:root {
    --bg-dark: #d5e0d5; /* Light Metallic Green */
    --bg-panel: rgba(240, 250, 240, 0.9);
    
    --accent-primary: #006d80; /* Darker Cyan for contrast */
    --accent-secondary: #004a70; /* Darker Blue */
    --accent-alert: #cc0030; /* Darker Red */
    
    --text-primary: #0a1f0a; /* Dark Green/Black */
    --text-secondary: #3a4f3a; /* Dark Grey/Green */
    --text-dim: rgba(0, 100, 120, 0.4);
    
    --font-headers: 'Rajdhani', sans-serif; /* Less sci-fi, more industrial */
    --font-body: 'Rajdhani', sans-serif;
    
    --container-width: 1200px;
    --glow-text: 0 0 10px rgba(0, 100, 120, 0.3); /* Reduced glow */
    --glow-box: 0 0 20px rgba(0, 100, 120, 0.05);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background-color: #d5e0d5;
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='%23a3bfa3' stroke-width='2' d='M20,20 L50,20 L50,50 M150,20 L150,50 L180,50 M20,180 L50,180 L50,150 M180,180 L150,180 L150,150 M80,80 L120,80 L120,120 L80,120 Z M100,20 L100,50 M20,100 L50,100 M180,100 L150,100 M100,180 L100,150'/%3E%3Ccircle cx='50' cy='50' r='4' fill='%23a3bfa3'/%3E%3Ccircle cx='150' cy='50' r='4' fill='%23a3bfa3'/%3E%3Ccircle cx='50' cy='150' r='4' fill='%23a3bfa3'/%3E%3Ccircle cx='150' cy='150' r='4' fill='%23a3bfa3'/%3E%3Crect x='90' y='90' width='20' height='20' fill='%23a3bfa3'/%3E%3C/svg%3E");
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 18px; /* Slightly larger for Rajdhani */
}

/* Background Effects */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.2) 50%,
        rgba(0,0,0,0.2)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.15; /* Reduced opacity */
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: -1;
    transform: perspective(500px) rotateX(0deg); /* Flat grid for now, maybe animate later */
}

/* Typography */
h1, h2, h3, .header__logo, .btn {
    font-family: var(--font-headers);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

h1 {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(180deg, var(--text-primary), var(--accent-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: var(--glow-text);
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.2rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-primary);
    display: inline-block;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.3rem;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-secondary);
    font-weight: 500;
}

.container {
    width: min(var(--container-width), 100% - 2rem);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    padding: 1.5rem 0;
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    background: rgba(5, 20, 5, 0.95); /* Dark background for contrast */
    border-bottom: 1px solid rgba(0, 109, 128, 0.3);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@keyframes logoPulse {
    0% { text-shadow: 0 0 10px var(--accent-primary); transform: scale(1); }
    50% { text-shadow: 0 0 25px var(--accent-primary), 0 0 10px var(--accent-secondary); transform: scale(1.05); }
    100% { text-shadow: 0 0 10px var(--accent-primary); transform: scale(1); }
}

.header__logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent-primary);
    text-shadow: 0 0 10px var(--accent-primary);
    animation: logoPulse 4s infinite ease-in-out;
}

.header__nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.header__nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(0, 243, 255, 0.25);
    border-radius: 10px;
    background: rgba(0, 243, 255, 0.05);
    color: var(--accent-primary);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-toggle__bar {
    width: 22px;
    height: 2px;
    background: var(--accent-primary);
    display: block;
    border-radius: 2px;
}

.header__nav a {
    color: #e0f7fa; /* Light text for dark header */
    text-decoration: none;
    font-family: var(--font-headers);
    font-size: 0.8rem;
    transition: all 0.3s;
    position: relative;
}

.header__nav a:hover {
    color: var(--accent-primary);
    text-shadow: 0 0 5px var(--accent-primary);
}

.header__nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s;
}

.header__nav a:hover::after {
    width: 100%;
}

.header__cta {
    border: 1px solid var(--accent-primary);
    padding: 0.5rem 1.5rem;
    color: var(--accent-primary) !important;
    background: rgba(0, 243, 255, 0.05);
}

.header__cta:hover {
    background: var(--accent-primary);
    color: #000 !important;
    box-shadow: 0 0 20px var(--accent-primary);
}

/* Hero */
.hero {
    padding: 12rem 0 8rem;
    position: relative;
    /* Option 5 Background */
    background-color: transparent;
    overflow: hidden;
}

