/* ==========================================
   NASA Website - Responsive Stylesheet
   Mobile-first approach
   ========================================== */

/* --- CSS Custom Properties --- */
:root {
    --nasa-red: #E03C31;
    --nasa-red-hover: #f64137;
    --nasa-blue: #0076f6;
    --bg-white: #ffffff;
    --bg-black: #000000;
    --text-dark: #212121;
    --text-body: #333333;
    --text-muted: #888888;
    --border-light: #e0e0e0;
--header-height: 3.75rem;
    --container-padding: 1.25rem;
    --section-gap: 3.75rem;

}

/* --- Global Reset --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Base Section Spacing --- */
section {
    padding: var(--section-gap) var(--container-padding);
}

html {
    font-size: clamp(1rem, 4vw, 1.125rem);
    -webkit-text-size-adjust: 100%;

}

body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================
   HEADER
   ========================================== */
header {
    background-color: var(--bg-black);
    color: var(--bg-white);
    padding: 0.625rem var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    position: relative;
    z-index: 100;
}


.header-left,
.header-right {
    display: none;
    /* Hidden on mobile by default */
    align-items: center;
    gap: 30px;
}

/* Mobile menu active state */
.header-left.active,
.header-right.active {
    display: flex;
}

/* Mobile menu slide-in animation */
@media (max-width: 767px) {

    .header-left.active,
    .header-right.active {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background-color: var(--bg-black);
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        z-index: 99;
        animation: slideDown 0.3s ease;
    }

    .header-left.active {
        top: 60px;
        border-bottom: 1px solid #333;
    }

    .header-right.active {
        top: 180px;
    }

    .search-bar {
        width: 100%;
    }

    .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(5px, -5px);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nasa-logo img {
    height: 40px;
}

.explore-btn {
    font-weight: bold;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

.explore-btn::after {
    content: ' ⌵';
    margin-left: 5px;
    margin: bottom -3px;
    font-size: 1.2rem;
}

.search-bar {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
    padding: 8px 15px;
    width: 200px;
    color: white;
    border-radius: 2px;
    font-family: inherit;
    font-size: 14px;
}

.search-bar::placeholder {
    color: #aaa;
}

.nav-link {
    font-weight: bold;
    text-decoration: none;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.chevron {
    font-size: 1.2rem;
}

.nasa-plus {
    background-color: transparent;
    border: 1px solid #ffffff;
    padding: 2px 5px;
    border-radius: 3px;
    width: 40px;
    text-align: center;
    margin-top: 10px;
    font-size: 10px;
    margin-left: 5px;
}

.nasa-plus:hover {
    background-color: red;
}

/* Mobile hamburger - Hide on desktop, show on mobile */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    transition: 0.3s;
}

/* Hide hamburger on desktop - show menus by default */
@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }

    .header-left,
    .header-right {
        display: flex !important;
    }
}

/* ==========================================
   EVENT SECTION
   ========================================== */
.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 var(--container-padding);
}

.event-timestamp {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-dark);
    line-height: 1.3;
}

hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin-bottom: 30px;
}

.event-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.event-image {
    width: 70px;
    height: 70px;
    background-color: black;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.event-image img {
    width: 70%;
    filter: brightness(0.9);
    opacity: 0.5;
}

.event-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.event-description {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-body);
}

.arrow-button {
    width: 40px;
    height: 40px;
    background-color: var(--nasa-red-hover);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: transform 0.2s, background-color 0.2s;
    flex-shrink: 0;
}

