@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap');

/* ===========================
   CSS Variables (Theme Colors)
   =========================== */
:root {
    --bg-primary: #0b0f17;
    --bg-surface: #121826;
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --accent: #5bd6ff;
    --accent-contrast: #4cc3ff;
    --accent-alt: #cecece;
    --accent-alt1: #49159e;
    --divider: #243048;
    --header-height: 64px;
    --section-padding: 96px;
    --max-width: 1200px;
    --border-radius: 8px;
    --pill-radius: 50px;
    /* Glass variables */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-bg-strong: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.15);
}

/* ===========================
   Reset & Base Styles
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: "Orbitron", "Share Tech Mono", "monospace";
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

h1 {
    font-family: "Orbitron";
}

/* Site background (desktop default: fixed) */
body {
    background: url('/pictures/dark_mode_bg.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Mobile override - background-attachment fixed is unreliable */
@media (max-width: 768px) {
    body {
        background-size: auto;
        background-repeat: repeat-y;
    }
}

body.loading {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-alt);
}

/* ===========================
   Scrollbar - Glass Theme
   =========================== */
/* Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) rgba(255, 255, 255, 0.06);
}

/* WebKit */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.04));
    border: 1px solid var(--glass-border);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.18));
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 8px rgba(0, 0, 0, 0.35);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(91, 214, 255, 0.35), rgba(91, 214, 255, 0.22));
    border-color: var(--accent);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* ===========================
   Media Loading Spinner
   =========================== */
.media-loading {
    position: relative;
}

.media-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.25);
    transition: opacity 0.3s ease;
}

.media-spinner-logo {
    width: 120px;
    height: auto;
    animation: rotate 2s linear infinite;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.4));
}

