﻿/* ==========================================================================
   1. DESIGN TOKENS (VARIABLES)
   ========================================================================== */

:root {
    /* --- Modern Fluid Typography --- */
    --fs-base: 13.3px;
    --font-main: 'Google Sans', system-ui, -apple-system, sans-serif;

    /* Fluid sizes: min size at 400px, max size at 1200px */
    --fs-xs: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
    /* ~11.2px min */
    --fs-sm: clamp(0.9rem, 0.85rem + 0.25vw, 1.05rem);
    /* ~12.6px min */
    --fs-md: 1rem;
    --fs-lg: clamp(1.1rem, 1.05rem + 0.25vw, 1.2rem);
    --fs-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.6rem);
    --fs-h3: clamp(1.35rem, 1.2rem + 1vw, 1.8rem);
    --fs-h2: clamp(1.5rem, 1.3rem + 1.5vw, 2.2rem);
    --fs-h1: clamp(2rem, 2.3rem + 2.5vw, 5rem);

    /* --- Spacing Scale (rem-based) --- */
    --sp-3xs: 0.125rem;
    /* 2px */
    --sp-2xs: 0.25rem;
    /* 4px */
    --sp-xs: 0.5rem;
    /* 8px */
    --sp-sm: 0.75rem;
    /* 12px */
    --sp-md: 1rem;
    /* 16px */
    --sp-lg: 1.5rem;
    /* 24px */
    --sp-xl: 2rem;
    /* 32px */
    --sp-2xl: 3rem;
    /* 48px */
    --sp-3xl: 4rem;
    /* 64px */
    --sp-4xl: 5rem;
    /* 80px */
    --sp-section: 7.5rem;
    /* 120px */

    /* --- Border Radii --- */
    --rd-xs: 0.25rem;
    --rd-sm: 0.5rem;
    --rd-md: 0.75rem;
    --rd-lg: 1rem;
    --rd-pill: 3.125rem;
    /* 50px */

    /* --- Transitions --- */
    --tr-fast: 0.2s ease;
    --tr-base: 0.3s ease;
    --tr-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

    /* --- Effects --- */
    --glass-blur: 20px;
    --glass-saturate: 180%;
    --glass-opacity: 0.6;
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --theme-border: rgba(94, 106, 126, 0.3);

    /* --- Colors (Light Theme) --- */
    --clr-accent: #ffc400;
    --clr-accent-hover: #e6b000;
    --clr-bg: #f1f1f1;
    --clr-bg-rgb: 241, 241, 241;
    --clr-bg-section: #e8e8e8;
    --clr-border: rgba(37, 43, 58, 0.15);
    --clr-card: #ffffff;
    --clr-text: #383f49;
    /* Slate 600 - Greyish Blueish */
    --clr-text-muted: #5e6a7e;
    --clr-primary: #252b3a;
    --clr-nav-bg: rgba(255, 255, 255, var(--glass-opacity));
    --clr-glass-bg: rgba(255, 255, 255, var(--glass-opacity));
    /* Light theme glass */

    --grad-accent: linear-gradient(135deg, #fffc6d 0%, #ffd94d 100%);
    --grad-primary: linear-gradient(135deg, #1e293b 0%, #334155 100%);

    --nav-height: 4.375rem;
    /* 70px */
}

[data-theme="dark"] {
    --clr-bg: #0f1218;
    --clr-bg-rgb: 15, 18, 24;
    --clr-bg-section: #161a22;
    --clr-border: rgba(255, 255, 255, 0.1);
    --theme-border: rgba(126, 126, 126, 0.4);
    /* Darker/Fainter */
    --clr-card: #1c222d;
    --clr-text: #f3f5f9;
    --clr-text-muted: #94a3b8;
    --clr-nav-bg: rgba(22, 26, 34, var(--glass-opacity));
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.6);
    --grad-primary: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    --clr-glass-bg: rgba(45, 55, 72, var(--glass-opacity));
    /* Dark theme glass */
}

