/* 
  iNEX - Premium Agency Styles 
  No frameworks, pure performance.
*/

:root {
    /* Colors - Default Light (Refined for Professional Look) */
    --color-bg: #FFFFFF;
    /* Pure white background */
    --color-text: #111827;
    /* Near black for better readability */
    --color-surface: #F3F4F6;
    /* Light gray for cards to pop against white */
    --color-primary: #C2410C;
    /* Deep Orange 700 - WCAG AA Pass on White */
    --color-primary-hover: #9A3412;
    /* Orange 800 */
    --color-border: rgba(0, 0, 0, 0.08);
    /* More subtle border */

    /* Code Section Theme Vars */
    --color-code-bg: #F3F4F6;
    --color-code-text: #111827;
    --color-code-input-bg: #FFFFFF;

    /* Gradient Text Vars (Light Mode Default) */
    --grad-start: #000000;
    --grad-end: #4B5563;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;
}

/* Dark Theme Override */
[data-theme="dark"] {
    --color-bg: #000000;
    /* Pitch Black */
    --color-text: #ffffff;
    /* Pure White */
    --color-surface: #0a0a0a;
    /* Very slightly lighter for cards */
    --color-primary: #EAB308;
    --color-primary-hover: #CA8A04;
    --color-border: rgba(255, 255, 255, 0.15);
    /* More visible border */

    --color-code-bg: #000000;
    --color-code-text: #FFFFFF;
    --color-code-input-bg: #111111;

    --grad-start: #ffffff;
    --grad-end: #a1a1aa;
}

/* System Dark Mode Preference */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --color-bg: #000000;
        --color-text: #ffffff;
        --color-surface: #0a0a0a;
        --color-primary: #EAB308;
        --color-primary-hover: #CA8A04;
        --color-border: rgba(255, 255, 255, 0.15);

        --color-code-bg: #000000;
        --color-code-text: #FFFFFF;
        --color-code-input-bg: #111111;

        --grad-start: #ffffff;
        --grad-end: #a1a1aa;
    }
}

/* ... (Reset and Base styles remain same until Cards) ... */

/* Cards & FAQ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.card {
    background: var(--color-surface);
    padding: 48px;
    border-radius: 12px;
    /* Softer corners */
    border: 1px solid var(--color-border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy professional transition */
    overflow: hidden;
    position: relative;
    /* Light Mode Default Shadow */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Dark Mode Specifc Card Styles */
[data-theme="dark"] .card {
    box-shadow: none;
}

[data-theme="dark"] .card:hover {
    box-shadow: 0 0 30px rgba(234, 179, 8, 0.15);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .card {
        box-shadow: none;
    }

    :root:not([data-theme="light"]) .card:hover {
        box-shadow: 0 0 30px rgba(234, 179, 8, 0.15);
    }
}


/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-primary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-primary);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body.hovering .cursor-outline {
    width: 60px;
    height: 60px;
    background-color: rgba(234, 179, 8, 0.1);
}

/* Transitions */
body {
    opacity: 0;
    animation: fadeInPage 0.5s ease-out forwards;
}

@keyframes fadeInPage {
    to {
        opacity: 1;
    }
}

