/**
 * GoalGPT Site Stylesheet
 * Based on WordPress theme design
 */

/* ==========================================================================
   CSS Reset & Base
   ========================================================================== */

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

html {
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--body-font);
    font-size: var(--body-font-size);
    color: var(--body-text-color);
    background-color: var(--site-background);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    color: var(--heading-color);
    margin: 0 0 1rem 0;
    line-height: 1.2;
    font-weight: 600;
}

h1 { font-size: var(--h1-size); }
h2 { font-size: var(--h2-size); }
h3 { font-size: var(--h3-size); }
h4 { font-size: var(--h4-size); }
h5 { font-size: var(--h5-size); }
h6 { font-size: var(--h6-size); }

p {
    margin: 0 0 1rem 0;
}

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

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

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

/* ==========================================================================
   Layout
   ========================================================================== */

.site-content {
    flex: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.page-container {
    max-width: 800px;
    margin: 0 auto;
}

.article-container {
    margin: 0 auto;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    background-color: #111111;
    border-bottom: 1px solid var(--footer-border-color);
    padding: 1rem 0;
}

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

/* Site branding */
.site-branding {
    flex: 1;
    min-width: 200px;
}

.site-logo-link {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    max-height: 50px;
    width: auto;
}

.site-name {
    font-family: var(--header-font-family);
    font-size: var(--site-title-size);
    font-weight: 400;
    color: var(--site-title-color);
    line-height: 1.2;
}

.site-tagline {
    font-family: var(--header-font-family);
    font-size: var(--site-tagline-size);
    font-weight: 400;
    color: var(--site-tagline-color);
    margin: 0.25rem 0 0 0;
    max-width: 400px;
}

/* Header date */
.header-date {
    flex-basis: 100%;
    width: 100%;
    font-family: var(--header-font-family);
    font-size: var(--site-tagline-size);
    font-weight: 400;
    color: var(--site-tagline-color);
    text-align: right;
    margin: 0;
}

/* Header social icons */
.header-connect {
    display: flex;
    gap: 0.75rem;
}

.header-connect a {
    color: var(--meta-color);
    transition: color 0.2s ease;
}

.header-connect a:hover {
    color: var(--accent-color);
}

.social-icon {
    width: 24px;
    height: 24px;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--heading-color);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--heading-color);
    left: 0;
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

/* Navigation */
.main-navigation {
    flex: 2;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--body-text-color);
    font-weight: 500;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: 4px;
}