/* ==========================================================================
   2. GLOBAL RESET & BASE
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: var(--fs-base);
    scroll-behavior: smooth;
}

body {
    background-color: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.4;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s ease;
}

h1,
h2,
h3,
h4 {
    margin-bottom: var(--sp-md);
    font-weight: 700;
    line-height: 1.1;
}

h1 {
    font-size: var(--fs-h1);
}

h2 {
    font-size: var(--fs-h2);
}

h3 {
    font-size: var(--fs-xl);
}

h4 {
    font-size: var(--fs-lg);
}

/* Mobile H1 fix */
@media (max-width: 48rem) {
    h1 {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--tr-base);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}


/* ==========================================================================
   3. COMPONENTS
   ========================================================================== */

/* --- Buttons --- */
.btn-fill {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    z-index: 1;

    border: none;
    border-radius: 12px;
    padding: var(--sp-sm) var(--sp-lg);

    font-weight: 400;
    text-decoration: none;
    color: var(--clr-primary);

    background: var(--clr-accent);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: background-color var(--tr-base);
}

/* Apply squircle to all filled buttons EXCEPT the navbar quote button */
.btn-fill:not(#navQuoteBtn) {
    corner-shape: squircle;
}

.btn-fill:hover {
    background-color: var(--clr-accent-hover);
}

[data-theme="dark"] .btn-fill {
    color: var(--clr-primary);
}

/* Glass Style for btn-cases */
.btn-cases {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: var(--sp-sm);

    height: 2.715rem;
    padding: var(--sp-sm) var(--sp-lg);
    border: 1px solid var(--theme-border);
    border-radius: var(--rd-pill);

    font-size: var(--fs-base);
    white-space: nowrap;
    color: var(--clr-text);

    background: var(--clr-glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    box-shadow: none !important;
    cursor: pointer;
    overflow: hidden;
    /* Added */
    position: relative;
    /* Added */
    transition: var(--tr-base);
}

@keyframes arrow-fly-out {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(40px);
        opacity: 0;
    }
}

.arrow-animate {
    animation: arrow-fly-out 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.btn-hero {
    position: relative;
    z-index: 10;
    align-self: flex-start;

    margin-top: var(--sp-4xl);
    padding: var(--sp-lg) var(--sp-3xl);
    border-radius: var(--rd-pill);

    font-size: var(--fs-lg);
    corner-shape: squircle;
}

#navQuoteBtn {
    display: none;
    align-items: center;
    opacity: 0;

    height: 2.715rem;
    padding: 0 var(--sp-lg);
    border-radius: 50px;

    font-size: var(--fs-md);
    corner-shape: none;
    transition: opacity 0.4s ease, background-color 0.3s ease;
}

#navQuoteBtn.active {
    display: inline-flex;
}

#navQuoteBtn.visible {
    opacity: 1;
}

#navQuoteBtn:hover {
    background-color: var(--clr-accent-hover);
    opacity: 1;
}