.media-loading.media-loaded .media-spinner {
    opacity: 0;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

/* ===========================
   Header
   =========================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: transparent;
    /* border: 1px solid #000000; */
    border-top: none;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.hidden {
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.site-header.white {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo img {
    height: 32px;
    width: auto;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: #000000;
    font-size: 1.04rem;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: #000000;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.04rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
}

.dropdown-toggle:hover {
    color: var(--accent);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--divider);
    border-radius: var(--border-radius);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    background: rgba(91, 214, 255, 0.1);
    color: var(--accent);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: #000000;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: transparent;
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    border-top: none;
    transform: translateY(-100%);
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 998;
    opacity: 0;
    visibility: hidden;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.site-header.white .mobile-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
}

.mobile-nav-link {
    color: #000000;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    pointer-events: none;
    opacity: 0.5;
}

.mobile-menu.active .mobile-nav-link {
    pointer-events: auto;
    opacity: 1;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    border-color: var(--accent);
    color: var(--accent);
}

/* ===========================
   Container & Layout
   =========================== */
.container {
    max-width: var(--max-width);
    margin-bottom: 1%;
    padding: 0 1.5rem;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.container.animate-in {
    opacity: 1;
    transform: translateY(0);
}

main {
    margin-top: 0;
}

/* ===========================
   Hero Section
   =========================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(11,15,23,0.6) 0%, rgba(18,24,38,0.6) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(91, 214, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 2rem;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
    -webkit-text-stroke-width: 0.4px;
    -webkit-text-stroke-color: black;
}

.hero-mission {
    font-size: clamp(1.125rem, 2.2vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
    -webkit-text-stroke-width: 0.2px;
    -webkit-text-stroke-color: black;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    opacity: 0.9;
    -webkit-text-stroke-width: 0.15px;
    -webkit-text-stroke-color: black;
}

/* ===========================
   Product Sections
   =========================== */
.product-section {
    padding: var(--section-padding) 0;
    position: relative;
    background: transparent;
}

.product-section:nth-child(even) {
    background: transparent;
}

/* Background image support per section */
.product-section.has-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.product-section.has-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

/* Background video support */
.product-section.has-video {
    overflow: hidden;
}

.product-section.has-video .bg-video {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.product-section.has-video .bg-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.product-section.has-video .container,
.product-section.has-video .section-content,
.product-section.has-video .section-text {
    position: relative;
    z-index: 1;
}

/* Edge-to-edge layout for background sections, with aligned glass text */
.product-section.has-bg .container {
    max-width: none;
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    padding-left: 0;
    padding-right: 0;
}

.product-section.has-bg .section-content {
    padding: 4rem 4vw;
}

.product-section .section-text { max-width: 640px; }

.product-section .section-text.align-left { margin-left: 4vw; margin-right: auto; }

.product-section .section-text.align-right { margin-left: auto; margin-right: 4vw; }

.product-section .section-text.align-center { margin: auto; }

/* Glass panel for text block */
.product-section .section-text {
    background: rgb(8 8 8 / 10%);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    padding: 1.5rem;
}

/* Glass panel for legal pages (T&C) */
.legal-page .section-text {
    background: rgb(8 8 8 / 10%);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    padding: 1.5rem;
}

/* Full-width container for legal pages */
.legal-container {
    max-width: none;
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    padding-left: 0;
    padding-right: 0;
}

/* Hide media block if background image is used */
.product-section.has-bg .section-media {
    display: none;
}

.section-content {
    display: grid;
    gap: 3rem;
    align-items: center;
}

/* Group titles */
/* Full-width inter-section glass title panels */
.section-title-panel {
    width: 100vw;
    margin: 0 0 0 50%;
    transform: translateX(-50%);
    padding: 1.25rem 1.5rem;
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0; /* square edges per request */
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    box-shadow: 0 6px 22px rgba(0,0,0,0.35);
}

/* Themed glass variants for contrast */
.glass-theme-services .section-text { 
    border-left: 3px solid var(--accent-alt);
}
.glass-theme-technology .section-text { 
    border-left: 3px solid var(--accent-alt);
}
.glass-theme-pilots .section-text { 
    border-radius: 3px solid var(--accent-alt);
}
.glass-theme-partners .section-text { 
    border-radius: 3px solid var(--accent-alt);
}

/* Group layout: sticky full-height title column */
/* Group content uses full width beneath the title panel */
.group-grid { display: block; }
.group-grid .group-content > .product-section { margin-bottom: 0; }

/* Pilots section uses liquid glass */
.pilots-section {
    padding: var(--section-padding) 0;
    background: var(--glass-bg);
}

.pilots-section .container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    padding: 2rem 1.5rem;
}

.section-content.reverse {
    direction: rtl;
}

.section-content.reverse > * {
    direction: ltr;
}

.section-text h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.section-text p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.section-media {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.section-media img {
    width: 100%;
    height: auto;
    display: block;
}

.section-media video {
    width: 100%;
    height: auto;
    display: block;
    margin-top: 1rem;
}

/* ===========================
   Contact Section
   =========================== */
.contact-section {
    padding: var(--section-padding) 0;
    background: var(--bg-surface);
}

.contact-section h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin-bottom: 1rem;
    text-align: center;
    color: var(--text-primary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.125rem;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
}

.checkbox-label {
    display: flex;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 0.125rem;
    cursor: pointer;
}

.checkbox-label a {
    text-decoration: underline;
}

.form-message {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(124, 255, 178, 0.1);
    border: 1px solid var(--accent-alt);
    color: var(--accent-alt);
}

.form-message.error {
    display: block;
    background: rgba(255, 100, 100, 0.1);
    border: 1px solid #ff6464;
    color: #ff6464;
}

/* ===========================
   Buttons
   =========================== */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: var(--pill-radius);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    /* background: linear-gradient(135deg, var(--accent) 0%, var(--accent-alt) 100%); */
    /* background: linear-gradient(135deg, var(--accent) 0%, var(--accent-alt) 100%); */
    background: rgb(8 8 8 / 40%);
    color: #f3f3f3;
    /* box-shadow: 0 8px 24px rgba(91, 214, 255, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1) inset; */
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    /* box-shadow: 0 8px 24px rgba(91, 214, 255, 0.35), 0 0 0 1px rgba(255,255,255,0.1) inset; */
}

.btn-primary:hover {
    transform: translateY(-2px);
    /* box-shadow: 0 12px 28px rgba(91, 214, 255, 0.45), 0 0 0 1px rgba(255,255,255,0.15) inset; */
    color: var(--text-primary);
}

.btn-secondary {
    background: rgba(91, 214, 255, 0.08);
    color: var(--accent);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
}

.btn-secondary:hover {
    background: var(--accent);
    color: var(--bg-primary);
    box-shadow: 0 8px 24px rgba(91, 214, 255, 0.35);
}

button.btn {
    font-family: inherit;
}

/* ===========================
   Footer
   =========================== */
.footer {
    padding: 2rem 0;
    background: rgb(8 8 8 / 80%);
    border-top: 1px solid var(--divider);
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    align-items: start;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.footer-column h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 0;
}

.footer-column a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.linkedin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    text-decoration: none;
}

.linkedin-button:hover {
    background: var(--glass-bg-strong);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.linkedin-button svg {
    width: 24px;
    height: 24px;
}

.footer-column p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

.btn-share-website {
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: rgba(91, 214, 255, 0.1);
    color: var(--accent);
    border: 1px solid var(--glass-border);
    border-radius: var(--pill-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
}

.btn-share-website:hover {
    background: rgba(91, 214, 255, 0.2);
    color: var(--text-primary);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .footer {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-column {
        align-items: center;
    }
    
    .footer-column:first-child {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}

/* ===========================
   Page Content (for sub-pages)
   =========================== */
.page-content {
    min-height: calc(100vh - var(--header-height) - 100px);
    padding: 4rem 0;
}

.page-content h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.page-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Legal Pages */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
}

.legal-page section {
    margin-bottom: 2.5rem;
}

.legal-page h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.legal-page ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-page li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.last-updated {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 2rem;
}

.legal-disclaimer {
    margin-top: 3rem;
    padding: 1rem;
    background: rgba(255, 100, 100, 0.1);
    border: 1px solid #ff6464;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===========================
   Responsive Design
   =========================== */

/* Tablet */
@media (max-width: 992px) {
    :root {
        --section-padding: 64px;
    }
    
    .section-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .section-content.reverse {
        direction: ltr;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --header-height: 56px;
        --section-padding: 48px;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-content h1 {
        font-size: 1.75rem; 
        line-height: 1.2; }
    .hero-subtitle { 
        font-size: 0.95rem; }
    
    .section-text h2, .section-text h3 { font-size: 1.25rem; }
    .section-text p { font-size: 0.95rem; }
    .section-text ul { padding-left: 1rem; }
    .section-text li { font-size: 0.95rem; margin-bottom: 0.5rem; }
    .section-text { margin-left: 1rem !important; margin-right: 1rem !important; }
    
    .site-footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 32px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .btn { padding: 0.6rem 1.25rem; font-size: 0.9rem; }
    .btn { padding: 0.55rem 1.1rem; font-size: 0.85rem; }
    .section-title-panel { font-size: 1.5rem; padding: 0.9rem 1rem; }
}

/* ===========================
   Contact Sidebar
   =========================== */
.contact-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.contact-sidebar.active {
    visibility: visible;
    opacity: 1;
}

.sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.sidebar-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 500px;
    height: 100%;
    background: rgb(8 8 8 / 80%);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    border-left: 1px solid var(--divider);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.contact-sidebar.active .sidebar-content {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--divider);
    background: var(--glass-bg);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
}

.sidebar-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}

.sidebar-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: opacity 0.3s ease;
}

.sidebar-close:hover {
    opacity: 0.7;
}

.sidebar-close span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.sidebar-close span:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

.sidebar-close span:last-child {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Contact Type Selector */
.contact-type-selector {
    padding: 1.5rem;
    border-bottom: 1px solid var(--divider);
}

.contact-type-option {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-type-option:last-child {
    margin-bottom: 0;
}

.contact-type-option:hover {
    background: var(--glass-bg-strong);
    border-color: var(--accent);
}

.contact-type-option.active {
    background: rgba(91, 214, 255, 0.1);
    border-color: var(--accent);
}

.contact-type-option h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.contact-type-option p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Sales Type Selector */
.sales-type-selector {
    padding: 1.5rem;
    border-bottom: 1px solid var(--divider);
}

.sales-type-selector h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.sales-type-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sales-type-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.sales-type-option:hover {
    background: var(--glass-bg-strong);
    border-color: var(--accent);
}

.sales-type-option input[type="radio"] {
    margin: 0;
    margin-top: 0.125rem;
}

.sales-type-option input[type="radio"]:checked + .option-content {
    color: var(--accent);
}

.sales-type-option:has(input[type="radio"]:checked) {
    background: rgba(91, 214, 255, 0.1);
    border-color: var(--accent);
}

.option-content h5 {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    transition: color 0.3s ease;
}

.option-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Sidebar Form */
.sidebar-content .contact-form {
    flex: 1;
    padding: 1.5rem;
    background: transparent;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    box-shadow: none;
    margin: 0;
    max-width: none;
}

.sidebar-content .form-group {
    margin-bottom: 1.25rem;
}

.sidebar-content .form-group label {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.sidebar-content .form-group input,
.sidebar-content .form-group textarea {
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem;
}

.sidebar-content .checkbox-group {
    margin-bottom: 1.5rem;
}

.sidebar-content .checkbox-label {
    font-size: 0.8rem;
    line-height: 1.4;
}

.sidebar-content .btn {
    width: 100%;
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar-content {
        max-width: 100%;
        width: 100%;
    }
    
    .sidebar-header {
        padding: 1rem;
    }
    
    .sidebar-header h2 {
        font-size: 1.25rem;
    }
    
    .contact-type-selector,
    .sales-type-selector,
    .sidebar-content .contact-form {
        padding: 1rem;
    }
    
    .contact-type-option,
    .sales-type-option {
        padding: 0.75rem;
    }
    
    .contact-type-option h3,
    .option-content h5 {
        font-size: 0.95rem;
    }
    
    .contact-type-option p,
    .option-content p {
        font-size: 0.8rem;
    }

    .sales-type-option-description {
        font-style: italic;
    }
}

@media (max-width: 480px) {
    .sidebar-header {
        padding: 0.75rem;
    }
    
    .contact-type-selector,
    .sales-type-selector,
    .sidebar-content .contact-form {
        padding: 0.75rem;
    }
}

/* ===========================
   Carousel Background (Essential Commander)
   =========================== */
.commander-carousel-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.7s ease;
}

.commander-carousel-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.carousel-dots {
    position: absolute;
    right: 2rem;
    bottom: 2rem;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--text-primary);
    background: transparent;
    opacity: 0.6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dots button:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.carousel-dots button.is-active {
    opacity: 1;
    background: var(--accent);
    border-color: var(--accent);
}

@media (max-width: 768px) {
    .carousel-dots {
        right: 1rem;
        bottom: 1rem;
    }
    
    .carousel-dots button {
        width: 8px;
        height: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .commander-carousel-bg {
        transition: none;
    }
    
    .commander-carousel-bg::before {
        transition: none;
    }
}

/* ===========================
   Modal (FOD Specs)
   =========================== */
.modal[aria-hidden='true'] {
    display: none;
}

.modal[aria-hidden='false'] {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: grid;
    place-items: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-dialog {
    position: relative;
    z-index: 1;
    width: 80%;
    height: 80%;
    background: var(--bg-surface);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    border: 1px solid var(--divider);
    display: grid;
    grid-template-rows: auto 1fr auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.modal-header,
.modal-footer {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--divider);
}

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

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-footer {
    border-bottom: 0;
    border-top: 1px solid var(--divider);
    display: grid;
    place-items: center;
}

.modal-body {
    padding: 1.5rem;
    overflow: auto;
}

.modal-close {
    background: none;
    border: 0;
    color: inherit;
        font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.modal-close:hover {
    opacity: 0.7;
}

/* PDF iframe styling */
.modal-body iframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: var(--border-radius);
    background: var(--bg-primary);
}

@media (max-width: 768px) {
    .modal-body iframe {
        height: 500px;
    }
}

/* View specs button link style */
.btn-link {
    background: none;
    border: none;
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0;
    margin-top: 0.75rem;
    display: inline-block;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: var(--accent-alt);
}

/* Share modal specific styling */
#share-modal .modal-dialog {
    width: auto;
    max-width: 500px;
    height: auto;
    max-height: 90vh;
}

#share-modal .modal-body {
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .modal-dialog {
        width: 96vw;
        max-height: 94vh;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-section .bg-video video {
        display: none;
    }
    
    .hero-section {
        background: url('/pictures/robot_and_disposal.jpg') center/cover no-repeat;
    }
}