.hero__content {
    display: flex;
    justify-content: space-between;
    align-items: stretch; /* Ensure equal height */
    gap: 4rem;
}

.hero__left {
    flex: 1.6; /* Increased width (approx 60%) */
    max-width: none; /* Remove 50% limit */
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* Prevent flex overflow */
}

.hero__right {
    flex: 1; /* Decreased width (approx 40%) */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden; /* Contain the gallery */
    border-radius: 8px;
}

.hero-gallery-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-gallery-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
    width: 100%;
    height: 100%;
    gap: 0; /* No gap for seamless slider */
}

.hero-gallery-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.hero-gallery-item {
    flex: 0 0 100%; /* Full width */
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.hero__image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
}

.hero-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(2, 12, 27, 0.7);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0; /* Hidden by default, shown on hover */
}

.hero__right:hover .hero-gallery-nav {
    opacity: 1;
}

.hero-gallery-nav:hover {
    background: var(--accent-primary);
    color: #000;
}

.hero-gallery-nav.prev {
    left: 10px;
}

.hero-gallery-nav.next {
    right: 10px;
}

.hero__image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 400px;
    background: rgba(0, 243, 255, 0.05);
    border: 1px dashed var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-family: var(--font-headers);
}

.hero__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    background-image: none;
    z-index: 0;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}


.hero-title-split {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 1rem;
}
.hero-title-main {
    font-family: 'Georgia', serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 3vw, 2rem);
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    background: linear-gradient(180deg, var(--text-primary) 0%, var(--accent-secondary) 45%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: url(#wavy) drop-shadow(0 0 10px rgba(0, 100, 120, 0.3));
    text-align: left;
    padding-right: 10px;
}
.hero-title-sub {
    font-family: 'Georgia', serif;
    font-weight: 700;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    line-height: 1.2;
    color: var(--text-primary);
    text-align: center;
    margin-top: 0.5rem;
}

/* Maritime-themed hero title styling */
.hero-title-maritime {
    margin-bottom: 1rem;
}
.hero-title-maritime .hero-title-line {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.hero-title-maritime .hero-prefix {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(1.2rem, 3.8vw, 2.4rem);
    color: var(--accent-secondary); /* тёмно-синий */
    text-transform: uppercase;
    letter-spacing: 0.14em;
    text-shadow: 0 0 10px rgba(0,0,0,0.06);
}
.hero-title-maritime .hero-rest {
    font-family: var(--font-headers);
    font-weight: 700;
    font-size: clamp(1.6rem, 4.2vw, 3.2rem);
    line-height: 1.05;
    color: var(--accent-secondary); /* тёмно-синий */
    text-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
/* Decorative icon removed — keeping header clean */

@media (max-width: 992px) {
    .hero-title-maritime .hero-prefix { font-size: 1.1rem; }
    .hero-title-maritime .hero-rest { font-size: 1.6rem; }
    .hero-title-maritime::before { width: 36px; height: 36px; }
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

@media (max-width: 992px) {
    .hero__content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .hero__left {
        max-width: 100%;
        text-align: center;
    }
    
    .hero__right {
        align-items: center;
        width: 100%;
    }
    
    .hero__view-tile {
        text-align: center !important;
    }
    
    .hero p {
        margin-left: auto;
        margin-right: auto;
    }
}

.hero__badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    color: #000000; /* Black text */
    font-family: var(--font-headers);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    background: rgba(5, 20, 5, 0.2); /* Increased transparency */
    backdrop-filter: blur(5px); /* Blur effect */
    border-radius: 8px;
    box-shadow: 0 0 10px 5px rgba(5, 20, 5, 0.2); /* Blurred edges */
}

.hero__lead {
    font-size: 1.4rem;
    max-width: 800px;
    margin: 0 auto 3rem;
    border-left: 3px solid var(--accent-primary);
    padding-left: 1.5rem;
    text-align: left;
    background: linear-gradient(90deg, rgba(0, 243, 255, 0.05), transparent);
}

.hero__actions {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 3rem;
}

.hero__actions > * {
    flex: 1;
    min-width: 200px;
    text-align: center;
    justify-content: center;
}

/* Buttons - Tech Style */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    text-decoration: none;
    font-family: var(--font-headers);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    border: 1px solid transparent;
    cursor: pointer;
    overflow: hidden;
    white-space: normal;
    text-align: center;
}

/* Primary: "Request Confidential Audit" */
.btn--primary {
    background: rgba(0, 109, 128, 0.1);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 109, 128, 0.2);
}

.btn--primary:hover {
    background: var(--accent-primary);
    color: #000;
    box-shadow: 0 0 25px var(--accent-primary);
    text-shadow: none;
    transform: translateY(-2px);
}

/* Secondary: "Why Us" */
.btn--secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--text-secondary);
}

