/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&family=Quicksand:wght@500;700&display=swap');

/* Root Variables from your existing style.css for consistency */
:root {
  --primary-color: #5162d4;
  --secondary-color: #6BCEBB;
  --background-color: #ffffff;
  --text-color: #2A2D3E;
  --card-bg: #ffffff;
  --card-secondary-bg: #F7F9FC;
  --shadow: 0 10px 30px rgba(37, 45, 90, 0.07);
  --border-radius: 14px;
}

/* Base Body & HTML styles for scroll snapping */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Nunito', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    height: 100%;
    overflow: hidden; /* Prevent body from scrolling */
}

.header-title-container {
    text-align: left;
    display: flex;
    align-items: center;
}

/* === Logo Styling Fix === */
/* Remove the generic .app-logo rule that sets a fixed height */

.app-logo-desktop {
    display: block; /* Visible by default */
    width: 180px;
    height: auto;
    filter: brightness(0) saturate(100%);
    transition: filter 0.4s ease-in-out;
}

.app-logo-mobile {
    display: none; /* Hidden by default */
    width: 40px;
    height: auto;
    filter: brightness(0) saturate(100%);
    transition: filter 0.4s ease-in-out;
}

/* When the header has the .header-inverted class, this rule applies */
.main-header.header-inverted .app-logo-desktop,
.main-header.header-inverted .app-logo-mobile {
    filter: brightness(0) saturate(100%) invert(1);
}

header h1 {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.5px;
  color: var(--text-color); /* Using your existing dark text color for a modern, strong contrast */
  font-weight: 600; /* Poppins looks clean and modern at 600 (Semi-Bold) or 700 (Bold) */
}

.scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory; /* The magic! */
    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.scroll-container::-webkit-scrollbar {
    display: none;
}

.scroll-section {
    height: 100vh;
    width: 100vw;
    scroll-snap-align: start; /* Snap to the start of each section */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-sizing: border-box;
    padding: 0 5%;
}

.scroll-section .subtitle {
    font-size: 1.2rem;
    color: #555;
    max-width: 800px; /* Increased from 600px */
    margin: 0 auto 2.5rem auto; /* Centering the subtitle */
    line-height: 1.6;
}

/* Header Styles */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-sizing: border-box;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.main-header.header-inverted {
    background: var(--primary-color);
    backdrop-filter: none;
}

.main-header.header-inverted h1,
.main-header.header-inverted .nav-link {
    color: #ffffff;
}

.main-header.header-inverted .nav-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

.main-header.header-inverted .btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.main-header.header-inverted .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.main-header.header-inverted .btn-primary {
    background: #ffffff;
    color: var(--primary-color);
}

.logo {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.main-header nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* General Section & Content Styling */
.section-content {
    text-align: center;
    max-width: 1000px;
}

h1 {
    font-family: 'Quicksand', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    margin-right: 2.4rem;
}

h2 {
    font-family: 'Quicksand', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 2.5rem;
}

.subtitle {
    font-size: 1.25rem;
    color: #555;
    max-width: 600px;
    margin-left: 0rem;
    margin-right: 2.2rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* Button Styles (from your app) */
.btn {
    text-decoration: none;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(80, 101, 229, 0.2);
}
.btn-primary:hover {
    background: #3F51E0;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(80, 101, 229, 0.3);
}

.btn-secondary {
    background: var(--card-secondary-bg);
    color: var(--text-color);
    border: 1px solid #e0e0e0;
}
.btn-secondary:hover {
    background: #e9e9e9;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Hero Section with Video */
.hero-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    width: 100%;
    max-width: 1200px;
}

.hero-bg-video {
    position: absolute;
    top: 0;
    right: 0;
    width: 40vw;
    height: 100vh;
    object-fit: cover;
    z-index: 1;
    filter: blur(3px);
    pointer-events: none;
    touch-action: none;
}

.hero-text {
    position: relative;
    z-index: 2;
    width: 40vw;
    min-width: 320px;
    padding: 0 4vw 0 2vw; /* left and right padding for spacing */
    color: var(--primary-color);
    background: transparent;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100vh;
    /* Ensure text area allows scrolling */
    pointer-events: auto;
    align-items: flex-start; /* Add this to prevent items from stretching */
}


.hero-visual {
    flex-shrink: 0;
}

.phone-mockup {
    position: relative;
    width: 280px; /* 9:16 aspect ratio, e.g., 280px width */
    height: 606px; /* 280 * (16/9) + padding */
    background: #111;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3), inset 0 0 2px rgba(255,255,255,0.2);
}

.demo-video {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    object-fit: cover;
    filter: blur(2px);
}


/* Features Section */
#features {
    background-color: var(--card-bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem; /* Increased from 2rem */
    margin-top: 2rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.feature-card h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-top: 0;
}

.feature-list {
    list-style: none;
    padding-left: 0;
    text-align: left;
    margin-top: 1rem;
}

.feature-list li {
    padding-left: 1.8rem;
    position: relative;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.feature-list li::before {
    content: '\2714'; /* Unicode for a checkmark */
    position: absolute;
    left: 0;
    top: 0;
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.2rem; /* Adjusted size for better visibility */
}


/* Originals Section Styling */
.originals-section {
    background-color: var(--primary-color);
}

.originals-section h2,
.originals-section .subtitle {
    color: #ffffff;
}

.originals-container {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    padding: 0 10px; /* Add horizontal padding to create space from edges */

}

.original-box {
    background: var(--card-bg);
    color: var(--primary-color);
    padding: 2.5rem;
    border-radius: 20px;
    flex: 1;
    box-shadow: var(--shadow);
}

.original-box h3 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.original-box p {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1rem;
}


/* Scroll Down Arrow Animation */
.scroll-down-container {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-down-arrow {
    width: 20px;
    height: 20px;
    border: solid var(--text-color);
    border-width: 0 3px 3px 0; /* Creates the arrow shape */
    animation: scroll 2s infinite;
    margin: 0 auto;
}

@keyframes scroll {
    0% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(5px) rotate(45deg); }
    100% { transform: translateY(0) rotate(45deg); }
}


/* Language Dropdown Styles */
.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    transition: background-color 0.3s ease, color 0.4s ease;
}

.language-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.main-header.header-inverted .language-toggle {
    color: #ffffff;
}

.main-header.header-inverted .language-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.language-icon {
    font-size: 16px;
}

.current-language {
    font-weight: 500;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.language-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.language-dropdown.active .language-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-radius: 6px;
    margin: 4px;
}

.language-option:hover {
    background-color: #f5f5f5;
}

.language-option .flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    object-position: center;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    display: block;
}

.language-flag-display {
    width: 20px;
    height: 15px;
    object-fit: cover;
    object-position: center;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0; /* Prevents shrinking */
    display: block;
}

/* For high-DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .language-flag-display,
    .language-option .flag {
        /* CSS size remains the same, but serve 2x images if available */
    }
}

