:root {
    --navy: #142b3b;
    --orange: #ed762e;
    --light: #f5f6f7;
    --text: #202b32;
    --muted: #687780;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--light);
    color: var(--text);
    line-height: 1.6;
}

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

/* Website header and navigation */

.site-header {
    background: var(--navy);
    color: white;
}

.header-inner {
    max-width: 1400px;
    margin: auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.brand {
    font-size: 29px;
    font-weight: 800;
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
}

.brand span {
    color: var(--orange);
}

.navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
}

.navigation a {
    transition: color .2s;
}

.navigation a:hover,
.navigation a.active {
    color: #ffb27e;
}

.navigation .register-link {
    background: transparent;
    color: inherit;
    padding: 9px 13px;
    border-radius: 0;
}

.navigation .register-link:hover {
    background: #d96120;
    color: white;
}

.menu-toggle {
    display: none;
    background: var(--orange);
    color: white;
    border: 0;
    border-radius: 5px;
    padding: 9px 13px;
    font-size: 15px;
    cursor: pointer;
}

/* Hero banner */

.hero-banner {
    background: linear-gradient(120deg, #142b3b, #284b60);
    color: white;
    padding: 35px 20px;
}

.hero-inner {
    max-width: 1200px;
    margin: auto;
}

.hero-inner h1 {
    margin: 0;
    font-size: 34px;
}

.hero-inner p {
    margin: 7px 0 0;
    color: #dce6eb;
}

/* Main content */

.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.search-form input {
    flex: 1;
    min-width: 0;
    padding: 13px;
    border: 1px solid #d3d9dc;
    border-radius: 6px;
    font-size: 15px;
}

.search-form button {
    background: var(--orange);
    color: white;
    border: 0;
    border-radius: 6px;
    padding: 12px 22px;
    cursor: pointer;
    font-weight: bold;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--orange);
    margin: 38px 0 20px;
    padding-bottom: 9px;
}

.section-heading h2 {
    margin: 0;
    font-size: 23px;
    color: var(--navy);
}

/* Featured story */

.featured {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,.07);
}

.featured-image {
    min-height: 330px;
    background: #dce3e7;
}

.featured-image img {
    width: 100%;
    height: 100%;
    min-height: 330px;
    object-fit: cover;
    display: block;
}

.featured-placeholder {
    min-height: 330px;
    display: grid;
    place-items: center;
    color: var(--navy);
    font-size: 30px;
    font-weight: bold;
}

.featured-content {
    padding: 30px;
    align-self: center;
}

.featured-content h2 {
    font-size: 29px;
    line-height: 1.3;
    margin: 12px 0;
    color: var(--navy);
}

.featured-content p {
    color: var(--muted);
}

.read-more {
    display: inline-block;
    background: var(--orange);
    color: white;
    padding: 10px 18px;
    border-radius: 5px;
    margin-top: 10px;
    font-weight: bold;
}

/* Category and language labels */

.card-labels {
    display: flex;
    gap: 7px;
    align-items: center;
    flex-wrap: wrap;
}

.language,
.category-label {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.language {
    color: #bd551d;
    background: #fff0e7;
}

.category-label {
    color: #234d68;
    background: #e7f0f6;
}

.category-label:hover {
    background: #d1e3ef;
}

/* News cards */

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.news-card {
    background: white;
    border-radius: 9px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
}

.card-image {
    display: block;
    height: 205px;
    background: #e0e6e9;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}

.news-card:hover .card-image img {
    transform: scale(1.04);
}

.image-placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--navy);
    font-weight: bold;
    font-size: 22px;
}

