/* ==========================================================================
   CSS Variables & Tokens
   ========================================================================== */
:root {
    /* Color Palette */
    --color-bg: #ffffff;
    --color-bg-alt: #f8f9fa;
    --color-text: #1a1a1a;
    --color-text-light: #666666;
    --color-accent: #004948; /* Deep corporate teal */
    --color-accent-hover: #003333;
    --color-dark: #0a0a0a;
    --color-border: #e2e8f0;

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 3rem;
    --text-5xl: 4.5rem;

    /* Spacing */
    --space-2: 0.5rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Layout */
    --container-max: 1400px;
    --header-height: 80px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Global Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.section {
    padding: var(--space-24) 0;
}

/* ==========================================================================
   Typography & Utility Classes
   ========================================================================== */
.section-header {
    margin-bottom: var(--space-16);
    max-width: 800px;
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-6);
    line-height: 1.1;
}

.section-description {
    font-size: var(--text-xl);
    color: var(--color-text-light);
    font-weight: 300;
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4) var(--space-8);
    font-weight: 500;
    font-size: var(--text-base);
    transition: var(--transition-base);
    cursor: pointer;
    border: none;
    gap: var(--space-2);
}

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

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
}

.btn .arrow-icon {
    transition: transform var(--transition-base);
}

.btn:hover .arrow-icon {
    transform: translateX(4px);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: transparent;
    z-index: 1000;
    transition: background-color var(--transition-base), box-shadow var(--transition-base);
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header.scrolled .nav-link, 
.header.scrolled .logo,
.header.scrolled .region-selector, 
.header.scrolled .hamburger .bar {
    color: var(--color-text);
}

.header.scrolled .hamburger .bar {
    background-color: var(--color-text);
}

/* Para mantener color blanco cuando el hero es oscuro (antes del scroll) */
.header:not(.scrolled) {
    color: #fff;
}
.header:not(.scrolled) .hamburger .bar {
    background-color: #fff;
}

.header-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.img-logo-color {
    display: none;
}

.header.scrolled .img-logo-white {
    display: none;
}

.header.scrolled .img-logo-color {
    display: block;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: var(--space-8);
}

.nav-link {
    font-size: var(--text-sm);
    font-weight: 500;
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--color-accent);
    transition: width var(--transition-base);
}

.nav-link:hover::after {
    width: 100%;
}

.has-dropdown {
    position: relative;
    pointer-events: none; /* Prevent accidental container triggers */
}

.has-dropdown > .nav-link,
.has-dropdown .dropdown-menu {
    pointer-events: auto; /* Re-enable for specific interactive parts */
}

.dropdown-icon {
    margin-left: 2px;
    transition: transform var(--transition-fast);
}

.has-dropdown .nav-link:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background-color: var(--color-bg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
    padding: var(--space-4) 0;
    border-radius: 6px;
    z-index: 100;
    margin-top: 15px; /* Spans the gap to parent */
}

/* Invisible bridge restricted to the link text area */
.has-dropdown > .nav-link::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    right: 0;
    height: 15px;
}

/* Show menu only when link or menu itself is hovered */
.has-dropdown .nav-link:hover + .dropdown-menu,
.has-dropdown .dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: var(--space-2) var(--space-6);
    font-size: var(--text-sm);
    color: var(--color-text-light);
    transition: color var(--transition-fast), background-color var(--transition-fast), padding-left var(--transition-fast);
}

.dropdown-menu a:hover {
    color: var(--color-accent);
    background-color: var(--color-bg-alt);
    padding-left: calc(var(--space-6) + 4px);
}

.header.scrolled .dropdown-menu {
    background-color: var(--color-bg);
}

.header:not(.scrolled) .dropdown-menu a {
    color: var(--color-text-light); /* Keeps black text on white dropdown even if header is white */
}
.header:not(.scrolled) .dropdown-menu a:hover {
    color: var(--color-accent);
}

/* Mega Menu Extensions */
.mega-menu {
    position: static !important;
}

.dropdown-mega {
    left: 50% !important;
    width: calc(100vw - var(--space-8)) !important;
    max-width: 1200px !important;
    transform: translateX(-50%) translateY(10px) !important;
    padding: var(--space-8) var(--space-8) !important;
    border-top: 3px solid var(--color-accent);
}

.has-dropdown.mega-menu .nav-link:hover + .dropdown-mega,
.has-dropdown.mega-menu .dropdown-mega:hover {
    transform: translateX(-50%) translateY(0) !important;
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
}

.mega-column h4 {
    font-size: var(--text-base);
    font-weight: 800;
    color: var(--color-accent);
    margin-bottom: var(--space-4);
    letter-spacing: -0.01em;
}

