/*
Theme Name: Al-Jazirah News
Theme URI: https://example.com/aljazirah-news
Author: Your Agency
Author URI: https://example.com
Description: A right-to-left (RTL) Arabic news/magazine WordPress theme converted from a static HTML sample (home, category/section and single article layouts). Built for WordPress 6.8.1 and PHP 8.1+. Includes a custom logo, a primary navigation menu, featured-image driven news cards, and Customizer-editable sidebar boxes (paper/PDF issue box and promo/culture box).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aljazirah-news
Tags: news, blog, right-to-left, custom-logo, custom-menu, featured-images, translation-ready

Al-Jazirah News is based on the standard underscores.me file structure and is
distributed under the terms of the GNU GPL v2 or later.
*/

/* =====================================================
   0. RESET / BASE
   ===================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: #fff;
    color: #222;
    font-family: Tahoma, Arial, "Segoe UI", sans-serif;
    direction: rtl;
    text-align: right;
}

img {
    max-width: 100%;
    height: auto;
    border: 0;
    vertical-align: middle;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    color: navy;
    text-decoration: none;
    font-weight: 500;
    transition: color .2s;
}

a:hover,
a:focus {
    color: #b89735;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: -60px;
    right: 10px;
    background: #2d5363;
    color: #fff;
    padding: 10px 18px;
    z-index: 999999;
    border-radius: 0 0 6px 6px;
}

.skip-link:focus {
    top: 0;
}

/* =====================================================
   1. LAYOUT WRAPPERS
   ===================================================== */

.page {
    width: min(1400px, calc(100% - 48px));
    margin: 24px auto 0;
}

.site {
    overflow-x: hidden;
}

/* =====================================================
   2. SITE HEADER
   ===================================================== */

.site-header {
    height: 94px;
    background: #2d5363;
    display: flex;
    align-items: center;
    padding: 0 34px;
    gap: 24px;
}

.site-branding {
    display: flex;
    align-items: center;
    margin-left: 0;
}

.site-branding .custom-logo,
.site-branding img {
    width: 151px;
    height: 67px;
    object-fit: contain;
}

.site-branding .site-title {
    margin: 0;
    font-size: 22px;
    line-height: 1;
}

.site-branding .site-title a {
    color: #fff;
    font-weight: 800;
}

.site-branding .site-description {
    display: none;
}

.main-navigation {
    flex: 1;
}

.main-navigation ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    font-weight: 700;
    font-size: 15px;
    flex-wrap: wrap;
}

.main-navigation ul ul {
    display: none;
}