.arrow-button:hover {
    transform: translateX(5px);
    background-color: var(--nasa-red);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero-container {
    background-image: url(./assets/55114649503-06b807462e-o.webp);
    min-height: 80vh;
    /* min-height: 100dvh; Dynamic viewport height for mobile */
    width: 100%;
    /* background: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.6));  */
    /* url('https://www.nasa.gov/wp-content/uploads/2024/03/iss070e123456.jpg'); */
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 var(--container-padding) 40px;
    color: white;
}

.hero-content {
    max-width: 700px;
    margin-bottom: 40px;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.0625rem;
    line-height: 1.1;
}


.hero-description {
    font-size: clamp(1rem, 4vw, 1.125rem);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    text-shadow: 0.125rem 0.125rem 0.25rem rgba(0, 0, 0, 0.5);
    opacity: 0.95;
}


.hero-btn {
    display: inline-block;
    background-color: var(--nasa-red);
    color: #fff;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.25rem;
    font-weight: bold;
    font-size: clamp(1rem, 4vw, 1.125rem);
    transition: background-color 0.2s;
}

.hero-btn:hover {
    background-color: var(--nasa-red-hover);
}

/* Hero Footer */
.hero-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.footer-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.label {
    display: block;
    text-transform: uppercase;
    font-size: 0.6875rem;
    letter-spacing: 0.125rem;
    color: #ccc;
}

.link {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.arrow {
    background-color: var(--nasa-red);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    flex-shrink: 0;
}

/* Video Controls */
.video-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-end;
}

.thumb-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: url('https://www.nasa.gov/wp-content/uploads/2024/03/iss070e123456.jpg') center/cover;
    flex-shrink: 0;
}

.pause-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(5px);
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

/* ==========================================
   NEWS SECTION
   ========================================== */
.news-section-wrapper {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 var(--container-padding);
    font-family: 'Inter', sans-serif;
    background: var(--bg-white);
}

.news-header-flex {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 30px;
}

.section-main-title {
    font-size: clamp(2rem, 6vw, 2.625rem);
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
}

.recently-published-link {
    text-decoration: none;
    color: var(--bg-black);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    white-space: nowrap;
}

.red-arrow-icon {
    background: var(--nasa-red);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    flex-shrink: 0;
}

/* Mosaic Grid */
.news-mosaic-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 40px;
}

.mosaic-card {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    /* overflow: hidden; */
    color: white;
    /* min-height: 250px; */
    width: 100%;
    display: flex;
    /* align-items: flex-end; */
}

.large-feature {
    min-height: 350px;
}

.medium-feature {
    min-height: 280px;
}

.small-feature-stack {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stack-item {
    min-height: 180px;
    flex: 1;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.card-tag {
    display: block;
    font-size: 0.625rem;
    letter-spacing: 0.125rem;
    font-weight: 600;
    margin-bottom: 0.3125rem;
    text-transform: uppercase;
}

.read-time {
    font-size: 0.625rem;
    font-weight: 700;
    opacity: 0.8;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-top: 10px;
    line-height: 1.2;
}

.card-title-small {
    font-size: 16px;
    font-weight: 700;
    margin-top: 5px;
    line-height: 1.3;
}

/* Mini News Row */
.bottom-news-flex-row {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mini-news-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.mini-thumb {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.mini-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mini-meta {
    font-size: 10px;
    font-weight: 800;
    color: #444;
    letter-spacing: 1px;
}

.mini-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
    line-height: 1.3;
}

.mini-tag {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* ==========================================
   PODCAST SECTION
   ========================================== */
.podcast-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    /* background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7)),  */
    /* url('./goldstones-dss-15-antenna-at-sunset.webp'); */
    background-image: url('./assets/goldstones-dss-15-antenna-at-sunset.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 80px var(--container-padding);
    color: white;
}

.podcast-content {
    max-width: 600px;
    width: 100%;
}

.podcast-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -1px;
    line-height: 1.1;
}

.podcast-description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 32px;
    font-weight: 400;
    text-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5);
    opacity: 0.95;
}

.podcast-link {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: opacity 0.2s;
}

.podcast-link:hover {
    opacity: 0.8;
}

.podcast-arrow {
    background-color: var(--nasa-red-hover);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    padding-bottom: 2px;
    flex-shrink: 0;
}

/* ==========================================
   MISSIONS SECTION
   ========================================== */
.missions-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 var(--container-padding);
}

.missions-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
}

.missions-main-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
}

