:root {
    --primary-color: #0d2c54;
    --secondary-color: #1a5a9a;
    --accent-color: #007bff;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #343a40;
    --text-color: #212529;
    --text-color-light: #ffffff;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --container-width: 1140px;
    --header-height: 70px;
}

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

html, body {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: #fff;
    line-height: 1.6;
}

body.search-open {
    overflow: hidden;
}

#root {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
    padding-top: var(--header-height);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--secondary-color);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-color-light);
    background-color: var(--accent-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn.btn-secondary {
    background-color: #6c757d;
}

.btn.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

/* Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--primary-color);
    color: var(--text-color-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.logo {
    cursor: pointer;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 10px 0;
}

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

.menu-toggle {
    background: none;
    border: none;
    color: var(--text-color-light);
    font-size: 1.75rem;
    cursor: pointer;
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
    align-items: center;
    height: 100%;
}

.desktop-nav > ul {
    list-style: none;
    display: flex;
    height: 100%;
    margin: 0;
}

.desktop-nav > ul > li {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    margin: 0;
}

.desktop-nav a {
    color: var(--text-color-light);
    font-family: var(--font-heading);
    font-size: 1rem;
    padding: 0 1rem;
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: center;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.desktop-nav li:hover > a {
    background-color: var(--secondary-color);
}

.desktop-nav a:hover {
    background-color: var(--secondary-color);
}


.desktop-nav .nav-link i {
    margin-left: 0.5rem;
    font-size: 0.8em;
    transition: transform 0.2s ease;
}

.desktop-nav li:hover .nav-link i {
    transform: rotate(180deg);
}

.desktop-sub-menu {
    position: absolute;
    top: var(--header-height);
    left: 0;
    background-color: var(--dark-gray);
    border-radius: 0 0 5px 5px;
    padding: 0.5rem 0;
    list-style: none;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1100;
}

.desktop-sub-menu li {
    height: auto;
    width: 100%;
}

.desktop-sub-menu a {
    width: 100%;
    padding: 0.75rem 1.5rem;
    height: auto;
    border-bottom: none;
    justify-content: flex-start;
}

.desktop-sub-menu a:hover {
    background-color: var(--accent-color);
}


/* Mobile Navigation */
.nav-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background-color: var(--dark-gray);
    color: var(--text-color-light);
    padding: var(--header-height) 2rem 2rem;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 999;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
}

.nav-menu.open {
    right: 0;
}

.nav-menu ul {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 1rem;
}

