/* =============================================================================
   Multi-Site Frontend Styles
   Consolidated CSS for all frontend pages
   ============================================================================= */

/* =============================================================================
   CSS CUSTOM PROPERTIES (Overridable via inline styles from branding.php)
   ============================================================================= */

:root {
    --primary-color: var(--primary-color);
    --accent-color: #059669;
    --text-color: #222;
    --bg-color: #f4f4f4;
    --link-color: var(--primary-color);
}

/* =============================================================================
   1. BASE STYLES & RESET
   ============================================================================= */

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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

p {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

p:last-child {
    margin-bottom: 0;
}

/* =============================================================================
   2. HEADER
   ============================================================================= */

.site-header {
    background: white;
    border-bottom: 3px solid var(--primary-color);
    padding: 1rem 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Georgia', serif;
}

.site-tagline {
    color: #666;
    font-size: 1rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid #ccc;
    font-style: italic;
}

/* =============================================================================
   3. NAVIGATION
   ============================================================================= */

.main-nav {
    background: var(--primary-color);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 0.875rem 1.25rem;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    text-decoration: none;
}

.nav-item.has-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    border-radius: 0 0 4px 4px;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
}

.dropdown-item:hover {
    background: #f5f5f5;
    text-decoration: none;
}

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

.dropdown-arrow {
    display: inline-block;
    margin-left: 0.25rem;
    font-size: 0.75em;
    vertical-align: middle;
}

