/*
Theme Name: Tourism News Daily
Theme URI: https://tourismnewsdaily.com
Author: Tourism News Daily
Description: Lightweight custom global tourism news theme.
Version: 1.0
Text Domain: tourism-news
*/

:root {
    --primary: #12345a;
    --secondary: #ed3028;
    --accent: #f7941d;
    --text: #252b34;
    --muted: #687385;
    --border: #e5e8ed;
    --background: #ffffff;
    --light: #f5f7fa;
    --container: 1200px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--background);
    font-size: 16px;
    line-height: 1.65;
}

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

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

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

.container {
    width: min(94%, var(--container));
    margin: auto;
}

/* Header */

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding: 15px 0;
}

.site-branding img {
    max-width: 310px;
    max-height: 85px;
    object-fit: contain;
}

.site-title {
    font-size: 29px;
    font-weight: 800;
    color: var(--primary);
}

.site-description {
    margin: 0;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--muted);
}

.primary-navigation {
    background: var(--primary);
}

.primary-navigation ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.primary-navigation li a {
    display: block;
    color: #fff;
    padding: 13px 15px;
    font-size: 14px;
    font-weight: 600;
}

.primary-navigation li a:hover {
    background: var(--secondary);
    color: #fff;
}

/* Main Layout */

.page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 30px;
    padding-top: 30px;
    padding-bottom: 40px;
}

.main-content {
    min-width: 0;
}

/* Section headings */

.section-heading {
    font-size: 21px;
    color: var(--primary);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 9px;
    margin: 0 0 20px;
}

/* Article cards */

.featured-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 22px;
    margin-bottom: 35px;
}

.featured-image,
.article-image {
    display: block;
    overflow: hidden;
    background: var(--light);
}

.featured-image img,
.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.featured-image:hover img,
.article-image:hover img {
    transform: scale(1.04);
}

.featured-image {
    height: 280px;
}

.featured-title {
    font-size: 24px;
    line-height: 1.35;
    margin: 12px 0;
}

.article-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
}

.article-card {
    min-width: 0;
}

.article-image {
    height: 190px;
}

.article-title {
    font-size: 18px;
    line-height: 1.4;
    margin: 10px 0 6px;
}

.article-meta {
    font-size: 12px;
    color: var(--muted);
}

.article-excerpt {
    font-size: 14px;
    color: #596273;
    margin-top: 7px;
}

/* Sidebar */

.sidebar {
    min-width: 0;
}

.sidebar-widget {
    border: 1px solid var(--border);
    padding: 17px;
    margin-bottom: 22px;
    background: #fff;
}

.widget-title {
    font-size: 17px;
    color: var(--primary);
    margin: 0 0 14px;
    padding-bottom: 9px;
    border-bottom: 2px solid var(--accent);
}

.sidebar-widget ul {
    padding-left: 18px;
    margin: 0;
}

.sidebar-widget li {
    margin-bottom: 10px;
    font-size: 14px;
}

/* Single Article */

.single-title {
    font-size: 34px;
    line-height: 1.3;
    margin: 10px 0 15px;
    color: var(--primary);
}

.single-featured-image {
    margin: 22px 0;
}

.single-featured-image img {
    width: 100%;
    max-height: 470px;
    object-fit: cover;
}

.article-content {
    font-size: 17px;
    line-height: 1.85;
}

.article-content h2,
.article-content h3 {
    color: var(--primary);
    margin-top: 30px;
}

.article-content img {
    margin: 15px 0;
}

/* Pagination */

.pagination {
    margin-top: 35px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 13px;
    margin: 3px;
    border: 1px solid var(--border);
}

.pagination .current {
    background: var(--primary);
    color: #fff;
}

/* Footer */

.site-footer {
    background: #102b49;
    color: #fff;
    padding: 35px 0 15px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 35px;
}

.site-footer h3 {
    font-size: 18px;
    margin-top: 0;
}

.site-footer p,
.site-footer a {
    color: #d5deea;
    font-size: 14px;
}

.site-footer ul {
    padding-left: 18px;
}

.footer-bottom {
    border-top: 1px solid #38516c;
    margin-top: 25px;
    padding-top: 15px;
    text-align: center;
    font-size: 13px;
    color: #c6d0dc;
}

/* Search */

.search-form {
    display: flex;
    gap: 5px;
}

.search-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
}

.search-form button {
    background: var(--primary);
    color: #fff;
    border: 0;
    padding: 10px 15px;
    cursor: pointer;
}

/* Mobile */

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

    .header-main {
        flex-direction: column;
        text-align: center;
    }

    .primary-navigation ul {
        justify-content: center;
    }

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

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

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

    .featured-title {
        font-size: 21px;
    }

    .single-title {
        font-size: 26px;
    }

    .primary-navigation li a {
        padding: 10px 9px;
        font-size: 12px;
    }

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

    .site-branding img {
        max-width: 260px;
    }
}


/* =====================================
   TOURISM NEWS DAILY - NEWS HOMEPAGE
===================================== */






/* Top news layout */

.top-news-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 25px;
    margin: 28px 0;
}

.top-featured {
    min-width: 0;
}