/* --- Glass Components --- */
.glass-btn-style,
.control-circle-btn,
.floating-btn,
.floating-btn-small {
    display: flex;
    justify-content: center;
    align-items: center;

    border: 1px solid var(--theme-border);

    color: var(--clr-text);

    background: var(--clr-glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    cursor: pointer;
    transition: var(--tr-base);
}

.glass-btn-style:hover,
.control-circle-btn:hover,
.floating-btn:hover,
.floating-btn-small:hover,
.btn-cases:hover {
    background: rgba(37, 43, 58, 0.1);
}

[data-theme="dark"] .glass-btn-style:hover,
[data-theme="dark"] .control-circle-btn:hover,
[data-theme="dark"] .floating-btn:hover,
[data-theme="dark"] .floating-btn-small:hover,
[data-theme="dark"] .btn-cases:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- Language Selector --- */
.lang-options {
    position: absolute;
    top: calc(100% + var(--sp-xs));
    right: 0;
    z-index: 1001;

    display: flex;
    flex-direction: column;
    gap: var(--sp-2xs);
    visibility: hidden;
    opacity: 0;

    min-width: 8.75rem;
    padding: var(--sp-xs);
    border: 1px solid var(--theme-border);
    border-radius: var(--rd-lg);
    overflow: hidden;

    background: var(--clr-glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    box-shadow: var(--shadow-md);
    transform: translateY(var(--sp-xs));
    transition: var(--tr-slow);
}

.control-circle-container.active .lang-options,
.offcanvas.active .lang-options,
.floating-lang-container.active .lang-options {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);

    padding: var(--sp-sm) var(--sp-md);
    border-radius: var(--rd-sm);

    text-align: left;
    color: var(--clr-text);

    cursor: pointer;
    transition: background 0.2s;
}

.lang-option:hover {
    background: var(--clr-text);
    color: #ffffff;
}

.lang-option .fi {
    border-radius: 2px;
    flex-shrink: 0;
}

[data-theme="dark"] .lang-option:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* --- Navigation Items --- */
.nav-item,
.mobile-link {
    display: inline-flex;
    align-items: center;

    height: 2.715rem;
    padding: 0 var(--sp-lg);
    border-radius: 12px;

    font-size: var(--fs-md);
    text-decoration: none;
    color: var(--clr-text);

    corner-shape: squircle;
    transition: var(--tr-base);
}

.nav-item:hover,
.mobile-link:hover {
    background: var(--clr-primary);
    color: #ffffff;
}

[data-theme="dark"] .nav-item:hover,
[data-theme="dark"] .mobile-link:hover {
    background: #ffffff;
    color: var(--clr-bg);
}

/* --- Nav Dropdowns (Desktop) --- */
.nav-dropdown-wrapper {
    position: relative;
}

.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-xs);

    height: 2.715rem;
    padding: 0 var(--sp-lg);
    border: none;
    border-radius: 12px;

    font-size: var(--fs-md);
    text-decoration: none;
    color: var(--clr-text);

    background: transparent;
    corner-shape: squircle;
    cursor: pointer;
    transition: var(--tr-base);
}

.nav-dropdown-trigger:hover,
.nav-dropdown-wrapper.active .nav-dropdown-trigger,
.nav-dropdown-trigger.active {
    background: var(--clr-text);
    color: #ffffff;
}