body.fade-out {
    opacity: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Background Utilities */
.bg-noise {
    background-color: #000000 !important;
    /* Force Pitch Black */
    background-image: none;
    min-height: 100vh;
    color: var(--color-text);
}

.login-input {
    background: #0a0a0a;
    /* Darker input */
    caret-color: var(--color-primary);
    color: var(--color-text);
    border-color: var(--color-border);
}

.glow-orb {
    position: absolute;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.section {
    padding: 120px 0;
}

.text-gradient {
    background: linear-gradient(135deg, var(--grad-start) 0%, var(--grad-end) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}



h1,
h2,
h3,
h4 {
    letter-spacing: -0.03em;
    font-weight: 700;
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
}

h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    letter-spacing: -0.01em;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #000;
}

/* Cyberpunk Glitch Effect on Hover */
.btn-primary:hover {
    background-color: var(--color-primary-hover);
    animation: glitch-skew 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
    box-shadow: 4px 4px 0px rgba(255, 0, 80, 0.7), -4px -4px 0px rgba(0, 255, 255, 0.7);
    transform: translateY(-2px);
}

@keyframes glitch-skew {
    0% {
        transform: translate(0) skew(0deg);
    }

    20% {
        transform: translate(-2px, 2px) skew(2deg);
    }

    40% {
        transform: translate(-2px, -2px) skew(-2deg);
    }

    60% {
        transform: translate(2px, 2px) skew(2deg);
    }

    80% {
        transform: translate(2px, -2px) skew(-2deg);
    }

    100% {
        transform: translate(0) skew(0deg);
    }
}

.btn-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Header - Z-INDEX 1000 */
.header {
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    background-color: rgba(10, 10, 10, 0.8);
}

@media (prefers-color-scheme: light) {
    .header {
        background-color: rgba(255, 255, 255, 0.8);
    }
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 100px;
    width: auto;
    /* Invert colors:
       If PNG is transparent with black text -> Invert makes it white text.
       If PNG has white bg -> Invert makes bg black, mix-blend-mode hides it.
       Hue rotate corrects yellow accent if present.
    */
    filter: invert(1) hue-rotate(180deg);
    mix-blend-mode: screen;
}

/* Light mode support: Reset filter */
@media (prefers-color-scheme: light) {
    .logo-img {
        /* If dark text on transparent, no filter needed.
           If white bg, mix-blend-mode might be needed to multiply?
           Let's assume standard dark logo usage. */
        filter: none;
        mix-blend-mode: normal;
    }
}


.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.6;
    position: relative;
}

.nav-links a:hover {
    opacity: 1;
}

/* ACTIVE STATE FIX - ensure color-primary is applied */
.nav-links a.active {
    opacity: 1;
    color: var(--color-primary);
}

/* Underline removed per user request */
.nav-links a.active::after {
    display: none;
}

/* Dropdown Menu Styles */
.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: -10px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    min-width: 220px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1100;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 10px 16px;
    font-size: 0.9rem;
    color: var(--color-text);
    border-radius: 6px;
    display: block;
    width: 100%;
    opacity: 0.8 !important;
    text-align: left;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    /* Light hover effect */
    color: var(--color-primary);
    opacity: 1 !important;
    transform: translateX(4px);
}

/* Light Mode Hover Highlight */
:root[data-theme="light"] .dropdown-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Dropdown Arrow/Indicator */
.nav-link-trigger::after {
    content: ' ▾';
    font-size: 0.7em;
    margin-left: 4px;
    opacity: 0.7;
    transition: transform 0.2s;
    display: inline-block;
}

.nav-item:hover .nav-link-trigger::after {
    transform: rotate(180deg);
}

/* Hero - FIX Z-INDEX LAYERING */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--header-height);
    overflow: hidden;
}

.hero-content {
    max-width: 900px;
    z-index: 10;
    position: relative;
}

/* Ensure text is above */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    object-fit: cover;
    opacity: 0.4;
    filter: grayscale(100%) contrast(1.2);
}

/* Vanta canvas usually appends to element, ensuring it's z-index 0 or 1 */
#vanta-hero canvas {
    z-index: 1 !important;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.5;
}

/* Marquee */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    padding: 60px 0;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}

.marquee-content {
    display: flex;
    gap: 80px;
    animation: marquee 40s linear infinite;
}

.marquee-logo {
    display: inline-block;
    height: 80px;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
    cursor: pointer;
}

.marquee-logo:hover {
    opacity: 1;
    transform: scale(1.1);
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Cards & FAQ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.card {
    background: var(--color-surface);
    padding: 48px;
    border-radius: 2px;
    border: 1px solid var(--color-border);
    transition: transform 0.1s ease;
    overflow: hidden;
}

/* CSS file content check recommended first */

.accordion {
    max-width: 800px;
    margin: 0 auto;
}

/* Premium FAQ Styles */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-sans);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0.8;
}

.faq-answer p {
    padding: 0 24px 24px;
    line-height: 1.6;
    margin: 0;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    /* Arbitrary large height */
}