.mega-spacer {
    display: block;
    height: var(--space-8);
}

.mega-column ul {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mega-column a {
    padding: var(--space-2) 0 !important;
}

.mega-column a:hover {
    padding-left: 6px !important;
    background-color: transparent !important;
}


.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.region-selector-wrapper {
    position: relative;
    display: inline-block;
}

.region-selector {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
    padding: 8px 12px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.05);
}

.header.scrolled .region-selector {
    background-color: rgba(0, 73, 72, 0.05);
}

.region-selector:hover {
    color: var(--color-accent);
    background-color: rgba(0, 73, 72, 0.1);
}

.flag-icon {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.region-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 220px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-base);
    z-index: 1000;
    padding: 8px 0;
}

.region-selector-wrapper:hover .region-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.region-dropdown li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--color-text);
    font-size: var(--text-sm);
    transition: var(--transition-fast);
}

.region-dropdown li a:hover {
    background-color: var(--color-bg-alt);
    color: var(--color-accent);
}

.globe-icon {
    flex-shrink: 0;
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    flex-direction: column;
    gap: 5px;
}

.hamburger .bar {
    width: 25px;
    height: 2px;
    background-color: var(--color-text);
    transition: var(--transition-base);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    background-color: var(--color-dark); /* Fallback */
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(10, 10, 10, 0.65), rgba(10, 10, 10, 0.85));
    z-index: 2;
}

.hero-background-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(10,10,10,1) 0%, rgba(10,10,10,0) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
    color: #fff;
}

.hero-title {
    font-size: var(--text-5xl);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-6);
    max-width: 900px;
}

.hero-subtitle {
    font-size: var(--text-xl);
    font-weight: 300;
    max-width: 600px;
    margin-bottom: var(--space-8);
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   Capabilities (Services grid)
   ========================================================================== */
.capabilities {
    background-color: var(--color-accent); /* #004948 */
    background-image: linear-gradient(rgba(0, 73, 72, 0.85), rgba(0, 73, 72, 0.95)), url('../img/capabilities-bg-dark.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.capabilities .section-title,
.capabilities .section-description {
    color: #ffffff;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-12) var(--space-8);
}

.service-card {
    position: relative;
    padding: var(--space-8) var(--space-6) var(--space-8) var(--space-6);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition-base);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    color: #ffffff;
    border: none;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
    filter: blur(4px);
    transform: scale(1.1); /* Hides blurred edges */
    transition: filter var(--transition-base), transform var(--transition-base);
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(10, 10, 10, 0.65), rgba(10, 10, 10, 0.9));
    z-index: 2;
    transition: background var(--transition-base);
}

.service-card > * {
    position: relative;
    z-index: 3;
}

/* Background mappings */
.card-consulting::before { background-image: url('../img/consulting.png'); }
.card-outsourcing::before { background-image: url('../img/outsourcing.png'); }
.card-ai::before { background-image: url('../img/ai.png'); }
.card-cloud::before { background-image: url('../img/cloud.png'); }
.card-networking::before { background-image: url('../img/networking.png'); }
.card-security::before { background-image: url('../img/security.png'); }
.card-support::before { background-image: url('../img/support.png'); }

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.service-card:hover::before {
    filter: blur(0px);
    transform: scale(1.15);
}

.service-card:hover::after {
    background: linear-gradient(rgba(10, 10, 10, 0.4), rgba(10, 10, 10, 0.7));
}

.service-icon {
    margin-bottom: var(--space-6);
}

.icon-placeholder {
    font-size: var(--text-base);
    font-weight: 800;
    color: #a3fffc; /* Light teal for dark bg */
    display: inline-block;
    padding-bottom: var(--space-2);
}

.service-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-4);
    letter-spacing: -0.01em;
    color: #ffffff;
}

.service-text {
    font-size: var(--text-base);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--space-8);
    font-weight: 400;
}