[data-theme="dark"] .nav-dropdown-trigger:hover,
[data-theme="dark"] .nav-dropdown-wrapper.active .nav-dropdown-trigger,
[data-theme="dark"] .nav-dropdown-trigger.active {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.dropdown-icon {
    font-size: 0.7em;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.nav-dropdown-wrapper.active .dropdown-icon {
    transform: rotate(180deg);
}

.nav-dropdown-options {
    position: absolute;
    top: calc(100% + var(--sp-xs));
    left: 0;
    z-index: 1001;

    display: flex;
    flex-direction: column;
    gap: var(--sp-2xs);
    visibility: hidden;
    opacity: 0;

    min-width: 12.5rem;
    padding: var(--sp-xs);
    border: 1px solid var(--theme-border);
    border-radius: var(--rd-lg);
    overflow: hidden;

    background: var(--clr-glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    box-shadow: var(--shadow-md);
    transform: translateY(var(--sp-xs));
    transition: var(--tr-slow);
}

.nav-dropdown-wrapper.active .nav-dropdown-options {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.nav-dropdown-item {
    padding: var(--sp-sm) var(--sp-lg);
    border-radius: var(--rd-sm);

    font-size: var(--fs-sm);
    color: var(--clr-text);
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--tr-base), color var(--tr-base);
}

.nav-dropdown-item:hover {
    background: var(--clr-text);
    color: #ffffff;
}

[data-theme="dark"] .nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.dropdown-divider {
    height: 1px;
    background: var(--theme-border);
    margin: var(--sp-xs) var(--sp-sm);
}

/* --- Floating Elements --- */
.floating-controls-wrapper {
    position: fixed;
    right: 5%;
    bottom: 5vh;
    z-index: 1060;

    display: none;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-md);

    width: 5rem;

    transition: transform var(--tr-base), opacity var(--tr-base);
}

.floating-btn {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;

    font-size: 1.6rem;

    box-shadow: var(--shadow-md);
}

.floating-quote-container {
    display: none;
    flex: 1;
    opacity: 0;

    transform: translateX(-20px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.floating-quote-container.active {
    display: block;
}

.floating-quote-container.visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.floating-quote-btn {
    width: 100%;
    height: 4rem;
    border-radius: var(--rd-pill);

    font-size: var(--fs-lg);

    box-shadow: var(--shadow-lg);
}

.floating-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(20px);
}

/* --- Miscelaneous --- */
.control-circle-container {
    display: inline-flex;
    position: relative;
}

.control-circle-btn {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 2.715rem;
    height: 2.715rem;
    padding: 0;
    border-radius: 50%;

    font-size: var(--fs-base);
    line-height: 1;

    corner-shape: none;
}

.modal-close-btn {
    position: absolute;
    top: calc(var(--sp-2xl) / 2);
    right: calc(var(--sp-2xl) / 2);
    z-index: 10;
}

@media (max-width: 48rem) {
    .modal-close-btn {
        top: calc(var(--sp-lg) / 2);
        right: calc(var(--sp-lg) / 2);
    }
}

.control-circle-btn i {
    vertical-align: middle;
}

.control-circle-btn i.fa-language {
    font-size: 1.15rem;
}

/* --- Pill Shape for Language Trigger --- */
.lang-trigger-btn {
    width: auto !important;
    height: 2.715rem;
    padding: 0 13px !important;
    gap: 5px;
    border-radius: 50px !important;
}

.lang-active {
    margin-right: 1px;

    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 48rem) {
    .lang-active {
        margin-top: 1px;
    }
}

.control-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    z-index: 1001;

    visibility: hidden;
    opacity: 0;

    padding: 6px 12px;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    overflow: hidden;

    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--clr-text);

    background: var(--clr-card);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateX(-50%) translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    corner-shape: squircle;
    pointer-events: none;
}

.control-circle-btn:hover~.control-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    visibility: visible;
}

.captcha-container {
    align-items: center;
    display: flex;
    justify-content: center;
}

.captcha-container * {
    flex: 1;
}

/* ==========================================================================
   4. LAYOUT
   ========================================================================== */

header {
    position: fixed;
    top: var(--sp-lg);
    left: 50%;
    z-index: 1000;

    display: flex;
    justify-content: center;

    width: 100%;
    max-width: 77.5rem;
    border: 1px solid var(--theme-border);
    border-radius: var(--rd-pill);

    background: transparent;
    box-shadow: var(--shadow-md);
    transform: translateX(-50%);
    transition: background var(--tr-base), box-shadow var(--tr-base);
}

.nav-glass {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;

    width: 100%;
    height: 100%;
    border-radius: var(--rd-pill);

    background: var(--clr-glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    pointer-events: none;
}

.nav-container {
    display: flex;
    align-items: center;
    position: relative;

    flex-grow: 1;
    height: 100%;
    padding: var(--sp-md);
}

.logo {
    color: inherit;
    font-size: var(--fs-lg);
    font-weight: 900;
    letter-spacing: -0.5px;
    text-decoration: none;
}

.nav-desktop {
    position: absolute;
    left: 50%;

    display: flex;
    align-items: center;
    gap: var(--sp-xs);

    transform: translateX(-50%);
}

.nav-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;

    gap: var(--sp-md);
}

.offcanvas {
    position: fixed;
    top: 0;
    right: -100%;
    z-index: 1100;

    display: flex;
    flex-direction: column;

    width: 17.5rem;
    height: 100%;
    padding: var(--sp-3xl) var(--sp-lg);

    background: transparent;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.1);
    transition: var(--tr-slow);
}

.offcanvas-footer {
    display: flex;
    justify-content: flex-end;

    margin-top: auto;
    margin-left: calc(var(--sp-lg) * -1);
    margin-right: calc(var(--sp-lg) * -1);
    padding: var(--sp-lg) var(--sp-lg) 0 var(--sp-lg);
    border-top: 1px solid var(--theme-border);
}

