/*
Theme Name: Navid Newspaper
Theme URI: https://wpmatcha.com/wordpress-themes/navid/
Author: WP Matcha
Author URI: https://wpmatcha.com
Description: Navid Newspaper is a classic, editorial child theme for Navid. Designed specifically for publishers, journalists, and news portals, it features a traditional newspaper grid layout, classic serif typography, and sharp structural borders for a premium reading experience.
Template: navid
Version: 1.0.3
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: navid-newspaper
Tags: blog, news, grid-layout, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, theme-options, translation-ready
*/

/* ==========================================================================
   Editorial Overrides for Navid News
   ========================================================================== */

/* Classic Single Border for Header and Topbar */
.site-header {
    border-bottom: 1px solid var(--border);
    border-top: 1px solid var(--border);
}

.top-bar {
    border-bottom: none;
}

/* Editorial Borders for the Newspaper Grid */
.hero-newspaper-grid {
    border-top: none !important;
    border-bottom: 3px double var(--border) !important;
}



body:not(.dark-mode) {
    background-color: #faf9f7;
    /* Slight off-white paper texture feel */
}

/* Ensure sharp corners for all images by default */
.post-thumbnail,
.post-card,
.bento-item,
.category-card,
.wp-block-image img,
.entry-content img,
.woocommerce-product-gallery__image img,
.hero-ticker-thumb img {
    border-radius: 0 !important;
}

/* Editorial Double Borders for Images */
.category-card {
    border: 3px double var(--border) !important;
    box-sizing: border-box;
}

/* Apply border to wrappers, NOT the image directly, for clean inner-zoom without clipping */
.post-card-img-wrap,
.newspaper-img-wrapper {
    padding: 0 !important;
    border: 3px double var(--border) !important;
    box-sizing: border-box;
    border-radius: 0 !important;
}

.post-card-img-wrap img,
.newspaper-img-wrapper img {
    border: none !important;
}

/* Remove post-card-body padding in list posts layouts specifically for the child theme */
.feed-layout-list .post-card-body,
.feed-layout-newspaper .post-card-body {
    padding: 0 !important;
}

/* Newspaper Grid Typography Tweaks */
.newspaper-excerpt {
    font-family: var(--font-serif);
    color: var(--charcoal);
    text-align: center;
}

.newspaper-title-large em {
    font-style: italic;
    font-weight: 500;
    color: var(--charcoal);
}

/* Disable problematic drop-cap by default in child theme */
.newspaper-excerpt::first-letter {
    float: none;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
}

/* Fix double underline issue on newspaper titles and apply animated primary color on hover */
.newspaper-title-large a,
.newspaper-title-small a {
    text-decoration: none !important;
    background-image: linear-gradient(transparent calc(100% - 2px), var(--terracotta) 2px) !important;
    background-size: 0% 100% !important;
    background-repeat: no-repeat !important;
    transition: background-size 0.4s cubic-bezier(0.25, 1, 0.5, 1), color 0.4s ease !important;
}

.newspaper-title-large a:hover,
.newspaper-title-small a:hover {
    color: var(--terracotta) !important;
    background-size: 100% 100% !important;
}

/* ==========================================================================
   Breaking News Top Ticker
   ========================================================================== */

.breaking-news-ticker-wrap {
    background-color: #1a1a1a;
    /* Hardcoded dark instead of --charcoal to prevent inverting in dark mode */
    color: #fff;
    font-family: var(--font-sans);
    font-size: 13px;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.breaking-news-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 40px);
    display: flex;
    align-items: stretch;
    height: 40px;
    position: relative;
}

/* Ensure all core containers in child theme align perfectly with parent theme container padding */
.top-bar-inner,
.hero-newspaper-wrapper {
    padding-left: clamp(20px, 4vw, 40px) !important;
    padding-right: clamp(20px, 4vw, 40px) !important;
}

.breaking-news-label {
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
    white-space: nowrap;
    padding-right: 20px;
}

/* Minimal sleek blinking dot */
.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: var(--terracotta);
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    box-shadow: 0 0 0 0 rgba(217, 48, 37, 0.7);
    animation: pulseRed 2s infinite;
}

@keyframes pulseRed {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(217, 48, 37, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(217, 48, 37, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(217, 48, 37, 0);
    }
}

.breaking-news-content {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 20px;
}

.breaking-news-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    animation: breakingMarquee 120s linear infinite;
    width: max-content;
}

.breaking-news-list:hover {
    animation-play-state: paused;
}

.breaking-news-list li {
    display: inline-flex;
    align-items: center;
    padding: 0 25px;
    position: relative;
}

.breaking-news-list li::after {
    content: "—";
    position: absolute;
    right: -5px;
    color: rgba(255, 255, 255, 0.15);
}

.breaking-news-list li:last-child::after {
    display: none;
}

.breaking-news-list li a {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-family: var(--font-serif);
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0;
    transition: color 0.3s ease;
}

.breaking-thumb {
    display: inline-flex;
    margin-right: 12px;
    border-radius: 50%;
    overflow: hidden;
    width: 24px;
    height: 24px;
}

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

.breaking-news-list li a:hover {
    color: var(--terracotta);
    text-decoration: none;
}

@keyframes breakingMarquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .breaking-news-label {
        font-size: 11px;
        padding-right: 10px;
    }

    .breaking-news-content {
        padding-left: 10px;
    }
}

/* ==========================================================================
   Stacked Header Layout (Native to Child Theme)
   ========================================================================== */
body.header-layout-stacked .site-header {
    padding: 30px 0 0 0;
}

body.header-layout-stacked .header-inner {
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    position: relative;
    width: 100%;
}

body.header-layout-stacked .header-inner>.logo-wrapper {
    margin: 0 auto;
    text-align: center;
    width: 100%;
}

body.header-layout-stacked .header-inner .logo {
    display: inline-flex;
    justify-content: center;
    margin: 0 auto;
    max-width: 100%;
}

body.header-layout-stacked .header-inner>nav {
    width: 100%;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode.header-layout-stacked .header-inner>nav {
    border-color: rgba(255, 255, 255, 0.05);
}

body.header-layout-stacked .nav-menu {
    justify-content: center;
}

body.header-layout-stacked .header-inner>.js-search-toggle {
    position: absolute;
    top: 5px;
    left: clamp(20px, 4vw, 40px);
    z-index: 100;
}

body.header-layout-stacked .header-actions {
    position: absolute;
    top: 5px;
    right: clamp(20px, 4vw, 40px);
    left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 100;
}

@media (max-width: 991px) {
    body.header-layout-stacked .site-header {
        padding: 20px 0;
    }

    body.header-layout-stacked .header-inner {
        flex-direction: row;
        justify-content: space-between;
    }

    body.header-layout-stacked .header-inner>.js-search-toggle {
        position: static;
        order: -1;
    }

    body.header-layout-stacked .header-actions {
        position: static;
        left: auto;
        right: auto;
    }
}