.main-navigation a {
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation a:hover {
    color: #e5cf83;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}

/* =====================================================
   3. SECTION TITLES (band with a floating label)
   ===================================================== */

.section-title {
    height: 40px;
    background: linear-gradient(to left, #e8eef2, #fff);
    color: #fff;
    font-size: 21px;
    font-weight: 700;
    padding: 7px 24px;
    margin: 0 0 18px;
    position: relative;
}

.section-title span,
.section-title a {
    display: inline-block;
    background: #8b9caf;
    color: #fff;
    padding: 5px 58px;
    position: absolute;
    right: 0;
    top: 0;
}

.section-title a:hover {
    color: #fff;
    background: #6f7e8e;
}

/* Softer, inline variant used on the front page between grid blocks */

.section-title.section-title--inline {
    position: relative;
    background: none;
    height: auto;
    padding: 0;
    display: flex;
}

.section-title.section-title--inline::before {
    content: "";
    position: absolute;
    inset: 3px 0 3px;
    background: linear-gradient(to left, #ffffff, #dbe3eb, #9daebe);
    border-radius: 20px 0 0 20px;
    z-index: 0;
}

.section-title.section-title--inline span,
.section-title.section-title--inline a {
    position: relative;
    z-index: 1;
    background: #fff;
    color: #526b80;
    padding: 8px 25px;
    font-size: 21px;
    font-weight: bold;
}

/* =====================================================
   4. FRONT PAGE HERO (3 top stories)
   ===================================================== */

.hero-strip {
    margin: 12px 0 28px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: 275px;
    overflow: hidden;
    border-radius: 15px;
    gap: 0;
}

.hero-strip .hero-card {
    position: relative;
    overflow: hidden;
    background: #ddd;
}

.hero-strip .hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-strip .hero-card::after {
    content: "";
    position: absolute;
    inset: 35% 0 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, .82));
}

.hero-strip .hero-title {
    position: absolute;
    z-index: 2;
    bottom: 18px;
    left: 18px;
    right: 18px;
    color: #fff;
    font-size: 23px;
    line-height: 1.35;
    font-weight: bold;
    text-align: right;
    margin: 0;
}

.hero-strip .hero-title a {
    color: #fff;
}

.hero-strip .hero-title a:hover {
    color: #e5cf83;
}

/* =====================================================
   5. TWO-COLUMN CONTENT (front page + archive + single)
   ===================================================== */

.content-area {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 28px;
    direction: ltr;
    align-items: start;
}

.content-area .primary,
.content-area .widget-area {
    direction: rtl;
}

.content-area.content-area--wide {
    grid-template-columns: 350px 1fr;
}

/* =====================================================
   6. SIDEBAR BOXES
   ===================================================== */

.widget-area .ad-box {
    border: 1px solid #e34b4b;
    padding: 10px;
    margin-bottom: 38px;
    text-align: center;
}

.widget-area .ad-box .ad-image {
    height: 125px;
    border-radius: 3px;
    margin-bottom: 8px;
    background-size: cover;
    background-position: center;
    background-color: #eee;
}

.widget-area .ad-box .ad-title {
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5;
}

.widget-area .paper-box .paper-title {
    display: inline-block;
    background: #b18b32;
    color: #fff;
    padding: 8px 30px;
    font-weight: bold;
    margin-bottom: 10px;
    border-radius: 2px;
}

.widget-area .paper-box .newspaper {
    border: 5px solid #b18b32;
    border-radius: 15px;
    padding: 10px;
    overflow: hidden;
    display: block;
}

.widget-area .paper-box .newspaper img {
    width: 100%;
    display: block;
    border-radius: 6px;
}

.widget-area .side-box {
    border: 5px solid #b89735;
    border-radius: 14px;
    padding: 30px 25px 22px;
    position: relative;
    margin: 45px 0 70px;
    background: #fff;
}

.widget-area .side-box:first-child {
    margin-top: 10px;
}

.widget-area .side-box .side-label {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #b89735;
    color: #fff;
    padding: 7px 34px;
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
    clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%);
}

.widget-area .side-box img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.widget-area .side-box .more {
    position: absolute;
    bottom: -31px;
    left: 50%;
    transform: translateX(-50%);
    background: #b89735;
    color: #fff;
    padding: 7px 30px;
    border-radius: 0 0 8px 8px;
    font-weight: 700;
    font-size: 14px;
}

.widget-area .widget-title {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 800;
    color: #526b80;
}

/* =====================================================
   7. NEWS GRID / CARDS (front page + archive)
   ===================================================== */

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

.news-card,
.card {
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    min-width: 0;
}

.news-card .news-image,
.card img {
    width: 100%;
    height: 175px;
    object-fit: cover;
    display: block;
    background: #eee;
}

.news-card .news-body,
.card .body {
    padding: 12px 15px 17px;
}

.news-card .news-title,
.card h2 {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.45;
    margin: 0 0 8px;
}

.news-card .news-title a,
.card h2 a {
    color: #222;
}

.news-card .news-title a:hover,
.card h2 a:hover {
    color: #b18b32;
}

.news-card .news-summary,
.card p {
    font-size: 14px;
    line-height: 1.65;
    color: #555;
    margin: 0;
}

/* Archive/category grid uses a slightly taller image + tighter type */

.archive-grid .card img {
    height: 145px;
}

.archive-grid .card .body {
    padding: 9px 13px 14px;
}

.archive-grid .card h2 {
    font-size: 17px;
    line-height: 1.45;
    font-weight: 800;
}

.archive-grid .card p {
    font-size: 14px;
    line-height: 1.55;
    font-weight: 600;
    color: #777;
}

/* =====================================================
   8. ARTICLE HERO (archive listing lead story + single post header)
   ===================================================== */

.article-hero {
    display: grid;
    grid-template-columns: 1fr 375px;
    min-height: 320px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
    margin-bottom: 28px;
    background: #fff;
}

.article-hero .copy {
    padding: 20px 24px 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.article-hero h1,
.article-hero h2 {
    font-size: 25px;
    line-height: 1.5;
    margin: 0 0 10px;
    font-weight: 800;
}

.article-hero h1 a,
.article-hero h2 a {
    color: #222;
}

.article-hero p {
    font-size: 17px;
    line-height: 1.65;
    color: #777;
    margin: 0;
    font-weight: 600;
}

.article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #eee;
}

.article-hero.article-hero--single {
    grid-template-columns: 1fr;
    min-height: 0;
}

.article-hero.article-hero--single img {
    max-height: 460px;
}

.article-hero.article-hero--single .copy {
    padding: 24px 4px 4px;
}

.single .entry-meta {
    color: #8a8a8a;
    font-size: 14px;
    margin: 0 0 16px;
    font-weight: 600;
}

.single .entry-meta a {
    color: #526b80;
}

.single .entry-content {
    font-size: 17px;
    line-height: 1.9;
    color: #333;
}

.single .entry-content p {
    margin: 0 0 1.1em;
}

.single .entry-content img {
    border-radius: 8px;
    margin: 1em 0;
}

.entry-tags,
.entry-footer {
    margin: 30px 0 0;
    padding-top: 18px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #777;
}

/* =====================================================
   9. PAGINATION
   ===================================================== */

.pagination,
.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 24px 0 70px;
    direction: rtl;
    flex-wrap: wrap;
}

