/* ============================================
   JW.ORG REPLICA STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --logo-blue: #4A6DA7;
    --nav-bg: #333333;
    --text-primary: #212121;
    --text-secondary: #555555;
    --link-color: #4A6DA7;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --hero-bg: #ccc;
    /* Fallback */
}

body {
    font-family: "Noto Sans", Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-white);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   HEADER SECTIONS
   ============================================ */
.year-text-bar {
    background-color: var(--logo-blue);
    color: #fff;
    text-align: center;
    padding: 8px;
    font-size: 14px;
    font-weight: 500;
}

.site-header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* TOP BAR (White) */
.header-top {
    max-width: 1024px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    /* Centered content */
    align-items: center;
    min-height: 60px;
    padding: 10px 20px;
    position: relative;
    flex-wrap: wrap;
}

.header-branding {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    /* Slightly larger for main title presence */
    font-weight: bold;
    color: #4A6DA7;
    /* Use blue branding color for text */
    text-align: center;
    width: 100%;
}

/* Logo styles removed as requested */

/* JW.ORG SVG LOGO */
.jw-logo-img {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    margin-right: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.header-utils {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: var(--text-secondary);
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
}

.search-box {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    background: #fff;
}

.search-box input {
    border: none;
    outline: none;
    width: 150px;
}

/* NAV BAR (Dark) */
.header-nav {
    background-color: var(--nav-bg);
    color: #fff;
}

.nav-container {
    max-width: 1024px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 20px;
}

.nav-menu {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-menu li a {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 0;
    display: block;
    white-space: nowrap;
    /* Prevent line breaks in menu items */
}

.nav-menu li a:hover {
    color: #ddd;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    max-width: 1024px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
}

/* HERO SECTION */
.hero-section {
    margin-bottom: 40px;
    background: #262626;
    /* Dark background only */
    display: flex;
    /* min-height removed to fit content */
    border-radius: 4px;
    overflow: hidden;
}

.hero-content {
    width: 100%;
    /* Full width */
    background-color: #262626;
    color: #fff;
    padding: 60px 40px;
    /* More padding for presence */
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    /* Centered for text-only impact */
    align-items: center;
}

.hero-image {
    /* This rule is effectively removed for a text-only layout */
    display: none;
}

.hero-tag {
    color: var(--logo-blue);
    /* Accent color */
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    font-size: 12px;
    margin-bottom: 20px;
    letter-spacing: 1px;
    width: fit-content;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    max-width: 800px;
}

.hero-excerpt {
    font-size: 18px;
    margin-bottom: 30px;
    color: #e0e0e0;
    max-width: 700px;
}

.btn-hero {
    display: inline-block;
    background-color: var(--logo-blue);
    color: #fff;
    padding: 12px 30px;
    font-weight: bold;
    font-size: 16px;
    border-radius: 4px;
    text-align: center;
    transition: background 0.2s;
}

.btn-hero:hover {
    background-color: #3b5a8c;
}

/* GRID SECTION */
.section-title {
    font-size: 24px;
    font-weight: 400;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.grid-container {
    display: grid;
    /* Reduced min-width to 250px for better mobile support */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.grid-card {
    display: block;
    /* Ensure anchor behaves like block */
    background: #fff;
    border-top: 3px solid var(--logo-blue);
    /* Accent like JW news cards */
    border-radius: 4px;
    /* Slight radius */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    /* Remove underline from whole card */
    color: inherit;
    /* retain text colors */
}

.grid-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-image {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #eee;
    margin-bottom: 10px;
    background-size: cover;
    background-position: center;
}

.card-title {
    font-size: 18px;
    color: var(--link-color);
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 5px;
}

/* Underline title on hover only */
.grid-card:hover .card-title {
    text-decoration: underline;
}

.card-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

/* ============================================
   DETAIL PAGE SPECIFIC
   ============================================ */
.detail-container {
    max-width: 800px;
    margin: 0 auto;
}

.detail-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.back-link {
    color: var(--link-color);
    font-size: 14px;
    margin-bottom: 20px;
    display: inline-block;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background-color: #eee;
    color: #555;
    padding: 10px 20px;
    /* Reduced specific padding */
    margin-top: auto;
    font-size: 12px;
}

.footer-inner {
    max-width: 1024px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 0;
    /* No bottom margin needed */
    flex-wrap: wrap;
    /* Safety for small screens */
}

.footer-links a {
    color: var(--link-color);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        height: auto;
        padding: 15px;
        gap: 15px;
    }

    .header-branding {
        margin-bottom: 0;
        width: 100%;
        justify-content: center;
    }

    .header-utils {
        width: 100%;
        justify-content: center;
    }

    .hero-section {
        flex-direction: column;
    }

    .hero-content {
        order: 2;
        /* Content below image on mobile */
    }

    .hero-image {
        order: 1;
        height: 250px;
        flex: none;
    }

    .nav-container {
        height: auto;
        padding: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu {
        padding: 0 20px;
        width: max-content;
        /* Ensure horizontal scroll works */
    }

    .main-content {
        padding: 20px;
    }
}