/* Navigation Responsive */
@media (max-width: 900px) {
    .nav-menu {
        flex-wrap: wrap;
    }

    .nav-link {
        padding: 0.75rem 0.875rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 600px) {
    .nav-content {
        padding: 0;
    }

    .nav-menu {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }

    .nav-menu::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .nav-link {
        padding: 0.75rem 0.75rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    /* Dropdown arrow styling for mobile */
    .dropdown-arrow {
        display: inline-block;
        margin-left: 0.25rem;
        font-size: 0.7rem;
        transition: transform 0.2s;
    }

    .nav-item.dropdown-open .dropdown-arrow {
        transform: rotate(180deg);
    }

    /* Disable hover dropdowns on mobile - use tap instead */
    .nav-item.has-dropdown:hover .dropdown-menu {
        display: none;
    }

    /* Show dropdown when open class is added via JS */
    .nav-item.dropdown-open .dropdown-menu {
        display: block !important;
        width: 100%;
        max-height: 60vh;
        overflow-y: auto;
        border-radius: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        z-index: 1001;
        background: white;
    }

    .nav-item.dropdown-open .dropdown-item {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }

    .nav-item.dropdown-open .dropdown-header {
        background: #f0f0f0;
        font-weight: 600;
        color: var(--primary-color);
    }
}

/* Portrait mobile: full-width fixed dropdown */
@media (max-width: 480px) {
    .nav-item.dropdown-open .dropdown-menu {
        position: fixed;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        max-width: 100vw;
        border-radius: 0;
    }
}

/* =============================================================================
   4. BANNERS
   ============================================================================= */

.tag-banner {
    background: #3b9ed8;
    color: white;
    padding: 1rem;
}

.tag-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tag-banner h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.tag-banner a {
    color: white;
    opacity: 0.9;
}

.tag-banner a:hover {
    opacity: 1;
}

.topic-banner {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: white;
    padding: 2rem 1rem;
}

.topic-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.topic-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.topic-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.topic-description {
    font-size: 1.1rem;
    opacity: 0.95;
    line-height: 1.6;
    max-width: 800px;
}

.topic-meta {
    margin-top: 1.5rem;
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.topic-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.topic-back {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    font-weight: 500;
}

.topic-back:hover {
    opacity: 1;
    text-decoration: underline;
}

/* =============================================================================
   5. MAIN CONTENT
   ============================================================================= */

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* =============================================================================
   6. THREE COLUMN LAYOUT (Homepage)
   ============================================================================= */

.three-col-layout {
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .three-col-layout {
        grid-template-columns: 1fr;
    }

    .center-content {
        order: 1;
    }

    .left-rail {
        display: none;
    }

    .right-rail {
        order: 2;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-flow: dense;
        gap: 1rem;
    }

    /* Make Upcoming Meetings span 2 rows in 2-column layout */
    .right-rail .rail-section:nth-child(2) {
        grid-row: span 2;
    }
}

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

    .right-rail .rail-section:nth-child(2) {
        grid-row: auto;
    }
}

/* Rails */
.left-rail, .right-rail {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.rail-section {
    background: white;
    border-radius: 4px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.rail-header {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rail-content {
    padding: 0;
}

.rail-article {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
}

.rail-article:last-child {
    border-bottom: none;
}

.rail-article-title {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.rail-article-title a {
    color: #333;
}

.rail-article-title a:hover {
    color: var(--primary-color);
}

.rail-article-date {
    font-size: 0.75rem;
    color: #888;
}

.rail-article-link {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.rail-article-link:hover {
    text-decoration: underline;
}

.rail-link {
    display: block;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
}

.rail-link:hover {
    background: #f9f9f9;
    text-decoration: none;
    color: var(--primary-color);
}

.rail-link:last-child {
    border-bottom: none;
}

/* =============================================================================
   6b. TWO COLUMN LAYOUT (Category pages)
   ============================================================================= */

.two-col-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Single column layouts for category and topic pages */
.category-articles,
.topic-articles {
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .two-col-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }

    .articles-column {
        order: 1;
    }
}

.articles-column {
    min-width: 0;
}

/* Sidebar */
.sidebar {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.sidebar-section {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sidebar-header {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.sidebar-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    color: #1e3a5f;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
    transition: background 0.15s;
}

.sidebar-link:hover {
    background: #f5f7fa;
    text-decoration: none;
}

.sidebar-link.active {
    background: #e8f0fe;
    font-weight: 600;
}

.sidebar-link:last-child {
    border-bottom: none;
}

.topic-count {
    background: #e5e7eb;
    color: #4b5563;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
}

/* =============================================================================
   7. FEATURED STORY (Homepage)
   ============================================================================= */

.featured-story {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.featured-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.featured-content {
    padding: 1.5rem;
}

.featured-tag {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 2px;
    margin-bottom: 0.75rem;
}

.featured-headline {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.featured-headline a {
    color: #222;
}

.featured-headline a:hover {
    color: var(--primary-color);
}

.featured-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.featured-summary {
    font-size: 1.1rem;
    color: #444;
    line-height: 1.7;
}

.featured-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Secondary Stories (text-only, full width) */
.secondary-stories {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
}

.secondary-story {
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.secondary-story:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.secondary-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--primary-color);
    color: white;
    border-radius: 3px;
    font-size: 0.7rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.secondary-headline {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 0.3rem;
}

.secondary-headline a {
    color: #1e3a5f;
    text-decoration: none;
}

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

.secondary-meta {
    font-size: 0.8rem;
    color: #666;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Topic bubbles for main articles */
.featured-topics,
.secondary-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.topic-bubble {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: #f3e8ff;
    color: #7c3aed;
    border-radius: 12px;
    font-size: 0.75rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 500;
    transition: background 0.15s;
}

.topic-bubble:hover {
    background: #ede9fe;
    text-decoration: none;
}

.article-card-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.4rem;
}

/* =============================================================================
   8. SECTION HEADERS
   ============================================================================= */

.section-header {
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* =============================================================================
   9. ARTICLE GRID
   ============================================================================= */

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

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

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

.article-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s;
}

.article-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.article-card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.article-card-content {
    padding: 1rem;
}

.article-card-tag {
    display: inline-block;
    background: #e8f4fc;
    color: var(--primary-color);
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 2px;
    margin-bottom: 0.5rem;
}

.article-card-headline {
    font-size: 1.1rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.article-card-headline a {
    color: #222;
}

.article-card-headline a:hover {
    color: var(--primary-color);
}

.article-card-date {
    font-size: 0.8rem;
    color: #888;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Text-only article grid row */
.article-grid-text-only {
    margin-top: 1.25rem;
}

.article-grid-text-only .article-card-content {
    padding: 0.875rem 1rem;
}

/* =============================================================================
   10. ARTICLE DETAIL PAGE
   ============================================================================= */

.article {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e5e5;
}

.article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.article-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.article-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.15s;
}

.article-tag:hover {
    background: #2d5a8a;
    text-decoration: none;
    color: white;
}

.article-topics {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
}

.article-topics .topics-label {
    font-size: 0.8rem;
    color: #666;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 500;
}

.article-topic {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: #f3e8ff;
    color: #7c3aed;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 500;
    transition: background 0.15s;
}

.article-topic:hover {
    background: #ede9fe;
    text-decoration: none;
}

.article-headline {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1e3a5f;
    font-weight: 700;
}

.article-date {
    font-size: 0.9rem;
    color: #666;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.article-date .meeting-date {
    font-weight: 500;
    color: #444;
}

.article-date .meta-dates {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.25rem;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 1rem;
}

.article-thumbnail {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.article-section {
    margin-bottom: 2.5rem;
}

.article-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.article-summary {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 2rem;
}

.video-embed {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.video-embed iframe {
    max-width: 100%;
    height: auto;
    aspect-ratio: 853 / 480;
}

@media (max-width: 900px) {
    .video-embed iframe {
        width: 100%;
    }
}

.key-points-section {
    background: linear-gradient(135deg, #0f2d4a 0%, #1e4a7a 100%);
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 16px rgba(15, 45, 74, 0.35);
}

.key-points-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.6rem;
    color: #90cdf4;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
}

.key-points {
    list-style: none;
    padding: 0;
    margin: 0;
}

.key-points li {
    padding-left: 1.25rem;
    margin-bottom: 0.4rem;
    position: relative;
    line-height: 1.5;
    color: white;
    font-size: 1.2rem;
}

.key-points li:last-child {
    margin-bottom: 0;
}

.key-points li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #90cdf4;
    font-weight: bold;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.75rem 1.5rem;
    background: #f8f9fa;
    color: var(--primary-color);
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 500;
    transition: background 0.2s;
}

.back-link:hover {
    background: #e9ecef;
    text-decoration: none;
}

/* =============================================================================
   11. TOPIC DETAIL PAGE
   ============================================================================= */

.topic-articles {
    margin-top: 2rem;
}

.topic-articles h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.topic-articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .topic-articles-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   12. PAGINATION
   ============================================================================= */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.pagination a, .pagination span {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
}

.pagination a:hover {
    background: #f5f5f5;
    text-decoration: none;
}

.pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* =============================================================================
   13. FOOTER
   ============================================================================= */

.site-footer {
    background: var(--primary-color);
    color: white;
    padding: 2rem 1rem;
    margin-top: 2rem;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-content p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
    font-size: 0.9rem;
}

.footer-disclaimer {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 1rem;
}

/* =============================================================================
   14. TAG PAGE LAYOUT
   ============================================================================= */

.tag-page-layout {
    max-width: 900px;
    margin: 0 auto;
}

/* =============================================================================
   15. RESPONSIVE OVERRIDES
   ============================================================================= */

@media (max-width: 768px) {
    .site-title {
        font-size: 1.75rem;
    }

    .site-tagline {
        display: none;
    }

    .article-headline {
        font-size: 1.75rem;
    }

    .article {
        padding: 1.5rem;
    }

    .featured-headline {
        font-size: 1.5rem;
    }

    .topic-title {
        font-size: 1.75rem;
    }
}

/* =============================================================================
   16. NEWSLETTER SUBSCRIPTION
   ============================================================================= */

/* Footer Newsletter Section */
.footer-newsletter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.footer-newsletter-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-newsletter-text strong {
    font-size: 1.1rem;
}

.footer-newsletter-text span {
    font-size: 0.85rem;
    opacity: 0.8;
}

.footer-subscribe-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.footer-subscribe-btn:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}

.footer-info {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 600px) {
    .footer-newsletter {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* Newsletter Popup Modal */
.newsletter-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.newsletter-popup.is-open {
    opacity: 1;
    visibility: visible;
}

.newsletter-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.newsletter-popup-content {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.newsletter-popup.is-open .newsletter-popup-content {
    transform: translateY(0);
}

.newsletter-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
    transition: background 0.2s;
}

.newsletter-popup-close:hover {
    background: #e0e0e0;
    color: #333;
}

#newsletter-popup-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: 'Georgia', serif;
}

.newsletter-popup-description {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Newsletter Form */
.newsletter-form {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

.newsletter-form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.newsletter-form-group input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.newsletter-form-group input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.newsletter-form-hint {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.75rem;
}

/* Categories Checkbox Grid */
.newsletter-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

@media (max-width: 480px) {
    .newsletter-categories-grid {
        grid-template-columns: 1fr;
    }
}

.newsletter-category-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.newsletter-category-checkbox:hover {
    border-color: var(--primary-color);
    background: #f9fbfd;
}

.newsletter-category-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.newsletter-category-checkbox input[type="checkbox"]:checked + .newsletter-category-label .newsletter-category-name {
    color: var(--primary-color);
}

.newsletter-category-label {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    line-height: 1.3;
}

.newsletter-category-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.newsletter-category-desc {
    font-size: 0.8rem;
    color: #666;
    font-weight: 400;
}

/* Form Actions */
.newsletter-form-actions {
    margin-top: 1.5rem;
}

.newsletter-submit-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.newsletter-submit-btn:hover {
    background: #2d5a8a;
}

.newsletter-submit-btn:disabled {
    background: #999;
    cursor: not-allowed;
}

/* Messages */
.newsletter-message {
    margin-top: 1rem;
    padding: 0;
    font-size: 0.9rem;
    text-align: center;
    min-height: 1.5em;
}

.newsletter-message-success {
    padding: 0.75rem;
    background: #d4edda;
    color: #155724;
    border-radius: 6px;
}

.newsletter-message-error {
    padding: 0.75rem;
    background: #f8d7da;
    color: #721c24;
    border-radius: 6px;
}

/* Nearby Events Checkbox */
.newsletter-nearby-events {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.newsletter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 400 !important;
}

.newsletter-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.newsletter-checkbox-label span {
    font-size: 0.9rem;
    color: #555;
}