.pagination span,
.pagination a,
.nav-links span,
.nav-links a {
    background: #f2f2f2;
    border-radius: 5px;
    padding: 8px 12px;
    font-weight: 700;
    color: #222;
    min-width: 20px;
    text-align: center;
}

.pagination .current,
.nav-links .current {
    background: #2d5363;
    color: #fff;
}

.pagination a:hover,
.nav-links a:hover {
    background: #b89735;
    color: #fff;
}

/* =====================================================
   10. GENERIC PAGE CONTENT (page.php / index.php fallback)
   ===================================================== */

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

.page-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0;
}

.no-results {
    padding: 40px 0 70px;
    font-size: 17px;
    color: #555;
}

/* =====================================================
   11. FOOTER
   ===================================================== */

.site-footer {
    margin-top: 40px;
    padding: 25px;
    background: #2d5363;
    color: #fff;
    text-align: center;
}

.site-footer a {
    color: #e5cf83;
}

.site-footer .site-info {
    font-family: Georgia, serif;
    letter-spacing: 1px;
    font-size: 14px;
    direction: ltr;
}

.site-footer .footer-note {
    margin: 0 0 8px;
    font-size: 15px;
}

/* =====================================================
   12. RESPONSIVE
   ===================================================== */

@media (max-width: 1050px) {
    .content-area,
    .content-area.content-area--wide {
        grid-template-columns: 1fr;
    }

    .content-area .widget-area {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .widget-area .side-box {
        margin: 40px 0;
    }

    .article-hero {
        grid-template-columns: 1fr 40%;
    }

    .main-navigation ul {
        gap: 14px;
        font-size: 12px;
    }
}

@media (max-width: 900px) {
    .hero-strip {
        height: 230px;
    }

    .hero-strip .hero-title {
        font-size: 17px;
    }

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

@media (max-width: 700px) {
    .site-header {
        height: auto;
        min-height: 82px;
        padding: 10px 16px;
        flex-wrap: wrap;
    }

    .site-branding {
        order: -1;
    }

    .main-navigation {
        order: 2;
        width: 100%;
    }

    .main-navigation ul {
        overflow-x: auto;
        justify-content: flex-start;
        padding: 8px 0;
        gap: 18px;
    }

    .page {
        width: calc(100% - 20px);
    }

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

    .content-area .widget-area {
        grid-template-columns: 1fr;
    }

    .article-hero,
    .article-hero.article-hero--single {
        grid-template-columns: 1fr;
    }

    .article-hero img {
        height: 240px;
    }

    .hero-strip {
        grid-template-columns: 1fr;
        height: auto;
    }

    .hero-strip .hero-card {
        height: 210px;
    }

    .hero-strip .hero-card:not(:first-child) {
        display: none;
    }
}

/* =====================================================
   13. WORDPRESS CORE / ACCESSIBILITY DEFAULTS
   ===================================================== */

.alignleft {
    float: left;
    margin: 0 0 1em 1em;
}

.alignright {
    float: right;
    margin: 0 1em 1em 0;
}

.aligncenter {
    display: block;
    margin: 0 auto 1em;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 13px;
    color: #777;
    text-align: center;
    margin-top: 6px;
}

.bypostauthor {
    display: block;
}

.sticky {
    outline: 2px solid #b89735;
    outline-offset: 4px;
}