/* How It Works Section */
.steps-container {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    margin-top: 3rem;
}

.step {
    max-width: 250px;
}

.step-number {
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    text-align: center;
    margin: 0 auto 1rem auto;
}


.step-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.step h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}


.about-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-top: 0rem;
    color: #ffffff;
    max-width: 800px;
    margin-left: max(auto, 5px);
    margin-right: max(auto, 5px);
}

.about-container-vertical {
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
    margin-top: 0rem;
}

.about-image img {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.about-text {
    text-align: left;
    max-width: 500px;
    color: #ffffff;
}

.about-text h3 {
    font-size: 1.8rem;
    font-family: 'Quicksand', sans-serif;
    color: var(--primary-color);
    color: #ffffff;
    margin-top: 0;
}


.about-text h4 {
    font-size: 1.0rem;
    font-family: 'Quicksand', sans-serif;
    color: var(--primary-color);
    color: #ffffff;
    margin-top: 0;
}

.about-text p {
    font-size: 1rem;
    line-height: 1.7;
    color: #ffffff;
}


/* CTA Section with Footer */
/* CTA Section with Footer */
#cta.scroll-section {
    padding: 0;
    align-items: stretch;
    justify-content: flex-start;
}

.cta-flex-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100vh;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 5% 0 5%;
    box-sizing: border-box;
}

