/* =========================================
   1. System Variables & Resets
   ========================================= */
:root {
    --midnight-navy: #09111e;
    --navy-card: #131e31;
    --electric-blue: #3da9fc;
    --pure-white: #ffffff;
    --muted-ice: #94a3b8;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--midnight-navy);
    color: var(--pure-white);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   2. Typography & Buttons
   ========================================= */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

p {
    color: var(--muted-ice);
}

.btn-primary {
    display: inline-block;
    background-color: var(--electric-blue);
    color: var(--midnight-navy);
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background-color: #57b6ff;
}

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--pure-white);
    border: 2px solid var(--muted-ice);
    padding: 10px 26px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--electric-blue);
    color: var(--electric-blue);
}

/* =========================================
   3. Header Navigation
   ========================================= */
header {
    background-color: rgba(9, 17, 30, 0.95);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo img {
    height: 70px;
    display: block;
}

nav ul {
    display: flex;
    list-items: none;
    gap: 30px;
    align-items: center;
}

nav ul li {
    list-style: none;
}

nav ul li a {
    color: var(--muted-ice);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

nav ul li a:hover {
    color: var(--electric-blue);
}

/* =========================================
   4. Hero Section
   ========================================= */
.hero {
    padding: 140px 0 120px 0; /* Slightly increased padding to give the graphic space */
    text-align: center;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    
    /* Adds the image with a subtle dark overlay so white text pops */
    background-image: linear-gradient(rgba(9, 17, 30, 0.75), rgba(9, 17, 30, 0.85)), url('hero-bg.png');
    background-size: cover;
    background-position: center bottom; /* Keeps the network nodes nicely aligned at the bottom */
    background-repeat: no-repeat;
}

.hero h1 {
    font-size: 3rem;
    max-width: 800px;
    margin: 0 auto 20px auto;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* =========================================
   5. Episode Grid Layout
   ========================================= */
.episodes-section {
    padding: 80px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.episode-card {
    background-color: var(--navy-card);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(148, 163, 184, 0.05);
}

.episode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.episode-artwork {
    width: 100%;
    height: 200px;
    background-color: #1a2942;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--electric-blue);
    color: var(--midnight-navy);
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
}

.episode-content {
    padding: 25px;
}

.episode-meta {
    font-size: 0.85rem;
    color: var(--electric-blue);
    margin-bottom: 10px;
    font-weight: 600;
}

.episode-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--pure-white);
}

.episode-excerpt {
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* =========================================
   6. Footer
   ========================================= */
footer {
    background-color: #050a12;
    padding: 60px 0 30px 0;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.footer-logo {
    height: 70px;
    margin-bottom: 20px;
}

.footer-links {
    margin-bottom: 30px;
}

.footer-links a {
    color: var(--muted-ice);
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--electric-blue);
}

.copyright {
    font-size: 0.85rem;
    color: var(--muted-ice);
    opacity: 0.6;
}

/* =========================================
   7. Custom Data Table (Episodes Page)
   ========================================= */
.table-container {
    background-color: var(--navy-card);
    border-radius: 8px;
    padding: 30px;
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.05);
    margin-bottom: 60px;
}

.podcast-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.podcast-table th {
    color: var(--pure-white);
    font-size: 1rem;
    font-weight: 700;
    padding: 16px;
    border-bottom: 2px solid rgba(148, 163, 184, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.podcast-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    color: var(--pure-white);
    font-size: 1rem;
    vertical-align: middle;
}

.podcast-table tr:last-child td {
    border-bottom: none;
}

.podcast-table tr:hover td {
    background-color: rgba(61, 169, 252, 0.03);
}

/* Platform Badges */
.link-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pod-link {
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.pod-link:hover {
    opacity: 0.8;
}

.lnk-spotify { color: #1DB954; }
.lnk-apple { color: #FC3C44; }
.lnk-youtube { color: #FF0000; }
.lnk-podbean { color: #38A1F3; }


/* =========================================
   8. Form and Community Elements
   ========================================= */
.community-callout {
    background: linear-gradient(135deg, var(--navy-card) 0%, #0d1a2d 100%);
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    border: 1px solid rgba(61, 169, 252, 0.1);
    margin: 40px auto 80px auto;
    max-width: 900px;
}

.contact-section {
    padding: 80px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    background-color: rgba(19, 30, 49, 0.4);
}

.custom-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--navy-card);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.05);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--pure-white);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--midnight-navy);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 6px;
    color: var(--pure-white);
    font-family: var(--font-main);
    font-size: 1rem;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--electric-blue);
}

/* Form Popup Overlays */
.form-popup {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.popup-content {
    background-color: var(--navy-card);
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    border-top: 5px solid var(--electric-blue);
}

.popup-content h3 {
    font-size: 1.8rem;
    color: var(--pure-white);
    margin-bottom: 10px;
}

/* =========================================
   9. Loading Spinner Accent
   ========================================= */
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@keyframes button-spin {
    to { transform: rotate(360deg); }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(9, 17, 30, 0.3);
    border-radius: 50%;
    border-top-color: var(--midnight-navy);
    animation: button-spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* =========================================
   10. Mobile aspects
   ========================================= */

@media (max-width: 768px) {
    /* Stack the container elements vertically instead of forcing a row */
    .nav-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px 10px;
    }

    /* Wrap the text links neatly on mobile screens */
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px 18px;
    }

    /* Fix the button so it sits inline perfectly without jumping out of place */
    nav ul li a.btn-primary {
        display: inline-block;
        padding: 6px 14px !important;
        font-size: 0.9rem;
    }
}

/* =========================================
   11. Cookie Banner
   ========================================= */
.cookie-banner {
    position: fixed;
    bottom: 24px;                 /* Lifts it cleanly off the bottom edge */
    left: 50%;                    /* Targets the horizontal center axis */
    transform: translateX(-50%);     /* Perfectly offsets it to remain dead center */
    width: calc(100% - 40px);     /* Keeps a 20px safety margin on phone displays */
    max-width: 750px;             /* Prevents it from looking stretched out on desktop */
    background-color: #0b132b;    /* Your exact dark-mode panel color */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Crisp, subtle border */
    border-radius: 12px;          /* Soft premium rounded edge card style */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); /* Deep shadow depth */
    padding: 16px 24px;
    z-index: 9999;                /* Keeps it layered safely over your page content */
    
    /* Grid/Flex mechanics for side-by-side display */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

/* Base font layout for the text inner wrap */
.cookie-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--muted-ice, #b0c4de);
}

.cookie-text a {
    color: var(--primary-blue, #007bff);
    text-decoration: underline;
}

/* Keeps the Accept/Decline actions neatly grouped in a row */
.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0; /* Prevents the buttons from narrowing down or squishing */
}

/* Responsive framework for mobile devices */
@media (max-width: 680px) {
    .cookie-banner {
        flex-direction: column;    /* Stacks text on top, buttons on the bottom */
        text-align: center;
        padding: 20px;
        bottom: 16px;
        gap: 16px;
    }

    .cookie-buttons {
        width: 100%;               /* Lets the buttons spread comfortably on mobile */
        justify-content: center;
    }
}