.nav-menu a:hover {
    color: var(--heading-color);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Submenu */
.has-submenu > a::after {
    content: ' ▾';
    font-size: 0.7em;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--content-background);
    border: 1px solid var(--footer-border-color);
    border-radius: 4px;
    min-width: 150px;
    padding: 0.5rem 0;
    list-style: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.has-submenu:hover .submenu {
    display: block;
}

.submenu a {
    padding: 0.5rem 1rem;
    border-radius: 0;
}

/* Header search */
.header-search {
    flex-shrink: 0;
}

.search-form {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.search-form input[type="search"] {
    background: none;
    border: none;
    padding: 0.5rem 0.75rem;
    color: var(--body-text-color);
    font-size: 0.9rem;
    width: 150px;
    outline: none;
}

.search-form input[type="search"]::placeholder {
    color: var(--meta-color);
}

.search-form button {
    background: none;
    border: none;
    padding: 0.5rem;
    color: var(--meta-color);
    cursor: pointer;
    transition: color 0.2s ease;
}

.search-form button:hover {
    color: var(--accent-color);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background-color: #111111;
    border-top: 1px solid var(--footer-border-color);
    padding: 2rem 0;
    margin-top: auto;
}

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

.footer-main {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    min-height: 60px;
}

.footer-connect {
    display: flex;
    gap: 1rem;
    justify-self: start;
}

.footer-connect a {
    color: var(--footer-text-color);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.footer-connect a:hover {
    color: var(--accent-color);
}

.footer-legal {
    text-align: center;
    justify-self: center;
    grid-column: 2;
}

.copyright {
    color: var(--footer-text-color);
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.footer-nav a {
    color: var(--footer-meta-color);
}

.footer-nav a:hover {
    color: var(--accent-color);
}

.footer-nav .separator {
    color: var(--footer-border-color);
}

.footer-text {
    color: var(--footer-meta-color);
    font-size: 0.85rem;
    margin-top: 1rem;
    text-align: center;
}

/* ==========================================================================
   Static Page
   ========================================================================== */

.static-page {
    background-color: var(--content-background);
    padding: 2rem;
    border-radius: 8px;
}

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

.page-title {
    margin: 0;
}

.page-content {
    color: var(--body-text-color);
    line-height: 1.7;
}

.page-content h2,
.page-content h3,
.page-content h4 {
    margin-top: 2rem;
}

.page-content ul,
.page-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.page-content li {
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   Article Page
   ========================================================================== */

.article-page {
    background-color: var(--content-background);
    border-radius: 8px;
    overflow: hidden;
}

/* Article hero with overlayed header */
.article-hero {
    position: relative;
    margin-bottom: 2rem;
}

.article-hero .article-featured-image {
    margin: 0;
    border-radius: 0;
    overflow: hidden;
}

.article-hero .article-featured-image img {
    width: 100%;
    display: block;
}

/* Overlay header on featured image */
.article-header-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
    z-index: 10;
}

.article-header-overlay .article-categories {
    margin-bottom: 1rem;
}

.article-header-overlay .article-title {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 0.75rem;
}

.article-header-overlay .article-meta {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.article-header-overlay .article-date {
    color: rgba(255, 255, 255, 0.9);
}

.article-header-overlay .category-badge {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Standard header (when no featured image) */
.article-header {
    padding: 2rem;
    margin-bottom: 0;
}

.article-title {
    margin-bottom: 0.75rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--meta-color);
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.article-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #fff;
    background-color: #333;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.category-badge:hover {
    opacity: 0.85;
    color: #fff;
}

.article-featured-image {
    margin: 0 0 2rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
}

.article-container {
    padding: 0 2rem 2rem 2rem;
}

.article-content {
    color: var(--body-text-color);
    line-height: 1.8;
    font-size: 0.90rem;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 2rem;
}

.article-content img {
    border-radius: 4px;
    margin: 1.5rem 0;
}

.article-content blockquote {
    border-left: 4px solid var(--accent-color);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.03);
    font-style: italic;
}

.article-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--footer-border-color);
}

.article-tags {
    color: var(--meta-color);
    font-size: 0.9rem;
}

.tags-label {
    font-weight: 500;
}

.tag-link {
    color: var(--link-color);
}

.article-share {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--footer-border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.share-label {
    color: var(--meta-color);
    font-size: 0.9rem;
}

.share-link {
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--body-text-color);
    transition: background-color 0.2s ease;
}

.share-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--heading-color);
}

/* ==========================================================================
   Article Navigation (Previous/Next)
   ========================================================================== */

.article-navigation {
    margin-top: 2.5rem;
    padding-top: 2rem;
}

.article-navigation-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: var(--content-width);
    margin: 0 auto;
}

.article-nav-item {
    position: relative;
    display: block;
    height: 130px;
    overflow: hidden;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.article-nav-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.article-nav-empty {
    background-color: transparent;
    box-shadow: none;
}

/* Background image (cropped to 50% width x 130px height) */
.article-nav-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.article-nav-bg-placeholder {
    background-color: var(--site-background);
    background-image: linear-gradient(135deg, rgba(27, 145, 54, 0.1) 0%, rgba(35, 35, 35, 0.1) 100%);
}

/* Overlay with text */
.article-nav-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
    z-index: 10;
}

.article-nav-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 600;
}

.article-nav-title {
    font-size: 1rem;
    line-height: 1.3;
    color: white;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.article-nav-item:hover .article-nav-title {
    color: var(--primary-color);
}

/* Text alignment */
.article-nav-prev .article-nav-overlay {
    align-items: flex-start;
    text-align: left;
}

.article-nav-next .article-nav-overlay {
    align-items: flex-end;
    text-align: right;
}

/* ==========================================================================
   Related Posts
   ========================================================================== */

.related-posts {
    margin-top: 3rem;
    padding: 2.5rem 0;
    background-color: var(--site-background);
}

.related-posts-container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.related-posts-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--heading-color);
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.related-post-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.related-post-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.related-post-image-wrapper a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.related-post-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-image-wrapper img {
    transform: scale(1.05);
}