.service-link {
    font-weight: 600;
    font-size: var(--text-sm);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    transition: color var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-link span {
    transition: transform var(--transition-base);
}

.service-card:hover .service-link {
    color: #45fffc;
}

.service-card:hover .service-link span {
    transform: translateX(5px);
}

/* ==========================================================================
   Global Reach Section
   ========================================================================== */
.global-reach {
    background-color: #ffffff;
    background-image: url('../img/global-reach-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: var(--space-32) 0;
    overflow: hidden;
}

.global-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

.global-title {
    font-size: var(--text-4xl);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-6);
}

.global-text {
    font-size: var(--text-lg);
    color: var(--color-text-light);
    margin-bottom: var(--space-8);
}

.reach-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.reach-list li {
    font-size: var(--text-xl);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.reach-list li strong {
    color: var(--color-accent);
}

.global-map {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.map-visual {
    width: 90%;
    height: 90%;
    background: url('../img/map-bg.png') center/contain no-repeat;
    border-radius: 50%;
    position: relative;
    /* El mapa como fondo central, rodeado de los bordes animados */
}
.map-visual::before, .map-visual::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px dashed rgba(0,73,72,0.4);
    border-radius: 50%;
}
.map-visual::before {
    width: 60%;
    height: 60%;
    animation: spin 30s linear infinite;
}
.map-visual::after {
    width: 100%;
    height: 100%;
    animation: spin-reverse 45s linear infinite;
}

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

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-section {
    padding: var(--space-32) 0;
    background-color: var(--color-bg);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

.contact-content {
    max-width: 500px;
}

.contact-title {
    font-size: var(--text-4xl);
    font-weight: 800;
    margin-bottom: var(--space-6);
    letter-spacing: -0.02em;
}

.contact-text {
    font-size: var(--text-lg);
    color: var(--color-text-light);
    margin-bottom: var(--space-12);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.info-item svg {
    color: var(--color-accent);
    flex-shrink: 0;
}

.info-item h4 {
    font-size: var(--text-base);
    font-weight: 700;
    margin-bottom: var(--space-1);
}

.info-item p {
    color: var(--color-text-light);
    font-size: var(--text-sm);
}

.contact-form-wrapper {
    background-color: #ffffff;
    padding: var(--space-12);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
}

.form-group label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    padding: var(--space-4);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: var(--text-base);
    color: var(--color-text);
    background-color: #f8fafc;
    transition: var(--transition-base);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 73, 72, 0.1);
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position-x: 95%;
    background-position-y: center;
}

.btn-submit {
    margin-top: var(--space-4);
    width: 100%;
    padding: var(--space-4);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--color-dark);
    color: #fff;
    padding: var(--space-24) 0 var(--space-8) 0;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: var(--space-16);
    margin-bottom: var(--space-16);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: var(--space-16);
}

.footer-brand h2 {
    font-size: var(--text-3xl);
    font-weight: 800;
    margin-bottom: var(--space-4);
}

.footer-brand p {
    color: rgba(255,255,255,0.6);
    max-width: 300px;
    font-size: var(--text-sm);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
}

.footer-column h4 {
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-6);
    color: rgba(255,255,255,0.4);
}

.footer-column ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.footer-column a {
    font-size: var(--text-sm);
    color: rgba(255,255,255,0.8);
    transition: color var(--transition-fast);
}

.footer-column a:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-xs);
    color: rgba(255,255,255,0.4);
}

.social-links {
    display: flex;
    gap: var(--space-4);
}

.social-links a {
    color: rgba(255,255,255,0.8);
    transition: color var(--transition-fast);
    font-weight: 600;
}

.social-links a:hover {
    color: #fff;
}