.card-content {
    padding: 17px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-content h3 {
    font-size: 18px;
    line-height: 1.4;
    margin: 12px 0 8px;
}

.card-content h3 a:hover {
    color: var(--orange);
}

.card-content p {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 15px;
}

.card-date {
    color: #879198;
    font-size: 12px;
    margin-top: auto;
}

.view-count {
    color: #687780;
    white-space: nowrap;
}

.comment-count {
    color: #bd551d;
    font-weight: bold;
    white-space: nowrap;
}

.comment-count:hover {
    text-decoration: underline;
}

.featured-comment-count {
    display: inline-block;
    margin-top: 8px;
    color: #bd551d;
    font-size: 13px;
    font-weight: bold;
}

.featured-view-count {
    display: inline-block;
    margin-top: 8px;
    margin-right: 12px;
    color: #687780;
    font-size: 13px;
}
/* Pagination */

.results-summary {
    color: var(--muted);
    font-size: 14px;
    margin: -8px 0 18px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 30px 0 15px;
}

.page-link {
    display: inline-block;
    min-width: 40px;
    padding: 8px 12px;
    text-align: center;
    border: 1px solid #d3d9dc;
    border-radius: 5px;
    background: white;
    color: var(--navy);
    font-size: 14px;
    font-weight: bold;
}

a.page-link:hover {
    background: #e7f0f6;
    border-color: #9db7c7;
}

.page-link.current {
    background: var(--navy);
    color: white;
    border-color: var(--navy);
}

.page-link.disabled {
    color: #aab2b7;
    background: #f0f1f2;
    cursor: not-allowed;
}

.page-dots {
    color: var(--muted);
    padding: 0 3px;
}

/* Article page */

.article-page {
    background: white;
    border-radius: 10px;
    padding: 30px;
    max-width: 900px;
    margin: auto;
}

.article-page h1 {
    color: var(--navy);
    font-size: 34px;
    line-height: 1.3;
}

.article-photo {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 8px;
    margin: 15px 0;
}

.article-summary {
    font-size: 19px;
    color: #53636c;
    font-weight: bold;
}

.article-body {
    font-size: 17px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #bd551d;
    font-weight: bold;
}

.empty-message {
    background: white;
    padding: 25px;
    border-radius: 8px;
    color: var(--muted);
}

/* Article sharing buttons */

.share-section {
    margin-top: 30px;
    padding: 20px;
    background: #f7f8f9;
    border-radius: 8px;
}

.share-section h3 {
    margin: 0 0 13px;
    color: var(--navy);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-button {
    display: inline-block;
    border: 0;
    border-radius: 5px;
    padding: 10px 16px;
    color: white;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
}

.share-whatsapp {
    background: #168b50;
}

.share-facebook {
    background: #1877f2;
}

.share-email {
    background: #596b78;
}

.share-copy {
    background: var(--orange);
}

.share-button:hover {
    opacity: .88;
}

.copy-message {
    display: block;
    margin-top: 10px;
    color: #24643b;
    font-size: 13px;
}

/* Reader comments */

.comments-section {
    margin-top: 45px;
    border-top: 1px solid #e1e5e8;
    padding-top: 25px;
}

.comments-section h2 {
    color: var(--navy);
    font-size: 24px;
}

.comment-message {
    background: #e8f5ec;
    color: #24643b;
    border: 1px solid #b9dfc5;
    border-radius: 6px;
    padding: 12px 15px;
    margin: 15px 0;
}

.comment-error {
    background: #fff0e7;
    color: #99451c;
    border: 1px solid #f0c7ad;
    border-radius: 6px;
    padding: 12px 15px;
    margin: 15px 0;
}

.comment-form {
    background: #f7f8f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.comment-form label {
    display: block;
    font-weight: bold;
    margin: 12px 0 5px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccd4d9;
    border-radius: 5px;
    font: inherit;
}

.comment-form textarea {
    min-height: 130px;
    resize: vertical;
}

.comment-form button {
    background: var(--orange);
    color: white;
    border: 0;
    border-radius: 5px;
    padding: 12px 20px;
    margin-top: 15px;
    font-weight: bold;
    cursor: pointer;
}

.comment-item {
    border-bottom: 1px solid #e5e8ea;
    padding: 15px 0;
}

.comment-item strong {
    color: var(--navy);
}

.comment-item p {
    margin: 7px 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.comment-date {
    font-size: 12px;
    color: #879198;
}

/* Website footer */

.site-footer {
    background: var(--navy);
    color: #dce6eb;
    text-align: center;
    padding: 28px 20px;
    margin-top: 60px;
    font-size: 14px;
}

/* Responsive design */

@media (max-width: 1100px) {

    .header-inner {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .navigation {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding-top: 10px;
        white-space: normal;
    }

    .navigation.open {
        display: flex;
    }

    .navigation a {
        padding: 11px 8px;
        border-top: 1px solid rgba(255,255,255,.12);
    }

    .navigation .register-link {
        margin-top: 8px;
        text-align: left;
    }
}

@media (max-width: 850px) {

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

    .featured-image,
    .featured-image img,
    .featured-placeholder {
        min-height: 260px;
        max-height: 320px;
    }

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

@media (max-width: 560px) {

    .header-inner {
        padding: 15px;
    }

    .brand {
        font-size: 25px;
    }

    .hero-inner h1 {
        font-size: 27px;
    }

    .container {
        padding: 0 13px;
    }

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

    .card-image {
        height: 220px;
    }

    .featured-content {
        padding: 20px;
    }

    .featured-content h2 {
        font-size: 24px;
    }

    .article-page {
        padding: 18px;
    }

    .article-page h1 {
        font-size: 26px;
    }

    .search-form button {
        padding: 10px 13px;
    }

    .pagination {
        gap: 5px;
    }

    .page-link {
        min-width: 35px;
        padding: 7px 9px;
        font-size: 13px;
    }
}
