
/* Global utility classes */
html.no-scroll,
body.no-scroll {
    overflow: hidden !important;
    touch-action: none; /* Prevent scroll on mobile devices */
    -webkit-overflow-scrolling: auto;
}


:root {
    --bg-base: #030305;
    --bg-surface: #0a0a0f;
    --bg-surface-elevated: rgba(18, 18, 24, 0.5);
    --border-color: rgba(255, 255, 255, 0.06);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-primary: #f59e0b;
    /* Premium brilliant amber */
    --accent-glow: rgba(245, 158, 11, 0.2);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition-standard: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
    max-width: 100vw;
    overflow-x: clip;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* iOS Safari auto-zooms the page when a focused form control has a font-size
   below 16px. Enforce a 16px minimum on all text-entry controls so focusing an
   input never triggers that zoom. Buttons/checkboxes/radios are excluded. */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
textarea,
select {
    font-size: 16px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-standard);
}

/* Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.glass-panel {
    background: var(--bg-surface-elevated);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08), 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: transform var(--transition-standard), box-shadow var(--transition-standard), border-color var(--transition-standard);
}

/* iOS Safari: backdrop-filter on many cards + a fixed header re-rasterizes the
   blur every scroll frame — the dominant cause of scroll jank. On touch/coarse
   devices drop the blur and use a near-solid background so panels stay legible
   while scrolling becomes smooth. */
@media (hover: none), (pointer: coarse) {
    .glass-panel {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(16, 16, 22, 0.92);
    }

    .header.scrolled {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(5, 5, 6, 0.96);
    }
}

/* Dynamic glow interactions */
.hover-glow {
    position: relative;
    transition: transform var(--transition-standard), box-shadow var(--transition-standard), border-color var(--transition-standard);
    backface-visibility: hidden;
}

.hover-glow::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(45deg, transparent 40%, var(--accent-primary) 50%, transparent 60%);
    background-size: 200% 200%;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-standard);
    pointer-events: none;
    z-index: 10;
}

/* Gate the lift + animated-border glow to real pointer devices. On touch (iOS
   Safari) :hover sticks after a tap, leaving a non-link card permanently raised
   with its border gradient animating forever — gating prevents that. */
@media (hover: hover) {
    .hover-glow.hover-glow:hover {
        transform: translateY(-6px);
        box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15), 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 40px rgba(245, 158, 11, 0.15);
        border-color: rgba(245, 158, 11, 0.3);
    }

    .hover-glow.hover-glow:hover::before {
        opacity: 1;
        animation: borderGradient 2s ease infinite;
    }
}

@keyframes borderGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.2rem 0;
    transition: background var(--transition-standard), padding var(--transition-standard), border-bottom var(--transition-standard);
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100% !important;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-image {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
    line-height: 1.1;
    text-transform: uppercase;
}

.logo-text span {
    display: block;
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

/* Hide mobile-only elements on desktop */
.mobile-menu-footer, 
.mobile-dropdown-toggle {
    display: none;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

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

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

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

.nav-item-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: -20px;
    padding-top: 1.5rem;
    min-width: 380px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity var(--transition-standard), transform var(--transition-standard), visibility var(--transition-standard);
    z-index: 100;
}

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

.nav-dropdown-content {
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    will-change: transform, opacity;
}

.nav-dropdown-link {
    padding: 0.6rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
    transition: color var(--transition-standard), background var(--transition-standard), padding-left var(--transition-standard);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-dropdown-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    padding-left: 2rem;
}
.nav-dropdown-link::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    opacity: 0;
    transform: scale(0);
    transition: all var(--transition-standard);
}
.nav-dropdown-link:hover::before {
    opacity: 1;
    transform: scale(1);
}

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

.phone-link {
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary);
    color: #fff;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 14px var(--accent-glow);
    transition: transform var(--transition-standard), box-shadow var(--transition-standard);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
}

/* Footer */
.footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 5rem 0 2rem;
    margin-top: 6rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand .logo-wrapper {
    margin-bottom: 1.5rem;
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    max-width: 300px;
}

.footer-title {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

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

/* Animations */
/* Hidden-until-scrolled only when JS is available, so content always shows if JS is
   disabled or fails to load on a flaky mobile connection. */
.js .animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

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

/* Hero is always above the fold: reveal it instantly via CSS so the first screen
   paints immediately and never waits for the IntersectionObserver / main.js. */
.js .hero .animate-fade-up {
    opacity: 1;
    transform: none;
    animation: heroFadeUp var(--transition-slow) both;
}

@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .js .animate-fade-up,
    .js .hero .animate-fade-up {
        opacity: 1;
        transform: none;
        animation: none;
        transition: none;
    }
}

/* ----- PAGE SECTIONS ----- */

.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Secondary Button */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-primary);
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: background var(--transition-standard), transform var(--transition-standard), border-color var(--transition-standard);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh; /* iOS Safari: track the dynamic viewport so the hero isn't hidden behind the address/tool bar */
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
    background-image: linear-gradient(to right, rgba(3, 3, 5, 0.95) 0%, rgba(3, 3, 5, 0.6) 50%, rgba(3, 3, 5, 0.85) 100%), var(--hero-bg, url('assets/hero-bg.jpg'));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.bg-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-size: 60px 60px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(60px);
    }
}

.hero::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    filter: blur(180px);
    opacity: 0.2;
    z-index: -1;
    border-radius: 50%;
    animation: heroOrbPulse 8s ease-in-out infinite alternate;
}