/* Overlay with gradient */
.related-post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
    z-index: 10;
}

.related-post-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    line-height: 1.3;
}

.related-post-title a {
    color: white;
    text-decoration: none;
    transition: color 0.2s ease;
}

.related-post-title a:hover {
    color: var(--primary-color);
}

.related-post-date {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-weight: 400;
}

/* ==========================================================================
   Article Cards (for listings)
   ========================================================================== */

.article-card {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--footer-border-color);
}

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

.article-card-image {
    flex-shrink: 0;
}

.article-card-image img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 4px;
}

.article-card-content {
    flex: 1;
}

.article-card-title {
    font-size: var(--h4-size);
    margin-bottom: 0.5rem;
}

.article-card-title a {
    color: var(--heading-color);
}

.article-card-title a:hover {
    color: var(--accent-color);
}

.article-card-excerpt {
    color: var(--body-text-color);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--meta-color);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }

    .site-branding {
        flex: 1 1 100%;
        text-align: center;
    }

    .site-tagline {
        max-width: none;
    }

    .menu-toggle {
        display: block;
        order: 2;
    }

    .main-navigation {
        display: none;
        order: 3;
        width: 100%;
    }

    .main-navigation.is-open {
        display: block;
    }

    .nav-menu {
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
        padding: 0.5rem;
    }

    .submenu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        background-color: transparent;
    }

    .has-submenu:hover .submenu {
        display: block;
    }

    .header-search {
        order: 4;
        width: 100%;
    }

    .header-connect {
        order: 5;
        justify-content: center;
        width: 100%;
    }

    .search-form {
        width: 100%;
    }

    .search-form input[type="search"] {
        flex: 1;
        width: auto;
    }

    /* Article cards stack on mobile */
    .article-card {
        flex-direction: column;
    }

    .article-card-image {
        width: 100%;
    }

    .article-card-image img {
        height: 200px;
    }

    /* Static pages */
    .static-page {
        padding: 1rem;
    }

    /* Article pages - adjust overlay header */
    .article-header-overlay {
        padding: 1.5rem 1rem;
    }

    .article-header-overlay .article-title {
        font-size: 1.75rem;
    }

    .article-container {
        padding: 0 1rem 1rem 1rem;
    }

    /* Article navigation responsive */
    .article-navigation-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .article-nav-image {
        width: 140px;
    }

    .article-nav-content {
        padding: 0.75rem 1rem;
    }

    .article-nav-title {
        font-size: 0.9rem;
    }

    /* Related posts responsive */
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .related-post-image-wrapper {
        height: 250px;
    }

    .related-post-overlay {
        padding: 1rem;
    }

    .related-post-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    :root {
        --h1-size: 28px;
        --h2-size: 24px;
        --h3-size: 18px;
    }

    .site-content {
        padding: 1rem 0.5rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .article-share {
        flex-wrap: wrap;
    }

    /* Related posts - single column on small mobile */
    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .related-post-image-wrapper {
        height: 220px;
    }
}

/* ==========================================================================
   Utilities
   ========================================================================== */

/* ==========================================================================
   Homepage
   ========================================================================== */

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

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 3rem 1rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, rgba(27, 145, 54, 0.1) 0%, rgba(35, 35, 35, 0.9) 100%);
    border-radius: 8px;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--heading-color);
}

.hero-text {
    font-size: 1.1rem;
    color: var(--meta-color);
    margin: 0;
    line-height: 1.6;
}

/* Articles Section */
.articles-section {
    padding: 0 1rem;
}

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

