/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 2rem 3rem;
    transition: all 0.3s ease;
}

.header.scrolled {
    padding: 1.5rem 3rem;
    /* Removed background and backdrop-filter for transparent header */
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 160px;
    width: auto;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.4)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.header.scrolled .logo {
    height: 100px;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero.active {
    pointer-events: auto;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video placeholder and loading optimization */
.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease; /* Faster transition */
}

.placeholder-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(2px) brightness(0.7); /* Reduced blur for better quality */
    transition: all 0.3s ease;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px; /* Smaller spinner */
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite; /* Faster animation */
    z-index: 3;
    opacity: 0.8;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Lazy image loading styles */
.lazy-image {
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
    background: transparent;
}

.lazy-image.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.lazy-image.loaded {
    opacity: 1;
    background: none;
}

.lazy-image.error {
    opacity: 0.7;
    background: #f5f5f5;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.lazy-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Video ending blur effect */
.video-ending .lazy-video {
    filter: blur(5px);
    transition: filter 1s ease;
}

.video-loaded .video-placeholder {
    opacity: 0;
    transition: opacity 0.4s ease; /* Faster transition */
    pointer-events: none;
}

.video-loaded .lazy-video {
    display: block !important;
    opacity: 1;
}

.video-loading .loading-spinner {
    display: block;
}

.video-loaded .loading-spinner {
    display: none;
    transition: opacity 0.3s ease;
}

.video-error .video-placeholder {
    opacity: 1;
    background: #333;
}

.video-error .loading-spinner {
    display: none;
}

.video-error .placeholder-img {
    opacity: 0.3;
    filter: grayscale(100%);
}

.video-error-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    z-index: 4;
    text-align: center;
    width: 100%;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    padding: 20px;
    box-sizing: border-box;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

/* Content Sections - these scroll normally */
.content-section {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    background: transparent;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.scroll-content {
    position: relative;
    z-index: 10;
    min-height: 400vh; /* 4 sections x 100vh */
}

.hero-content {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 4rem;
    max-width: 800px;
    text-align: right;
    z-index: 10;
}

.section-content {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 4rem;
    max-width: 800px;
    text-align: right;
    z-index: 10;
}

.video-content {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 4rem;
    max-width: 800px;
    text-align: right;
    z-index: 10;
}

/* Project Sections */
.project-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    overflow: hidden;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 2;
    pointer-events: none;
    cursor: pointer;
}

.project-section.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

/* Lazy image loading optimization */
.lazy-image {
    transition: opacity 0.3s ease;
    background: #f0f0f0;
}

.lazy-image[data-src] {
    opacity: 0.7;
    filter: blur(1px);
}

.lazy-image.loaded {
    opacity: 1;
    filter: none;
}

.lazy-image.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}



.section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.hero-quote {
    font-size: 45px;
    font-weight: 300;
    color: white;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.section-quote {
    font-size: 45px;
    font-weight: 300;
    color: white;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

/* Video Section */
.video-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    overflow: hidden;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 2;
    pointer-events: none;
    cursor: pointer;
}

.video-section.active {
    opacity: 1;
    pointer-events: auto;
}

.video-quote {
    font-size: 45px;
    font-weight: 300;
    color: white;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

/* About Section */
.about-section {
    padding: 8rem 0;
    background: #f8f9fa;
    position: relative;
    z-index: 20;
    margin-top: 100vh; /* Space for the fixed backgrounds */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-right {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: flex-start;
}

.founders-photo {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.founders-photo img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.founders-photo:hover img {
    transform: scale(1.02);
}

.founders-caption {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 60px; /* Ensure enough height for vertical centering */
}

.about-text h2 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.about-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #555;
    line-height: 1.8;
}



/* Services Section */
.services-section {
    padding: 8rem 0;
    background: white;
    position: relative;
    z-index: 20;
}

.services-section h2 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 4rem;
    text-align: center;
    color: #2c3e50;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 3rem 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.service-item {
    padding: 3rem 2.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.service-item h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.service-item p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.7;
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
}

.whatsapp-btn.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-btn svg {
    width: 30px;
    height: 30px;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 4rem 0 2rem;
    position: relative;
    z-index: 30;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.footer-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.footer-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-section p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #ecf0f1;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    color: white;
    transform: translateX(5px);
}

.social-links a:last-child {
    border-bottom: none;
}

.social-links svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: #bdc3c7;
    font-size: 0.9rem;
    margin: 0;
}



/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-quote,
    .section-quote,
    .video-quote {
        font-size: 38px;
    }
    
    .hero-content,
    .section-content,
    .video-content {
        max-width: 700px;
    }
    
    .services-grid {
        gap: 2.5rem 3rem;
    }
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 2.5rem;
        max-width: 600px;
    }
    
    .service-item {
        padding: 2.5rem;
    }
    
    .footer-info {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .social-links a {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1.5rem 2rem;
    }

    .header.scrolled {
        padding: 1rem 2rem;
    }

    .logo {
        height: 100px;
    }

    .header.scrolled .logo {
        height: 70px;
    }

    .hero-content,
    .section-content,
    .video-content {
        padding: 2rem;
        max-width: 100%;
        bottom: 40px; /* Move text 40px higher on mobile */
    }

    .hero-quote,
    .section-quote,
    .video-quote {
        font-size: 28px;
    }

    .container {
        padding: 0 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-right {
        gap: 2rem;
    }

    .founders-photo {
        max-width: 400px;
        margin: 0 auto;
    }

    .about-text h2,
    .services-section h2 {
        font-size: 2.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 2rem;
        max-width: 500px;
    }

    .service-item {
        padding: 2rem;
    }

    .whatsapp-btn {
        width: 55px;
        height: 55px;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .whatsapp-btn svg {
        width: 25px;
        height: 25px;
    }
    
    .footer {
        padding: 3rem 0 1.5rem;
    }
    
    .footer-content {
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .logo {
        height: 80px;
    }

    .header.scrolled .logo {
        height: 60px;
    }

    .hero-quote,
    .section-quote,
    .video-quote {
        font-size: 24px;
    }

    .about-text h2,
    .services-section h2 {
        font-size: 2rem;
    }

    .about-text p {
        font-size: 1.1rem;
    }

    .service-item h3 {
        font-size: 1.3rem;
    }

    .service-item p {
        font-size: 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 1.5rem;
        max-width: 400px;
    }

    .service-item {
        min-height: auto;
        padding: 2rem 1.5rem;
    }
}

/* Performance optimizations */
.carousel-slide img {
    will-change: opacity;
}

.carousel-btn {
    will-change: transform;
}

.logo {
    will-change: height;
}

/* Smooth scrolling for older browsers */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}