#closeOffcanvas {
    margin-left: auto;
}

.offcanvas-glass {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;

    width: 100%;
    height: 100%;

    background: var(--clr-glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    pointer-events: none;
}

/* ==========================================================================
   5. SECTIONS
   ========================================================================== */

section {
    border-bottom: 1px solid var(--clr-border);
    padding: var(--sp-section) 5%;
    position: relative;
}

.container {
    margin: 0 auto;
    max-width: 75rem;
    position: relative;
    z-index: 2;
}

.section-gray {
    background-color: var(--clr-bg-section);
}

.label {
    color: var(--clr-accent);
    display: block;
    font-size: var(--fs-xs);
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-bottom: var(--sp-sm);
    text-transform: uppercase;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;

    min-height: 100vh;
    height: 100vh;
    height: 100dvh;
    padding: 0 5%;
    overflow: hidden;

    text-align: left;
    background-color: var(--clr-bg);
    transition: background-color 0.4s ease;
}

.hero .container {
    padding: 0;
    width: 100%;
}

.hero h1 {
    position: relative;
    z-index: 2;
    margin-bottom: var(--sp-xl);
    color: #ffffff;
}

.hero p {
    position: relative;
    z-index: 2;

    max-width: 43.75rem;
    margin-bottom: var(--sp-xl);

    font-size: var(--fs-lg);
    line-height: 1.6;
    color: #ffffff;
}

.offcanvas.active {
    right: 0;
}

.offcanvas-links {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);

    margin-top: auto;

    text-align: right;
    align-items: flex-end;
}

.mobile-menu-header {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--clr-text-muted);
    margin: var(--sp-md) var(--sp-md) var(--sp-xs) 0;
}

.mobile-divider {
    width: 60px;
    /* Width of buttons approximately */
    height: 1px;
    background: var(--glass-border);
    margin: var(--sp-sm) 0;
}

.offcanvas-overlay {
    background: rgba(0, 0, 0, 0.4);
    display: none;
    height: 100%;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1050;
}

.offcanvas-overlay.active {
    display: block;
}

.hero-glass-card {
    display: flex;
    flex-direction: column;

    width: fit-content;
    max-width: 56.25rem;
}

.hero-text-slider {
    position: relative;
    z-index: 2;

    display: grid;
    grid-template-columns: 1fr;

    font-size: var(--fs-md);
    color: #ffffff;
}

.hero-text-slider .text-slide {
    grid-column: 1;
    grid-row: 1;

    width: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-text-slider .text-slide.active {
    opacity: 1;
}



.hero-bg-slider {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;

    width: 100%;
    height: 100%;

    filter: brightness(0.6);
}

.hero-bg-slide {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background-image: var(--bg-desk);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;

    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-bg-slide.active {
    opacity: 1;
}

/* --- Card Grid --- */
.section-title {
    margin-bottom: var(--sp-2xl);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
    gap: var(--sp-lg);
}

.card {
    padding: var(--sp-2xl);
    border: none;
    border-radius: var(--rd-lg);

    background: var(--clr-card);
    transition: var(--tr-slow);
    border: 1px solid transparent;
}

#cabling .card {
    border: 1px solid var(--clr-border);
}

[data-theme="dark"] #cabling .card {
    border-color: transparent;
}

[data-theme="dark"] .section-gray .card {
    border: 1px solid var(--clr-border);
}

/* .card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-0.75rem);
} */

.card ul li {
    margin-bottom: var(--sp-xs);
    padding-left: var(--sp-lg);
    position: relative;
}