.cta-content {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.cta-footer {
    width: 100%;
    margin-top: auto;
    padding: 1rem 0;
}

/* Dynamic Logo Styles */
.app-logo .logo-text {
    fill: #000000; /* Default black text */
    transition: fill 0.3s ease-in-out;
}

/* When header has inverted class, change logo text to white */
.header-nav-inv .app-logo .logo-text {
    fill: #FFFFFF; /* White text for inverted header */
}

/* Optional: If you want to change it based on scroll or other states */
.main-header.scrolled .app-logo .logo-text {
    fill: #5162d4; /* Purple text when scrolled */
}

/* === Dynamic Logo Styling === */
.app-logo {
    height: auto;
    /* This filter makes the SVG black by default */
    filter: brightness(0) saturate(100%);
    transition: filter 0.4s ease-in-out;
}


/* When the header has the .header-inverted class, this rule applies */
.main-header.header-inverted .app-logo {
    /* This chain inverts the black color to white */
    filter: brightness(0) saturate(100%) invert(1);
}

/* Responsive Design */
@media (max-width: 768px) {

    h1 { font-size: 1.4rem; margin-right: 0; text-align: center; }
    h2 { font-size: 1.2rem; }
    h3 { font-size: 1.0rem; }

    .subtitle, .scroll-section .subtitle {
        font-size: 0.9rem;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 20px;
    }

    .scroll-down-arrow {
        display: none !important;
    }

    .scroll-section {
        height: 100vh;
        width: 100vw;
        scroll-snap-align: start;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        position: relative;
        box-sizing: border-box;
        padding: 0 0 0 0; /* Remove horizontal padding */
        overflow: hidden; /* Prevent content from overflowing into next section */
    }

    /* Only apply top padding to scroll-sections except the hero */
    .scroll-section:not(#hero) {
        padding-top: 60px; /* Adjust as needed to match your header height */
    }

    .scroll-section#hero {
        padding-top: 0;
    }        

    .app-logo-desktop {
        display: none; /* Hide desktop logo on mobile */
    }
    .app-logo-mobile {
        display: block; /* Show mobile logo */
        width: 45px; /* Adjusted size for mobile */
    }

    .main-header {
        flex-direction: row; /* Changed from column */
        padding: 0.5rem 1rem;
        justify-content: space-between;
        align-items: center; /* Added to vertically align items */
    }

    .header-title-container {
        display: flex; /* Hide logo and title on mobile for simplicity */
    }

    .header-title-container div {
        display: none; /* Hide the div containing the h1 title */
    }    

    .main-header nav {
        gap: 0.5rem;
    }
    
    /* Hide some nav links on mobile to save space */
    .nav-link[href$="#how-it-works"],
    .nav-link[href$="#about"],
    .nav-link[href$="#hero"],    
    .nav-link[href$="#originals"],
    .nav-link[href$="#features"] {
        display: none;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }

    /* Hide the flag in the language dropdown on mobile */
    .language-flag-display {
        display: none;
    }

    /* Hero Section */


    .hero-layout {
        position: relative;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        width: 100vw;
        height: 100vh;
        overflow: hidden;
        gap: 2rem;

    }

    .hero-bg-video {
        position: absolute;
        top: 0;
        right: 0;
        width: 100vw;
        height: 100vh;
        object-fit: cover;
        z-index: 1;
        filter: blur(3px);
        pointer-events: none;
    }

    .hero-text {
        position: relative;
        z-index: 2;
        width: 85vw;
        height: auto;
        display: flex;
        margin-top:10rem;   
        max-width: 450px; /* Optional: prevents the box from being too wide on tablets */
        padding: 1.5rem;        
        color: var(--text-color); /* Use default text color for contrast */
        background: rgba(255, 255, 255, 0.9); /* Semi-transparent white background */
        text-align: left;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow);
        box-sizing: border-box;
    }

    .hero-text h1 {
        font-size: min(3.5vh, 18px);
    }

    .hero-text .subtitle {
        font-size: min(2.vh, 15px);
    }    

    /* Hide phone mockup on mobile */
    .hero-visual, .phone-mockup {
        display: none !important;
    }

    .hero-visual {
        order: 1; /* Visual on top */
    }

    .phone-mockup {
        height: 45vh; /* 40% of viewport height */
        width: calc(45vh * 9 / 19.5); /* Maintain 9:19.5 aspect ratio */
        min-width: 140px;
        max-width: 95vw;
        padding: 10px;
        border-radius: 30px;
        margin: 0 auto;
    }

    .demo-video {
        border-radius: 20px;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Originals Section */
    .originals-container {
        flex-direction: column;
        gap: 0.8rem;
        font-size: 0.95rem;
        margin-top: 0px;        
    }

    .original-box {
        padding: 0.9rem;
        border-radius: 14px;
        font-size: 1.0rem;
    }

    .original-box h3 {
        font-size: 1.2rem;
        margin-top: 0;
        margin-bottom: 0.5rem;
    }

    .original-box p {
        color: var(--text-color);
        line-height: 1.6;
        font-size: 0.8rem;
    }


    /* Features Section */

    #features {
        padding-left: 10px;
        padding-right: 10px;
        align-items: center;
    }

    #features h2 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    #features p {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.0rem;
    }

    .feature-card {
        padding: 0.5rem;
        border-radius: 12px;
        font-size: 0.8rem;
        margin: 0 0.5rem;
    }

    .feature-list {
        list-style: none;
        padding-left: 0;
        text-align: left;
        margin-top: 0.5rem;
    }

    .feature-list li {
        padding-left: 1.8rem;
        position: relative;
        margin-bottom: 0.5rem;
        line-height: 1.5;
    }

    .feature-card h3 {
        font-size: 0.9rem;
    }

    /* How it works section */
    .steps-container {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
    }

    /* About Section */
    .about-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        margin-left: auto;
        margin-right: auto;    
        padding: 0 10px; /* Add horizontal padding to create space from edges */

    }

    .about-text {
        text-align: center;
    }

    .about-text h3 {
        font-size: min(3.5vh, 26px);
    }

    .about-text h4 {
        font-size: min(2.2vh, 18px);
    }

    .about-text p {
        font-size: min(2.0vh, 16px);
        line-height: 1.4;
    }
  
    .about-image img {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        object-fit: cover;
        box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    }    
}