/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #000000;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 2px solid #dc3545;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 80px;
    min-height: 80px;
    max-height: 80px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    min-height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000000;
}

.logo a {
    color: #000000 !important;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    color: #000000;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav a:hover {
    color: #dc3545;
}

/* Main Content */
main {
    margin-top: 150px;
    min-height: calc(100vh - 160px);
    padding: 2rem 0;
}

/* Override for blog post pages */
body.blog-post-page main {
    margin-top: 100px !important;
    padding-top: 0.5rem !important;
}

/* Blog Post Styles */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 2rem;
}


/* Force blog post content below header */
body.blog-post-page .blog-post {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Emergency fix for header overlay - very aggressive */
body.blog-post-page {
    padding-top: 0 !important;
}


/* Ensure content scrolls under header properly */
body.blog-post-page .blog-post {
    position: relative;
    z-index: 1;
}

/* Make sure header stays on top during scroll */
header {
    position: fixed !important;
    z-index: 1000 !important;
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #dc3545;
}

.post-header h1 {
    font-size: 1.8rem;
    color: #000000;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.post-meta {
    display: flex;
    gap: 1rem;
    color: #666666;
    font-size: 0.9rem;
}

.post-meta .date {
    font-weight: bold;
    color: #dc3545;
}

.post-content {
    line-height: 1.8;
    color: #000000;
}

.post-content h2 {
    font-size: 1.8rem;
    color: #dc3545;
    margin: 2rem 0 1rem 0;
    border-left: 4px solid #dc3545;
    padding-left: 1rem;
}

.post-content h3 {
    font-size: 1.4rem;
    color: #000000;
    margin: 1.5rem 0 0.8rem 0;
}

.post-content h4 {
    font-size: 1.2rem;
    color: #000000;
    margin: 1.2rem 0 0.6rem 0;
}

.post-content p {
    margin-bottom: 1.2rem;
    text-align: justify;
}

.post-content ul, .post-content ol {
    margin: 1rem 0 1rem 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content strong {
    color: #dc3545;
    font-weight: bold;
}

.cta-section {
    background: #f8f9fa !important;
    border: 2px solid #dc3545 !important;
    border-radius: 8px !important;
    padding: 2rem !important;
    margin: 3rem 0 !important;
    text-align: center !important;
}

.cta-section h3 {
    color: #dc3545 !important;
    margin-bottom: 1rem !important;
}

.cta-section p {
    color: #000000 !important;
    margin-bottom: 1.5rem !important;
}

.cta-section .cta-button {
    background: #dc3545 !important;
    color: #ffffff !important;
    padding: 12px 24px !important;
    text-decoration: none !important;
    border-radius: 5px !important;
    font-weight: bold !important;
    display: inline-block !important;
    transition: background 0.3s ease !important;
}

.cta-section .cta-button:hover {
    background: #c82333 !important;
    color: #ffffff !important;
}

/* Responsive Blog Post Styles */
@media (max-width: 768px) {
    .blog-post {
        padding: 1rem;
        margin: 1rem;
    }
    
    .post-header h1 {
        font-size: 1.5rem;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
    }
    
    .post-content h3 {
        font-size: 1.2rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cta-section {
        padding: 1.5rem !important;
        margin: 2rem 0 !important;
    }
}

/* Hero Section */
.hero {
    background: #ffffff;
    color: #000000;
    padding: 4rem 0;
    text-align: center;
    border-bottom: 2px solid #dc3545;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.3s both;
}

.cta-button {
    display: inline-block;
    background: #dc3545;
    color: #ffffff;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: transform 0.3s ease;
    animation: fadeInUp 1s ease 0.6s both;
}

.cta-button:hover {
    transform: translateY(-2px);
    background: #c82333;
}

/* Content Sections */
.content-section {
    padding: 4rem 0;
    background: #ffffff;
    margin: 2rem 0;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.content-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #dc3545;
}

.content-section p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #dc3545;
}

.service-card p {
    text-align: left;
}

.service-link {
    display: inline-block;
    margin-top: 1rem;
    color: #dc3545;
    text-decoration: none;
    font-weight: bold;
}

.service-link:hover {
    color: #c82333;
}

/* Tech Stack */
.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.tech-item {
    background: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #dc3545;
    border: 1px solid #dc3545;
}

/* Auto-scrolling Tech Stack */
.tech-scroll-container {
    overflow: hidden;
    margin-top: 2rem;
    position: relative;
    background: #ffffff;
    border-radius: 10px;
    padding: 1rem 0;
    min-height: 100px;
    width: 100%;
}

.tech-scroll {
    display: flex;
    animation: scrollLeft 180s linear infinite;
    gap: 2rem;
    align-items: center;
    width: max-content;
    white-space: nowrap;
    animation-delay: 0s;
    animation-iteration-count: infinite;
}

.tech-item-scroll {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
    padding: 1rem;
    background: #ffffff;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.tech-item-scroll:hover {
    transform: scale(1.1);
}

.tech-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 0.5rem;
    filter: grayscale(0);
    transition: filter 0.3s ease;
}

.tech-item-scroll:hover .tech-icon {
    filter: grayscale(0) brightness(1.1);
}

.tech-item-scroll span {
    font-size: 0.9rem;
    font-weight: bold;
    color: #dc3545;
    text-align: center;
}

@keyframes scroll {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Alternative animation for better compatibility */
@keyframes scrollLeft {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Ensure animation is visible */
.tech-scroll-container .tech-scroll {
    animation: scrollLeft 180s linear infinite;
    animation-fill-mode: both;
}

/* Force visibility */
.tech-scroll-container {
    display: block !important;
    visibility: visible !important;
}

.tech-scroll {
    display: flex !important;
    visibility: visible !important;
}

/* Pause animation on hover */
.tech-scroll-container:hover .tech-scroll {
    animation-play-state: paused;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.blog-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.blog-content {
    padding: 1.5rem;
}

.blog-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #dc3545;
}

.blog-link {
    text-decoration: none;
    color: inherit;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #dc3545;
}

.submit-btn {
    background: #dc3545;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background: #c82333;
}

/* Contact Info */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    text-align: center;
}

.contact-item h3 {
    color: #dc3545;
    margin-bottom: 1rem;
}

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: white;
    border-radius: 50px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: whatsapp-pulse 2s infinite;
}

.whatsapp-float svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* WhatsApp Pulse Animation */
@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    }
    50% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.6), 0 0 0 10px rgba(37, 211, 102, 0.1);
    }
    100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    }
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed !important;
    width: 50px !important;
    height: 50px !important;
    bottom: 90px !important;
    right: 20px !important;
    background-color: #dc3545 !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.5) !important;
    z-index: 9999 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-size: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.scroll-to-top.show {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Button hidden by default, shown only when scrolling */

.scroll-to-top:hover {
    background-color: #5a6268;
    transform: scale(1.1);
}

/* Footer */
footer {
    background: #ffffff !important;
    color: #000000 !important;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 2px solid #dc3545;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav ul {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .services-grid,
    .blog-grid,
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .whatsapp-float,
    .scroll-top {
        right: 20px;
    }
    
    .scroll-top {
        bottom: 100px;
    }
}