.card ul li::before {
    color: var(--clr-accent);
    content: '•';
    left: 0;
    position: absolute;
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */

footer {
    background: var(--clr-primary);
    color: #ffffff;
    padding: var(--sp-3xl) 5%;
}

.footer-content {
    align-items: center;
    display: flex;
    gap: var(--sp-2xl);
    justify-content: space-between;
}

.footer-company-info h4 {
    font-size: var(--fs-lg);
    margin-bottom: var(--sp-sm);
}

.footer-company-info p {
    line-height: 1.6;
    margin-bottom: var(--sp-3xs);
    opacity: 0.7;
}

.copyright-text {
    font-size: var(--fs-xs);
    font-weight: 500;
    opacity: 0.6;
}

/* ==========================================================================
   7. MODAL
   ========================================================================== */

.modal-overlay {
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    height: 100%;
    justify-content: center;
    left: 0;
    opacity: 0;
    position: fixed;
    top: 0;
    transition: var(--tr-base);
    visibility: hidden;
    width: 100%;
    z-index: 2000;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    background: var(--clr-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--rd-lg);
    box-shadow: var(--shadow-lg);
    max-width: 28.125rem;
    padding: var(--sp-2xl);
    position: relative;
    width: 90%;
}

@media (max-width: 48rem) {
    .modal-content {
        padding: var(--sp-lg);
    }
}

.modal-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--sp-lg);
}

.form-control {
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--rd-sm);
    color: var(--clr-text);
    font-size: var(--fs-sm);
    margin-bottom: var(--sp-md);
    padding: var(--sp-sm);
    width: 100%;
    font-family: inherit;
}

.modal-submit-btn {
    border-radius: 16px;
    corner-shape: squircle;
    font-size: var(--fs-md);
    margin-top: var(--sp-xl);
    padding: 0 var(--sp-2xl);
    height: 3.4375rem;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   8. MEDIA QUERIES
   ========================================================================== */

@media (max-width: 60rem) {

    .nav-desktop,
    .desktop-only {
        display: none;
    }

    .nav-container {
        justify-content: space-between;
    }

    .logo,
    .nav-controls {
        flex: none;
    }

    .nav-controls {
        gap: var(--sp-sm);
    }

    .nav-controls .btn-fill:not(.floating-quote-btn),
    #navQuoteBtn {
        display: none !important;
    }

    .floating-controls-wrapper {
        display: flex;
        flex-direction: row;
        width: 90%;
        max-width: 31.25rem;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        bottom: 5vw;
        background: transparent;
        padding: 0;
    }

    .floating-quote-container {
        display: block;
    }

    .floating-btn {
        height: 4rem;
        width: 4rem;
    }

    .btn-hero {
        margin-top: 6rem;
    }

    .section-header-flex .btn-cases {
        margin-left: auto;
        width: auto;
        min-width: fit-content;
        height: 2.715rem;
        padding: 0 var(--sp-xl);
        display: inline-flex;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-action {
        width: 100%;
    }

    .footer-action .btn-fill {
        width: 100%;
    }
}

@media (max-width: 48rem) {
    section {
        padding: var(--sp-3xl) 5%;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: var(--sp-xl);
    }

    .btn-hero {
        margin-top: var(--sp-xl);
        width: 100%;
        align-self: stretch;
    }

    header {
        width: 90%;
    }

    .hero {
        height: 100dvh;
    }

    .hero-glass-card {
        width: 100%;
    }

    .hero-bg-slide {
        background-image: var(--bg-mob);
        background-attachment: scroll;
    }
}

/* ==========================================================================
   9. PROJECTS PAGE & FILTERING
   ========================================================================== */

.page-main {
    padding-top: calc(var(--nav-height) + var(--sp-4xl));
}

.page-header {
    margin-bottom: var(--sp-3xl);
}

.page-header h1 {
    font-size: var(--fs-h1);
    margin-bottom: var(--sp-xs);
}

.page-subtitle {
    font-size: var(--fs-lg);
    color: var(--clr-text-muted);
    max-width: 37.5rem;
}

.section-header-flex {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--sp-2xl);
    gap: var(--sp-lg);
}

.section-header-flex .section-title {
    margin-bottom: 0;
    flex-grow: 1;
    word-break: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 48rem) {
    .section-header-flex {
        flex-direction: row;
        align-items: flex-start;
        gap: var(--sp-md);
    }
}

/* --- Filter Panel --- */
.filter-row-container {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    margin-bottom: var(--sp-xl);
}

