:root {
    --color-primary: #10b981; /* Pleasant Emerald Green */
    --color-primary-hover: #059669; /* Hover Green */
    --color-dark: #0f0f11;
    --color-darker: #0b0b0c;
    --color-light: #0b0b0c; /* Forced dark theme background */
    --color-gray: #1e1e24;   /* Dark gray for borders/dividers */
    --color-gray-dark: #8b8b93;
    --color-text: #ffffff;   /* Forced white text */
    --color-neon: #00e5ff;
    
    --font-heading: 'Bebas Neue', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--color-darker);
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-darker);
    overflow-x: hidden;
    max-width: 100vw;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a,
a:hover,
a:focus,
a:active,
a:visited {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition);
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.section-title.black {
    color: #ffffff !important;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-gray-dark);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
}

.btn-outline {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
}

.btn-outline:hover {
    background-color: #ffffff;
    color: var(--color-darker);
}

.btn-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-gray-dark);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
}

.btn-text:hover {
    color: var(--color-primary);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(11, 11, 12, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--color-gray);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 0.05em;
}

.logo-e {
    background-color: var(--color-primary);
    color: white;
    padding: 0 12px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 1.2rem;
}

.logo-text {
    color: #ffffff;
}

.logo.dark .logo-text {
    color: #ffffff;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-gray-dark);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--color-primary);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

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

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

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

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: rgba(11, 11, 12, 0.98);
    backdrop-filter: blur(10px);
    z-index: 999;
    display: none;
    flex-direction: column;
    padding: 2rem;
    border-bottom: 1px solid var(--color-gray);
}

.mobile-menu.active {
    display: flex;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-links a {
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-nav-links a:hover {
    color: var(--color-primary);
}

/* Main Content & SPA Transitions */
main {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    background-color: var(--color-darker);
    overflow-x: hidden;
    max-width: 100vw;
}

.page {
    opacity: 0;
    transition: opacity 0.5s ease;
    overflow-x: hidden;
    max-width: 100%;
}

.page.active {
    opacity: 1;
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    overflow: hidden;
    background-color: var(--color-darker);
}

.hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    position: relative;
    min-height: 70vh;
}

.hero-content {
    flex: 1;
    max-width: 720px;
    position: relative;
    z-index: 2;
    min-width: 0;
}

.hero-headline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 1.5rem;
    width: 100%;
}