@keyframes heroOrbPulse {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 0.15;
    }

    100% {
        transform: scale(1.1) translate(-20px, 20px);
        opacity: 0.25;
    }
}

/* iOS Safari: an always-on transform/opacity animation on a 180px-blur layer
   (plus the moving grid) keeps the GPU compositing during momentum scroll —
   visible scroll jank and battery drain. These are purely decorative, so on
   touch/coarse-pointer devices freeze them and shrink the costly blur. */
@media (hover: none), (pointer: coarse) {
    .bg-grid {
        animation: none;
    }

    .hero::after {
        animation: none;
        filter: blur(90px);
    }
}

.hero-container {
    padding-bottom: 4rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(217, 119, 6, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(217, 119, 6, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 4.5rem;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: #fff;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

.hero-title span {
    color: var(--accent-primary);
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

/* Stats Section */
.stats {
    padding: 2rem 0 5rem;
    position: relative;
    z-index: 2;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-card {
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(15, 15, 20, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    transition: transform var(--transition-standard), border-color var(--transition-standard), box-shadow var(--transition-standard);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(217, 119, 6, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(217, 119, 6, 0.1);
}

.stat-icon-wrapper {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.15) 0%, rgba(217, 119, 6, 0.02) 100%);
    border: 1px solid rgba(217, 119, 6, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: inset 0 0 20px rgba(217, 119, 6, 0.05);
}

.stat-icon-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at center, rgba(217, 119, 6, 0.3) 0%, transparent 70%);
    opacity: 0.5;
    pointer-events: none;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 0.3rem;
}

.stat-title span {
    color: var(--accent-primary);
}

.stat-p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* Bento Services */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 280px;
    gap: 1.5rem;
}

.bento-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem;
    grid-column: span 2;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.bento-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-surface-elevated);
    transition: transform var(--transition-standard);
    will-change: transform;
    backface-visibility: hidden;
}

/* Actual image is a real <img> so the browser can natively lazy-load
   off-screen cards instead of eagerly fetching every grid background. */
.bento-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.bento-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.95) 0%, rgba(10, 10, 15, 0.6) 40%, rgba(10, 10, 15, 0.2) 100%);
    pointer-events: none;
    z-index: 1;
}

.bento-item:hover .bento-bg,
.comp-item:hover .bento-bg {
    transform: scale(1.08);
}

.bento-content {
    position: relative;
    z-index: 2;
}

.bento-tall {
    grid-row: span 2;
}

.bento-wide {
    grid-column: span 4;
}

/* Services Preview Split */
.services-preview-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: 16px;
    overflow: hidden;
    padding: 0;
}