.discover-more-btn {
    text-decoration: none;
    color: var(--bg-black);
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.header-arrow {
    background-color: var(--nasa-red-hover);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    flex-shrink: 0;
}

.missions-grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.mission-card-item {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background-color: #000;
    min-height: 280px;
    display: flex;
    align-items: flex-end;
}

.mission-card-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.85));
    z-index: 1;
    transition: background 0.3s;
}

.mission-card-item:hover::before {
    background: linear-gradient(transparent 30%, rgba(0, 0, 0, 0.95));
}

.mission-card-overlay {
    position: relative;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 2;
    color: #fff;
    width: 100%;
}

.mission-card-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    max-width: 80%;
}

.mission-card-arrow {
    background-color: var(--nasa-red-hover);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    flex-shrink: 0;
}

/* ==========================================
   IMAGE OF THE DAY SECTION
   ========================================== */
.iotd-section {
    padding: 60px 0;
    display: flex;
    justify-content: center;
    background: var(--bg-white);
}

.iotd-container {
    max-width: 1200px;
    width: 100%;
    padding: 0 var(--container-padding);
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.iotd-content {
    flex: 1;
}

.iotd-label {
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 700;
    color: #666;
    display: block;
    margin-bottom: 10px;
}

.iotd-main-heading {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 30px;
    line-height: 1.2;
}

.iotd-sub-heading {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
}

.iotd-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-body);
    margin-bottom: 24px;
    max-width: 480px;
}

.iotd-image-wrapper {
    flex: 1.2;
    background-color: #f6f6f6;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.iotd-image-container {
    position: relative;
    width: 100%;
}

.iotd-image-container img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.iotd-link,
.iotd-link-small {
    text-decoration: none;
    color: var(--bg-black);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.red-arrow,
.red-arrow-small {
    background-color: var(--nasa-red-hover);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.red-arrow {
    width: 22px;
    height: 22px;
    font-size: 12px;
}

.red-arrow-small {
    width: 18px;
    height: 18px;
    font-size: 10px;
}

.download-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background-color: var(--nasa-blue);
    color: white;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.view-image-footer {
    align-self: flex-end;
    margin-top: 12px;
}

/* ==========================================
   GALLERY SECTION
   ========================================== */
.gallery-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 var(--container-padding);
}

.gallery-section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-dark);
    line-height: 1.2;
}

.gallery-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.gallery-card {
    cursor: pointer;
}

.image-composite {
    display: flex;
    gap: 4px;
    height: 220px;
    overflow: hidden;
    border-radius: 4px;
}

.main-img {
    flex: 2;
    overflow: hidden;
}

.side-imgs {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.image-composite img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease, transform 0.5s ease;
}

.gallery-card:hover img {
    opacity: 0.9;
}

.gallery-card:hover .main-img img {
    transform: scale(1.02);
}

.card-content {
    margin-top: 15px;
}

.card-heading {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}

.card-meta {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    color: #555;
    text-transform: uppercase;
}

/* ==========================================
   TABLET BREAKPOINT (768px+)
   ========================================== */