/* Reusing existing accordion for other parts if needed */
.accordion-item {

    .accordion-item {
        border-bottom: 1px solid var(--color-border);
    }

    .accordion-header {
        padding: 24px 0;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-weight: 600;
        font-size: 1.1rem;
    }

    .accordion-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        opacity: 0.8;
    }

    .accordion-item.active .accordion-content {
        max-height: 500px;
    }

    .process-step {
        border-left: 1px solid var(--color-border);
        padding-left: 40px;
        margin-bottom: 60px;
        position: relative;
        /* transition: background 0.3s ease, color 0.3s ease; */
    }

    /* We Speak Code Section - Dynamic Theme */
    .section-code {
        background-color: var(--color-code-bg);
        color: var(--color-code-text);
        overflow: hidden;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    .code-editor-box {
        background: var(--color-code-bg);
        border: 1px solid var(--color-border);
        border-radius: 8px;
        padding: 24px;
        font-family: 'Courier New', monospace;
    }

    .code-input-field {
        background: var(--color-code-input-bg);
        border: none;
        border-bottom: 1px solid var(--color-border);
        color: #EAB308;
        font-family: inherit;
        font-size: 1rem;
        width: 100px;
        padding: 4px;
    }


    /* Header Visibility Fix */
    .header {
        background: rgba(var(--color-bg-rgb, 255, 255, 255), 0.85);
        /* Use RGB if possible or fallback */
        background: var(--color-bg);
        /* Fallback solidity */
        /* Ensure decent contrast by using main bg color with slight transparency */
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--color-border);
    }

    /* Light Mode Header: Revert to semi-transparent */
    /* The base class .header already handles blur and rgba background */
    :root[data-theme="light"] .header {
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(12px);
    }

    @media (prefers-color-scheme: light) {
        :root:not([data-theme="dark"]) .header {
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(12px);
        }
    }

    /* Dark Mode Logo Handling:
   If logo is white-text based, it needs inversion on light mode IF the background is white.
   Assuming current logo is for DARK mode (white text).
*/

    /* 
   Logic for Logo: 
   Reverting to the clean Transparent PNG.
   1. Dark Mode: Shift Orange line (30deg) to Golden Amber (50deg).
      - using 22deg rotation.
   2. Light Mode: Invert to Charcoal text + Blue line. 
      - using 192deg rotation to avoid green tint.
*/

    /* Default (Dark Mode) */
    .logo-img {
        content: normal;
        /* Reset content */
        filter: hue-rotate(22deg);
        /* Shift Orange to Golden Yellow */
        transition: filter 0.3s ease;
        mix-blend-mode: normal;
    }

    /* Light Mode */
    :root[data-theme="light"] .logo-img {
        /* Invert to dark charcoal (0.85), then rotate line to yellow */
        filter: invert(0.85) hue-rotate(192deg) saturate(3) contrast(1.1);
        mix-blend-mode: normal;
    }

    /* Double check system preference if no data-theme */
    @media (prefers-color-scheme: light) {
        :root:not([data-theme="dark"]) .logo-img {
            content: normal;
            filter: invert(0.85) hue-rotate(192deg) saturate(3) contrast(1.1);
            mix-blend-mode: normal;
        }
    }

    .footer-logo {
        height: 150px;
        width: auto;
        display: block;
        margin-bottom: 16px;
        /* Default Dark Mode Footer Logo */
        content: normal;
        filter: hue-rotate(22deg);
        mix-blend-mode: normal;
    }

    /* Ensure footer logo adapts to light mode same as header */
    :root[data-theme="light"] .footer-logo {
        content: normal;
        filter: invert(0.85) hue-rotate(192deg) saturate(3) contrast(1.1);
    }

    @media (prefers-color-scheme: light) {
        :root:not([data-theme="dark"]) .footer-logo {
            content: normal;
            filter: invert(0.85) hue-rotate(192deg) saturate(3) contrast(1.1);
        }
    }

    /* Symmetrical Footer Grid */
    .footer-grid {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        align-items: center;
        gap: 24px;
    }

    @media (max-width: 768px) {
        .footer-grid {
            display: flex;
            flex-direction: column;
            text-align: center;
            gap: 32px;
        }
    }

    .process-step:last-child {
        border-left: none;
        margin-bottom: 0;
    }

    .process-number {
        position: absolute;
        left: -20px;
        top: 0;
        width: 40px;
        height: 40px;
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        color: var(--color-primary);
    }

    .form-input,
    .form-textarea {
        width: 100%;
        padding: 18px;
        background: var(--color-surface);
        /* Updated to use surface for better visibility */
        border: 1px solid var(--color-border);
        border-radius: 4px;
        color: var(--color-text);
        font-family: inherit;
        font-size: 1rem;
    }

    .form-input:focus,
    .form-textarea:focus {
        outline: none;
        border-color: var(--color-primary);
    }

    .footer {
        padding: 80px 0;
        border-top: 1px solid var(--color-border);
        background: var(--color-surface);
    }

    .back-to-top {
        position: fixed;
        bottom: 30px;
        right: 30px;
        width: 50px;
        height: 50px;
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--color-primary);
        cursor: pointer;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s;
        z-index: 10000;
        /* Highest priority */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .back-to-top.visible {
        opacity: 1;
        transform: translateY(0);
    }

    /* Modals */
    .modal {
        display: none;
        position: fixed;
        z-index: 2000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow-y: auto;
        background-color: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(8px);
        /* display: none;  Removed duplicate */
        align-items: center;
        justify-content: center;
    }

    .modal-content {
        background-color: var(--color-surface);
        margin: 40px auto;
        padding: 32px;
        border: 1px solid var(--color-border);
        width: 90%;
        max-width: 500px;
        max-height: 85vh;
        overflow-y: auto;
        border-radius: 12px;
        position: relative;
        animation: scaleUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    }

    @keyframes scaleUp {
        from {
            transform: scale(0.9);
            opacity: 0;
        }

        to {
            transform: scale(1);
            opacity: 1;
        }
    }

    .close-modal {
        color: var(--color-text);
        position: absolute;
        top: 16px;
        right: 20px;
        font-size: 24px;
        font-weight: bold;
        cursor: pointer;
        line-height: 1;
        z-index: 10;
    }

    .close-modal:hover {
        color: var(--color-primary);
    }

    .time-slot {
        padding: 12px;
        border: 1px solid var(--color-border);
        border-radius: 4px;
        cursor: pointer;
        transition: background 0.2s;
        text-align: center;
    }

    .time-slot:hover {
        border-color: var(--color-primary);
    }

    .fade-up {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }

    .fade-up.visible {
        opacity: 1;
        transform: translateY(0);
    }

    /* Feature 8: Comparison Slider */
    .comparison-slider {
        position: relative;
        width: 100%;
        height: 400px;
        overflow: hidden;
        border-radius: 8px;
        border: 1px solid var(--color-border);
    }

    .before-image,
    .after-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .after-image {
        clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
        z-index: 2;
    }

    .slider-range {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 200;
        /* Increased to ensure clickability */
        opacity: 0;
        cursor: ew-resize;
    }

    .slider-handle {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        width: 2px;
        background: var(--color-primary);
        z-index: 150;
        pointer-events: none;
    }

    .slider-handle::after {
        content: '< >';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: var(--color-primary);
        color: #000;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    /* Social Links */
    .social-links {
        display: flex;
        gap: 12px;
        align-items: center;
        margin-top: 12px;
    }

    .social-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 1px solid var(--color-border);
        color: var(--color-text);
        transition: all 0.3s ease;
        opacity: 0.8;
    }

    .social-link:hover {
        border-color: var(--color-primary);
        background: var(--color-primary);
        color: #000;
        /* Black for visibility on amber */
        transform: translateY(-3px);
        opacity: 1;
    }

    .social-link svg {
        width: 20px;
        height: 20px;
        stroke-width: 2;
    }

    /* Mobile Responsiveness Fixes */
    /* --- Mobile Navigation Toggle --- */
    .mobile-nav-toggle {
        display: none;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 10001;
        padding: 10px;
    }

    .mobile-nav-toggle span {
        display: block;
        width: 25px;
        height: 2px;
        background-color: var(--color-text);
        margin-bottom: 5px;
        transition: all 0.3s ease;
    }

    /* Transform Hamburger to X when active */
    body.nav-open .mobile-nav-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    body.nav-open .mobile-nav-toggle span:nth-child(2) {
        opacity: 0;
    }

    body.nav-open .mobile-nav-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    @media (max-width: 768px) {

        /* Navigation: Slide Out Menu */
        .mobile-nav-toggle {
            display: block;
            /* Show hamburger */
        }

        .nav-links {
            position: fixed;
            top: 0;
            right: 0;
            height: 100vh;
            width: 75%;
            background-color: var(--color-bg);
            border-left: 1px solid var(--color-border);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 32px;
            transform: translateX(100%);
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 10000;
            box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        }

        .nav-links.active {
            transform: translateX(0);
        }

        .nav-links a {
            font-size: 1.5rem;
        }

        /* Hide Language/Login in Header on Mobile for cleanliness */
        .header-inner>div:last-child {
            display: none !important;
        }

        /* Dashboard: Stack Sidebar and Content */
        .app-layout {
            flex-direction: column;
        }

        .sidebar {
            width: 100%;
            height: auto;
            min-height: auto;
            border-right: none;
            border-bottom: 1px solid var(--color-border);
            padding: 16px;
        }

        /* Stats: Stack Cards */
        .stats-grid {
            grid-template-columns: 1fr;
        }

        /* Admin Grid: Stack Cards */
        .client-grid {
            grid-template-columns: 1fr;
        }

        /* Navigation: Adjust for smaller screens */
        .header-inner {
            padding: 0 16px;
        }

        h1 {
            font-size: 2.5rem;
            /* Smaller H1 */
        }

        /* Adjust Modals */
        .modal-content {
            width: 95%;
            margin: 20px auto;
            padding: 20px;
        }

        /* Hide Custom Cursor on Mobile */
        .cursor-dot,
        .cursor-outline {
            display: none !important;
        }

        /* Mobile Menu Extras (Lang, Theme, Login) */
        .mobile-menu-extras {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 24px;
            margin-top: 32px;
            border-top: 1px solid var(--color-border);
            padding-top: 32px;
            width: 80%;
        }

        /* --- Admin & Dashboard Mobile Polish --- */

        /* Global Layout Fixes */
        .admin-layout,
        .dashboard-content {
            padding: 20px !important;
        }

        /* Admin Header Stack */
        .admin-header {
            flex-direction: column;
            gap: 20px;
            align-items: flex-start !important;
        }

        .admin-header>div {
            width: 100%;
            justify-content: space-between;
        }

        /* Dashboard Header Stack */
        .dashboard-content header {
            flex-direction: column;
            align-items: flex-start !important;
            gap: 20px;
        }

        .dashboard-content header>div {
            width: 100%;
        }

        /* Invoice Rows on Mobile */
        .invoice-row {
            flex-direction: column;
            align-items: flex-start;
            gap: 12px;
        }

        .invoice-row>div:last-child {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            text-align: left !important;
        }
    }
}

