/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: clip;
}

body {
    max-width: 100vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

p {
    margin-bottom: 1em;
}

body {
    font-family: ReithSans, Helvetica, Arial, freesans, sans-serif;
    background-color: #f9f7f3;
    color: #1a1a1a;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

/* News Banner */
.news-banner {
    background-color: transparent;
    padding: 8px 0;
}

.news-banner .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
}

.news-title .highlight {
    color: #0066cc;
}

.search-toggle {
    display: none;
}

.search-icon {
    display: none;
}

.search-box {
    display: flex;
    gap: 0;
}

.search-box input {
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 4px 0 0 4px;
    width: 180px;
    font-family: inherit;
}

.search-box input:focus {
    outline: none;
    border-color: #1a3a5c;
}

.search-box button {
    padding: 6px 10px;
    font-size: 16px;
    background-color: #1a3a5c;
    color: #fff;
    border: 1px solid #1a3a5c;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    line-height: 1;
}

.search-box button:hover {
    background-color: #12293f;
}

/* Secondary Nav */
.secondary-nav {
    background-color: #1a3a5c;
    padding: 0;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.secondary-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    gap: 0;
}

.sec-nav-link {
    color: #fff;
    padding: 10px 14px;
    font-size: 14px;
    display: inline-block;
    position: relative;
    line-height: 19px;
}

.sec-nav-link:hover {
    background-color: rgba(0,0,0,0.1);
}

.sec-nav-link.active {
    background-color: #f9f7f3;
    color: #1a1a1a;
}

.more-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    padding: 8px 16px;
    font-size: 14px;
    background-color: #12293f;
    line-height: 19px;
}

.hamburger {
    font-size: 16px;
}

/* More toggle (CSS-only) */
.more-toggle {
    display: none;
}

.more-categories {
    display: none;
    background-color: #12293f;
}

.more-categories .container {
    display: flex;
    gap: 0;
    justify-content: flex-start;
}

.more-toggle:checked ~ .secondary-nav .more-categories {
    display: block;
}

.more-toggle:checked ~ .secondary-nav .more-btn {
    background-color: #0a1a29;
}

.mobile-only {
    display: none;
}

/* Tertiary Nav */
.tertiary-nav {
    background-color: #f9f7f3;
    padding: 0;
    border-bottom: 1px solid #e6e6e6;
}

.tertiary-nav .container {
    display: flex;
    gap: 0;
}

.ter-nav-link {
    color: #1a1a1a;
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.ter-nav-link:hover {
    border-bottom-color: #b80000;
}

.ter-nav-link.active {
    border-bottom-color: #b80000;
    font-weight: bold;
}

.ter-nav-sep {
    color: #ccc;
    padding: 12px 8px;
    font-size: 14px;
}

/* Main Content */
.main-content {
    padding: 24px 0;
    background-color: #f9f7f3;
}

/* Page Header */
.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e6e6e6;
}

.hero-main {
    grid-column: span 2;
}

.hero-article {
    cursor: pointer;
}

.hero-image img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
}

.hero-content {
    padding: 12px 0;
}