@media (min-width: 768px) {
    :root {
        --container-padding: 30px;
        --section-gap: 60px;
    }

    section {
        padding: var(--section-gap) var(--container-padding);
    }

    header {
        padding: 10px var(--container-padding);
    }

    .header-left,
    .header-right {
        display: flex;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .nasa-logo img {
        height: 50px;
    }

    .container {
        margin: 60px auto;
    }

    .event-timestamp {
        font-size: 22px;
    }

    .event-card {
        display: grid;
        grid-template-columns: 80px 1fr 1fr 50px;
        align-items: center;
        gap: 20px;
    }

    .event-title {
        font-size: 30px;
    }

    .event-description {
        font-size: 16px;
        padding-right: 20px;
    }

    .hero-title {
        font-size: 60px;
        margin-bottom: 20px;
    }

    .hero-description {
        font-size: 18px;
        margin-bottom: 30px;
    }

    .hero-btn {
        font-size: 18px;
    }

    .hero-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
        gap: 30px;
    }

    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
        flex-grow: 1;
    }

    .link {
        font-size: 18px;
    }

    .news-header-flex {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .section-main-title {
        font-size: 42px;
    }

    .news-mosaic-grid {
        grid-template-columns: 2fr 1fr;
        grid-template-rows: 1fr 1fr;
        height: auto;
    }

    .large-feature {
        grid-row: 1 / 3;
        min-height: 400px;
    }

    .medium-feature {
        grid-column: 2 / 3;
        min-height: 200px;
    }

    .small-feature-stack {
        grid-column: 2 / 3;
        flex-direction: column;
    }

    .card-title {
        font-size: 22px;
    }

    .bottom-news-flex-row {
        flex-direction: row;
        justify-content: space-between;
        gap: 20px;
    }

    .mini-news-item {
        flex: 1;
    }

    .podcast-hero {
        padding: 0 8%;
    }

    .podcast-title {
        font-size: 52px;
        margin-bottom: 30px;
    }

    .podcast-description {
        font-size: 18px;
        margin-bottom: 40px;
    }

    .podcast-link {
        font-size: 22px;
    }

    /* Missions tablet */
    .missions-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .missions-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .mission-card-item {
        min-height: 320px;
    }

    .mission-card-title {
        font-size: 22px;
    }

    /* IOTD tablet */
    .iotd-section {
        padding: 80px 0;
    }

    .iotd-container {
        flex-direction: row;
        gap: 60px;
    }

    .iotd-main-heading {
        font-size: 48px;
        margin-bottom: 50px;
    }

    .iotd-sub-heading {
        font-size: 24px;
    }

    .iotd-description {
        font-size: 16px;
    }

    .iotd-image-wrapper {
        padding: 40px;
    }

    /* Gallery tablet */
    .gallery-section-title {
        font-size: 36px;
    }

    .gallery-grid {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 20px;
    }

    .gallery-card {
        flex: 1 1 calc(50% - 10px);
        min-width: 300px;
    }

    .image-composite {
        height: 260px;
    }

    .card-heading {
        font-size: 18px;
    }
}

/* ==========================================
   DESKTOP BREAKPOINT (1024px+)
   ========================================== */
@media (min-width: 1024px) {
    :root {
        --container-padding: 40px;
        --section-gap: 80px;
    }

    section {
        padding: var(--section-gap) var(--container-padding);
    }

    .event-card {
        grid-template-columns: 100px 1fr 1fr 50px;
    }

    .event-image {
        width: 80px;
        height: 80px;
    }

    .event-title {
        font-size: 32px;
    }

    .hero-title {
        font-size: 80px;
        letter-spacing: -2px;
    }

    .footer-grid {
        gap: 40px;
    }

    .link {
        font-size: 20px;
    }

    .news-mosaic-grid {
        grid-template-columns: 2fr 1fr 1fr;
        grid-template-rows: 1fr;
        height: 600px;
    }

    .large-feature {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }

    .medium-feature {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }

    .small-feature-stack {
        grid-column: 3 / 4;
        grid-row: 1 / 2;
    }

    .card-title {
        font-size: 24px;
    }

    .podcast-title {
        font-size: 64px;
        letter-spacing: -1.5px;
    }

    /* Missions desktop */
    .missions-grid-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .mission-card-item {
        min-height: 450px;
    }

    .mission-card-title {
        font-size: 24px;
    }

    /* IOTD desktop */
    .iotd-main-heading {
        font-size: 54px;
    }

    /* Gallery desktop */
    .gallery-card {
        flex: 1;
        min-width: 300px;
    }

    .gallery-grid {
        flex-wrap: nowrap;
    }

    .image-composite {
        height: 220px;
    }
}

/* ==========================================
   LARGE DESKTOP BREAKPOINT (1400px+)
   ========================================== */
@media (min-width: 1400px) {
    .container {
        padding: 0 20px;
    }

    .news-section-wrapper {
        padding: 20px;
    }
}