.btn--secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(0, 109, 128, 0.05);
    box-shadow: 0 0 15px rgba(0, 109, 128, 0.2);
}

/* Outline: "Our View" */
.btn--outline {
    background: transparent;
    color: var(--accent-primary);
    border: 1px dashed var(--accent-primary);
}

.btn--outline:hover {
    background: rgba(0, 109, 128, 0.1);
    border-style: solid;
    box-shadow: 0 0 15px rgba(0, 109, 128, 0.3);
    transform: translateY(-2px);
}

/* Cards / HUD Elements */
.card, .service-item {
    background: var(--bg-panel);
    border: 1px solid rgba(0, 243, 255, 0.1);
    padding: 2rem;
    position: relative;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    border-radius: 16px;
}

.service-item {
    cursor: pointer;
}

.card:hover, .service-item:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 243, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.1);
}

.service-item:not(.expanded):hover {
    animation: vibrate 0.4s linear infinite;
    cursor: pointer;
}

@keyframes vibrate {
    0% { transform: translateY(-5px) translate(0); }
    20% { transform: translateY(-5px) translate(-1px, 1px); }
    40% { transform: translateY(-5px) translate(-1px, -1px); }
    60% { transform: translateY(-5px) translate(1px, 1px); }
    80% { transform: translateY(-5px) translate(1px, -1px); }
    100% { transform: translateY(-5px) translate(0); }
}

/* Expanded Card Logic */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(5px);
}

.overlay.active {
    opacity: 1;
    pointer-events: all;
}

.service-item.expanded {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(1.1);
    z-index: 1000;
    width: 80% !important;
    max-width: 800px;
    height: auto !important;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.3);
    border-color: var(--accent-primary);
    cursor: default;
    background: var(--bg-dark); /* Ensure solid background */
    margin: 0 !important;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
    font-size: 20px;
    line-height: 1;
    pointer-events: none;
}

.close-btn:hover {
    background: var(--accent-alert);
    color: white;
}

.service-item.expanded .close-btn {
    opacity: 1;
    pointer-events: all;
}

.service-item.expanded .service-short-desc {
    display: none;
}

.service-item.expanded .service-full-content {
    display: block !important;
    margin-var(--text-primary); /* Dark text for light bg */
    line-height: 1.6;
}

.service-item.expanded h3 {
    font-size: 0.9rem; /* Reduced from 1.3rem */
}

.service-item.expanded strong, 
.service-item.expanded b {
    font-weight: 900;
    color: var(--text-primary): 900;
    color: #fff;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); }

/* AI Glow Element */
.ai-glow {
    animation: pulse 4s infinite ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.1); }
    100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
}

