/* =========================
   1. RESET & BASICS
   ========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Use Barlow font (SpaceX style) */
body {
    font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: #050505; /* Deep Black */
    color: #cccccc; /* Lunar Grey text */
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll on body */
}

h1, h2, h3 {
    font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: #ffffff;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* =========================
   2. NAVIGATION
   ========================= */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: rgba(0,0,0,0.9);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #fff;
}

.logo-short {
    display: none;
}

.logo-full {
    display: inline;
}

.nav-links {
    display: flex;
    width: 50%;
    justify-content: flex-end;
    gap: 30px;
}

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
}

.nav-links a:hover {
    color: #fff;
}

/* Language Selector Dropdown */
.language-selector {
    position: relative;
    z-index: 1001;
}

.lang-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid #444;
    color: #888;
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    min-width: 90px;
}

.lang-dropdown-btn:hover {
    border-color: #666;
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.lang-dropdown-btn .flag {
    font-size: 1.1rem;
    line-height: 1;
}

.lang-dropdown-btn .lang-code {
    letter-spacing: 1px;
}

.lang-dropdown-btn .arrow {
    font-size: 0.6rem;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.lang-dropdown-btn.active .arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: #0a0a0a;
    border: 1px solid #333;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

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

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: #888;
    font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.lang-option:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.lang-option .flag {
    font-size: 1.3rem;
    line-height: 1;
}

.lang-option .lang-name {
    font-weight: 400;
}

.lang-option.selected {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

/* =========================
   3. HERO SECTION
   ========================= */
.hero {
    height: 100vh;
    /* Fallback background image if video doesn't load */
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.4)), url('https://images.unsplash.com/photo-1446941611757-91d2c3bd3d45?q=80&w=2072&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    position: relative;
    overflow: hidden;
}

/* Video background */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: cover;
}

/* Hide video on mobile to improve performance */
@media screen and (max-width: 768px) {
    .hero-video {
        display: none;
    }
}

/* Dark overlay on video */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.3));
    z-index: 1;
    pointer-events: none;
}

/* Ensure content is above video */
.hero-content {
    position: relative;
    z-index: 2;
}

/* CSS-only animation (Ken Burns effect) */
@keyframes slowZoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.08);
    }
}

/* Apply animation to hero background */
.hero::after {
    content: '';
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background: url('https://images.unsplash.com/photo-1446941611757-91d2c3bd3d45?q=80&w=2072&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    animation: slowZoom 30s ease-in-out infinite alternate;
    z-index: 0;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #ddd;
    line-height: 1.5;
}

/* BUTTONS */
.btn {
    padding: 12px 30px;
    background-color: #fff;
    color: #000;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 0.8rem;
    display: inline-block;
}

.btn:hover {
    background-color: #ccc;
}

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

.btn-outline:hover {
    background: #fff;
    color: #000;
}

/* =========================
   4. SECTIONS & LAYOUT
   ========================= */
.container {
    padding: 80px 10%;
    border-bottom: 1px solid #1a1a1a;
}

.bg-darker {
    background-color: #0a0a0a;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-top: 40px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Standard Images */
.image-box img {
    width: 100%;
    filter: grayscale(100%) contrast(120%);
    border: 1px solid #333;
}

/* Technology Cards */
.card {
    background: #111;
    padding: 30px;
    border: 1px solid #222;
}

.card h3 {
    font-size: 1.1rem;
    text-transform: uppercase;
}

.hero-small {
    padding: 100px 10%;
    text-align: center;
    border-bottom: 1px solid #1a1a1a;
}

/* =========================
   5. SPACEX STYLE CAROUSEL (THE FIX)
   ========================= */

/* The main container for the carousel section */
.carousel-section {
    background-color: #000;
    padding: 60px 0;
    border-bottom: 1px solid #222;
    overflow: hidden; /* Crucial: cuts off images that go off screen */
}

.carousel-header {
    padding: 0 10%;
    margin-bottom: 30px;
}

.carousel-header h2 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.carousel-header p {
    color: #888;
    font-size: 1rem;
    font-weight: 300;
}

/* The scrollable strip */
.carousel-container {
    display: flex; /* THIS forces images to sit side-by-side */
    overflow-x: auto; /* Allows horizontal scrolling */
    scroll-snap-type: x mandatory; /* Makes it snap cleanly */
    gap: 20px;
    padding: 0 10%;
    padding-bottom: 20px;
}

/* Hide scrollbar but keep functionality */
.carousel-container::-webkit-scrollbar {
    height: 8px;
}

.carousel-container::-webkit-scrollbar-track {
    background: #111;
}

.carousel-container::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.carousel-container::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Each image card */
.carousel-item {
    flex: 0 0 auto; /* Don't shrink, don't grow */
    width: 500px; /* Default width for desktop */
    max-width: 90vw; /* Never exceed 90% of viewport width */
    scroll-snap-align: start;
    position: relative;
}

/* The images themselves - RESPONSIVE */
.carousel-item img {
    width: 100%;
    height: 400px; /* Fixed height for consistency */
    object-fit: cover; /* Crop to fill without distortion */
    display: block;
    filter: grayscale(100%) contrast(110%);
    border: 1px solid #333;
}

/* Caption overlay */
.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 40px 20px 20px 20px;
    color: #fff;
}

.caption h3 {
    font-size: 0.9rem;
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.caption p {
    font-size: 0.85rem;
    color: #999;
    font-weight: 300;
}

/* =========================
   6. RESPONSIVE CAROUSEL
   ========================= */

/* Tablets */
@media screen and (max-width: 768px) {
    .carousel-item {
        width: 400px;
        max-width: 85vw;
    }

    .carousel-item img {
        height: 300px;
    }

    .carousel-header h2 {
        font-size: 1.5rem;
    }
}

/* Mobile phones */
@media screen and (max-width: 480px) {
    .carousel-item {
        width: 280px;
        max-width: 80vw;
    }

    .carousel-item img {
        height: 250px;
    }

    .carousel-container {
        padding: 0 5%;
        gap: 15px;
    }

    .carousel-header {
        padding: 0 5%;
    }

    .caption {
        padding: 30px 15px 15px 15px;
    }

    .caption h3 {
        font-size: 0.8rem;
    }

    .caption p {
        font-size: 0.75rem;
    }
}

/* =========================
   10. MOBILE RESPONSIVE
   ========================= */
@media screen and (max-width: 768px) {
    /* Logo: Show abbreviated version on mobile */
    .logo {
        font-size: 1rem;
        letter-spacing: 2px;
    }

    .logo-full {
        display: none;
    }

    .logo-short {
        display: inline;
    }

    /* Hero section mobile optimization */
    .hero {
        min-height: 100vh;
        height: auto;
        padding: 100px 20px 60px;
        background-position: center center;
    }

    .hero::after {
        background-position: center center;
        animation: none; /* Disable animation on mobile for better performance */
    }

    .hero::before {
        background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.5));
    }

    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 25px;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    /* Better touch targets for buttons */
    .btn {
        padding: 14px 35px;
        font-size: 0.75rem;
    }

    /* Navigation improvements */
    nav {
        padding: 15px 5%;
    }

    /* Prevent body scroll when mobile menu is open */
    body.menu-open {
        overflow: hidden;
    }

    /* Improve nav link touch targets on mobile */
    .nav-links a {
        padding: 10px 0;
        display: block;
    }

    /* Grid layouts stack on mobile */
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .grid-3 {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    /* Ensure images scale properly */
    .image-box img {
        width: 100%;
        height: auto;
    }

    /* Container padding */
    .container {
        padding: 60px 7%;
    }

    /* Hero small section */
    .hero-small {
        padding: 80px 7%;
    }
}

@media screen and (max-width: 480px) {
    /* Extra small logo on tiny screens */
    .logo {
        font-size: 0.85rem;
        letter-spacing: 1.5px;
    }

    /* Hero mobile */
    .hero {
        padding: 80px 15px 50px;
    }

    .hero-content h1 {
        font-size: 1.6rem;
        line-height: 1.3;
    }

    .hero-content p {
        font-size: 0.85rem;
    }

    .btn {
        padding: 12px 28px;
        font-size: 0.7rem;
    }

    /* Improve readability */
    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1rem;
    }

    p {
        font-size: 0.9rem;
    }

    .container {
        padding: 50px 5%;
    }
}
/* =========================
   7. CONTACT FORM
   ========================= */