/* ==========================================
   MEDIUM TABLET BREAKPOINT (900px)
   Better support for small tablets
   ========================================== */
@media (min-width: 900px) and (max-width: 1023px) {
    .hero-title {
        font-size: 52px;
    }

    .podcast-title {
        font-size: 42px;
    }

    .news-mosaic-grid {
        height: 450px;
    }

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

    .mission-card-item {
        min-height: 280px;
    }

    .iotd-container {
        gap: 40px;
    }

    .gallery-card {
        flex: 1 1 calc(50% - 10px);
    }
}

/* ==========================================
   SMALL MOBILE OPTIMIZATIONS
   ========================================== */
@media (max-width: 480px) {
    .hero-container {
        min-height: 60vh;
        padding: 0 var(--container-padding) 30px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-description {
        font-size: 14px;
    }

    .podcast-hero {
        min-height: 60vh;
        padding: 40px var(--container-padding);
    }

    .podcast-title {
        font-size: 28px;
    }

    .podcast-description {
        font-size: 14px;
    }

    .event-title {
        font-size: 22px;
    }

    .section-main-title,
    .missions-main-title {
        font-size: 26px;
    }

    .gallery-section-title {
        font-size: 26px;
    }

    /* jfhjdhfjdsgfjdk */
    /* Base Reset */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        background-color: #f6f6f6;
        /* Off-white background from image */
        font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
        color: #212121;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
        padding: 20px;
    }

    .container {
        max-width: 1100px;
        width: 100%;
        display: grid;
        grid-template-columns: 1.1fr 1fr;
        /* Two columns */
        gap: 60px;
        align-items: flex-start;
    }

    /* Text Styling */
    .eyebrow {
        font-weight: bold;
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    h1 {
        font-size: 3.5rem;
        line-height: 1.1;
        font-weight: 700;
        margin-bottom: 2rem;
        letter-spacing: -1px;
    }

    .subheadline {
        font-weight: bold;
        font-size: 1.15rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
    }

    .body-text {
        font-size: 1.05rem;
        line-height: 1.6;
        margin-bottom: 2rem;
        color: #333;
    }

    /* Learn More Link */
    .learn-more {
        display: inline-flex;
        align-items: center;
        text-decoration: none;
        color: #212121;
        font-weight: bold;
        font-size: 1.3rem;
        transition: opacity 0.2s;
    }

    .learn-more:hover {
        opacity: 0.7;
    }

    .arrow-circle {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        background-color: #e03c31;
        /* NASA Red */
        color: white;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        margin-left: 10px;
        font-size: 14px;
    }

    /* Image and Caption Styling */
    .image-wrapper img {
        width: 100%;
        height: auto;
        display: block;
    }

    .caption {
        margin-top: 20px;
        font-size: 0.85rem;
        line-height: 1.5;
        color: #555;
    }

    /* Responsive for Tablets/Mobile */
    @media (max-width: 900px) {
        .container {
            grid-template-columns: 1fr;
            gap: 40px;
        }

        h1 {
            font-size: 2.5rem;
        }
    }

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

    body {
        background-color: #ffffff;
        font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
        padding: 60px 20px;
    }

    .topics-section {
        max-width: 1200px;
        margin: 0 auto;
    }

    .section-title {
        font-size: 2rem;
        font-weight: 700;
        color: #212121;
        margin-bottom: 40px;
    }

    /* Grid Layout */
    .topics-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        /* 4 equal columns */
        gap: 15px;
    }

    /* Card Styling */
    .topic-card {
        height: 450px;
        /* Tall vertical aspect ratio */
        background-size: cover;
        background-position: center;
        position: relative;
        border-radius: 4px;
        overflow: hidden;
        cursor: pointer;
        transition: transform 0.3s ease;
    }

    .topic-card:hover {
        transform: translateY(-5px);
    }

    /* Dark Gradient Overlay for text readability */
    .card-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 40%, transparent 100%);
        display: flex;
        align-items: flex-end;
        /* Text at the bottom */
        padding: 25px;
    }

    .card-content {
        display: flex;
        align-items: center;
        width: 100%;
    }

    .card-content h3 {
        color: #ffffff;
        font-size: 1.5rem;
        font-weight: 700;
        margin-right: 10px;
        line-height: 1.2;
    }

    /* Small Red Arrow Circle */
    .arrow-circle {
        min-width: 24px;
        height: 24px;
        background-color: #e03c31;
        /* NASA Red */
        color: white;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 10px;
    }

    /* Responsive Adjustments */
    @media (max-width: 1024px) {
        .topics-grid {
            grid-template-columns: repeat(2, 1fr);
            /* 2 columns for tablets */
        }
    }

    @media (max-width: 600px) {
        .topics-grid {
            grid-template-columns: 1fr;
            /* 1 column for phones */
        }

        .topic-card {
            height: 350px;
        }
    }

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

    body {
        background-color: #ffffff;
        font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
        padding: 40px;
        display: flex;
        justify-content: center;
    }

    /* 4-Column Grid Layout */
    .grid-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        /* Tight gap between cards */
        max-width: 1200px;
        width: 100%;
    }

    /* Card Styling */
    .topic-card {
        height: 480px;
        /* Specific tall height */
        background-size: cover;
        background-position: center;
        position: relative;
        cursor: pointer;
        overflow: hidden;
    }

    /* The Darkening Overlay */
    .overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        /* Darker at bottom for text readability */
        background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 30%, transparent 100%);
        display: flex;
        align-items: flex-end;
        padding: 20px;
        transition: background 0.3s ease;
    }

    .topic-card:hover .overlay {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 100%);
    }

    /* Text and Arrow Layout */
    .card-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    h3 {
        color: #ffffff;
        font-size: 1.6rem;
        font-weight: 700;
        line-height: 1.1;
        max-width: 80%;
    }

    /* Red Circular Arrow */
    .arrow {
        width: 24px;
        height: 24px;
        background-color: #e03c31;
        /* NASA Brand Red */
        color: white;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 11px;
        flex-shrink: 0;
    }

    /* Responsive View */
    @media (max-width: 1024px) {
        .grid-container {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    @media (max-width: 600px) {
        .grid-container {
            grid-template-columns: 1fr;
        }

        .topic-card {
            height: 350px;
        }
    }
}



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

body {
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* Resembles the font in image */
    background-color: #f7f7f7;
    /* Very light grey background from the image */
    color: #1a1a1a;
    /* Very dark grey text */
    line-height: 1.5;
    padding: 40px;
    /* Outer margin for the whole section */
}

/* --- Main Layout Container --- */
.feature-container {
    max-width: 1100px;
    /* Caps the maximum width */
    margin: 0 auto;
    /* Centers the whole container */
    display: flex;
    flex-wrap: wrap;
    /* Allows stacking on small screens */
    gap: 40px;
    /* Space between the text column and image column */
    align-items: flex-start;
}

/* --- Text Column Styles --- */
.content-text-col {
    flex: 1 1 50%;
    /* Takes 50% width on large screens */
    min-width: 300px;
    /* Stacks when screen is very small */
    padding-top: 20px;
}

.text-subtitle {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 25px;
}

.text-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 30px;
}

