/* NOVIO Base Styles - Core Design System
   This is the main CSS file with all base styles
   Component CSS files should only contain overrides or component-specific additions
*/

/* Import Fonts - Must be first */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Saira:wght@200;300;400;500;600;700&display=swap');

/* CSS Variables - Design Tokens */
:root {
    --primary-color: #C2D500;
    --accent-color: #f2ff66;
    --novio-lime: #d3d73e;
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #141414;
    --anthracite: #1d1e1b;
    --anthracite-light: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #e5e5e5;
    --text-muted: #999999;
    --border-color: #1a1a1a;
}

/* Base Reset & Body */
html, body {
    /* background: var(--bg-primary); */ /* Commented out to allow theme-specific backgrounds */
    color: var(--text-primary);
    font-family: 'Saira', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-shadow: 0 0 0.4px rgba(0,0,0,0.35);
}

body {
    min-height: 1000vh;  /* Doubled from 500vh for slower scrolling */
    overflow-x: hidden;
    background: #000000;  /* Default dark background */
}

/* Mobile mode - standard vertical scrolling */
body.mobile-mode {
    min-height: auto;
    overflow-x: hidden !important;
    overflow-y: auto;
    position: relative;
    /* Prevent any transform3d or will-change on body that could affect fixed positioning */
    transform: none !important;
    will-change: auto !important;
}

/* Mobile mode - ensure no child elements can cause horizontal overflow */
body.mobile-mode,
body.mobile-mode .slides-container,
body.mobile-mode .slide {
    overflow-x: hidden !important;
}

/* Slides - Base */
.slide {
    position: absolute;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    will-change: transform, opacity;
    transform-style: preserve-3d;
    padding: 2rem;
}

/* Mobile mode - slides become static blocks */
body.mobile-mode .slide {
    position: relative !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    min-height: auto;  /* Allow slides to be as tall as needed */
    height: auto;  /* Allow expansion for content */
    margin: 0 0 2rem 0;  /* Add space between slides */
    display: flex !important;
    flex-direction: column;
    justify-content: center;
}

/* Hero section special handling */
body.mobile-mode .hero-section {
    padding-top: 120px !important;
}

/* Mobile mode - floating elements become static */
body.mobile-mode .floating-element:not(.menu):not(.detail-popup) {
    position: relative !important;
    transform: none !important;
    opacity: 1 !important;
}

/* Mobile mode - ensure menu stays at top and centered */
body.mobile-mode .menu {
    position: fixed !important;
    top: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 30000 !important;
    width: auto !important;
    max-width: 90vw !important;
}

/* Ensure menu remains fixed when toggled open */
body.mobile-mode .menu,
body.mobile-mode .menu.menu-open {
    position: fixed !important;
    top: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 30000 !important;
}

/* Guard against inline overrides introduced by animations */
body.mobile-mode .menu[id*="menu"],
body.mobile-mode #mobileMenu,
body.mobile-mode nav.menu,
body.mobile-mode div.menu {
    position: fixed !important;
    top: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 30000 !important;
    will-change: auto !important;
}

/* Mobile mode - slides container becomes normal flow */
body.mobile-mode .slides-container {
    position: relative !important;
    height: auto !important;
    width: 100% !important;
    top: auto !important;
    left: auto !important;
}

/* Slide Backgrounds */
.slide.bg-mesh {
    background:
        radial-gradient(at 20% 80%, rgba(194, 213, 0, 0.04) 0px, transparent 50%),
        radial-gradient(at 80% 20%, rgba(242, 255, 102, 0.03) 0px, transparent 50%),
        radial-gradient(at 40% 40%, rgba(255, 255, 255, 0.02) 0px, transparent 50%),
        #0d0d0d;
    border-radius: 20px;
}

.slide.bg-pattern {
    background:
        repeating-linear-gradient(
            -45deg,
            #0f0f0f,
            #0f0f0f 25px,
            #141414 25px,
            #141414 50px
        );
    border-radius: 20px;
}

.slide.bg-gradient {
    background:
        linear-gradient(135deg,
            rgba(194, 213, 0, 0.03) 0%,
            transparent 25%,
            transparent 75%,
            rgba(242, 255, 102, 0.02) 100%
        ),
        linear-gradient(45deg,
            #0a0a0a 0%,
            #141414 50%,
            #0a0a0a 100%
        );
    border-radius: 20px;
}