.nav-menu a, .nav-menu .nav-link {
    display: block;
    color: var(--text-color-light);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    padding: 0.5rem 0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover, .nav-menu .nav-link:hover {
    color: var(--accent-color);
}

.sub-menu {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}

.sub-menu.open {
    max-height: 200px; /* Adjust as needed */
}

.sub-menu li {
    margin-bottom: 0.5rem;
}

.sub-menu a {
    font-size: 1rem;
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.nav-overlay.open {
    opacity: 1;
    visibility: visible;
}


/* Page Styles */
.page-content {
    padding: 2rem 0;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.page-section {
    padding: 2rem 0;
    border-bottom: 1px solid var(--medium-gray);
}
.page-section:last-child {
    border-bottom: none;
}

/* Home Page */
.hero {
    background: linear-gradient(rgba(13, 44, 84, 0.8), rgba(13, 44, 84, 0.8)), url('/graphics/studio.png') no-repeat center center/cover;
    color: var(--text-color-light);
    text-align: center;
    padding: 6rem 1rem;
}

.hero .hero-logo {
    margin-bottom: 1.5rem;
    line-height: 1;
}

.hero .hero-logo img {
    max-width: 450px;
    width: 90%;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.welcome-section {
    text-align: center;
}
.mission-text {
    max-width: 800px;
    margin: 0 auto;
}

.social-links a {
    font-size: 2.5rem;
    margin: 0 1rem;
    color: #999; /* Set default color to grey */
}

.social-links a[href*="youtube.com"]:hover {
    color: #FF0000; /* YouTube red on hover */
}

.social-links a[href*="facebook.com"]:hover {
    color: #1877F2; /* Facebook blue on hover */
}

.donation-link {
    margin-top: 1rem;
}

/* Video/Episodes */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin: 1rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Video Facade Styles */
.video-facade {
    cursor: pointer;
    /* Flexbox centering removed to fix vertical alignment issue with 0-height container */
}

.video-facade:hover .play-button-overlay {
    transform: translate(-50%, -50%) scale(1.1);
}

.video-facade .video-thumbnail-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-facade:hover .video-thumbnail-img {
    transform: scale(1.05);
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    width: 68px;
    height: 48px;
    transition: transform 0.2s ease;
    pointer-events: none;
}

.play-button-overlay svg {
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

.play-button-bg {
    fill: #212121;
    fill-opacity: 0.8;
    transition: fill 0.2s ease, fill-opacity 0.2s ease;
}

.video-facade:hover .play-button-bg {
    fill: #f00;
    fill-opacity: 1;
}

.play-button-icon {
    fill: #fff;
}


.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.show-card {
    display: flex;
    flex-direction: column;
}

.show-card h3 {
    text-align: center;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-top: 0.75rem;
}

/* All Shows List Page Card Link */
.show-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.show-card-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.show-card-link .blog-post-image-container {
    border-radius: 0;
}

.show-card-link:hover .blog-post-image {
    transform: scale(1.05);
}

.show-card-link h3 {
    color: var(--primary-color);
    text-align: center;
    font-size: 1.1rem;
    margin: 0;
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    transition: color 0.3s ease;
}

.show-card-link:hover h3 {
    color: var(--accent-color);
}


.episode-card {
    background-color: var(--light-gray);
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.episode-card h3 {
    text-align: center;
    font-size: 1.1rem;
    min-height: 44px; /* Ensure titles have space */
}

.episode-card .btn {
    margin-top: 1rem;
    width: 100%;
}

/* Page Hero for Generic Pages */
.page-hero {
    background-color: var(--primary-color);
    padding: 3rem 1rem;
    text-align: center;
}

.page-hero h1 {
    color: var(--text-color-light);
    font-size: 2.5rem;
    margin: 0;
}

/* Shows Page Banner */
.shows-page-banner {
    background-color: var(--primary-color);
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.shows-page-banner h1 {
    color: var(--text-color-light);
    font-size: 2.5rem;
    margin: 0;
}


.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

/* Blog Page Specific Styles */
.blog-page-wrapper {
    background-color: var(--primary-color);
    padding: 2rem 0;
    color: var(--text-color-light);
}

.blog-page-wrapper .page-title {
    color: var(--text-color-light);
    margin-bottom: 3rem;
}

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.blog-post-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.blog-post-video .video-container {
    margin: 0;
}

.blog-post-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--dark-gray);
    display: block; /* For the anchor tag */
}

.blog-post-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-post-card:hover .blog-post-image {
    transform: scale(1.05);
}


.blog-post-content {
    background-color: var(--secondary-color);
    padding: 2rem 2.5rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-post-content h2 {
    color: var(--text-color-light);
    font-size: 1.75rem;
    margin-top: 0;
}

.blog-post-date {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.blog-post-content p {
    margin-bottom: 1.5rem;
}

.read-more-link {
    font-family: var(--font-heading);
    font-weight: bold;
    color: var(--text-color-light);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease;
}

.read-more-link:hover {
    color: #fff;
    transform: translateX(5px);
}

@media (min-width: 992px) {
    .blog-post-card {
        grid-template-columns: 1fr 1fr;
    }

    .blog-post-card.layout-reversed .blog-post-video {
        grid-column-start: 2;
    }
    .blog-post-card.layout-reversed .blog-post-content {
        grid-column-start: 1;
        grid-row-start: 1;
    }
}


/* Article Page */
.article-back-button {
    background-color: var(--dark-gray);
    margin-bottom: 2rem;
}
.article-back-button:hover {
    background-color: var(--secondary-color);
}

.article-with-video {
    text-align: justify;
}

.article-with-video::after {
    content: "";
    display: table;
    clear: both;
}

.article-video-floated {
    width: 100%;
    margin: 0 auto 2rem auto;
}

.article-video-floated .video-container {
    margin: 0;
}

@media (min-width: 768px) {
    .article-video-floated {
        float: left;
        width: 48%;
        max-width: 450px;
        margin: 0 2rem 1rem 0;
    }
}


/* About/Policy/Ethics Pages */
.document-content {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 1.5rem;
}

.document-content h3 {
    margin-top: 2rem;
    font-size: 1.25rem;
}

/* Show Page - Video List */
.video-list-section {
    margin-top: 2rem;
}

.episodes-section-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.video-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.video-list-item {
    background-color: var(--light-gray);
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    transition: box-shadow 0.3s ease, background-color 0.5s ease;
}

.video-list-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.video-list-item.highlight {
    background-color: #e9f5ff; /* A light, noticeable blue */
    box-shadow: 0 0 0 2px var(--accent-color), 0 4px 12px rgba(0,0,0,0.1);
}

.video-thumbnail-wrapper {
    flex-shrink: 0;
    width: 240px;
}

.video-thumbnail {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.video-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.video-info h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.video-info .video-date {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.video-info .video-description {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    flex-grow: 1;
}

.video-info .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    align-self: flex-start;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 44, 84, 0.95);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-overlay.open {
    opacity: 1;
    visibility: visible;
}

.search-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
}

.search-input-wrapper {
    width: 100%;
    max-width: 700px;
    margin-top: 5vh;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.5rem;
    font-family: var(--font-heading);
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    background-color: var(--light-gray);
    color: var(--text-color);
}
.search-input::placeholder {
    color: #999;
}

.search-results {
    width: 100%;
    max-width: 700px;
    margin-top: 1.5rem;
    background-color: #fff;
    border-radius: 8px;
    max-height: 70vh;
    overflow-y: auto;
}

.search-result-item {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--medium-gray);
    color: var(--text-color);
    text-decoration: none;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--light-gray);
}

.search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.search-result-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 0;
}

.search-result-type {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--text-color-light);
    background-color: var(--secondary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

.search-result-parent {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.search-result-snippet {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
}

.search-result-snippet strong {
    color: var(--accent-color);
}

.no-results-message {
    padding: 1.5rem;
    text-align: center;
    color: #6c757d;
}


/* Footer */
.app-footer {
    background-color: var(--dark-gray);
    color: #ccc;
    padding: 2rem 0;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-col h4 {
    color: var(--text-color-light);
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: #ccc;
    cursor: pointer;
}

.footer-col a:hover {
    color: var(--text-color-light);
}

.abf-logo-container {
    max-width: 260px;
}
.abf-logo-container img {
    max-width: 100%;
    height: auto;
    background: white;
    padding: 5px;
    border-radius: 3px;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #4a4a4a;
    font-size: 0.8rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--dark-gray);
    color: var(--text-color-light);
    padding: 1rem 0;
    z-index: 1100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    font-size: 0.9rem;
}

.cookie-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.cookie-banner p {
    margin: 0;
}

.cookie-banner a {
    color: #fff;
    text-decoration: underline;
    font-weight: bold;
    cursor: pointer;
}

.cookie-banner a:hover {
    color: var(--accent-color);
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}


/* Responsive Media Queries */
@media (min-width: 992px) {
    .menu-toggle {
        display: none;
    }
    .desktop-nav {
        display: flex;
    }
}

@media (max-width: 768px) {
    .hero .hero-logo img {
        width: 80%;
    }
    .page-title {
        font-size: 2rem;
    }
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .page-hero h1 {
        font-size: 2.2rem;
    }
    .shows-page-banner h1 {
        font-size: 2.2rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    
    .video-list-item {
        flex-direction: column;
        align-items: center; /* center content */
        text-align: center;
    }
    .video-thumbnail-wrapper {
        width: 100%;
        max-width: 320px;
    }
    .video-info .btn {
        align-self: center;
    }
    .video-info h3 {
        font-size: 1.1rem;
    }

    .search-input {
        font-size: 1.2rem;
    }
}