.text-lead-para {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 20px;
}

.text-body-para {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #333;
    /* Slightly softer text for body */
}

.text-link-button {
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    color: #1a1a1a;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Circle around arrow */
.text-link-button .arrow {
    display: inline-block;
    color: white;
    background-color: #e31d2b;
    /* NASA-style red */
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    line-height: 22px;
    /* Center text vertically */
    text-align: center;
    font-weight: normal;
    /* Less bold for the symbol itself */
}

/* --- Image Column Styles --- */
.media-img-col {
    flex: 1 1 40%;
    /* Slightly narrower image column, takes rest of space */
    min-width: 300px;
    /* Stacks when screen is small */
}

.img-wrapper {
    background-color: #ddd;
    /* Gray box placeholder */
    aspect-ratio: 16 / 10;
    /* Roughly maintains image shape if no image is present */
    border: 1px solid #ddd;
    /* Subtle border like image */
    overflow: hidden;
    /* For rounded corners, if needed later */
}

.img-main {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    /* Ensures image fills box without stretching */
}

.text-image-caption {
    font-size: 11px;
    line-height: 1.4;
    color: #555;
    margin-top: 15px;
}

.text-image-caption p {
    margin-bottom: 5px;
}

.text-caption-credit {
    font-weight: 700;
}


/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    body {
        padding: 20px;
    }

    .feature-container {
        flex-direction: column-reverse;
        /* Reverses order on mobile: image on top, text below */
        gap: 20px;
    }

    .text-title {
        font-size: 28px;
    }
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: #ffffff;
    padding: 50px 20px;
}