.slide.bg-image-2 {
    background:
        linear-gradient(rgba(15, 15, 15, 0.75), rgba(15, 15, 15, 0.75)),
        url('/images/bg2.jpg') center/cover no-repeat;
    border-radius: 20px;
}

.slide.bg-image-3 {
    /* background:
        linear-gradient(rgba(15, 15, 15, 0.95), rgba(15, 15, 15, 0.95)),
        url('/images/bg3.png') center/cover no-repeat;
    border-radius: 20px; */
}

.slide::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    /* background: radial-gradient(circle at 30% 70%, rgba(194, 213, 0, 0.015) 0%, transparent 50%); */
    pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Orbitron', sans-serif;
    color: var(--text-primary);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

h3 {
    font-size: clamp(1rem, 2vw, 1.3rem);
    margin: 1rem 0 0.8rem 0;
}

@media (max-width: 1024px) {
    h3 {
        font-size: clamp(0.95rem, 1.8vw, 1.2rem);
        margin: 0.8rem 0 0.6rem 0;
    }
}

@media (max-width: 768px) {
    h3 {
        font-size: clamp(0.9rem, 1.6vw, 1.1rem);
        margin: 0.6rem 0 0.5rem 0;
    }
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
    letter-spacing: 0.15em;
}

h1 .light, h2 .light {
    font-weight: 300;
    color: var(--text-secondary);
}

h1 .bold, h2 .bold {
    font-weight: 700;
    color: var(--text-primary);
}

h1 .accent, h2 .accent {
    color: #f2ff66;
    -webkit-text-stroke: 1px var(--primary-color);
}

.dual-text {
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.4rem);
    text-align: center;
    margin: 0.5rem 0 1rem 0;
    line-height: 1.3;
}

@media (max-width: 1024px) {
    .dual-text {
        font-size: clamp(0.9rem, 1.8vw, 1.2rem);
        margin: 0.3rem 0 0.8rem 0;
    }
}

@media (max-width: 768px) {
    .dual-text {
        font-size: clamp(0.85rem, 1.5vw, 1rem);
        margin: 0.2rem 0 0.6rem 0;
    }
}

.dual-text .primary {
    color: var(--primary-color);
    font-weight: 700;
}

.dual-text .secondary {
    color: var(--text-secondary);
    font-weight: 300;
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 500;
    letter-spacing: 0.1em;
}

/* p {
    font-family: 'Saira', sans-serif;
    color: var(--text-secondary);
    line-height: 1.8;
    font-weight: 300;
    letter-spacing: 0.02em;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    margin: 0.8rem 0;
} */

@media (max-width: 1024px) {
    p {
        font-size: clamp(0.85rem, 1.4vw, 0.95rem);
        margin: 0.6rem 0;
        line-height: 1.6;
    }
}

@media (max-width: 768px) {
    p {
        font-size: clamp(0.8rem, 1.2vw, 0.9rem);
        margin: 0.5rem 0;
        line-height: 1.5;
    }
}

/* Buttons */
.btn {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--text-primary);
    padding: 1rem 1rem;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(0.2rem, 0.9rem, 0.9rem);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

.btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--text-primary);
    transition: height 0.25s ease;
    z-index: -1;
}

.btn:hover::after {
    height: 100%;
}

.btn:hover {
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
    border: 1px solid var(--text-primary);
}

.btn-primary::after {
    background: var(--primary-color);
}

.btn-primary:hover {
    border-color: var(--primary-color);
}