.split-content {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.split-title {
    font-size: 2.2rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.split-title span {
    color: var(--text-primary);
}

.split-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.split-features {
    list-style: none;
    padding: 0;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.split-features li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.split-action {
    display: flex;
}

.split-image {
    min-height: 450px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: var(--bg-surface-elevated);
    border-left: 1px solid var(--border-color);
}

@media (max-width: 1024px) {
    .hero {
        background-attachment: scroll;
    }

    .services-preview-split {
        grid-template-columns: 1fr;
    }

    .split-image {
        min-height: 350px;
        order: -1;
        border-left: none;
        border-bottom: 1px solid var(--border-color);
    }

    .split-content {
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .split-content {
        padding: 1.5rem;
    }

    .split-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .split-desc {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .split-features {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .split-features li {
        margin-bottom: 0.8rem;
    }

    .split-image {
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    .split-content {
        padding: 1.25rem;
    }

    .split-title {
        font-size: 1.5rem;
    }

    .split-desc {
        font-size: 0.95rem;
    }

    .split-features {
        font-size: 0.9rem;
    }
    
    .split-image {
        min-height: 200px;
    }
}

.bento-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: #fff;
    transition: color var(--transition-standard);
}

.bento-item:hover .bento-content h3 {
    color: var(--accent-primary);
}

.bento-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* CTA Section */
.cta-box {
    padding: 4rem;
    text-align: center;
    background: radial-gradient(circle at center, rgba(217, 119, 6, 0.1) 0%, transparent 60%), var(--bg-surface-elevated);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-content h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.cta-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Page Headers (Internal Pages) */
.page-header {
    padding: 12rem 0 6rem;
    background: radial-gradient(circle at right center, rgba(217, 119, 6, 0.08) 0%, transparent 60%);
    border-bottom: 1px solid var(--border-color);
}

.page-header-content {
    max-width: 800px;
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.page-header h1 span {
    color: var(--accent-primary);
}

.page-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.about-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-features li {
    font-size: 1.05rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 2rem;
}

.about-features li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

.about-features li strong {
    color: #fff;
}

.about-image {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(25, 25, 25, 0.4), rgba(40, 40, 40, 0.8));
}

.image-placeholder {
    opacity: 0.8;
}

/* Competencies Grid */
.comp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 2rem;
}

.comp-item {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 380px;
    border-top: 3px solid transparent;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    background: var(--bg-surface-elevated);
    transition: transform var(--transition-standard), border-color var(--transition-standard);
    overflow: hidden;
    position: relative;
    z-index: 1;
}



.comp-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(217, 119, 6, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.comp-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.comp-item p {
    color: var(--text-secondary);
    font-size: 1rem;
    flex-grow: 1;
}

/* Pricing Table */
.pricing-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    background: var(--bg-surface-elevated);
}

.pricing-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    text-align: left;
}

.pricing-table th,
.pricing-table td {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.pricing-table th {
    background: rgba(255, 255, 255, 0.03);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pricing-table tbody tr {
    transition: background 0.2s;
}

.pricing-table tbody tr:hover {
    background: rgba(217, 119, 6, 0.05);
}

.pricing-table td:last-child {
    font-weight: 600;
    color: var(--accent-primary);
}

.pricing-section-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    border-left: 4px solid var(--accent-primary);
    padding-left: 1rem;
}

/* History Timeline Section */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 4rem auto 0;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--accent-primary), transparent);
    transform: translateX(-50%);
    opacity: 0.3;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 2rem 3rem;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: var(--bg-surface);
    border: 3px solid var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(217, 119, 6, 0.6);
    transform: translateY(-50%);
    z-index: 2;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-item:hover .timeline-dot {
    transform: translateY(-50%) scale(1.3);
    box-shadow: 0 0 25px rgba(217, 119, 6, 0.9);
}

.timeline-content {
    background: rgba(40, 42, 45, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-8px);
    border-color: rgba(217, 119, 6, 0.4);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.timeline-year {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: rgba(217, 119, 6, 0.1);
    color: var(--accent-primary);
    border-radius: 100px;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(217, 119, 6, 0.2);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 1.5rem;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 1.5rem;
}

.timeline-content h4 {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 0.8rem;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Director & Timeline Infographics */
.director-section {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
    align-items: center;
    background: radial-gradient(circle at top right, rgba(217, 119, 6, 0.05) 0%, transparent 50%), var(--bg-surface-elevated);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin: 6rem 0;
}

.director-photo {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    filter: brightness(0.9) contrast(1.1);
    object-fit: cover;
}

.director-title {
    color: var(--accent-primary);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.director-text h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.director-quote {
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-top: 2rem;
    padding-left: 1.5rem;
    border-left: 3px solid var(--accent-primary);
}

/* Animated Process Layout (Horizontal Cards) */
.process-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr 1fr;
    margin-top: 2rem;
}

.process-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: rgba(15, 15, 20, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    gap: 2.5rem;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
}

.process-img-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.process-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease, filter 0.4s ease;
    filter: brightness(0.85);
}

.process-card:hover .process-img-wrapper img {
    transform: scale(1.15) rotate(2deg);
    filter: brightness(1.1);
}

.process-content {
    flex-grow: 1;
}

.process-content h3 {
    font-size: 1.6rem;
    color: var(--accent-primary);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.process-content .step-num {
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(217, 119, 6, 0.15);
    font-family: inherit;
    line-height: 1;
    transition: color 0.4s ease, text-shadow 0.4s ease;
}

.process-card:hover .process-content .step-num {
    color: rgba(217, 119, 6, 0.8);
    text-shadow: 0 0 15px rgba(217, 119, 6, 0.4);
}

.process-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

@media (max-width: 1024px) {
    .process-grid {
        grid-template-columns: 1fr;
        max-width: 800px;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .process-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        gap: 1.8rem;
    }

    .process-img-wrapper {
        width: 100%;
        height: 180px;
    }
}

/* Tablet Landscape Responsiveness */
@media (max-width: 1300px) {
    .hero-title {
        font-size: 3.8rem;
        hyphens: none;
        word-wrap: normal;
    }
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 1024px) {
    .nav-links,
    .phone-link {
        display: none;
    }

    .hero-title {
        font-size: 3rem;
        hyphens: none;
        word-wrap: normal;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .bento-wide {
        grid-column: span 2;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .process-grid {
        grid-template-columns: 1fr;
        max-width: 800px;
        margin: 0 auto;
    }

    .director-section {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
        text-align: center;
    }

    .director-quote {
        margin-top: 1.5rem;
        padding-left: 0;
        padding-top: 1.5rem;
        border-left: none;
        border-top: 3px solid var(--accent-primary);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding: 1.5rem 0 1.5rem 60px;
    }

    .timeline-dot {
        left: 20px !important;
        right: auto !important;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin: 0;
    }
}

@media (max-width: 768px) {
    .header-cta .btn-primary {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-desc {
        font-size: 1.1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-item,
    .bento-wide {
        grid-column: span 1;
        min-height: 250px;
    }

    .comp-grid {
        grid-template-columns: 1fr;
    }

    .cta-box {
        padding: 2.5rem 1.5rem;
    }

    .cta-content h2 {
        font-size: 1.8rem;
    }

    .page-header {
        padding: 8rem 0 4rem;
    }

    .page-header h1 {
        font-size: 2.0rem;
    }

    .director-section {
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .director-text h2 {
        font-size: 1.6rem;
        word-wrap: break-word;
        hyphens: auto;
    }

    .director-text p {
        font-size: 1rem !important;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 400px) {
    .container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 1.8rem;
        word-break: break-word;
        margin-bottom: 1rem;
    }
    
    .hero-desc {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-actions .btn-primary, .hero-actions a {
        width: 100%;
        text-align: center;
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
    }
    
    .hero-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.8rem;
        margin-bottom: 1rem;
    }
    
    .hero-container {
        padding-bottom: 2rem;
    }

    .page-header h1 {
        font-size: 1.65rem;
    }

    .logo-text {
        font-size: 1rem;
    }

    .logo-image {
        height: 36px;
    }

    .logo-wrapper {
        gap: 0.5rem;
    }
    
    .hamburger-btn {
        margin-left: 10px;
    }

    .nav-links {
        padding: 100px 1.5rem 3rem;
    }

    .nav-link {
        font-size: 1.6rem;
        padding: 1rem 0;
    }

    .nav-dropdown-link {
        font-size: 1rem;
        padding: 0.7rem 0;
    }
    

    .mobile-dropdown-toggle {
        width: 36px;
        height: 36px;
    }

    .mobile-menu-contact a {
        font-size: 1.2rem;
    }
    
    .mobile-menu-contact a[href^="mailto"] {
        font-size: 1rem !important;
    }

    .footer {
        padding: 3rem 0 1.5rem;
        margin-top: 4rem;
    }

    .footer-desc {
        font-size: 0.9rem;
    }
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 2rem;
}

.project-card {
    overflow: hidden;
    padding: 0;
    transition: transform var(--transition-standard), box-shadow var(--transition-standard);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.project-img-wrapper {
    height: 240px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-img-wrapper img {
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Projects Slider specific styles */
.projects-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.projects-slider {
    flex-grow: 1;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

.projects-track {
    display: flex;
    gap: 2rem;
    transition: transform var(--transition-standard);
    will-change: transform;
}

.projects-track .project-card {
    flex: 0 0 calc((100% - 4rem) / 3);
}

@media (max-width: 1024px) {
    .projects-track .project-card {
        flex: 0 0 calc((100% - 2rem) / 2);
    }
}

@media (max-width: 768px) {
    .slider-btn {
        display: none !important;
    }
    
    .projects-slider-wrapper {
        margin-left: -2rem;
        margin-right: -2rem;
        gap: 0;
    }
    
    .projects-track {
        gap: 1rem;
    }
    
    .projects-track .project-card {
        flex: 0 0 80%;
    }

    .projects-track .project-card:first-child {
        margin-left: 10%;
    }

    .projects-track .project-card:last-child {
        margin-right: 10%;
    }
}

@media (max-width: 400px) {
    .projects-slider-wrapper {
        margin-left: -1rem;
        margin-right: -1rem;
    }

}

.slider-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--transition-standard), transform var(--transition-standard), border-color var(--transition-standard);
    z-index: 2;
}

.slider-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.1);
    color: #fff;
}

/* Reviews */
.reviews-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.review-card {
    padding: 2.5rem;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.review-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
}

.review-header h4 {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
    color: #fff;
}

.rating {
    color: var(--accent-primary);
    font-size: 1rem;
    letter-spacing: 2px;
}

.review-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-style: italic;
    line-height: 1.6;
}

/* Promo and Certificates */
.cert-promo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: stretch;
}

.certificate-box {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cert-img-wrapper img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.promo-box {
    padding: 3rem;
}

@media (max-width: 768px) {
    .certificate-box,
    .promo-box {
        padding: 1.5rem;
    }
}

.promo-bg-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.promo-content {
    position: relative;
    z-index: 1;
}

/* Partners Marquee */
.disable-overflow {
    overflow: hidden;
}

.partners-marquee {
    position: relative;
    width: 100%;
    padding: 1rem 0;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-content {
    --marquee-gap: 4rem;
    display: flex;
    align-items: center;
    width: max-content;
    gap: var(--marquee-gap);
    animation: scroll-marquee 30s linear infinite;
    will-change: transform;
}

.marquee-content:hover {
    animation-play-state: paused;
}

/* Partner logos ship with inconsistent baked-in backgrounds (white, transparent,
   dark), so normalise every logo onto a uniform light "chip" — this keeps them
   legible and consistent on the dark page regardless of the source artwork. */
.marquee-content img {
    height: 80px;
    width: auto;
    max-width: none;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 14px 24px;
    background: #fff;
    border-radius: 12px;
    object-fit: contain;
    opacity: 0.92;
    transition: opacity var(--transition-standard), transform var(--transition-standard);
}

.marquee-content img:hover {
    opacity: 1;
    transform: translateY(-3px);
}

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

    to {
        /* Shift by exactly one half of the duplicated track (incl. one gap) for a seamless loop */
        transform: translateX(calc(-50% - (var(--marquee-gap) / 2)));
    }
}

/* Partners marquee — mobile: smaller logos, tighter spacing, softer edge fade */
@media (max-width: 768px) {
    .marquee-content {
        --marquee-gap: 2.25rem;
    }

    .marquee-content img {
        height: 56px;
        padding: 10px 16px;
        border-radius: 10px;
    }

    .partners-marquee {
        padding: 0.5rem 0;
        mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    }
}

@media (prefers-reduced-motion: reduce) {
    .marquee-content {
        animation: none;
    }
}

@media (max-width: 900px) {
    .cert-promo-grid {
        grid-template-columns: 1fr;
    }
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    visibility: visible;
    opacity: 1;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
    transition: color 0.3s;
}

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

.lightbox-img {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    z-index: 10000;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    object-fit: contain;
}

[data-zoom] {
    cursor: pointer;
}

/* Hamburger Menu Button */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001; /* Above mobile menu */
    padding: 0;
    margin-left: 20px;
    position: relative;
    /* Disable the iOS Safari double-tap-zoom delay so the first tap registers
       immediately instead of being held ~300ms to disambiguate a zoom gesture. */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.12);
}

/* Enlarge the tap target to ~60x52px (Apple HIG recommends >=44px) without
   changing the visual size of the icon, so taps near the icon reliably land. */
.hamburger-btn::before {
    content: '';
    position: absolute;
    inset: -14px;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: transform var(--transition-standard), opacity var(--transition-standard);
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

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

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}
@media (max-width: 1300px) {
    .header.mobile-menu-active { z-index: 9999 !important; }
    .header.mobile-menu-active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(5, 5, 8, 1);
        z-index: 1001; /* Above .nav-links (1000) */
    }

    .logo-wrapper {
        position: relative;
        z-index: 1005;
    }

    .hamburger-btn {
        display: flex;
        z-index: 1005; /* Must be above the menu and higher than header */
        position: relative;
    }
    
    .header-cta {
        display: none;
    }
    
    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh; /* iOS Safari: fill the visual viewport so menu items aren't hidden behind the toolbar and the height doesn't jump as it shows/hides */
        background: rgba(5, 5, 8, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 120px 2.5rem 4rem;
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                    opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                    visibility 0.5s;
        z-index: 1000;
        gap: 0;
        overscroll-behavior: contain; /* Prevent scroll chaining to body */
    }
    
    .nav-links.mobile-active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-links > * {
        opacity: 0;
        transform: translateY(20px);
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        width: 100%;
    }

    .nav-link {
        font-family: var(--font-heading);
        font-size: 2rem;
        font-weight: 600;
        margin: 0;
        padding: 1.2rem 0;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        color: var(--text-primary);
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: color var(--transition-standard);
    }

    .nav-links.mobile-active > * {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered animation for links */
    .nav-links.mobile-active > *:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.mobile-active > *:nth-child(2) { transition-delay: 0.15s; }
    .nav-links.mobile-active > *:nth-child(3) { transition-delay: 0.2s; }
    .nav-links.mobile-active > *:nth-child(4) { transition-delay: 0.25s; }
    .nav-links.mobile-active > *:nth-child(5) { transition-delay: 0.3s; }
    .nav-links.mobile-active > *:nth-child(6) { transition-delay: 0.35s; }

    .nav-link::after {
        display: none;
    }
    
    .nav-dropdown {
        position: static;
        min-width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        padding-top: 0;
        display: none; 
        padding-left: 0;
        border-left: none;
        margin: 1rem 0 1.5rem;
    }
    
    .nav-item-dropdown.mobile-open .nav-dropdown {
        display: block;
        animation: fadeInDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    
    @keyframes fadeInDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .nav-dropdown-content {
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        align-items: flex-start;
        width: 100%;
    }
    
    .nav-dropdown-link {
        font-family: var(--font-body);
        font-size: 1.1rem;
        padding: 0.8rem 0;
        text-align: left;
        width: 100%;
        color: var(--text-secondary);
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        transition: color 0.3s ease, padding-left 0.3s ease;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 0.75rem;
    }
    
    .nav-dropdown-link:last-child {
        border-bottom: none;
    }

    .nav-dropdown-link:hover {
        color: var(--accent-primary);
        background: transparent;
        padding-left: 0.8rem;
    }
    
    .nav-item-dropdown {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .mobile-dropdown-toggle {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 50%;
        color: var(--text-primary);
        transition: transform var(--transition-standard), background var(--transition-standard), color var(--transition-standard);
        flex-shrink: 0;
        margin-left: auto;
    }
    
    .mobile-dropdown-toggle svg {
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .nav-item-dropdown.mobile-open > a .mobile-dropdown-toggle {
        background: var(--accent-primary);
        color: #fff;
    }

    .nav-item-dropdown.mobile-open > a .mobile-dropdown-toggle svg {
        transform: rotate(180deg);
    }
    
    /* Footer elements inside mobile menu */
    .mobile-menu-footer {
        margin-top: auto;
        padding-top: 3rem;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        opacity: 0;
        transform: translateY(20px);
        transition: transform 0.5s ease 0.45s, opacity 0.5s ease 0.45s;
    }
    
    .nav-links.mobile-active .mobile-menu-footer {
        opacity: 1;
        transform: translateY(0);
    }
    
    .mobile-menu-contact {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .mobile-menu-contact span {
        color: var(--text-secondary);
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        font-family: var(--font-body);
    }
    
    .mobile-menu-contact a {
        color: #fff;
        font-size: 1.35rem;
        font-weight: 600;
        text-decoration: none;
        font-family: var(--font-heading);
    }
}

/* Service Page Vertical Layout Redesign */
.service-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
}

.service-content-wrapper .prose {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.service-content-wrapper .prose p {
    margin-bottom: 1.5rem;
}

.service-content-wrapper .prose h4.prose-heading {
    font-size: 1.4rem;
    color: var(--accent-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--accent-primary);
    padding-left: 1rem;
}

.service-content-wrapper .prose ul,
.service-content-wrapper .prose ol {
    margin: 1.5rem 0 1.5rem 2rem;
    padding-left: 0;
}

.service-content-wrapper .prose li {
    margin-bottom: 0.8rem;
    position: relative;
    color: var(--text-primary);
}

.service-content-wrapper h3 {
    font-size: 2.2rem;
    margin-top: 4rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    text-align: center;
}

.bento-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
    list-style: none;
    padding: 0;
}

.bento-feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform var(--transition-normal), background var(--transition-normal);
}

.bento-feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(245, 158, 11, 0.2);
}

.bento-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.bento-feature-content h4 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.bento-feature-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.service-image-divider {
    width: 100%;
    border-radius: 24px;
    margin: 4rem auto;
    max-width: 1000px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.professional-approach-block {
    margin-top: 4rem;
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Nested Dropdown Styles */
.nav-item-dropdown-nested {
    position: relative;
    display: block; /* Override display: flex from .nav-item-dropdown */
}

.nav-item-dropdown-nested > .nav-dropdown-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

@media (min-width: 1301px) {
    .nav-item-dropdown-nested > .nav-dropdown-link::after {
        content: none; /* remove css arrow since we will use JS SVG */
    }
    
    .nav-dropdown.nav-dropdown-nested {
        position: static;
        min-width: 100%;
        opacity: 0;
        visibility: hidden;
        transform: none;
        box-shadow: none;
        background: transparent;
        padding-top: 0;
        padding-bottom: 0;
        display: none; 
        padding-left: 0;
        border: none;
        margin: 0;
    }

    .nav-dropdown.nav-dropdown-nested .nav-dropdown-content {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: var(--radius-sm);
        box-shadow: none;
        padding: 0.5rem 0;
        margin-top: 0.5rem;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    
    /* Open state controlled by JS class */
    .nav-item-dropdown-nested.desktop-open > .nav-dropdown.nav-dropdown-nested {
        display: block;
        opacity: 1;
        visibility: visible;
        animation: fadeInDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
}

/* Base styles for the toggle button on desktop */
.nav-item-dropdown-nested .mobile-dropdown-toggle {
    margin-left: auto;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 5px;
    transition: transform 0.3s;
}

.nav-item-dropdown-nested.desktop-open .mobile-dropdown-toggle {
    transform: rotate(180deg);
}

@media (max-width: 1300px) {
    .nav-item-dropdown-nested .nav-dropdown.nav-dropdown-nested {
        margin: 0.5rem 0;
        padding-left: 0;
        border-left: none;
        display: none;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        padding: 0.5rem 0;
    }
    
    .nav-item-dropdown-nested .nav-dropdown.nav-dropdown-nested .nav-dropdown-link:last-child {
        border-bottom: none;
    }
    
    .nav-item-dropdown-nested .nav-dropdown.nav-dropdown-nested .nav-dropdown-link {
        padding-left: 2.2rem;
        position: relative;
    }
    
    .nav-item-dropdown-nested .nav-dropdown.nav-dropdown-nested .nav-dropdown-link::before {
        content: '';
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background-color: var(--text-secondary);
        opacity: 0.4;
        display: block;
        transition: all 0.3s ease;
    }
    
    .nav-item-dropdown-nested .nav-dropdown.nav-dropdown-nested .nav-dropdown-link:hover::before {
        opacity: 0.8;
        transform: translateY(-50%) scale(1.5);
        background-color: var(--accent-primary);
    }
    
    .nav-item-dropdown-nested.mobile-open .nav-dropdown.nav-dropdown-nested {
        display: block;
        animation: fadeInDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    
    .nav-item-dropdown-nested.mobile-open > a .mobile-dropdown-toggle {
        background: var(--accent-primary);
        color: #fff;
    }
    
    .nav-item-dropdown-nested.mobile-open > a .mobile-dropdown-toggle svg {
        transform: rotate(180deg);
    }
}
/* Form & CTA Grid Styles */
.cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    text-align: left;
    padding: 3rem !important;
}

.cta-grid .cta-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.cta-grid h2 {
    text-align: left;
    margin-bottom: 1.5rem;
}

.cta-grid p {
    text-align: left;
    margin-bottom: 2.5rem;
}

.contact-info-mini {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-mini-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 165, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
}

.contact-mini-item span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.contact-mini-item a {
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.contact-mini-item a:hover {
    color: var(--accent-primary);
}

.cta-form-wrapper {
    background: rgba(10, 10, 15, 0.5);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.contact-form textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.1);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.w-100 {
    width: 100%;
    justify-content: center;
}

.privacy-note {
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
    font-size: 0.75rem !important;
    color: var(--text-secondary) !important;
    text-align: center !important;
}

@media (max-width: 1024px) {
    .cta-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 2rem !important;
    }
}

/* Hub Cards Grid */
.hub-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.hub-card {
    background: rgba(10, 10, 15, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}



.hub-card .img-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

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

.hub-card:hover .hub-card-img {
    transform: scale(1.05);
}

.hub-card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.hub-card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hub-card-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.hub-card-content .btn-outline {
    display: inline-block;
    align-self: flex-start;
    padding: 0.6rem 1.5rem;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    border-radius: 8px;
    transition: all 0.3s;
}

.hub-card:hover .hub-card-content .btn-outline {
    background: var(--accent-primary);
    color: #fff;
}

@media (max-width: 768px) {
    .hub-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Fix for comp-item and hub-card overflow:hidden clipping the hover-glow */
.comp-item.hover-glow::before,
.hub-card.hover-glow::before {
    inset: 0;
}

/* Uslugi Intro Section */
.uslugi-intro {
    margin-bottom: 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    gap: 0;
    align-items: stretch;
    border-radius: 16px;
    overflow: hidden;
    padding: 0;
}

.uslugi-intro-title {
    grid-column: 1;
    grid-row: 1;
    font-size: 2rem;
    color: var(--accent-primary);
    line-height: 1.2;
    padding: 3rem 3rem 0 3rem;
    margin: 0;
}

.uslugi-intro-title span {
    color: var(--text-primary);
}

.uslugi-intro-texts {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem 3rem 3rem 3rem;
}

.uslugi-intro-image {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-height: 450px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-left: 1px solid var(--border-color);
}

.uslugi-intro-card {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--accent-primary);
    border-radius: 8px;
}

.uslugi-intro-card p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    font-size: 0.95rem;
}

@media (max-width: 1024px) {
    .uslugi-intro {
        display: flex;
        flex-direction: column;
    }
    .uslugi-intro-title {
        padding: 2.5rem;
        order: 1;
    }
    .uslugi-intro-image {
        min-height: 350px;
        border-left: none;
        border-bottom: 1px solid var(--border-color);
        order: 2;
    }
    .uslugi-intro-texts {
        padding: 2.5rem;
        order: 3;
    }
}

@media (max-width: 768px) {
    .uslugi-intro-title {
        padding: 1.5rem;
        font-size: 1.8rem;
    }
    .uslugi-intro-texts {
        padding: 1.5rem;
    }
    .uslugi-intro-image {
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    .uslugi-intro-title {
        font-size: 1.5rem;
        padding: 1.25rem;
    }
    .uslugi-intro-texts {
        padding: 1.25rem;
    }
    .uslugi-intro-image {
        min-height: 200px;
    }
}

/* Global Mobile Overrides for Inline Styles */
@media (max-width: 768px) {
    .feature-card {
        padding: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .service-hero {
        padding: 1.5rem !important;
    }
}


/* Centered CTA Form Layout */
.cta-centered {
    padding: 3rem !important;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-content-centered {
    margin: 0 auto 2.5rem auto;
}

.cta-content-centered h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.cta-content-centered p {
    color: var(--text-secondary);
    text-align: center;
}

@media (max-width: 768px) {
    .cta-centered {
        padding: 2rem 1.5rem !important;
    }
}


.wide-centered-form {
    max-width: 750px;
    margin: 0 auto;
    width: 100%;
}

.wide-centered-form input,
.wide-centered-form textarea {
    width: 100%;
}

/* Callback Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    transition: visibility var(--transition-standard);
}

.modal.active {
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: background var(--transition-standard), backdrop-filter var(--transition-standard), -webkit-backdrop-filter var(--transition-standard);
}

.modal.active .modal-overlay {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 450px;
    padding: 2.5rem;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity var(--transition-standard), transform var(--transition-standard);
    background: var(--bg-surface);
}

.modal.active .modal-content {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: #fff;
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
}

.modal-form .form-group {
    margin-bottom: 1.2rem;
}

.modal-form .form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 1rem 1.2rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition-standard), background var(--transition-standard);
}

.modal-form .form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
}

.modal-form .form-policy {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 1rem;
    line-height: 1.4;
}

.modal-form .form-policy a {
    color: var(--text-primary);
    text-decoration: underline;
}

.modal-success {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem auto;
}

.modal-success h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-success p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Service pages: harmonious, tighter vertical rhythm for stacked content blocks --- */
.service-page .section {
    padding-top: 0;
    padding-bottom: 2.5rem;
}
/* keep a small breath above the hero, below the breadcrumb header */
.service-page .page-header + .section,
.service-page .section[style*="padding-top: 2rem"] {
    padding-top: 1.5rem;
}
/* section spacing already separates blocks — drop the extra card margin */
.service-page .feature-card {
    margin-bottom: 0 !important;
}
/* trim the breadcrumb header's lower gap a touch */
.service-page .page-header {
    padding-bottom: 1rem;
}

/* keep bullet markers in accent color while body text stays white */
.dot-list > li::marker {
    color: var(--accent-primary);
}

/* restore paragraph spacing inside service-page prose/panels (global reset zeroes it) */
.service-page .prose p {
    margin-bottom: 1rem;
}
.service-page .prose p:last-child {
    margin-bottom: 0;
}

/* unified body typography for service-page prose blocks (text panels, notices) */
.service-page .prose {
    font-size: 1rem;
    line-height: 1.6;
}

/* ============================================================
   RESPONSIVE OVERRIDES FOR DYNAMIC SERVICE PAGES
   Beat inline styles via [style*=...] + !important.
   Covers: Desktop, Laptop, Tablet (portrait/landscape), Mobile (portrait/landscape)
   Scope: .service-page (uslugi, o-kompanii, kontakty, prajs-list, all services)
   ============================================================ */

/* Laptop / tablet landscape */
@media (max-width: 1024px) {
    .service-page [style*="font-size: 3rem"]   { font-size: 2.4rem !important; }
    .service-page [style*="font-size: 1.6rem"] { font-size: 1.35rem !important; }
    .service-page .service-hero                { padding: 2.5rem !important; }
    .service-page [style*="min-height: 50vh"]  { min-height: 42vh !important; }
    /* split (image+text) hub block must stack, beating inline display:grid */
    .uslugi-intro { display: flex !important; flex-direction: column !important; }
}

/* Tablet portrait / mobile landscape */
@media (max-width: 768px) {
    .service-page [style*="padding: 4rem"]   { padding: 1.75rem !important; }
    .service-page [style*="padding: 3rem"]    { padding: 1.5rem !important; }
    .service-page [style*="padding: 2.5rem"]  { padding: 1.5rem !important; }
    .service-page [style*="font-size: 3rem"]     { font-size: 2rem !important; }
    .service-page [style*="font-size: 1.875rem"] { font-size: 1.5rem !important; }
    .service-page [style*="font-size: 1.6rem"]   { font-size: 1.2rem !important; }
    .service-page [style*="font-size: 1.5rem"]   { font-size: 1.3rem !important; }
    /* allow the hero title (incl. nowrap span) to wrap on narrow screens */
    .service-page .service-hero h2 span { white-space: normal !important; }
    .service-page [style*="min-height: 50vh"]  { min-height: 300px !important; }
    .service-page [style*="min-height: 450px"] { min-height: 240px !important; }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .service-page [style*="padding: 4rem"]   { padding: 1.25rem !important; }
    .service-page [style*="padding: 3rem"]    { padding: 1.25rem !important; }
    .service-page [style*="padding: 2.5rem"]  { padding: 1.25rem !important; }
    .service-page [style*="font-size: 3rem"]     { font-size: 1.6rem !important; }
    .service-page [style*="font-size: 1.875rem"] { font-size: 1.35rem !important; }
    .service-page [style*="font-size: 1.6rem"]   { font-size: 1.1rem !important; }
    .service-page [style*="font-size: 1.2rem"]   { font-size: 1.05rem !important; }
    /* prevent any wide inline element from causing horizontal scroll
       (clip — без побочного вертикального скролла, в отличие от hidden) */
    .service-page .container { overflow-x: clip; }
}

/* ============================================================
   "О компании" — убрать лишнюю высоту/скроллы и полная видимость на мобильных
   (классы используются только на этой странице — другие страницы не затрагиваются)
   ============================================================ */

/* Не растягивать фото офиса под всю высоту текстовой колонки (лишняя высота на desktop) */
.about-grid { align-items: center !important; }
.about-image {
    max-height: 520px;
    background-size: cover;
    background-position: center;
    border-radius: 16px;
}

/* Фото директора: на десктопе ок (height:100%), но фикс на узких экранах ниже */

/* Laptop / tablet landscape */
@media (max-width: 1024px) {
    .director-photo {
        height: auto;
        width: 100%;
        aspect-ratio: 16 / 11;
        max-height: 440px;
        object-fit: cover;
    }
    .about-image { min-height: 320px; }
    .section-header { margin-top: 4rem !important; }
    .director-section { margin: 4rem 0 !important; }
}

/* Tablet portrait / mobile landscape */
@media (max-width: 768px) {
    .about-image { min-height: 240px !important; max-height: 300px; }
    .director-photo { aspect-ratio: 16 / 10; max-height: 340px; }
    .section-header { margin-top: 3rem !important; margin-bottom: 1.5rem !important; }
    .director-section { margin: 3rem 0 !important; }
    .about-text h2 { font-size: 1.6rem; }
    .timeline-content { padding: 1.25rem; }
    .process-grid { gap: 1.25rem; }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .about-image { min-height: 200px !important; }
    .about-text h2 { font-size: 1.45rem; }
    .about-text p, .about-features li { font-size: 1rem; }
    .director-text h2 { font-size: 1.5rem; }
    .director-quote { font-size: 1.05rem; }
    .timeline-content h4 { font-size: 1.05rem; }
    .timeline-year { font-size: 1.5rem; }
    /* убрать возможный горизонтальный вылет от таймлайна/процессов */
    .process-card { flex-wrap: wrap; }
}

/* ============================================================
   Услуги (/uslugi) — полное вмещение контента на мобильных
   ============================================================ */
@media (max-width: 1024px) {
    /* hub-блок «текст + фото» стопкой, компактнее внутренние отступы */
    .uslugi-intro { display: flex !important; flex-direction: column !important; }
    .uslugi-intro > div { padding: 2rem !important; }
    .uslugi-intro > div:last-child { min-height: 260px !important; }
}
@media (max-width: 768px) {
    .uslugi-intro > div { padding: 1.5rem !important; }
    .uslugi-intro > div:last-child { min-height: 200px !important; }
    /* плитки компетенций: не гигантские, контент влезает */
    .comp-item { min-height: 240px !important; padding: 1.75rem !important; }
    .comp-grid { gap: 1.25rem; }
}
@media (max-width: 480px) {
    .uslugi-intro > div { padding: 1.25rem !important; }
    .comp-item { min-height: 200px !important; padding: 1.5rem !important; }
    .comp-item h3 { font-size: 1.25rem; }
    .split-title { font-size: 1.4rem; }
}

/* ============================================================
   О компании — блок «Наша миссия»: убрать лишний вертикальный
   скролл/высоту картинки офиса на мобильных (компактный адаптив)
   ============================================================ */
@media (max-width: 1024px) {
    .about-grid { overflow: visible; }
    .about-image {
        min-height: 200px !important;
        height: auto !important;
        aspect-ratio: 16 / 10;
        max-height: 340px;
    }
}
@media (max-width: 480px) {
    .about-image {
        aspect-ratio: 16 / 11;
        max-height: 240px;
    }
}

/* ============================================================
   Услуги (/uslugi) — карточки гарантированно помещаются на мобильных
   ============================================================ */
@media (max-width: 768px) {
    /* одна колонка + элементы могут сжиматься до ширины контейнера */
    .comp-grid { grid-template-columns: 1fr !important; gap: 1.25rem; }
    .comp-item { min-width: 0 !important; max-width: 100% !important; }
    /* бэкстоп против любого горизонтального вылета на странице услуг/хабов */
    .service-page .container { overflow-x: clip; }
    .service-page .container,
    .comp-grid,
    .uslugi-intro { max-width: 100%; }
}
@media (max-width: 480px) {
    /* меньше паддинг контейнера — больше места карточкам */
    .service-page .container { padding-left: 1rem; padding-right: 1rem; }
}

/* iOS Safari scroll-perf: neutralise backdrop-filter on components whose base
   rule is defined later in this file (must come last to win the cascade). */
@media (hover: none), (pointer: coarse) {
    .timeline-content {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(28, 30, 33, 0.92);
    }
}