.nasa-gallery {
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-title {
    font-size: 28px;
    margin-bottom: 30px;
    color: #1a1a1a;
}

/* Grid layout for all cards */
.grid-container {
    display: grid;
    /* 4 columns on desktop */
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.topic-card {
    position: relative;
    aspect-ratio: 3 / 4;
    /* Makes cards tall rectangles */
    overflow: hidden;
    cursor: pointer;
    background-color: #000;
    /* Fallback for image loading */
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Darken image slightly to make white text pop */
    filter: brightness(0.8);
    transition: transform 0.3s ease;
}

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

/* Positioning text at the bottom of the image */
.card-text-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.card-text {
    color: white;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    max-width: 70%;
}

.red-arrow {
    background-color: #e31d2b;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* Responsive: 2 columns on tablets, 1 column on mobile */
@media (max-width: 900px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   FREEDOM 250 SECTION - RESPONSIVE
   ========================================== */
.feature-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px var(--container-padding);
    display: flex;

    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.content-text-col {
    flex: 1 1 50%;
    min-width: 300px;
    padding-top: 0;
}

.text-subtitle {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.text-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.text-lead-para {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-body);
}

.text-body-para {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: var(--text-body);
}

.text-link-button {
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-dark);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.text-link-button .arrow {
    display: inline-block;
    color: white;
    background-color: var(--nasa-red);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    line-height: 22px;
    text-align: center;
    font-weight: normal;
}

.media-img-col {
    flex: 1 1 40%;
    min-width: 300px;
}

.img-wrapper {
    background-color: #ddd;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 4px;
}

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

.text-image-caption {
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-muted);
    margin-top: 15px;
}

.text-caption-credit {
    font-weight: 700;
    color: var(--text-body);
}

@media (max-width: 768px) {
    .feature-container {
        flex-direction: column-reverse;
        gap: 20px;
        margin: 30px auto;
        padding: 30px var(--container-padding);
    }

    .content-text-col,
    .media-img-col {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .text-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .text-title {
        font-size: 24px;
    }

    .text-lead-para {
        font-size: 13px;
    }

    .text-body-para {
        font-size: 12px;
    }
}

/* ==========================================
   NASA TOPICS GALLERY - RESPONSIVE
   ========================================== */
.nasa-gallery {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 var(--container-padding);
}

.gallery-title {
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--text-dark);
    font-weight: 700;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.topic-card {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    cursor: pointer;
    background-color: #000;
    border-radius: 4px;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.8);
    transition: transform 0.3s ease;
}

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

.card-text-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.card-text {
    color: white;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.1;
    max-width: 70%;
}

.red-arrow {
    background-color: var(--nasa-red);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid-container {
        grid-template-columns: 1fr;
    }

    .topic-card {
        aspect-ratio: 16 / 9;
    }

    .card-text {
        font-size: 16px;
    }

    .gallery-title {
        font-size: 24px;
    }
}

/* ==========================================
   PADDING & MARGIN FIXES
   ========================================== */

/* Main body - remove conflicting paddings */
body {
    padding: 0;
    margin: 0;
    background-color: var(--bg-white);
}

/* Section spacing fixes */
section {
    margin: 0;
    padding: 40px var(--container-padding);
}

/* Ensure consistent section margins */
.news-section-wrapper,
.missions-section,
.gallery-section,
.iotd-section {
    margin: 40px auto;
    padding: 40px var(--container-padding);
}

/* Feature container (Freedom 250) */
.feature-container {
    margin: 40px auto;
    padding: 40px var(--container-padding);
}

/* NASA Topics Gallery */
.nasa-gallery {
    margin: 40px auto;
    padding: 40px var(--container-padding);
}

/* IOTD Section */
.iotd-section {
    padding: 40px 0;
}

/* Hero section */
.hero-container {
    padding: 0 var(--container-padding) 30px;
}

/* Podcast section */
.podcast-hero {
    padding: 60px var(--container-padding);
}

/* Mobile fixes */
@media (max-width: 768px) {
    section {
        padding: 30px var(--container-padding);
    }

    .news-section-wrapper,
    .missions-section,
    .gallery-section,
    .iotd-section,
    .nasa-gallery {
        margin: 30px auto;
        padding: 30px var(--container-padding);
    }

    .feature-container {
        margin: 30px auto;
        padding: 30px var(--container-padding);
    }

    .iotd-section {
        padding: 30px var(--container-padding);
    }

    .hero-container {
        padding: 0 var(--container-padding) 20px;
    }

    .podcast-hero {
        padding: 40px var(--container-padding);
    }
}



/* --- Base Styles (Mobile First) --- */
.nasa-footer {
    background-color: #000;
    color: #fff;
    padding: 40px 8vw;
    font-family: sans-serif;
}

.footer-container {
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    /* Stack vertically on mobile */
    gap: 70px;
}

.footer-logo {
    height: 70px;
    width: 70px;
}

.footer-logo img {
    width: 100%;
    height: 100%;
}

.agency-title {
    font-size: 1.25rem;
    margin: 15px 0;
    line-height: 1.3;
}

.agency-description {
    color: #ccc;
    margin-bottom: 20px;
    font-size: 0.8rem;
}

.join-us-btn {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

.fa-arrow-circle-right {
    color: #fc3d21;
    margin-left: 5px;
}

/* Navigation Grid - Stacks by default */
.nav-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.nav-list {
    list-style: none;
    padding: 0;
}

.nav-list li {
    margin-bottom: 12px;
}

.nav-list a {
    color: #fff;
    text-decoration: none;
    font-size: 0.8rem;
}

.badge-live {
    border: 1px solid #fc3d21;
    color: #fc3d21;
    font-size: 0.7rem;
    padding: 1px 4px;
    margin-left: 5px;
}
.social-links-section{
font-size: 0.8rem;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin: 15px 0;
}

.social-icons a {
    background: #333;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
}
.social-label{
opacity: 0.5;
}
/* Bottom Area */
.footer-divider {
    border: 0;
    border-top: 1px solid #333;
    margin: 30px 0;
}

.legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.legal-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.8rem;
}

.footer-metadata {
    color: #aaa;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* --- TABLET BREAKPOINT (768px and up) --- */
@media (min-width: 768px) {
    .nav-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on tablets */
    }

    .footer-metadata {
        flex-direction: row;
        /* Horizontal meta info */
        justify-content: flex-start;
        gap: 30px;
    }
}

/* --- DESKTOP BREAKPOINT (1024px and up) --- */
@media (min-width: 1024px) {
    .footer-container {
        flex-direction: row;
        /* Side-by-side layout like Screenshot 2026-05-01 230533.png */
        justify-content: space-between;
    }

    .brand-section {
        flex: 0 0 300px;
        /* Fixed width for brand */
    }

    .navigation-section {
        flex: 1;
    }

    .nav-grid {
        grid-template-columns: repeat(3, auto) 220px;
        /* 4 columns like the original */
        justify-content: space-between;
    }
}