.section-title {
    margin: 0;
    font-size: var(--h2-size);
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.article-card-grid {
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card-grid:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.article-card-grid .article-card-image {
    display: block;
    overflow: hidden;
}

.article-card-grid .article-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card-grid:hover .article-card-image img {
    transform: scale(1.05);
}

.article-card-body {
    padding: 1.25rem;
}

.article-card-categories {
    margin-bottom: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.article-card-grid .article-card-title {
    font-size: 1.1rem;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.article-card-grid .article-card-title a {
    color: var(--heading-color);
}

.article-card-grid .article-card-title a:hover {
    color: var(--accent-color);
}

.article-card-grid .article-card-excerpt {
    font-size: 0.9rem;
    color: var(--body-text-color);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.article-card-grid .article-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--meta-color);
}

/* No articles placeholder */
.no-articles {
    text-align: center;
    padding: 3rem;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.no-articles p {
    color: var(--meta-color);
    margin: 0;
}

.no-articles a {
    color: var(--accent-color);
}

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

    .hero-text {
        font-size: 1rem;
    }

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

/* ==========================================================================
   Headline News Block
   ========================================================================== */

.headline-news-block {
    margin-bottom: 3rem;
}

.headline-news-block .section-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 2px solid #116124;
}

.headline-news-block .section-title {
    font-size: 16px;
    background-color: #116124;
    color: #fff;
    padding: 0.3rem 0.3rem;
    margin: 0;
    display: inline-block;
}

.headline-news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Main featured article (left, 50%) */
.headline-main {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.headline-main:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.headline-main-image {
    display: block;
    overflow: hidden;
}

.headline-main-image a {
    display: block;
    text-decoration: none;
    border: none;
    outline: none;
    cursor: pointer;
}

.headline-main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.headline-main:hover .headline-main-image img {
    transform: scale(1.05);
}

/* Overlay content on main article */
.headline-main-content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
    z-index: 10;
}

.headline-categories {
    margin-bottom: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.headline-main-content-overlay .category-badge {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.headline-main-title {
    font-size: 1.5rem;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.headline-main-title a {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.headline-main-title a:hover {
    color: var(--accent-color);
}

.headline-main-excerpt {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
}

.headline-main-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Secondary articles (right, 50%, 2x2 grid) */
.headline-secondary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.headline-small {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.headline-small:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.headline-small-image {
    display: block;
    overflow: hidden;
}

.headline-small-image a {
    display: block;
    text-decoration: none;
    border: none;
    outline: none;
    cursor: pointer;
}

.headline-small-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.headline-small:hover .headline-small-image img {
    transform: scale(1.05);
}

/* Overlay content on small articles */
.headline-small-content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 70%, transparent 100%);
    z-index: 10;
}

.headline-small-title {
    font-size: 0.95rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.headline-small-title a {
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.headline-small-title a:hover {
    color: var(--accent-color);
}

.headline-small-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   Predictions Block
   ======================================== */
.predictions-block {
    margin-bottom: 3rem;
}

.predictions-block .section-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 2px solid #deb110;
}

.predictions-block .section-title {
    font-size: 16px;
    background-color: #deb110;
    color: #000;
    padding: 0.3rem 0.3rem;
    margin: 0;
    display: inline-block;
}

.predictions-block .section-title a {
    color: #000;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.predictions-block .section-title a:hover {
    opacity: 0.8;
}

.predictions-container {
    position: relative;
    margin-top: 1.5rem;
}

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

/* Prediction card */
.prediction-card {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prediction-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Image wrapper with overlay categories */
.prediction-image-wrapper {
    position: relative;
    overflow: hidden;
}

.prediction-image a {
    display: block;
    text-decoration: none;
    border: none;
    outline: none;
    cursor: pointer;
}

.prediction-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

/* Category badges overlay on image */
.prediction-categories-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    z-index: 10;
}

.prediction-categories-overlay .category-badge {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Content below image */
.prediction-content {
    padding: 1.25rem;
    background-color: rgba(255, 255, 255, 0.03);
}

.prediction-title {
    font-size: 1.1rem;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.prediction-title a {
    color: var(--heading-color);
}

.prediction-title a:hover {
    color: var(--accent-color);
}

.prediction-meta {
    font-size: 0.85rem;
    color: var(--meta-color);
}

/* Navigation controls - overlay buttons */
.predictions-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(222, 177, 16, 0.9);
    color: #000;
    font-size: 1.5rem;
    font-weight: 700;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.predictions-nav-btn:hover:not(:disabled) {
    background-color: #f5c829;
    box-shadow: 0 4px 16px rgba(222, 177, 16, 0.6);
}

.predictions-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: rgba(153, 153, 153, 0.7);
}

.predictions-nav-prev {
    left: -25px;
}

.predictions-nav-next {
    right: -25px;
}

/* Responsive */
@media (max-width: 1024px) {
    .headline-news-grid {
        grid-template-columns: 1fr;
    }

    .headline-secondary {
        grid-template-columns: 1fr 1fr;
    }

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

    .predictions-nav-prev {
        left: -15px;
    }

    .predictions-nav-next {
        right: -15px;
    }
}

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

    .headline-small-image img {
        height: 200px;
    }

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

    .prediction-image img {
        height: 200px;
    }

    .predictions-nav-prev {
        left: 5px;
    }

    .predictions-nav-next {
        right: 5px;
    }

    .predictions-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ==========================================================================
   WordPress Block Styles (for imported content)
   ========================================================================== */

/* Block Group - Container sections */
.wp-block-group {
    padding: 2rem 1rem;
    margin-bottom: 1rem;
}

.wp-block-group.has-background {
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

/* Spacer blocks - reduce height */
.wp-block-spacer {
    margin: 0.5rem 0 !important;
    height: auto !important;
}

/* Embedded App Pages (iframe full-page) */
.page-content iframe[src*="/static/apps/"] {
    width: 100%;
    border: none;
    display: block;
    min-height: 600px;
}

/* Hide title and remove ALL width constraints for embedded app pages */
body:has(.page-content iframe[src*="/static/apps/"]) .page-header,
body:has(.page-content iframe[src*="/static/apps/"]) .page-title {
    display: none !important;
}

body:has(.page-content iframe[src*="/static/apps/"]) .page-container {
    max-width: none !important;
    width: 100% !important;
}

body:has(.page-content iframe[src*="/static/apps/"]) .page-content {
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

body:has(.page-content iframe[src*="/static/apps/"]) .site-content {
    padding: 0 !important;
    max-width: none !important;
}

/* Block Columns - Multi-column layouts */
.wp-block-columns {
    display: flex;
    flex-wrap: nowrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Allow wrap only for 2-column section with background */
.has-background .wp-block-columns {
    flex-wrap: wrap;
}

.wp-block-column {
    flex: 1;
    min-width: 0;
}

/* Override WordPress inline styles for proper column layout */
/* 2 columns (first section with background) - stronger override for inline styles */
.has-background .wp-block-columns .wp-block-column {
    flex: 0 0 calc(50% - 1rem) !important;
    max-width: calc(50% - 1rem) !important;
    min-width: 0 !important;
}

/* 4 columns - when there are exactly 4 columns in a row */
.wp-block-columns .wp-block-column:first-child:nth-last-child(4),
.wp-block-columns .wp-block-column:first-child:nth-last-child(4) ~ .wp-block-column {
    flex: 0 0 calc(25% - 1.5rem) !important;
    max-width: calc(25% - 1.5rem) !important;
    min-width: 0 !important;
}

/* 3 columns - when there are exactly 3 columns in a row */
.wp-block-columns .wp-block-column:first-child:nth-last-child(3),
.wp-block-columns .wp-block-column:first-child:nth-last-child(3) ~ .wp-block-column {
    flex: 0 0 calc(33.333% - 1.5rem) !important;
    max-width: calc(33.333% - 1.5rem) !important;
    min-width: 0 !important;
}

/* Block Image */
.wp-block-image {
    margin: 1rem 0;
}

.wp-block-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.wp-block-image.is-resized img {
    width: 100%;
    height: auto;
}

/* Block Buttons */
.wp-block-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

/* Nested buttons container */
.wp-block-buttons .wp-block-buttons {
    margin: 0;
}

.wp-block-button {
    display: block;
    width: 100%;
}

.wp-block-button__link {
    display: block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
    color: #fff;
}

.wp-block-button__link:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Block Spacer */
.wp-block-spacer {
    display: block;
    margin: 0;
}

/* WordPress Typography Classes */
.has-x-large-font-size,
h1.has-x-large-font-size,
h2.has-x-large-font-size {
    font-size: 2rem !important;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.has-large-font-size {
    font-size: 1.5rem;
    line-height: 1.3;
}

.has-medium-font-size {
    font-size: 1.1rem;
    line-height: 1.6;
}

.has-small-font-size {
    font-size: 0.9rem;
}

/* Responsive WordPress Blocks */
@media (max-width: 768px) {
    .wp-block-columns {
        flex-direction: column;
    }

    .wp-block-column {
        min-width: 100%;
    }

    /* Override desktop 50% columns to full width on mobile */
    .has-background .wp-block-columns .wp-block-column {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Override 3-column and 4-column layouts to full width on mobile */
    .wp-block-columns .wp-block-column:first-child:nth-last-child(3),
    .wp-block-columns .wp-block-column:first-child:nth-last-child(3) ~ .wp-block-column,
    .wp-block-columns .wp-block-column:first-child:nth-last-child(4),
    .wp-block-columns .wp-block-column:first-child:nth-last-child(4) ~ .wp-block-column {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .has-x-large-font-size {
        font-size: 1.5rem;
    }

    .wp-block-buttons {
        flex-direction: column;
    }

    .wp-block-button {
        width: 100%;
    }

    .wp-block-button__link {
        display: block;
        text-align: center;
    }
}

/* ==========================================================================
   StreamField Blocks
   ========================================================================== */

/* Hero Block */
.hero-block {
    position: relative;
    padding: 4rem 1rem;
    margin-bottom: 3rem;
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-block .hero-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-block .hero-text {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-cta {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Hero Image Only Block (no text, uncropped image, CTA centered) */
.hero-image-block {
    position: relative;
    margin-bottom: 3rem;
    border-radius: 8px;
    overflow: hidden;
}

.hero-image-container {
    position: relative;
    display: block;
    line-height: 0;
}

.hero-full-image {
    width: 100%;
    height: auto;
    display: block;
}

.hero-cta-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hero-image-block .hero-cta {
    padding: 1.5rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 4px;
    width: auto;
    max-width: 80%;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
}

.hero-cta-wrapper--no-image {
    position: static;
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
}

/* Featured Articles Block */
.featured-articles-block {
    margin-bottom: 3rem;
}

/* Text Block */
.text-block {
    margin-bottom: 3rem;
    padding: 0 1rem;
}

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

.text-heading {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
}

.rich-text {
    line-height: 1.8;
}

.rich-text h2,
.rich-text h3,
.rich-text h4 {
    margin-top: 2rem;
}

.rich-text p {
    margin-bottom: 1.25rem;
}

.rich-text ul,
.rich-text ol {
    margin-bottom: 1.25rem;
    padding-left: 2rem;
}

.rich-text li {
    margin-bottom: 0.5rem;
}

/* Image Gallery Block */
.image-gallery-block {
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.image-gallery {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.image-gallery.columns-2 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.image-gallery.columns-3 {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.image-gallery.columns-4 {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* CTA Block */
.cta-block {
    margin-bottom: 3rem;
    padding: 3rem 1rem;
    text-align: center;
    border-radius: 8px;
}

.cta-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, rgba(27, 145, 54, 0.8) 100%);
}

.cta-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, rgba(255, 255, 240, 0.8) 100%);
}

.cta-accent {
    background: linear-gradient(135deg, var(--accent-color) 0%, rgba(27, 145, 54, 0.7) 100%);
}

.cta-dark {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.cta-text {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.3);
    border: 2px solid #fff;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: #fff;
    color: #111;
    transform: translateY(-2px);
}

/* Category Articles Block */
.category-articles-block {
    margin-bottom: 3rem;
}

/* Articles List (for list layout) */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--link-hover-color);
    color: #fff;
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Responsive adjustments for blocks */
@media (max-width: 768px) {
    .hero-block {
        min-height: 300px;
        padding: 3rem 1rem;
    }

    .hero-block .hero-title {
        font-size: 2rem;
    }

    .hero-block .hero-text {
        font-size: 1rem;
    }

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

    .cta-text {
        font-size: 1rem;
    }

    .image-gallery {
        grid-template-columns: 1fr !important;
    }

    /* Footer mobile */
    .footer-main {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-connect {
        justify-content: center;
    }

    .footer-legal {
        text-align: center;
    }
}