/* Footer */
footer {
    border-top: 1px solid rgba(0, 243, 255, 0.1);
    color: var(--text-dim);
    font-family: var(--font-headers);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .header {
        padding: 1rem 0;
        background: rgba(5,5,5,0.95);
    }

    .header__logo {
        font-size: 1.4rem;
    }

    .header__nav {
        display: flex;
        gap: 0.5rem;
        position: relative;
        align-items: center;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    .header__nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        width: min(360px, 92vw);
        padding: 0.75rem;
        flex-direction: column;
        gap: 0.75rem;
        background: rgba(5, 20, 5, 0.98);
        border: 1px solid rgba(0, 243, 255, 0.18);
        border-radius: 14px;
        z-index: 1001;
    }

    body.mobile-menu-open .header__nav-links {
        display: flex;
    }

    .header__nav-links a::after {
        display: none;
    }

    .header__nav-links a {
        width: 100%;
        text-align: center;
        padding: 0.85rem 0.75rem;
        border: 1px solid rgba(0, 243, 255, 0.12);
        background: rgba(0, 243, 255, 0.03);
        border-radius: 12px;
    }

    .header__nav-links a.header__cta {
        justify-content: center;
        margin-left: 0;
    }

    .header__nav-links .nav-item-dropdown {
        width: 100%;
    }

    .header__nav-links .nav-dropdown-menu {
        position: static;
        display: none;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        margin-top: 0.5rem;
        width: 100%;
        background: transparent;
        border: none;
        padding: 0;
    }

    .header__nav-links .nav-item-dropdown:hover .nav-dropdown-menu,
    .header__nav-links .nav-item-dropdown.is-open .nav-dropdown-menu {
        display: flex;
    }

    .lang-switch {
        margin-left: 0.5rem;
        gap: 0.5rem;
    }
    
    .header__cta {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }

    .hero {
        padding: 8rem 0 4rem;
    }

    .hero h1 { 
        font-size: 2.2rem; 
        line-height: 1.2;
    }
    
    .hero__lead { 
        font-size: 1.1rem;
        border-left: none; 
        padding-left: 0; 
        text-align: center; 
        background: none; 
        margin-bottom: 2rem;
    }

    .hero__actions {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }

    .btn {
        width: 100%;
        margin-left: 0;
        padding: 0.8rem 1rem;
    }

    .grid--2, .grid--3 { 
        grid-template-columns: 1fr; 
        gap: 1.5rem;
    }
    
    .card, .service-item {
        padding: 1.5rem;
    }
    
    h2 {
        font-size: 1.8rem;
        text-align: center;
        display: block;
        border-bottom: none;
    }
    
    h2::after {
        content: '';
        display: block;
        width: 50px;
        height: 2px;
        background: var(--accent-primary);
        margin: 0.5rem auto 0;
    }
}

/* Language Switcher */
.lang-switch {
    display: none; /* Hidden by default, toggled via JS */
    position: absolute;
    top: calc(100% + 36px);
    right: 0;
    background: rgba(2, 12, 27, 0.3);
    backdrop-filter: blur(3px);
    border: 1px solid rgba(0, 243, 255, 0.1);
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.5rem;
    /* Keep above mobile dropdown panel */
    z-index: 1105;
    min-width: 60px;
    border-radius: 8px;
}

.lang-switch.active {
    display: flex;
}

.lang-switch a {
    display: block;
    padding: 0.5rem;
    text-align: center;
    width: 100%;
    color: #e0f7fa; /* Light text for dark dropdown */
    text-decoration: none;
    font-family: var(--font-headers);
    font-size: 0.9rem;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.lang-switch a:hover,
.lang-switch a.active {
    color: var(--accent-primary);
    text-shadow: var(--glow-text);
}


/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-panel);
    border: none;
    width: 90%;
    max-width: 1100px;
    height: 80vh;
    position: relative;
    padding: 2rem;
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.1);
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--accent-primary);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}

.modal-close:hover {
    text-shadow: 0 0 10px var(--accent-primary);
}

.modal-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    padding-bottom: 1rem;
}

.modal-header h2 {
    margin: 0;
    color: var(--accent-primary);
    font-family: var(--font-headers);
    font-size: 1.5rem; /* Reduced from default h2 size */
}

.gallery-container {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    gap: 2rem;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) rgba(0, 0, 0, 0.3);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.gallery-container.fade-out {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.detail-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.detail-container.active {
    opacity: 1 !important;
    transform: scale(1);
}

/* Force left alignment for headers in modals and detail views */
.modal-content h1, .modal-content h2, .modal-content h3, .modal-content h4, .modal-content h5, .modal-content h6,
.detail-container h1, .detail-container h2, .detail-container h3, .detail-container h4, .detail-container h5, .detail-container h6,
.service-item.expanded h1, .service-item.expanded h2, .service-item.expanded h3, .service-item.expanded h4, .service-item.expanded h5, .service-item.expanded h6,
.detail-page h1, .detail-page h2, .detail-page h3, .detail-page h4, .detail-page h5, .detail-page h6 {
    text-align: left !important;
}

.btn-back {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    margin-bottom: 1rem;
    font-family: var(--font-headers);
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: var(--accent-primary);
    color: var(--bg-dark);
}

.gallery-container::-webkit-scrollbar {
    height: 8px;
}

.gallery-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.gallery-container::-webkit-scrollbar-thumb {
    background-color: var(--accent-primary);
    border-radius: 4px;
}

.gallery-card {
    min-width: 350px;
    max-width: 350px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 243, 255, 0.1);
    padding: 1.5rem;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    overflow-y: auto;
    max-height: 100%;
}