/* ==========================================================================
   Media Queries (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 992px) {
    .global-container {
        grid-template-columns: 1fr;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --text-4xl: 2.5rem;
        --text-5xl: 3rem;
    }

    /* Hide desktop nav */
    .nav-menu {
        display: none !important;
    }

    .hamburger {
        display: flex;
        z-index: 2000;
        position: relative;
    }

    .logo img {
        height: 35px;
    }

    .header-actions {
        gap: var(--space-2);
    }

    .header-actions .region-selector-wrapper {
        display: flex;
    }
    
    .region-selector span {
        display: none; 
    }

    .region-selector {
        padding: 6px;
        background-color: rgba(0, 73, 72, 0.05) !important;
    }

    .region-dropdown {
        right: 0;
        left: auto;
        width: 200px;
        max-width: 80vw;
    }

    /* Dedicated Exclusive Mobile Menu */
    .mobile-menu-exclusive {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background-color: var(--color-bg);
        z-index: 3000;
        transition: left 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        padding-top: 0;
        overflow-y: auto;
        overflow-x: hidden;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }

    .mobile-menu-exclusive.active {
        left: 0;
    }

    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 100px 30px 20px; /* Radical space from top and sides */
        padding-top: calc(max(100px, env(safe-area-inset-top))); 
        background-color: var(--color-bg);
        position: relative; /* Changed from sticky for debugging, can revert if needed */
        z-index: 100;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        min-height: 150px;
    }

    .mobile-logo {
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
    }

    .mobile-logo img {
        height: 35px;
        width: auto;
    }

    .mobile-back-indicator {
        font-size: 2.5rem;
        line-height: 1;
        color: var(--color-accent);
        font-weight: 300;
        margin-right: 15px; /* Margin after the < indicator */
        display: inline-block;
    }

    .mobile-nav-list {
        list-style: none;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .mobile-nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .mobile-nav-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: var(--space-4) var(--space-8); /* Increased horizontal padding */
        font-size: var(--text-base);
        font-weight: 500;
        color: var(--color-text);
        text-decoration: none;
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-nav-link[data-mobile-toggle]::after {
        content: '›';
        font-size: 1.5rem;
        transition: transform 0.3s ease;
        line-height: 1;
    }

    .mobile-nav-link::after {
        display: none;
    }

    .mobile-nav-link[data-mobile-toggle]::after {
        display: block;
    }

    .mobile-nav-item.open > .mobile-nav-link::after {
        transform: rotate(90deg);
    }

    .mobile-dropdown {
        display: none;
        list-style: none;
        padding: 0;
        margin: 0;
        background-color: var(--color-bg-alt);
    }

    .mobile-nav-item.open > .mobile-dropdown {
        display: block;
    }

    .mobile-dropdown-header {
        padding: var(--space-3) var(--space-6);
        font-size: var(--text-xs);
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--color-accent);
        background-color: rgba(0,0,0,0.02);
        font-weight: 700;
    }

    .mobile-dropdown a {
        display: block;
        padding: var(--space-4) var(--space-12); /* Increased left padding for dropdown items */
        font-size: var(--text-sm);
        color: var(--color-text-light);
        text-decoration: none;
        border-bottom: 1px solid rgba(0,0,0,0.02);
    }

    .mobile-nav-separator {
        height: 1px;
        background: rgba(255,255,255,0.1);
        margin: 1rem 1.5rem;
    }

    .mobile-nav-item.mini {
        padding: 0;
    }

    .mobile-nav-link-mini {
        display: block;
        padding: 0.5rem 1.5rem;
        color: rgba(255,255,255,0.6);
        text-decoration: none;
        font-size: 0.85rem;
    }

    .mobile-dropdown a:hover {
        background-color: rgba(0, 0, 0, 0.03);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    .hamburger.active .bar {
        background-color: var(--color-text) !important;
    }

    .hero-title {
        font-size: var(--text-4xl);
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Cookie Banner
   ========================================================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f4f4f4;
    padding: var(--space-4) 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    display: none; /* Controlled by JS */
    font-size: 0.75rem; 
}

.cookie-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-6);
}

.cookie-text {
    flex: 1;
    color: #000;
    line-height: 1.6;
}

.cookie-link {
    color: #0056b3;
    font-weight: 600;
}

.cookie-link:hover {
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-shrink: 0;
}

.btn-cookie-settings {
    background: none;
    border: none;
    color: #000;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.75rem;
}

.btn-cookie-action {
    background-color: #00605e;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.75rem;
    transition: background-color var(--transition-fast);
}

.btn-cookie-action:hover {
    background-color: #004948;
}

@media (max-width: 992px) {
    .cookie-container {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-4);
    }
    .cookie-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

/* ==========================================================================
   Cookie Preference Modal
   ========================================================================== */
.cookie-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10001; /* Above banner */
    justify-content: center;
    align-items: center;
}

.cookie-modal-content {
    background-color: #f4f4f4;
    width: 95%;
    max-width: 580px;
    height: 85vh;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-radius: 4px;
}

.cookie-modal-header {
    background-color: #f4f4f4;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.cookie-modal-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.03em;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    line-height: 1;
}

.cookie-modal-body {
    padding: 1.5rem 2rem;
    overflow-y: auto;
    flex: 1;
    background-color: #f4f4f4;
}

.cookie-modal-body h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 800;
}

.cookie-modal-body p {
    font-size: 0.75rem;
    color: #333;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.cookie-modal-body a {
    color: #0056b3;
    text-decoration: underline;
    font-weight: 600;
}

.btn-permit-all {
    margin-bottom: 2rem;
    width: auto;
    display: inline-block;
}

.cookie-modal-body h4 {
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.cookie-categories {
    border: 1px solid #e0e0e0;
    background-color: #fff;
    margin-bottom: 1rem;
}

.cookie-category {
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-category-icon {
    font-size: 1.25rem;
    font-weight: 400;
    color: #333;
    line-height: 1;
}

.cookie-category-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #111;
}

.cookie-category-status {
    font-size: 0.75rem;
    color: #0056b3;
    font-weight: 600;
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #888;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #00605e; /* Vibrant teal */
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.cookie-modal-footer {
    padding: 1.25rem 2rem;
    background-color: #f4f4f4;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-modal-footer .btn-cookie-action {
    flex: 1;
    text-align: center;
    padding: 14px;
}

@media (max-width: 480px) {
    .cookie-modal-footer {
        flex-direction: column;
        padding: 1rem;
    }
}