/* Hide Mobile Extras on Desktop */
@media (min-width: 769px) {
    .mobile-menu-extras {
        display: none;
    }
}

/* --- PROFESSIONAL FOOTER --- */
.footer {
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
    padding: 80px 0 40px;
    font-size: 0.95rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--color-text);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: var(--color-text);
    opacity: 0.6;
    text-decoration: none;
    transition: opacity 0.2s, color 0.2s;
}

.footer-link:hover {
    opacity: 1;
    color: var(--color-primary);
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    opacity: 0.6;
}

@media (max-width: 900px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 600px) {
    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
    }
}

/* --- Accessibility Fixes (Lighthouse) --- */
.mobile-nav-toggle,
.theme-toggle-btn,
.social-link,
button {
    min-width: 48px;
    min-height: 48px;
    touch-action: manipulation;
}

.nav-links a {
    padding: 12px 16px;
    display: inline-block;
}

.footer-link {
    padding: 8px 0;
    display: inline-block;
}/* --- Code Section Input --- */
.code-input-field {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-family: var(--font-mono, monospace);
    font-size: 1rem;
    width: 90px;
    padding: 0 4px;
    font-weight: 600;
    transition: all 0.2s;
}

.code-input-field:focus {
    outline: none;
    border-bottom-color: var(--color-text);
    background: rgba(255, 255, 255, 0.05);
}

/* Ensure Header Button Visibility */
.header .btn-primary {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* Fix Mobile Toggle White Box Issue */
/* Ensure it is absolutely hidden on desktop */
@media (min-width: 769px) {
    .mobile-nav-toggle {
        display: none !important;
    }
}