/* Cards */
.card {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: clamp(1.2rem, 2.5vw, 2rem);
    margin-bottom: clamp(1rem, 2vw, 2rem);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

@media (max-width: 1024px) {
    .card {
        padding: clamp(1rem, 2vw, 1.5rem);
        margin-bottom: clamp(0.8rem, 1.5vw, 1.5rem);
        border-radius: 8px;
    }
}

@media (max-width: 768px) {
    .card {
        padding: clamp(0.8rem, 1.8vw, 1.2rem);
        margin-bottom: clamp(0.6rem, 1.2vw, 1rem);
        border-radius: 6px;
    }
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.card:hover::before {
    transform: translateX(0);
}

.card:hover {
    border-color: var(--anthracite);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Hero Logo */
.hero-logo {
    transition: all 0.3s ease;
    width: min(40vh, 80vw);
    height: auto;
}

/* Dark theme hero logo - no filter */
.hero-logo-dark {
    /* No filter - show original color */
}

/* Mobile hero logo size */
body.mobile-mode .hero-logo {
    width: min(20vh, 60vw) !important;
    margin-bottom: 1.5rem;
}

.hero-logo:hover {
    transform: translateY(-5px);
}

/* Dark theme hero logo hover */
.hero-logo-dark:hover {
    filter: drop-shadow(0 10px 30px rgba(194, 213, 0, 0.2));
}

/* Navigation Menu */
.menu {
    position: fixed !important;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) !important;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 3px 5px;  /* Minimal padding */
    display: flex;
    align-items: center;
    gap: 3px;  /* Minimal gap */
    z-index: 30000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    height: auto !important;
    width: auto !important;
    min-width: 150px;
}

.menu-logo-desktop {
    display: block;
    width: 150px;  /* Increased from 120px */
    height: auto;
    max-height: 60px;  /* Increased from 50px */
    margin-right: 5px;  /* Minimal space after the logo */
    flex-shrink: 0;
    object-fit: contain;
    filter: brightness(0) invert(1);  /* Make logo white in dark mode */
}

.menu-logo-tablet {
    display: none;
}

.menu-item {
    font-family: 'Orbitron', sans-serif;
    color: var(--text-muted);
    padding: 0.8rem 1.5rem;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

.menu-item::after {
    content: '\2192';
    position: absolute;
    right: 0px;
    opacity: 0;
    transition: all 0.3s ease;
}

.menu-item:hover::after {
    right: 0px;
    opacity: 1;
}

.menu-item:hover {
    color: var(--text-primary);
    background: rgba(194, 213, 0, 0.02);
    transform: translateX(5px);
}

/* Desktop Menu Switchers - Ensure they are side by side */
@media (min-width: 769px) {
    /* Force the switchers container to be visible and flex on desktop */
    .menu .menu-switchers {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        align-items: center !important;
        margin-left: 10px !important;
    }

    /* Force individual buttons to be visible and properly positioned on desktop */
    .menu .menu-switchers .lang-switcher,
    .menu .menu-switchers .theme-switcher {
        display: inline-flex !important;
        position: relative !important;
        /* margin: 0 !important; */
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        padding: 4px 6px !important; /* Add padding around buttons */
    }

    /* Override any mobile-specific hiding rules for desktop */
    .menu:not(.menu-open) .lang-switcher,
    .menu:not(.menu-open) .theme-switcher {
        display: inline-flex !important;
    }
}

/* Forms */
.input {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 1rem 0;
    width: 100%;
    font-family: 'Saira', sans-serif;
    transition: all 0.3s ease;
}

.input:focus {
    outline: none;
    border-bottom-color: var(--text-primary);
}

/* Select dropdown styling */
select.input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px;
}

/* Select dropdown options styling */
select.input option {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 10px;
    border: none;
}

/* Badges */
.badge {
    background: var(--bg-primary);
    color: var(--accent-color);
    padding: 0.5rem 1.2rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid var(--accent-color);
    transition: all 0.2s ease;
}

.badge:hover {
    background: var(--accent-color);
    color: var(--bg-primary);
    transform: scale(1.05);
}

/* Divider */
.divider {
    width: 100%;
    height: 1px;
    background: var(--border-color);
    position: relative;
}

/* Icon Buttons */
.icon-button {
    width: 48px;
    height: 48px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem;
}

.icon-button:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    transform: rotate(90deg);
}

.icon-group {
    display: flex;
    gap: 20px;
    margin: 40px 0;
}

/* Progress Bar */
.progress-bar {
    background: transparent;
    height: 1px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 1px;
    background: var(--text-primary);
    width: var(--progress, 0%);
    transition: width 0.3s linear;
}

/* Animations */
@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-in {
    animation: reveal 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Parallax Page Specific */
.slides-container {
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    transform-style: preserve-3d;
    /* No z-index to allow children to control their depth */
}

/* Parallax Images Container */
.parallax-images-container {
    /* Container now only serves as a placeholder, parallax slides are in body */
    display: none;
}

.parallax-images-container .parallax-image {
    position: absolute !important;
    will-change: transform, opacity;
    transform-style: preserve-3d;
}

/* Parallax background slides need to be positioned properly */
.parallax-bg-slide {
    position: fixed !important;
    will-change: transform, opacity;
    transform-style: preserve-3d;
    pointer-events: none;
}

/* Override slide styles for parallax images */
.parallax-images-container .parallax-image.slide {
    width: auto !important;
    height: auto !important;
    min-height: auto !important;
    padding: 0 !important;
    display: block !important;
    align-items: initial !important;
    justify-content: initial !important;
    flex-direction: initial !important;
}

/* Hide parallax images in mobile mode */
body.mobile-mode .parallax-images-container {
    display: none;
}

/* Mobile mode - hide parallax background slides that may extend beyond viewport */
body.mobile-mode .parallax-bg-slide {
    display: none !important;
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--primary-color);
    z-index: 9999;
    transition: width 0.1s;
}

/* Navigation Dots */
.nav-dots {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.nav-dot {
    display: block;
    width: 12px;
    height: 12px;
    margin: 10px 0;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-dot.active {
    background: var(--primary-color);
    transform: scale(1.5);
}

.nav-dot:hover {
    transform: scale(1.3);
    background: rgba(194, 213, 0, 0.5);
}

/* Animation Classes */
.fade-in { opacity: 0; }
.slide-left { transform: translateX(-100vw); }
.slide-right { transform: translateX(100vw); }
.slide-up { transform: translateY(100vh); }
.slide-down { transform: translateY(-100vh); }
.zoom-in { transform: scale(0); }
.zoom-out { transform: scale(2); }
.rotate-in { transform: rotate(-180deg); }

/* Mobile mode - disable horizontal slide animations to prevent overflow */
body.mobile-mode .slide-left,
body.mobile-mode .slide-right {
    transform: none !important;
}

/* Mobile mode - hide slide pseudo-elements that extend beyond viewport */
body.mobile-mode .slide::before {
    display: none !important;
}

/* Desktop-only hamburger button (hidden by default) */
.menu-toggle {
    display: none;
}

/* When animations are disabled */
body.no-animations {
    min-height: auto;
}

body.no-animations .slide {
    position: relative !important;
    opacity: 1 !important;
    transform: none !important;
    display: block !important;
    margin-bottom: 100vh;
}

/* Hero Section */
.hero-section {
    opacity: 1;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
}

.hero-title {
    font-size: clamp(1.4rem, 4vw, 2.1rem);
    margin: clamp(20px, 3vh, 30px) 0;
}

.hero-subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    margin: 20px auto 40px;
    max-width: min(90%, 600px);
    opacity: 0.9;
}

.demo-buttons {
    display: flex;
    gap: clamp(15px, 3vw, 30px);
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

/* Social links styling */
.social-links {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-left: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.social-link.linkedin:hover {
    background: #0077b5;
    border-color: #0077b5;
    color: white;
}

.social-link.youtube:hover {
    background: #ff0000;
    border-color: #ff0000;
    color: white;
}

.social-link svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.social-link:hover svg {
    transform: scale(1.1);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .demo-buttons {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .social-links {
        margin-left: 0;
        margin-top: 10px;
    }

    .social-link {
        width: 36px;
        height: 36px;
    }

    .social-link svg {
        width: 18px;
        height: 18px;
    }
}

/* Utility Classes */
.highlight {
    color: var(--accent-color);
    font-weight: 500;
}

.subtle-gradient {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-glow {
    text-shadow: 0 0 20px rgba(194, 213, 0, 0.3);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
    align-items: center;
}


/* Mobile mode - slide-content expands naturally */
body.mobile-mode .slide-content {
    width: 100%;
    max-width: none !important;
    height: auto;
    display: block;
    padding: 1rem 1rem !important;
}

/* Force flex containers to column in mobile for intro slide */
body.mobile-mode .slide-content > div[style*="display: flex"],
body.mobile-mode .slide-content > div[style*="display:flex"] {
    flex-direction: column !important;
    gap: 1rem !important;
}

/* Cards in mobile should stack vertically */
body.mobile-mode .card[style*="flex: 1"],
body.mobile-mode .card[style*="flex:1"] {
    flex: none !important;
    /* width: 100% !important; */
    margin-bottom: 1rem;
}

/* Mobile mode - Override for grids */
body.mobile-mode .grid-2 {
    grid-template-columns: 1fr;
    direction: ltr !important;
    height: auto !important;  /* Override inline calc(100vh - 300px) */
    min-height: auto !important;
    align-items: stretch !important;  /* Allow content to expand */
}

/* Force consistent carousel height on mobile */
body.mobile-mode .carousel,
body.mobile-mode .slide .carousel,
body.mobile-mode .grid-2 .carousel,
body.mobile-mode .media-card-layout .carousel {
    order: -1; /* Put carousel first on mobile */
    max-width: 100%;
    margin-bottom: 2rem;
    width: 100% !important;
    height: 350px !important;
    min-height: 350px !important;
    max-height: 350px !important;
    z-index: 10; /* Ensure carousel is above other elements */
    overflow: hidden; /* Prevent horizontal scroll from carousel content */
}

/* Specific mobile height for media-card-carousel */
body.mobile-mode .carousel.media-card-carousel {
    height: 400px !important;
    min-height: 400px !important;
    max-height: 400px !important;
}

/* Ultra-specific fix for problematic slides */
section[data-nav-target="pentures"] .carousel,
section[data-nav-target="poignee"] .carousel,
.slide[data-nav-target="pentures"] .carousel,
.slide[data-nav-target="poignee"] .carousel {
    height: 450px !important;
    min-height: 450px !important;
    max-height: 450px !important;
    width: 100% !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
}

/* Ensure grid containers don't interfere with carousel height */
section[data-nav-target="pentures"] .grid-2,
section[data-nav-target="poignee"] .grid-2 {
    align-items: stretch !important;
}

section[data-nav-target="pentures"] .grid-2 > div:first-child,
section[data-nav-target="poignee"] .grid-2 > div:first-child {
    display: flex !important;
    align-items: center !important;
}

/* Mobile mode - ensure carousel container doesn't cause horizontal overflow */
body.mobile-mode .carousel-container {
    max-width: 100%;
    /* overflow: hidden; */
}

body.mobile-mode .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Mobile mode - cards expand naturally */
body.mobile-mode .card {
    height: auto !important;
    min-height: auto !important;
}

/* Mobile mode - fix absolutely positioned cards to prevent carousel overlap */
body.mobile-mode .card[style*="position: absolute"] {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    margin-top: 1rem;
}

/* Mobile typography adjustments */
body.mobile-mode h1 {
    font-size: clamp(2rem, 8vw, 3rem);
}

body.mobile-mode h2 {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    line-height: 1.2;
}

body.mobile-mode h3 {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
}

body.mobile-mode .dual-text {
    font-size: clamp(0.9rem, 3vw, 1.2rem);
}

body.mobile-mode p {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Mobile menu */

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 0px;
    }

    .menu {
        top: 15px !important;
        gap: 0 !important;
        width: calc(100% - 30px) !important;
        max-width: none !important;
        min-height: 50px !important; /* Increased from 40px to accommodate bigger logo */
        padding: 6px 10px !important; /* Slightly increased vertical padding */
    }

    /* Override for mobile-mode - ensure menu stays at top and centered */
    body.mobile-mode .menu {
        position: fixed !important;
        top: 10px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 30000 !important;
    }

    .menu-logo-desktop {
        display: none !important;
    }

    .menu-logo-tablet {
        display: block !important;
        
        height: 70px !important; /* Even bigger - increased from 45px */
        position: absolute !important;
        left: 30px !important; /* Adjusted for reduced padding */
        top: 30px !important;
        transform: translateY(-50%) !important;
        filter: brightness(0) invert(1);
    }

    .menu-item {
        display: none !important;
    }

    .menu-switchers {
        display: none !important;
    }

    .menu-toggle {
        display: flex !important;
        background: none;
        border: none;
        color: var(--text-primary);
        font-size: 26px;
        cursor: pointer;
        padding: 0;
        position: absolute !important;
        right: 12px !important;
        top: 12px !important; /* Align with logo top position */
        transform: none !important; /* Remove vertical centering */
        width: 36px !important;
        height: 36px !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 4px; /* Add slight rounding */
    }

    .menu.menu-open {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        border-radius: 30px;
        min-height: auto !important;
        padding-top: 55px !important; /* Increased to accommodate taller menu */
    }

    /* Keep logo in same position whether menu is open or closed */
    .menu.menu-open .menu-logo-tablet {
        /* Styles removed - using default positioning */
    }

    .menu.menu-open .menu-item {
        display: block !important;
        width: 100% !important;
        padding: 10px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
    }

    .menu.menu-open .menu-item:first-of-type {
        margin-top: 10px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Style the menu switchers container in 5th grid cell */
    .menu.menu-open .menu-switchers {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 15px !important;
        padding: 10px 0 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        width: 100% !important;
    }

    /* Style individual switcher buttons within container */
    .menu.menu-open .menu-switchers .lang-switcher,
    .menu.menu-open .menu-switchers .theme-switcher {
        display: inline-flex !important;
        position: static !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
    }

    /* Slide content */
    .slide-content {
        padding: 20px !important;
        max-width: 100% !important;
    }

    h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.2rem !important;
    }

    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 20px !important;
    }

    .card, .service-card, .feature-card {
        padding: 20px !important;
    }

    .hero-section {
        padding-top: 80px;
    }
}

/* =============================================================================
   GRID LAYOUTS
   ============================================================================= */





/* =============================================================================
   CAROUSEL STYLES
   ============================================================================= */

/* Force consistent carousel height across all slides */
.carousel,
.slide .carousel,
.grid-2 .carousel,
.media-card-layout .carousel {
    position: relative;
    width: 100% !important;
    height: 450px !important;
    min-height: 450px !important;
    max-height: 450px !important;
    overflow: hidden;
    border-radius: 12px;
    background: transparent;
    border: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Specific height for media-card-carousel */
.carousel.media-card-carousel {
    min-height: 500px !important;
    max-height: 500px !important;
    height: 500px !important;
}

.carousel-container {
    display: flex;
    transition: transform 1.2s ease;
    height: 100%;
}

/* Individual slide wrappers */
.carousel-slide {
    flex: 0 0 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: white;
}

.carousel-slide img {
    cursor: pointer;
    transition: transform 0.8s ease;
    /* Default fallback */
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Fit options applied to slide wrapper */
.carousel-slide[data-fit="width"] img {
    width: 100%;
    height: auto;
    object-fit: none;
}

.carousel-slide[data-fit="height"] img {
    width: auto;
    height: 100%;
    object-fit: none;
}

.carousel-slide[data-fit="cover"] img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-slide[data-fit="contain"] img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Alignment options applied to slide wrapper */
.carousel-slide[data-align="top"] img {
    object-position: center top;
}

.carousel-slide[data-align="bottom"] img {
    object-position: center bottom;
}

.carousel-slide[data-align="left"] img {
    object-position: left center;
}

.carousel-slide[data-align="right"] img {
    object-position: right center;
}

.carousel-slide[data-align="top-left"] img {
    object-position: left top;
}

.carousel-slide[data-align="top-right"] img {
    object-position: right top;
}

.carousel-slide[data-align="bottom-left"] img {
    object-position: left bottom;
}

.carousel-slide[data-align="bottom-right"] img {
    object-position: right bottom;
}

.carousel-slide img:hover {
    transform: scale(1.02);
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-dots .dot.active {
    background: var(--accent-color);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 20px;
    transition: background 0.3s;
}

.carousel-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.carousel-nav.prev {
    left: 10px;
}

.carousel-nav.next {
    right: 10px;
}

/* =============================================================================
   LIGHTBOX STYLES
   ============================================================================= */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    background: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    filter: none !important;
    opacity: 1 !important;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10001;
    transition: transform 0.8s ease;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: #000000;
    font-size: 60px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    padding: 0;
    transition: all 0.3s ease;
    user-select: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    border: 3px solid #000000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    opacity: 0;
}

.lightbox-prev {
    left: 40px;
}

.lightbox-next {
    right: 40px;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #333333;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.9);
    opacity: 1;
    color: #333333;
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
    background: rgba(255, 255, 255, 0.8);
}

.lightbox-video {
    width: 90vw;
    height: 50.625vw; /* 16:9 aspect ratio */
    max-width: 1200px;
    max-height: 675px;
}

.lightbox-video iframe {
    width: 100%;
    height: 100%;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.grid-specs {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0px 20px;
  align-items: start;
}

.specs-left .specs-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.specs-right ul {
  margin: 0;
  padding-left: 18px;
}