.segmented-control {
    display: flex;
    flex-grow: 1;
    height: 2.715rem;
    gap: var(--sp-xs);
    padding: 0;
    position: relative;
}

.segment-btn {
    flex: 1;
    height: 100%;
    background: var(--clr-glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    border: 1px solid var(--theme-border);
    padding: 0 16px;
    font-size: var(--fs-base);
    font-weight: 400;
    color: var(--clr-text);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 1;
    white-space: nowrap;
    border-radius: var(--rd-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.segment-btn:nth-child(2) {
    border-radius: var(--rd-md);
    corner-shape: squircle;
}

.segment-btn:first-child {
    border-radius: var(--rd-pill) var(--rd-md) var(--rd-md) var(--rd-pill);
}

.segment-btn:last-child {
    border-radius: var(--rd-md) var(--rd-pill) var(--rd-pill) var(--rd-md);
}

.segment-btn:hover,
.segment-btn:focus,
.segment-btn.active {
    background: var(--clr-text);
    border-color: var(--clr-text);
    color: #ffffff;
    outline: none;
}

[data-theme="dark"] .segment-btn:hover,
[data-theme="dark"] .segment-btn:focus,
[data-theme="dark"] .segment-btn.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    outline: none;
}

.reset-btn-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-xs);
    height: 2.715rem;
    padding: 0 var(--sp-lg);
    border: none;
    border-radius: var(--rd-pill);
    background: var(--clr-accent);
    color: var(--clr-primary);
    font-size: var(--fs-base);
    font-weight: 400;
    cursor: pointer;
    transition: opacity 0.4s ease, background-color 0.3s ease;
    flex-shrink: 0;
}

.reset-btn-pill:hover:not(:disabled) {
    background: var(--clr-accent-hover);
}

.reset-btn-pill:disabled {
    opacity: 0.35;
    pointer-events: none;
    filter: grayscale(0.5);
}

.reset-btn-pill i {
    font-size: 0.9rem;
}

@media (max-width: 62rem) {
    .filter-row-container {
        flex-direction: column;
        align-items: stretch;
    }

    .segmented-control {
        flex-direction: row;
        width: 100%;
    }

    .segment-btn {
        padding: 12px 8px;
        font-size: 0.7rem;
    }

    .reset-btn {
        align-self: flex-end;
    }
}

/* --- Project Cards --- */
.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-md);
    margin-bottom: var(--sp-lg);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    flex: 1;
}

.project-card-title,
.project-card-city {
    margin: 0;
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--clr-text);
    line-height: 1.1;
    white-space: nowrap;
}

.header-pin {
    color: #ffc400;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.header-sep {
    color: #ffc400;
    font-size: 0.9rem;
    margin: 0 var(--sp-xs);
    flex-shrink: 0;
}

/* removed old city icon style */

/* --- Country Grouping --- */
.country-group {
    margin-bottom: var(--sp-4xl);
}

.country-group.hidden {
    display: none;
}

.country-header-wrap {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    margin-bottom: var(--sp-xl);
    width: 100%;
}

.country-silhouette {
    width: 3.5rem;
    height: 3.5rem;
    flex-shrink: 0;
    position: relative;
    overflow: visible;
    /* amCharts needs relative/absolute to sizing correctly inside flex */
}

.country-heading {
    font-size: var(--fs-h3);
    color: var(--clr-text);
    margin: 0;
    white-space: nowrap;
    font-weight: 700;
}

.projects-grid-full {
    display: flex;
    flex-direction: column;
    gap: var(--sp-lg);
}

.projects-grid-full .project-card {
    width: 100%;
    max-width: none;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2xs);
    justify-content: flex-end;
}

.project-tag-indicator {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--clr-accent);
    background: rgba(var(--clr-bg-rgb), 0.1);
    border: 1px solid var(--clr-accent);
    padding: 2px 8px;
    border-radius: 4px;
}

.project-card.hidden,
.hidden {
    display: none !important;
}

/* Project Card Description Styling */
.project-card-desc {
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--clr-text-muted);
}