.hero-title {
    font-size: 7rem;
    line-height: 1;
    color: #ffffff;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Slot machine word container */
.slot-wrap {
    height: 7rem;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    width: 100%;
}

.slot-word {
    font-family: var(--font-heading);
    font-size: 5rem;
    line-height: 1;
    height: 8rem;
    display: flex;
    align-items: center;
    color: var(--color-primary);
    white-space: nowrap;
    /* default transition: for slide-IN (fast) */
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    will-change: transform, opacity;
    justify-content: flex-start;
    width: max-content;
}

.slot-word.slide-out {
    transform: translateY(-200%);
    opacity: 0;
    /* slide-OUT transition: slower and smoother */
    transition: transform 1s cubic-bezier(0.7, 0, 0.84, 0), opacity 0.7s ease;
}

.slot-word.slide-in-from-bottom {
    transform: translateY(200%);
    opacity: 0;
    transition: none; /* instant reset to bottom before animating in */
}

.slot-word.slide-visible {
    transform: translateY(0%);
    opacity: 1;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-gray-dark);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 4rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

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

.stat-num {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    line-height: 1;
    color: #ffffff;
}

.stat-text {
    font-size: 0.8rem;
    color: var(--color-gray-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.2rem;
}

.hero-visual {
    flex: 1;
    position: absolute;
    right: -200px; /* Shifted drastically to the right */
    top: 50%;
    transform: translateY(-50%);
    width: 750px;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    pointer-events: none;
}

/* THE ROBOT VIDEO */
.robot-glow {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.robot-video {
    width: 120%;
    height: auto;
    object-fit: contain;
    background: transparent;
    filter: url(#remove-black);
}

@media (max-width: 768px) {
    .robot-video {
        filter: none;
    }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Cases Teaser */
.bg-dark {
    background-color: var(--color-dark);
    color: #ffffff;
}

.cases-teaser {
    padding: 6rem 0;
}

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

.section-header.dark {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.section-header.dark .section-title {
    max-width: 600px;
    margin-bottom: 0;
}

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

/* Cards */
.dark-card {
    background-color: #1a1a1e;
    border: 1px solid #2a2a30;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}

.dark-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border-color: var(--color-primary);
}

.card-tags {
    margin-bottom: 1.5rem;
}

.tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-gray-dark);
}

.card-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.card-desc {
    color: #a0a0ab;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    border-top: 1px solid #2a2a30;
}

.tag-small {
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid #3a3a40;
    border-radius: 20px;
    color: #d0d0d5;
}

.arrow-icon {
    margin-left: auto;
    color: var(--color-gray-dark);
    font-size: 1.2rem;
}

.dark-card:hover .arrow-icon {
    color: var(--color-primary);
}

/* What I Do */
.what-i-do {
    padding: 8rem 0;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.service-item {
    display: flex;
    align-items: flex-start;
    padding: 2.5rem;
    border: 1px solid var(--color-gray);
    border-radius: 12px;
    transition: all var(--transition);
    background: #1a1a1e;
}

.service-item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.service-num {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: #2a2a30;
    width: 100px;
    line-height: 1;
    transition: color var(--transition);
}

.service-item:hover .service-num {
    color: var(--color-primary);
}

.service-content {
    flex: 1;
}

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

.service-icon {
    width: 24px;
    height: 24px;
    filter: invert(1); /* Invert black SVG icons to white */
}

.service-icon img {
    width: 100%;
    height: 100%;
}

.service-title {
    font-size: 2rem;
    margin-bottom: 0;
    color: #ffffff;
}

.service-desc {
    color: var(--color-gray-dark);
    margin-bottom: 1.5rem;
    max-width: 600px;
}

.service-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag-round {
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
    background-color: #2a2a30;
    border-radius: 20px;
    color: #ffffff;
}

.service-arrow {
    font-size: 1.5rem;
    color: #2a2a30;
    transition: color var(--transition);
}

.service-item:hover .service-arrow {
    color: #ffffff;
}

/* All Cases Page */
.all-cases-hero {
    padding: 4rem 0 8rem;
}

.page-title {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--color-gray-dark);
    margin-bottom: 4rem;
}

.cases-grid-large {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.light-card {
    background-color: #1a1a1e;
    border: 1px solid #2a2a30;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}

.light-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border-color: var(--color-primary);
}

.tag-outline {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.black { color: #ffffff !important; }
.black-text { color: var(--color-gray-dark) !important; }
.black-footer { border-top-color: #2a2a30 !important; }
.black-arrow { color: var(--color-gray-dark) !important; }

.tag-small-outline {
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid #2a2a30;
    border-radius: 20px;
    color: var(--color-gray-dark);
}

/* About Page */
.about-hero {
    padding: 4rem 0 8rem;
    overflow-x: hidden;
    max-width: 100%;
}

.about-header {
    max-width: 800px;
    margin-bottom: 4rem;
}

.tag-orange {
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    display: inline-block;
}

.page-title.huge {
    font-size: 5rem;
    margin-bottom: 1.5rem;
}

.about-subtitle {
    font-size: 1.2rem;
    color: var(--color-gray-dark);
    line-height: 1.6;
}

.about-stats {
    display: flex;
    gap: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--color-gray);
    margin-bottom: 4rem;
}

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

.about-history {
    display: flex;
    gap: 4rem;
    margin-bottom: 6rem;
    max-width: 100%;
    overflow: hidden;
}

.history-content {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.tag-gray {
    color: var(--color-gray-dark);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    display: inline-block;
}

.history-title {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.history-content p {
    margin-bottom: 1.5rem;
    color: var(--color-gray-dark);
}

.history-image {
    flex: 1;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    min-height: 400px;
    background-color: #1a1a1e;
    border: 1px solid #2a2a30;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-approach {
    margin-bottom: 6rem;
}

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

.approach-item {
    border-left: 2px solid #2a2a30;
    padding-left: 1.5rem;
}

.approach-num {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.approach-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.approach-item p {
    font-size: 0.9rem;
    color: var(--color-gray-dark);
}

.about-target {
    margin-bottom: 6rem;
}

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

.target-card {
    padding: 3rem;
    border-radius: 12px;
    background-color: #1a1a1e;
    border: 1px solid #2a2a30;
}

.target-card h4 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #ffffff;
}

.target-card ul {
    list-style: none;
}

.target-card li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: var(--color-gray-dark);
}

.target-card.positive li {
    color: #ffffff;
}

.check { color: var(--color-primary); font-weight: bold; }
.cross { color: var(--color-gray-dark); font-weight: bold; }

.cta-banner {
    background-color: #061f17; /* Dark forest green backdrop */
    border: 1px solid var(--color-primary);
    padding: 4rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cta-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.cta-content p {
    color: var(--color-gray-dark);
    margin-bottom: 1rem;
}

.cta-link-text {
    font-size: 0.9rem;
    color: var(--color-gray-dark);
}

.cta-btn {
    padding: 1.5rem 3rem;
}

/* Footer */
.footer {
    padding: 4rem 0 2rem;
    overflow-x: hidden;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    padding-bottom: 4rem;
    border-bottom: 1px solid #2a2a30;
    margin-bottom: 2rem;
}

.footer-desc {
    color: var(--color-gray-dark);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.footer-links {
    display: flex;
    gap: 6rem;
}

.footer-col h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.footer-col a {
    display: block;
    color: var(--color-gray-dark);
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

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

.disclaimer {
    font-size: 0.7rem;
    color: #555;
    max-width: 300px;
    margin-top: 1rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    color: var(--color-gray-dark);
    font-size: 0.8rem;
}

.footer-bottom a {
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: none;
    color: var(--color-primary);
}

/* Floating Chat */
.floating-chat {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background-color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
    z-index: 1000;
    transition: transform var(--transition);
}

.floating-chat:hover {
    transform: scale(1.1);
}

.floating-chat svg {
    width: 30px;
    height: 30px;
}

/* Animation Styles */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

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

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

/* Hero section initial load animation - SMOOTH */
.hero-animate {
    opacity: 0;
    transform: translateY(80px);
    transition: opacity 1.5s cubic-bezier(0.25, 1, 0.5, 1), transform 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for hero content */
.hero-content .hero-animate:nth-child(1) { transition-delay: 0.2s; }
.hero-content .hero-animate:nth-child(2) { transition-delay: 0.4s; }
.hero-content .hero-animate:nth-child(3) { transition-delay: 0.6s; }
.hero-content .hero-animate:nth-child(4) { transition-delay: 0.8s; }

.hero-visual.hero-animate { transition-delay: 0.3s; }

/* Staggered animation delays for cards */
.cases-grid .slide-in-left:nth-child(1) { transition-delay: 0.1s; }
.cases-grid .slide-in-left:nth-child(2) { transition-delay: 0.2s; }
.cases-grid .slide-in-left:nth-child(3) { transition-delay: 0.3s; }
.cases-grid .slide-in-left:nth-child(4) { transition-delay: 0.4s; }

/* Staggered animation delays for services */
.services-list .fade-in-up:nth-child(1) { transition-delay: 0.1s; }
.services-list .fade-in-up:nth-child(2) { transition-delay: 0.2s; }
.services-list .fade-in-up:nth-child(3) { transition-delay: 0.3s; }
.services-list .fade-in-up:nth-child(4) { transition-delay: 0.4s; }
.services-list .fade-in-up:nth-child(5) { transition-delay: 0.5s; }
.services-list .fade-in-up:nth-child(6) { transition-delay: 0.6s; }

/* Make case cards clickable */
.case-card { cursor: pointer; }

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

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

/* Modal Container */
.modal-container {
    background-color: #0b0b0c;
    border: 1px solid #2a2a30;
    border-radius: 16px;
    max-width: 1400px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

/* Modal Body - 2 column layout (natural height) */
.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    transform: rotate(90deg);
}

/* Modal Image - RIGHT SIDE (smaller preview) */
.modal-image {
    width: calc(100% - 6rem);
    aspect-ratio: 4 / 3;
    max-height: 360px;
    overflow: hidden;
    background-color: #1a1a1e;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin: 0 3rem 2.5rem 0;
    border: 1px solid #2a2a30;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Modal Content - LEFT SIDE */
.modal-content {
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    order: 1;
}

.modal-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.modal-image {
    order: 2;
}

/* Modal Carousels Container (full width, below body) */
.modal-carousels {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding: 2rem 3rem 2.5rem;
    border-top: 1px solid #2a2a30;
    background-color: #0b0b0c;
}

.modal-carousels:empty {
    display: none;
}

/* Modal Buttons */
.modal-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.modal-buttons:empty {
    display: none;
}

.modal-buttons .btn {
    display: inline-flex;
    align-items: center;
    padding: 0.85rem 1.5rem;
    font-size: 0.85rem;
}

/* Secondary (gray) button */
.btn-secondary {
    background-color: transparent;
    color: var(--color-gray-dark);
    border: 1px solid #2a2a30;
}

.btn-secondary:hover {
    background-color: #1a1a1e;
    color: #ffffff;
    border-color: var(--color-gray-dark);
    transform: translateY(-2px);
}

/* Single Carousel - small previews */
.carousel-block {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.carousel-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--color-gray-dark);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
    padding-left: 0.25rem;
}

/* Carousel Thumbs (small previews) */
.carousel-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    padding: 0.25rem;
}

.carousel-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #2a2a30;
    background-color: #1a1a1e;
    cursor: pointer;
    transition: all 0.2s ease;
    object-fit: cover;
    display: block;
}

.carousel-thumb:hover {
    border-color: var(--color-gray-dark);
    transform: translateY(-2px);
}

.carousel-thumb.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
}

/* ============ LIGHTBOX ============ */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(12px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    flex-direction: column;
    padding: 2rem;
    box-sizing: border-box;
}

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

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background-color: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    transform: rotate(90deg);
}

.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    flex: 1;
    min-height: 0;
    margin-bottom: 1.5rem;
    position: relative;
}

.lightbox-image-wrap {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    cursor: zoom-in;
    max-width: 100%;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform-origin 0.4s ease;
    cursor: zoom-in;
    will-change: transform, transform-origin;
}

.lightbox-image.zoomed {
    transform: scale(2);
    cursor: zoom-out;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform-origin 0.4s ease;
}

.lightbox-arrow {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.lightbox-arrow svg {
    width: 24px;
    height: 24px;
}

.lightbox-arrow:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    transform: scale(1.08);
}

.lightbox-thumbs {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%;
    width: 100%;
}

.lightbox-thumb {
    width: 70px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #2a2a30;
    background-color: #1a1a1e;
    cursor: pointer;
    transition: all 0.2s ease;
    object-fit: cover;
    display: block;
}

.lightbox-thumb:hover {
    border-color: var(--color-gray-dark);
    transform: translateY(-2px);
}

.lightbox-thumb.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
}

.lightbox-counter {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    color: var(--color-gray-dark);
    font-size: 0.9rem;
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
}

.modal-tag {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    background-color: rgba(16, 185, 129, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    line-height: 1.1;
    color: #ffffff;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.modal-description {
    font-size: 1rem;
    color: var(--color-gray-dark);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.modal-tags .tag-small {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
}

.modal-link {
    display: inline-flex;
    width: auto;
    align-self: flex-start;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-title { font-size: 4rem; }
    .slot-wrap { height: 5rem; justify-content: center; }
    .slot-word { font-size: 3.5rem; height: 5rem; justify-content: center; margin: 0 auto; }
    .hero-inner { flex-direction: column; text-align: center; }
    .hero-headline { align-items: center; text-align: center; }
    .hero-title { text-align: center; width: 100%; }
    .hero-subtitle { text-align: center; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .cases-grid, .cases-grid-large { grid-template-columns: repeat(2, 1fr); }
    .approach-grid { grid-template-columns: repeat(2, 1fr); gap: 3rem; }
}

@media (max-width: 768px) {
    body, html { overflow-x: hidden; max-width: 100vw; }
    .container { padding: 0 1rem; max-width: 100%; }
    .nav-links { display: none; }
    .header .btn-primary { display: none; }
    .hamburger { display: flex; }
    .header-inner { height: 70px; }
    main { margin-top: 70px; }
    .logo { font-size: 1.2rem; }
    .logo-e { font-size: 1rem; }

    .hero { padding: 2rem 0 2rem; }
    .hero-inner { min-height: auto; text-align: center; }
    .hero-content { max-width: 100%; width: 100%; }
    .hero-title { font-size: 2.5rem; text-align: center; width: 100%; }
    .hero-headline { align-items: center; text-align: center; }
    .slot-wrap { height: 2.5rem; width: 100%; overflow: hidden; justify-content: center; }
    .slot-word { font-size: 1.8rem; height: 2.5rem; justify-content: center; margin: 0 auto; }
    .hero-subtitle { font-size: 0.95rem; margin-bottom: 1.5rem; text-align: center; }
    .hero-actions { flex-direction: column; gap: 0.75rem; margin-bottom: 2rem; }
    .hero-actions .btn { width: 100%; padding: 0.85rem 1.5rem; font-size: 0.85rem; }
    .hero-stats { gap: 1.5rem; }
    .stat-num { font-size: 1.8rem; }
    .stat-text { font-size: 0.7rem; }

    /* Скрываем робота на мобильных — видео с черным фоном плохо смотрится */
    .hero-visual { display: none; }

    .cases-grid, .cases-grid-large { grid-template-columns: 1fr; }
    .about-history { flex-direction: column; gap: 2rem; max-width: 100%; }
    .target-grid { grid-template-columns: 1fr; }
    .cta-banner { flex-direction: column; text-align: center; gap: 2rem; padding: 2rem; }
    .cta-content h2 { font-size: 2rem; }
    .footer-inner { flex-direction: column; gap: 3rem; }
    .footer-links { flex-direction: column; gap: 2rem; }
    .about-stats { flex-direction: column; gap: 2rem; align-items: center; }
    .about-header .page-title.huge { font-size: 3rem; }
    .modal-container { max-width: 95%; max-height: 95vh; }
    .modal-body { grid-template-columns: 1fr; }
    .modal-content { padding: 1.5rem; order: 2; }
    .modal-image { width: 100%; height: 220px; min-height: 220px; order: 1; margin: 0 0 1.5rem 0; }
    .modal-title { font-size: 1.8rem; }
    .modal-carousels { padding: 1.5rem; }
    .service-item { flex-direction: column; gap: 1rem; padding: 1.5rem; }
    .service-num { font-size: 2rem; width: auto; }
    .section-title { font-size: 2rem; }
    .approach-grid { grid-template-columns: 1fr; }
    .carousel-thumbs { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
    /* Lightbox adjustments */
    .lightbox-overlay { padding: 0; }
    .lightbox-content { gap: 0; position: relative; margin-bottom: 0.5rem; }
    .lightbox-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        width: 40px;
        height: 40px;
        background-color: rgba(16, 185, 129, 0.3);
        backdrop-filter: blur(4px);
    }
    .lightbox-arrow-prev { left: 0.5rem; }
    .lightbox-arrow-next { right: 0.5rem; }
    .lightbox-arrow svg { width: 20px; height: 20px; }
    .lightbox-close { width: 36px; height: 36px; font-size: 1.3rem; top: 0.5rem; right: 0.5rem; }
    .lightbox-counter { top: 0.5rem; left: 0.5rem; font-size: 0.8rem; }
    .lightbox-image { max-height: 80vh; max-width: 100%; width: 100%; object-fit: contain; }
    .lightbox-thumbs { gap: 0.3rem; padding: 0 0.5rem; }
    .lightbox-thumb { width: 50px; height: 36px; }

    /* About page fixes */
    .about-history { gap: 2rem; }
    .history-image { max-width: 100%; }
    .photo-placeholder { min-height: 250px; }
    .cta-banner { max-width: 100%; }
    .page { max-width: 100%; overflow-x: hidden; }
    main { overflow-x: hidden; max-width: 100%; }
}