.form-container {
    max-width: 600px;
    margin: 40px auto 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #666;
    background: #1a1a1a;
}

.form-group textarea {
    resize: vertical;
}

.form-group select {
    cursor: pointer;
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9rem;
    display: none;
}

.form-message.success {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    color: #0f0;
    display: block;
}

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

#submitBtn {
    width: 100%;
    margin-top: 10px;
}

#submitBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile responsive */
@media screen and (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* =========================
   8. BLOG SECTION
   ========================= */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.blog-card {
    background: #0a0a0a;
    padding: 30px;
    border: 1px solid #222;
    transition: all 0.3s ease;
}

.blog-card:hover {
    border-color: #444;
    transform: translateY(-5px);
}

.blog-date {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #666;
    margin-bottom: 15px;
}

.blog-card h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.blog-card p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #999;
}

/* =========================
   9. PARTNERS SECTION
   ========================= */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.partner-card {
    text-align: center;
    padding: 40px 30px;
    background: #050505;
    border: 1px solid #1a1a1a;
}

.partner-logo {
    margin-bottom: 25px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nasa-logo,
.spacex-logo {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 8px;
    color: #fff;
}

.partner-card h3 {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: #888;
}

.partner-card p {
    font-size: 0.85rem;
    line-height: 1.8;
    color: #777;
}

/* =========================
   10. VALUATION SECTION
   ========================= */
.valuation-table-wrapper {
    overflow-x: auto;
    margin: 40px 0;
    border: 1px solid #1a1a1a;
    background: #050505;
}

.valuation-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.valuation-table thead {
    background: #0a0a0a;
    border-bottom: 2px solid #1a1a1a;
}

.valuation-table th {
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.valuation-table tbody tr {
    border-bottom: 1px solid #111;
    transition: background 0.2s ease;
}

.valuation-table tbody tr:hover {
    background: #0a0a0a;
}

.valuation-table td {
    padding: 20px 15px;
    color: #ccc;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.valuation-table td:first-child {
    font-family: 'Barlow', sans-serif;
    font-weight: 500;
    color: #fff;
}

.valuation-table .total-row {
    background: #0a0a0a;
    border-top: 2px solid #1a1a1a;
    font-weight: 600;
}

.valuation-table .total-row td {
    color: #fff;
    font-size: 1rem;
    padding: 22px 15px;
}

.valuation-note {
    margin-top: 30px;
    font-size: 0.75rem;
    color: #666;
    line-height: 1.8;
    font-style: italic;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

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

    .valuation-table {
        font-size: 0.75rem;
    }

    .valuation-table th,
    .valuation-table td {
        padding: 12px 8px;
    }

    .valuation-table th {
        font-size: 0.6rem;
    }

    .valuation-table td {
        font-size: 0.8rem;
    }

    .valuation-note {
        font-size: 0.7rem;
        padding: 0 10px;
    }
}