.top-featured-image {
    display: block;
    height: 330px;
    overflow: hidden;
    background: #edf0f4;
}

.top-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8995a4;
    font-size: 20px;
    font-weight: bold;
}

.top-featured-title {
    font-size: 27px;
    line-height: 1.3;
    margin: 10px 0;
}

.top-featured-title a {
    color: #172f4b;
}

.read-more {
    font-weight: 700;
    font-size: 14px;
}

.news-heading {
    font-size: 19px;
    color: #12345a;
    border-bottom: 2px solid #ed3028;
    padding-bottom: 10px;
    margin: 0 0 8px;
}

.latest-update {
    border-bottom: 1px solid #e5e8ed;
    padding: 12px 0;
}

.latest-update h3 {
    font-size: 15px;
    line-height: 1.45;
    margin: 4px 0;
}

.latest-update h3 a {
    color: #26364a;
}

.latest-update h3 a:hover {
    color: #ed3028;
}

/* Secondary news */

.secondary-news {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin: 30px 0 40px;
}

.secondary-card .article-image {
    height: 210px;
}

/* Category news sections */

.category-news-section {
    margin: 35px 0 45px;
}

.category-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.category-section-header .section-heading {
    flex: 1;
}

.category-section-header > a {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    margin-bottom: 20px;
}

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

.category-news-card .article-image {
    height: 155px;
}

.category-news-card .article-title {
    font-size: 16px;
}

/* Homepage header adjustments */

.site-branding img {
    max-width: 310px;
    max-height: 90px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Sidebar refinement */

.sidebar-widget {
    margin-bottom: 20px;
}

.sidebar .wp-block-heading {
    color: #12345a;
    font-size: 18px;
}

/* Responsive homepage */

@media(max-width: 900px) {

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

    .top-latest {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 18px;
    }

    .top-latest .news-heading {
        grid-column: 1 / -1;
    }

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

}

@media(max-width: 600px) {



    .top-featured-image {
        height: 230px;
    }

    .top-featured-title {
        font-size: 22px;
    }

    .top-latest {
        display: block;
    }

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

    .category-news-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .category-news-card .article-image {
        height: 120px;
    }

    .category-news-card .article-title {
        font-size: 14px;
    }

}


/* News sidebar */

.sidebar-news-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e8ed;
}

.sidebar-thumb {
    display: block;
    flex: 0 0 100px;
    width: 100px;
    aspect-ratio: 16 / 9;
    height: auto;
    overflow: hidden;
    background: #f5f7fa;
}

.sidebar-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.ad-placeholder {
    min-height: 250px;
    background: #f5f6f8;
    border: 1px dashed #c7cdd5;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #8993a1;
    font-size: 13px;
}





/* Consistent homepage image proportions */
.top-featured-image {
    height: auto;
    aspect-ratio: 16 / 9;
}

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

.secondary-card .article-image,
.category-news-card .article-image,
.article-card .article-image {
    display: block;
    height: auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.secondary-card .article-image img,
.category-news-card .article-image img,
.article-card .article-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-thumb {
    display: block;
    flex: 0 0 85px;
    width: 85px;
    height: 65px;
    overflow: hidden;
}

.sidebar-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top-featured-image,
.secondary-card .article-image,
.category-news-card .article-image,
.article-card .article-image {
    background: #f5f7fa;
}


/* Sidebar thumbnails: consistent 16:9 without cropping */
.sidebar-news-item {
    align-items: flex-start;
}

.sidebar-thumb {
    display: block;
    flex: 0 0 100px;
    width: 100px;
    height: auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f5f7fa;
}

.sidebar-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}


/* TND homepage image fallbacks and compact trending sidebar */
.top-featured-image, .secondary-card .article-image, .category-news-card .article-image {
    display:block; overflow:hidden; background:#f5f7fa;
}
.top-featured-image img, .secondary-card .article-image img, .category-news-card .article-image img {
    display:block; width:100%; height:100%; object-fit:cover;
}
.top-featured-image { aspect-ratio:16/9; height:auto; }
.secondary-card .article-image, .category-news-card .article-image { aspect-ratio:16/9; height:auto; }
.sidebar-news-item { display:flex; align-items:flex-start; gap:11px; padding:11px 0; border-bottom:1px solid #e5e8ed; }
.sidebar-thumb { display:block; flex:0 0 108px; width:108px; height:auto; aspect-ratio:16/9; overflow:hidden; background:#f5f7fa; border-radius:3px; }
.sidebar-thumb img { display:block; width:100%; height:100%; object-fit:cover; object-position:center; }
.sidebar-news-item > div { flex:1; min-width:0; }
.sidebar-news-item h4 { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; font-size:13px; line-height:1.38; margin:0 0 5px; }
.sidebar-news-item .article-meta { font-size:11px; line-height:1.3; }
.sidebar-thumb-placeholder { display:flex; width:100%; height:100%; align-items:center; justify-content:center; background:#e9eef4; color:#12345a; font-size:13px; font-weight:700; }
@media(max-width:600px) { .sidebar-thumb { flex-basis:100px; width:100px; } }