.hero-content h2 {
    font-size: 24px;
    font-weight: bold;
    line-height: 1.25;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.hero-content h2:hover {
    text-decoration: underline;
}

.hero-content p {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 8px;
}

/* Hero Sidebar - 3 columns x 2 rows */
.hero-sidebar {
    grid-column: span 3;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 16px;
}

.sidebar-card {
    cursor: pointer;
}

.sidebar-card .card-image {
    margin-bottom: 8px;
}

.sidebar-card .card-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.sidebar-card h3 {
    font-size: 14px;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 6px;
    color: #1a1a1a;
}

.sidebar-card h3:hover {
    text-decoration: underline;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #555;
}

.card-meta .category {
    color: #555;
}

.card-meta .category.highlight {
    color: #b80000;
}

.card-meta .dot {
    color: #999;
}

.card-meta .time {
    color: #555;
}

/* More Stories Section */
.more-stories-section {
    margin-bottom: 40px;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.story-card {
    cursor: pointer;
}

.story-card .card-image {
    margin-bottom: 8px;
}

.story-card .card-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.story-card h3 {
    font-size: 14px;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 6px;
    color: #1a1a1a;
}

.story-card h3:hover {
    text-decoration: underline;
}

/* Footer */
.site-footer {
    background-color: #111;
    color: #fff;
    padding: 24px 0 16px 0;
    margin-top: 20px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.footer-nav a {
    font-size: 14px;
    color: #fff;
}

.footer-nav a:hover {
    text-decoration: underline;
}

.copyright {
    font-size: 14px;
    color: #999;
}

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

    .hero-main {
        grid-column: span 1;
    }

    .hero-sidebar {
        grid-column: span 1;
        grid-template-columns: repeat(3, 1fr);
    }

    .stories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    .hero-section {
        grid-template-columns: 1fr;
    }

    /* Smaller hero image on mobile */
    .hero-image img {
        aspect-ratio: 2/1;
    }

    .hero-content h2 {
        font-size: 20px;
    }

    .hero-content p {
        font-size: 13px;
    }

    .hero-sidebar {
        grid-template-columns: 1fr;
    }

    /* Compact horizontal layout for sidebar cards on mobile */
    .sidebar-card {
        display: flex;
        align-items: flex-start;
        gap: 12px;
    }

    .sidebar-card a {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        width: 100%;
    }

    .sidebar-card .card-image {
        flex-shrink: 0;
        width: 100px;
        height: 60px;
        margin-bottom: 0;
    }

    .sidebar-card .card-image img {
        width: 100%;
        height: 100%;
        aspect-ratio: unset;
    }

    .sidebar-card h3 {
        flex: 1;
        margin-bottom: 0;
    }

    .sidebar-card .card-meta {
        display: none;
    }

    /* Compact horizontal layout for story grid on mobile */
    .stories-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .story-card {
        border-bottom: 1px solid #e6e6e6;
        padding: 12px 0;
    }

    .story-card:first-child {
        padding-top: 0;
    }

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

    .story-card a {
        display: flex;
        align-items: flex-start;
        gap: 12px;
    }

    .story-card .card-image {
        flex-shrink: 0;
        width: 100px;
        height: 60px;
        margin-bottom: 0;
    }

    .story-card .card-image img {
        width: 100%;
        height: 100%;
        aspect-ratio: unset;
    }

    .story-card h3 {
        flex: 1;
        margin-bottom: 0;
    }

    .story-card .card-meta {
        display: none;
    }

    .nav-left {
        overflow-x: auto;
        flex-shrink: 1;
        min-width: 0;
        -webkit-overflow-scrolling: touch;
    }

    .nav-left::-webkit-scrollbar {
        display: none;
    }

    .sec-nav-link {
        padding: 12px 12px;
        font-size: 13px;
        white-space: nowrap;
    }

    .mobile-only {
        display: inline-block;
    }

    .desktop-only {
        display: none;
    }

    .tertiary-nav .container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tertiary-nav .container::-webkit-scrollbar {
        display: none;
    }

    .ter-nav-link {
        padding: 12px 12px;
        font-size: 13px;
        white-space: nowrap;
        border-bottom: none;
    }

    .secondary-nav {
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .tertiary-nav {
        position: sticky;
        top: 37px;
        z-index: 99;
        border-top: 1px solid #e6e6e6;
    }

    .page-header {
        margin-bottom: 12px;
    }

    .page-header h1 {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .main-content {
        padding: 12px 0;
    }

    .secondary-nav .container,
    .tertiary-nav .container {
        padding: 0 1px;
    }


    .news-title {
        font-size: 18px;
    }

    .news-banner {
        padding: 6px 0;
    }

    .search-icon {
        display: block;
        font-size: 18px;
        cursor: pointer;
        padding: 4px;
    }

    .search-box {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: #f9f7f3;
        padding: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        z-index: 200;
    }

    .search-toggle:checked ~ .search-box {
        display: flex;
        width: 100%;
    }

    .search-toggle:checked ~ .search-icon {
        background: #e0e0e0;
        border-radius: 4px;
    }

    .search-box input {
        flex: 1;
        padding: 10px 12px;
        font-size: 16px;
    }

    .search-box button {
        padding: 10px 16px;
        font-size: 16px;
    }

    .news-banner {
        position: relative;
    }
}

/* Contact Form */
.contact-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a3a5c;
}

.form-group textarea {
    resize: vertical;
}

.submit-btn {
    background-color: #1a3a5c;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
}

.submit-btn:hover {
    background-color: #12293f;
}

.contact-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.contact-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* About Page Layout */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 33%;
    gap: 32px;
}

.about-image img {
    width: 100%;
    object-fit: cover;
}

.about-content h2 {
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.about-content ul {
    padding-left: 1.5em;
}

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

    .about-image {
        order: -1;
    }
}

/* Article Layout */
.article-main {
    padding: 24px 0;
    flex: 1;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

/* Article Content */
.article-content {
    max-width: 100%;
}

/* Article Header */
.article-header {
    margin-bottom: 24px;
}

.article-category {
    color: #b80000;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 12px;
}

.article-header h1 {
    font-size: 32px;
    font-weight: bold;
    line-height: 1.2;
    color: #222;
    margin-bottom: 16px;
}

.article-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 12px;
    border-top: 1px solid #e6e6e6;
}

.author-name {
    font-size: 14px;
    font-weight: bold;
    color: #222;
}

.article-time {
    font-size: 13px;
    color: #555;
}

/* Article Hero Image */
.article-hero {
    float: right;
    width: 50%;
    margin: 0 0 16px 24px;
}

.article-hero img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.article-hero figcaption {
    font-size: 13px;
    color: #555;
    padding: 8px 0;
    border-bottom: 1px solid #e6e6e6;
}

/* Article Body */
.article-body {
    font-size: 16px;
    line-height: 1.7;
    color: #222;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body p.lead {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.5;
}

.article-body h2 {
    font-size: 24px;
    font-weight: bold;
    margin: 32px 0 16px 0;
    color: #222;
}

/* Related Topics */
.related-topics {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e6e6e6;
}

.related-topics h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #222;
}

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.topic-tag {
    background-color: #f0f0f0;
    color: #222;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
}

.topic-tag:hover {
    background-color: #e0e0e0;
}

.disclaimer {
    margin-top: 32px;
    padding: 16px;
    background-color: #f5f0e1;
    border-left: 4px solid #c9a227;
    font-size: 14px;
    color: #5a5a5a;
    line-height: 1.5;
}

.disclaimer .source-list {
    margin-top: 12px;
    padding-left: 20px;
}

.disclaimer .source-list li {
    margin-bottom: 4px;
}

.disclaimer .source-list a {
    color: #4a4a4a;
}

.disclaimer .source-slug {
    color: #888;
    font-size: 12px;
}

/* Article Sidebar */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.sidebar-section {
    padding-bottom: 28px;
    border-bottom: 1px solid #e6e6e6;
}

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

.sidebar-title {
    font-size: 16px;
    font-weight: bold;
    color: #222;
    margin-bottom: 16px;
}

.sidebar-stories {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Vertical Story Cards */
.sidebar-story-vertical {
    cursor: pointer;
}

.sidebar-story-vertical a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.sidebar-story-vertical .story-img {
    margin-bottom: 8px;
}

.sidebar-story-vertical .story-img img {
    width: 281px;
    height: 157px;
    object-fit: cover;
}

.sidebar-story-vertical h4 {
    font-size: 15px;
    font-weight: bold;
    line-height: 1.3;
    color: #222;
}

.sidebar-story-vertical h4:hover {
    text-decoration: underline;
}

/* Most Read in Sidebar */
.most-read-sidebar {
    list-style: none;
    counter-reset: item;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
}

.most-read-sidebar li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e6e6e6;
}

.most-read-sidebar li:first-child {
    padding-top: 0;
}

.most-read-sidebar li:last-child {
    border-bottom: none;
}

.most-read-sidebar li::before {
    counter-increment: item;
    content: counter(item);
    font-size: 24px;
    font-weight: bold;
    color: #b80000;
    min-width: 28px;
    line-height: 1;
}

.most-read-sidebar li a {
    font-size: 14px;
    font-weight: bold;
    line-height: 1.3;
    color: #222;
    text-decoration: none;
}

.most-read-sidebar li a:hover {
    text-decoration: underline;
}

/* Most Recent Sidebar */
.most-recent-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.recent-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e6e6e6;
    text-decoration: none;
    color: inherit;
}

.recent-item:first-child {
    padding-top: 0;
}

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

.recent-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 50px;
    background-color: #f0f0f0;
}

.recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-title {
    font-size: 14px;
    font-weight: bold;
    line-height: 1.3;
    color: #222;
}

.recent-item:hover .recent-title {
    text-decoration: underline;
}

/* Article Responsive */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .article-header h1 {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .article-hero {
        float: none;
        width: 100%;
        margin: 0 0 24px 0;
    }

    .article-header h1 {
        font-size: 24px;
    }

    .article-body {
        font-size: 15px;
    }

    .article-body p.lead {
        font-size: 16px;
    }
}