.project-card-desc p {
    margin-bottom: var(--sp-md);
}

.project-card-desc p:last-child {
    margin-bottom: 0;
}

.project-card-desc strong {
    color: var(--clr-text);
    display: block;
    margin-bottom: var(--sp-xs);
    font-size: var(--fs-base);
    font-weight: 700;
}

.project-card-desc ul {
    list-style: none;
    padding: 0;
    margin: var(--sp-sm) 0 var(--sp-md) var(--sp-md);
}

.project-card-desc li {
    position: relative;
    padding-left: var(--sp-md);
    margin-bottom: var(--sp-xs);
    color: var(--clr-text-muted);
}

.project-card-desc li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--clr-accent);
    font-weight: 700;
}

/* --- Filter Info Bar --- */
#filter-info-wrap {
    margin-bottom: var(--sp-sm);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 4px 0;
}

#filter-info-text {
    font-weight: 600;
    font-size: var(--fs-xs);
    color: var(--clr-text-muted);
}

/* --- Interactive Map Section --- */
#map-wrap {
    width: 100%;
    aspect-ratio: 2.3 / 0.6;
    margin: 0 auto;
    background: transparent;
    /* border: 1px solid var(--theme-border); */
    /* border-radius: 0 var(--rd-lg); */
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chartdiv {
    width: 100%;
    height: 100%;
    touch-action: pan-y;
}

.map-hint {
    position: absolute;
    bottom: 5px;
    right: 10px;
    z-index: 5;
    font-weight: 500;
    font-size: 10px;
    font-family: var(--font-main);
    color: var(--clr-text);
    opacity: 0.8;
    pointer-events: none;
}

/* --- Interactive Map Overlay --- */
#map-wrap {
    touch-action: pan-y;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    touch-action: pan-y;
    pointer-events: none;
    transition: opacity var(--tr-base), visibility var(--tr-base);
}

.map-activate-btn {
    display: block;
    pointer-events: auto;
    background: var(--clr-accent);
    color: var(--clr-primary);
    border: none;
    padding: var(--sp-sm) var(--sp-lg);
    border-radius: var(--rd-pill);
    font-size: var(--fs-sm);
    box-shadow: var(--shadow-md);
    letter-spacing: 0.1px;
    cursor: pointer;
    transition: background-color var(--tr-base);
    margin-top: 4rem;
}

.map-activate-btn:hover {
    background-color: var(--clr-accent-hover);
}

#chartdiv {
    pointer-events: none;
}

/* When active, hide overlay and enable map interaction */
#map-wrap.interacting .map-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#map-wrap.interacting #chartdiv {
    pointer-events: auto;
}

@media (max-width: 48rem) {
    #map-wrap {
        margin: var(--sp-xl) auto;
        width: 100%;
        height: 260px;
        position: relative;
        touch-action: pan-y;
        /* Explicitly allow vertical scroll on container */
    }

    /* Overlay focused on catching the FIRST tap to activate the map */
    .map-mobile-overlay {
        position: absolute;
        top: 0;
        left: 0;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        background: rgba(var(--clr-bg-rgb), 0.1);
        touch-action: pan-y;
        pointer-events: none;
        /* Let swipes pass through to the page */
    }

    .map-activate-btn {
        display: block;
        /* Show button on mobile */
        pointer-events: auto;
        /* Button itself MUST catch the tap */
        background: var(--clr-accent);
        color: var(--clr-primary);
        border: none;
        padding: var(--sp-sm) var(--sp-lg);
        border-radius: var(--rd-pill);
        /* font-weight: 700; */
        font-size: var(--fs-sm);
        box-shadow: var(--shadow-md);
        letter-spacing: 0.1px;
        cursor: pointer;
    }

    #chartdiv {
        pointer-events: none;
        /* Map is inactive until overlay is removed */
    }

    /* When clicked/active, we hide the overlay and enable map */
    #map-wrap.interacting .map-mobile-overlay {
        display: none !important;
    }

    #map-wrap.interacting #chartdiv {
        pointer-events: auto;
    }
}