.gallery-card::-webkit-scrollbar {
    width: 4px;
}

.gallery-card::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.gallery-card::-webkit-scrollbar-thumb {
    background-color: var(--accent-primary);
    border-radius: 2px;
}

.gallery-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
    transform: translateY(-5px);
}

.gallery-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 243, 255, 0.2);
}

.gallery-card h3 {
    color: var(--text-primary);
    margin-top: 0;
    font-size: 1.2rem;
}

.gallery-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}


/* Mobile Only / Desktop Only Utilities */
.mobile-only { display: none; }
@media (max-width: 768px) {
    .mobile-only { display: block; }
    .desktop-only { display: none !important; }
}

/* =========================
   Mobile Styles (<= 768px)
   Keep desktop untouched.
   ========================= */

/* Home: layout overrides (including sections with inline padding) */
@media (max-width: 768px) {
    .expertise,
    .process,
    .contact {
        padding: 4rem 0 !important;
    }
}

/* Modals: tighter layout on mobile */
@media (max-width: 768px) {
    .modal-content {
        width: calc(100% - 24px);
        height: 85vh;
        padding: 1rem;
    }

    .modal-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    .modal-close {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 1.75rem;
    }

    .gallery-container {
        gap: 1rem;
    }

    .gallery-card {
        min-width: 78vw;
        max-width: 78vw;
        padding: 1rem;
    }

    .gallery-card img {
        height: 160px;
    }

    .detail-container {
        padding: 0.75rem;
    }

    .service-item.expanded {
        width: calc(100% - 24px) !important;
        max-height: 85vh;
        transform: translate(-50%, -50%) scale(1.02);
    }
}

/* Tabs: wrap and reduce on mobile */
@media (max-width: 768px) {
    .media-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .media-tab-btn {
        flex: 1 1 auto;
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Mobile Expertise Section (mobile-only module) */
@media (max-width: 768px) {
    .mobile-expertise-section {
        padding: 3rem 0;
        background: rgba(5, 5, 5, 0.8);
        border-top: 1px solid rgba(0, 243, 255, 0.1);
    }

    .mobile-expertise-menu {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1.25rem;
    }

    .mobile-expertise-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-decoration: none;
        padding: 1rem 1rem;
        border-radius: 14px;
        background: rgba(0, 243, 255, 0.03);
        border: 1px solid rgba(0, 243, 255, 0.16);
        color: var(--text-secondary);
        font-family: var(--font-headers);
        line-height: 1.2;
        transition: all 0.2s ease;
    }

    .mobile-expertise-item__title {
        font-size: 1rem;
        color: #e0f7fa;
    }

    .mobile-expertise-item:active {
        transform: translateY(1px);
    }

    .mobile-expertise-item:hover {
        border-color: rgba(0, 243, 255, 0.35);
        box-shadow: 0 0 14px rgba(0, 243, 255, 0.12);
        color: #fff;
    }
}

/* Language Switcher Mobile Styles */
.lang-switch-container {
    position: relative;
    display: flex;
    align-items: center;
}

.lang-toggle {
    background: transparent;
    border: none;
    color: var(--accent-primary);
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lang-toggle:hover {
    color: #fff;
    filter: drop-shadow(0 0 5px var(--accent-primary));
    transform: scale(1.1);
}

.globe-icon {
    width: 24px;
    height: 24px;
    stroke-width: 1.5;
}

/* Removed .lang-toggle .arrow styles as arrow is removed */

@media (max-width: 768px) {
    .lang-switch {
        left: auto; 
        right: 0;
        margin-left: 0;
    }

    /* Header Mobile Layout Overrides (hamburger handles nav links) */
    .header__nav {
        flex-wrap: nowrap;
        justify-content: flex-end;
    }

    .nav-link-training {
        order: 4;
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
        padding: 0.8rem;
        border: 1px solid rgba(0, 243, 255, 0.1);
        background: rgba(255, 255, 255, 0.02);
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(2, 12, 27, 0.95);
    border-top: 1px solid var(--accent-primary);
    padding: 1.5rem;
    z-index: 10000;
    display: none; /* Hidden by default, shown by JS */
    backdrop-filter: blur(10px);
    box-shadow: 0 -5px 20px rgba(0, 212, 255, 0.1);
}

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

.cookie-banner__text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cookie-banner__text a {
    color: var(--accent-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.cookie-banner__text a:hover {
    border-color: var(--accent-primary);
}

.cookie-banner__actions {
    display: flex;
    gap: 1rem;
}

/* Language Suggestion Toast */
.lang-toast {
    position: fixed;
    top: 100px; /* Below header */
    right: 20px;
    background: rgba(2, 12, 27, 0.95);
    border: 1px solid var(--accent-primary);
    padding: 1rem;
    border-radius: 8px;
    z-index: 9999;
    display: none; /* Hidden by default */
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.lang-toast__content {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
    font-family: var(--font-headers);
    font-size: 0.9rem;
}

.lang-toast__buttons {
    display: flex;
    gap: 0.5rem;
}

.lang-toast__buttons button {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-headers);
    font-weight: bold;
}

.lang-toast__buttons button:hover {
    background: var(--accent-primary);
    color: #000;
}

.lang-toast__close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 0.5rem;
    line-height: 1;
    padding: 0;
}

.lang-toast__close:hover {
    color: var(--accent-alert);
}

@media (max-width: 768px) {
    .lang-toast {
        top: auto;
        bottom: 80px; /* Above cookie banner */
        right: 10px;
        left: 10px;
        text-align: center;
    }
    
    .lang-toast__content {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .cookie-banner__content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cookie-banner__actions {
        width: 100%;
        justify-content: center;
    }
}

/* Gallery Section */
.gallery-scroll-container {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) rgba(0, 0, 0, 0.3);
}

.gallery-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.gallery-scroll-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.gallery-scroll-container::-webkit-scrollbar-thumb {
    background-color: var(--accent-primary);
    border-radius: 4px;
}

.gallery-track {
    display: flex;
    gap: 2rem;
    width: max-content; /* Ensure track is wide enough */
}

.gallery-item {
    position: relative;
    min-width: 300px;
    max-width: 500px;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 243, 255, 0.2);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
    border-color: var(--accent-primary);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: #fff;
    font-family: var(--font-headers);
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

/* Scroll Scale Effect */
.scroll-effect {
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: scale(0.95);
    opacity: 0.6;
}

.scroll-effect.active {
    transform: scale(1);
    opacity: 1;
}


/* Nav Dropdown */
.nav-item-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 25, 40, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    padding: 0.5rem 0;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 1000;
    border-radius: 4px;
    margin-top: 0.5rem;
}

/* Ensure it's hidden by default */
.nav-dropdown-menu {
    display: none;
}

/* Bridge the gap between button and menu */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -1rem;
    left: 0;
    width: 100%;
    height: 1rem;
    background: transparent;
}

.nav-item-dropdown:hover .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: #e0f7fa; /* Light text for dark dropdown */
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.3s;
    text-align: center;
}

.nav-dropdown-menu a:hover {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-primary);
}

.nav-dropdown-menu a::after {
    display: none; /* Remove the underline effect from main nav links */
}


/* Fade Out Dissolve Effect for Modal Close */
@keyframes fade-out-dissolve {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
        filter: blur(0px);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.05);
        filter: blur(10px);
    }
}

.service-item.fade-out-card {
    animation: fade-out-dissolve 0.8s ease-out forwards;
    pointer-events: none; /* Prevent clicks during animation */
}

/* Detail View Styles in Modal */
#detail-content-placeholder {
    /* По умолчанию — светлый текст для тёмной модалки,
       но не ломаем стили HTML-контента карточек. */
    color: var(--text-primary);
}

#detail-content-placeholder .detail-body {
    color: inherit;
}

#detail-content-placeholder .detail-body strong,
#detail-content-placeholder .detail-body b {
    font-weight: 900 !important;
}

#detail-content-placeholder .detail-body,
#detail-content-placeholder .detail-body p,
#detail-content-placeholder .detail-body div,
#detail-content-placeholder .detail-body li {
    text-align: justify !important;
}

/* Detail Page (Separate Window) Styles */
.detail-content,
.detail-content p,
.detail-content div,
.detail-content li,
.detail-content ul,
.detail-content ol {
    text-align: justify !important;
}

.back-link.close-style {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--accent-primary);
    background: rgba(0, 0, 0, 0.5);
    color: var(--accent-primary);
    transition: all 0.3s ease;
}

.back-link.close-style:hover {
    background: var(--accent-primary);
    color: #000;
    transform: rotate(90deg);
}

.back-link.close-style svg {
    width: 24px;
    height: 24px;
}

