/* ============================================
   Basilio Noticias - Main Styles
   Estilo Listín Diario
   ============================================ */

:root {
    --primary: #d32f2f;
    --primary-dark: #b71c1c;
    --dark: #1a1a2e;
    --text: #333;
    --text-light: #666;
    --border: #e0e0e0;
    --bg-light: #f8f9fa;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --font-display: 'Alfa Slab One', serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg-light);
    margin: 0;
}

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

/* ---- Header ---- */
.header-top {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.site-logo .logo-text {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--primary);
    letter-spacing: -1px;
}

.header-search .input-group { max-width: 350px; }
.header-search .form-control { border-radius: 20px 0 0 20px; border-right: 0; }
.header-search .btn { border-radius: 0 20px 20px 0; }

/* ---- Navigation ---- */
.main-nav {
    background: var(--dark);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
}

.nav-item-link {
    display: block;
    color: #fff;
    padding: 12px 16px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
    border-bottom: 3px solid transparent;
}

.nav-item-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-bottom-color: var(--cat-color, var(--primary));
}

/* ---- Breaking News Ticker ---- */
.breaking-ticker {
    background: var(--primary);
    padding: 8px 0;
    overflow: hidden;
}

.breaking-label {
    background: #fff;
    color: var(--primary);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.75rem;
    padding: 4px 12px;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 3px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.ticker-wrap {
    overflow: hidden;
    flex: 1;
    margin-left: 15px;
}

.ticker-content {
    display: flex;
    animation: ticker-scroll 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    color: #fff;
    font-size: 0.9rem;
    padding: 0 30px;
    flex-shrink: 0;
}

.ticker-item:hover { color: rgba(255,255,255,0.8); }

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ---- Hero Section ---- */
.hero-main {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    min-height: 400px;
}

.hero-image-link {
    display: block;
    height: 100%;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 400px;
}

.hero-placeholder {
    width: 100%;
    height: 100%;
    min-height: 400px;
    background: linear-gradient(135deg, var(--dark), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #fff;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 10px 0;
}

.hero-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.hero-meta {
    font-size: 0.85rem;
    opacity: 0.7;
    display: flex;
    gap: 15px;
}

.hero-secondary {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.hero-secondary:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

.hero-secondary-image {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
}

.hero-secondary-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px 0 0 8px;
}

.hero-secondary-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 5px 0;
}

.hero-secondary-title a { color: var(--text); }
.hero-secondary-title a:hover { color: var(--primary); }

/* ---- Section Headers ---- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 5px solid var(--section-color, var(--primary));
    padding-left: 12px;
    margin-bottom: 20px;
    border-bottom: none;
    padding-bottom: 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0;
    color: var(--text);
}

.section-more {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--section-color, var(--primary));
}

/* ---- Article Cards ---- */
.article-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.article-card-image {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

.article-card-placeholder {
    width: 100%;
    height: 100%;
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, #eee, #ddd);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 2rem;
}

.article-card-placeholder.small { font-size: 1rem; }

.article-card-body {
    padding: 15px;
}

.category-badge {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.category-badge.small { font-size: 0.65rem; padding: 2px 6px; }

.article-card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 8px 0;
}

.article-card-title a { color: var(--text); }
.article-card-title a:hover { color: var(--primary); }

.article-card-excerpt {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 10px;
}

.article-card-meta {
    font-size: 0.75rem;
    color: #999;
    display: flex;
    gap: 12px;
}

/* ---- Article Single ---- */
.article-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1.15;
    margin: 10px 0 5px;
}

.article-subtitle {
    font-size: 1.15rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 15px;
}

.article-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

.article-body p { margin-bottom: 1.2em; }
.article-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 15px 0; }
.article-body h2, .article-body h3 { font-family: var(--font-heading); margin-top: 1.5em; }
.article-body blockquote {
    border-left: 4px solid var(--primary);
    padding: 15px 20px;
    margin: 20px 0;
    background: var(--bg-light);
    font-style: italic;
}

.share-buttons .btn { border-radius: 20px; font-size: 0.8rem; }

/* ---- Sidebar ---- */
.sidebar-widget {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.widget-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary);
}

.most-read-number {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1;
    flex-shrink: 0;
    width: 30px;
}
.most-read-number.top-3 { color: var(--primary); }
.most-read-number.top-6 { color: var(--primary-dark); }
.most-read-number.top-10 { color: #999; }
.most-read-item { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.most-read-item:last-child { border-bottom: none; padding-bottom: 0; }

.newsletter-widget {
    background: var(--dark);
    color: #fff;
}

.newsletter-widget .widget-title { color: #fff; border-color: var(--primary); }

/* ---- Ad Slots ---- */
.ad-slot { text-align: center; margin: 10px 0; }
.ad-media { width: 100%; display: block; }
.ad-video-link { position: relative; display: block; }
.ad-play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 2.5rem; color: rgba(255,255,255,0.8); pointer-events: none; }
.ad-close-btn {
    position: absolute; top: 4px; right: 4px;
    background: rgba(0,0,0,0.7); color: #fff; border: none; border-radius: 50%;
    width: 26px; height: 26px; font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 5; transition: 0.2s;
}
.ad-close-btn:hover { background: #d32f2f; transform: scale(1.1); }
.ad-label {
    display: block; text-align: center;
    font-size: 0.6rem; color: #999; text-transform: uppercase;
    letter-spacing: 1px; padding: 4px 0; background: #fff;
}

/* ---- Lateral Ads (fixed sides) ---- */
.ad-lateral {
    position: fixed; top: 50%; transform: translateY(-50%);
    z-index: 1040; max-width: 160px;
    background: #fff; border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden; display: none;
}
.ad-lateral .ad-media { width: 160px; }
.ad-lateral-left { left: 10px; animation: adSlideLeft 0.4s ease-out; }
.ad-lateral-right { right: 10px; animation: adSlideRight 0.4s ease-out; }
@keyframes adSlideLeft {
    from { opacity: 0; transform: translateY(-50%) translateX(-30px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}
@keyframes adSlideRight {
    from { opacity: 0; transform: translateY(-50%) translateX(30px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* ---- Overlay/Popup Ads ---- */
.ad-overlay {
    position: fixed; inset: 0; z-index: 2500;
    background: rgba(0,0,0,0.6); display: none;
    align-items: center; justify-content: center;
}
.ad-overlay.show { display: flex; animation: adFadeIn 0.3s ease-out; }
.ad-overlay-content {
    position: relative; background: #fff; border-radius: 12px;
    overflow: hidden; max-width: 550px; width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: adPopIn 0.3s ease-out;
}
.ad-overlay-content .ad-close-btn { width: 32px; height: 32px; font-size: 20px; top: 8px; right: 8px; }
.ad-exit-header {
    text-align: center; padding: 15px 20px 5px;
    font-size: 1.1rem; font-weight: 700; color: var(--primary);
}
@keyframes adFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes adPopIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

/* ---- YouTube Live Widget ---- */
.yt-live-widget {
    position: fixed; bottom: 20px; left: 20px; z-index: 1050;
    width: 320px; background: #000; border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4); overflow: hidden;
    animation: adSlideLeft 0.5s ease-out;
}
.yt-live-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px; background: #1a1a2e; color: #fff;
    font-size: 0.8rem; font-weight: 700;
}
.yt-live-controls { display: flex; gap: 6px; }
.yt-live-btn {
    background: rgba(255,255,255,0.15); border: none; color: #fff;
    cursor: pointer; font-size: 0.8rem; border-radius: 4px;
    width: 28px; height: 28px; display: flex; align-items: center;
    justify-content: center; transition: 0.2s;
}
.yt-live-btn:hover { background: var(--primary); }
.yt-live-body { transition: max-height 0.3s ease; max-height: 200px; overflow: hidden; }
.yt-live-body.collapsed { max-height: 0; }
.yt-live-body iframe { width: 100%; height: 180px; display: block; }

/* YT Live Expanded Modal */
.yt-live-modal {
    position: fixed; inset: 0; z-index: 3500;
    background: rgba(0,0,0,0.85); display: none;
    align-items: center; justify-content: center;
}
.yt-live-modal.show { display: flex; animation: adFadeIn 0.3s ease-out; }
.yt-live-modal-content {
    width: 90vw; max-width: 960px; background: #000;
    border-radius: 12px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.yt-live-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 15px; background: #1a1a2e; color: #fff;
    font-size: 0.9rem; font-weight: 700;
}
.yt-live-modal-content iframe {
    width: 100%; height: 540px; display: block;
}

/* Dark mode ads */
body.dark-mode .ad-lateral { background: #1e1e30; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
body.dark-mode .ad-label { background: #1e1e30; color: #555; }
body.dark-mode .ad-overlay-content { background: #1e1e30; }
body.dark-mode .ad-exit-header { color: #ff6b6b; }

/* ---- Footer ---- */
.site-footer {
    background: var(--dark);
    color: #aaa;
    margin-top: 40px;
}

.footer-brand {
    font-family: var(--font-display);
    color: #fff;
    font-size: 1.5rem;
}

.footer-social { display: flex; gap: 10px; margin-top: 15px; }
.footer-social a {
    color: #aaa;
    font-size: 1.1rem;
    width: 35px;
    height: 35px;
    border: 1px solid #555;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.footer-social a:hover { color: #fff; border-color: var(--primary); background: var(--primary); }

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #aaa; font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }

/* ---- Comments ---- */
.comment-item { border-left: 3px solid var(--primary); }

/* ---- Misc ---- */
.breadcrumb-item a { color: var(--primary); }
.pagination .page-link { color: var(--primary); }
.pagination .active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---- 1.4 Back to Top ---- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 1050;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ---- 1.5 Reading Progress Bar ---- */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    z-index: 1100;
    width: 0;
    transition: width 0.1s linear;
}

/* ---- 1.6 Reading Time ---- */
.reading-time { color: var(--text-light); }

/* ---- 1.9 Cookie Banner ---- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark);
    color: #ccc;
    padding: 15px 0;
    z-index: 1100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}
.cookie-banner p { margin: 0; font-size: 0.9rem; }
.cookie-banner .btn { white-space: nowrap; }

/* ---- 1.10 Author Box ---- */
.author-box {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}
.author-box-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.author-box-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 5px;
}
.author-box-bio { font-size: 0.9rem; color: var(--text-light); margin: 0; }

/* ---- 1.11 Responsive Video ---- */
.article-body iframe {
    max-width: 100%;
    aspect-ratio: 16/9;
    border: none;
    border-radius: 6px;
}

/* ---- 1.12 Pull Quotes & Info Boxes ---- */
.pullquote {
    font-size: 1.4rem;
    font-style: italic;
    font-family: var(--font-heading);
    color: var(--text);
    border-top: 3px solid var(--primary);
    border-bottom: 3px solid var(--primary);
    padding: 20px 0;
    margin: 30px 0;
    text-align: center;
    line-height: 1.6;
}
.infobox {
    background: #e3f2fd;
    border-left: 4px solid #1976d2;
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
    font-size: 0.95rem;
}
.infobox::before {
    content: '\f05a';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 8px;
    color: #1976d2;
}

/* ---- 1.7 Print & Copy Buttons ---- */
.article-tools .btn { border-radius: 20px; font-size: 0.8rem; }

/* ---- 2.1 Dark Mode ---- */
body.dark-mode {
    --bg-light: #1a1a2e;
    --text: #e0e0e0;
    --text-light: #aaa;
    --border: #333;
    background: #121212;
    color: #e0e0e0;
}
body.dark-mode .header-top { background: #1a1a2e; border-color: #333; }
body.dark-mode .header-brand { background: #1a1a2e !important; }
body.dark-mode .site-logo .logo-text { color: #fff; }
body.dark-mode .article-card { background: #1e1e30; }
body.dark-mode .article-card-title a { color: #e0e0e0; }
body.dark-mode .sidebar-widget { background: #1e1e30; }
body.dark-mode .widget-title { color: #e0e0e0; }
body.dark-mode .hero-secondary { background: #1e1e30; }
body.dark-mode .hero-secondary-title a { color: #e0e0e0; }
body.dark-mode .form-control { background: #2a2a3e; border-color: #444; color: #e0e0e0; }
body.dark-mode .form-control::placeholder { color: #888; }
body.dark-mode .article-body { color: #d0d0d0; }
body.dark-mode .comment-item { background: #1e1e30 !important; }
body.dark-mode .breadcrumb-item { color: #aaa; }
body.dark-mode .breadcrumb-item.active { color: #888; }
body.dark-mode .author-box { background: #1e1e30; }
body.dark-mode .article-body blockquote { background: #1e1e30; }
body.dark-mode .badge.bg-light { background: #2a2a3e !important; color: #e0e0e0 !important; }
body.dark-mode .most-read-item { border-color: #333; }
body.dark-mode .text-dark { color: #e0e0e0 !important; }
body.dark-mode .text-muted { color: #888 !important; }
body.dark-mode .bg-light { background-color: #1e1e30 !important; }

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: none;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #666;
    transition: 0.2s;
}
.dark-mode-toggle:hover { border-color: var(--primary); color: var(--primary); }
body.dark-mode .dark-mode-toggle { color: #ffc107; border-color: #ffc107; }

/* ---- 2.2 Font Size Controls ---- */
.font-controls .btn {
    padding: 2px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: transparent;
    color: #666;
    cursor: pointer;
}
.font-controls .btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
body.font-small .article-body { font-size: 0.95rem; }
body.font-large .article-body { font-size: 1.2rem; line-height: 1.9; }

/* ---- 2.3 Trending Tags Strip ---- */
.trending-strip {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    overflow: hidden;
}
body.dark-mode .trending-strip { background: #1e1e30; border-color: #333; }
.trending-tags {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: 0 5px;
}
.trending-tags::-webkit-scrollbar { display: none; }
.trending-tag {
    scroll-snap-align: start;
    flex-shrink: 0;
    padding: 4px 14px;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: 0.2s;
    white-space: nowrap;
}
.trending-tag:hover { background: var(--primary); color: #fff; }
.trending-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    flex-shrink: 0;
    margin-right: 5px;
}

/* ---- 2.4 Weather Widget ---- */
.weather-widget {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}
body.dark-mode .weather-widget { color: #aaa; }

/* ---- 2.5 Newsletter Popup ---- */
.newsletter-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}
.newsletter-popup-overlay.show { display: flex; }
.newsletter-popup {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
body.dark-mode .newsletter-popup { background: #1e1e30; color: #e0e0e0; }
.newsletter-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}
.newsletter-popup h3 {
    font-family: var(--font-heading);
    margin-bottom: 10px;
}

/* ---- 2.6 Lightbox ---- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.lightbox-overlay.show { display: flex; }
.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

/* ---- 3.1 Footer Expanded ---- */
.footer-section-title {
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}
.footer-contact-info { list-style: none; padding: 0; margin: 0; }
.footer-contact-info li { margin-bottom: 8px; color: #aaa; font-size: 0.9rem; }
.footer-contact-info i { width: 20px; color: var(--primary); }

/* ---- 3.2 Opinion Section ---- */
.opinion-card {
    text-align: center;
    padding: 20px 10px;
}
.opinion-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    margin-bottom: 10px;
}
.opinion-author {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 5px;
}
.opinion-title {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
}
.opinion-title a { color: var(--text); }
.opinion-title a:hover { color: var(--primary); }

/* ---- 3.3 Breaking Stories Strip ---- */
.breaking-stories {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    display: flex;
    gap: 15px;
    padding: 10px 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.breaking-stories::-webkit-scrollbar { display: none; }
.breaking-story-card {
    scroll-snap-align: start;
    flex-shrink: 0;
    width: 220px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}
body.dark-mode .breaking-story-card { background: #1e1e30; }
.breaking-story-card:hover { transform: translateY(-2px); }
.breaking-story-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}
.breaking-story-card .card-body {
    padding: 10px;
}
.breaking-story-card .card-title {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}
.breaking-story-card .card-title a { color: var(--text); }
.breaking-story-card .card-title a:hover { color: var(--primary); }

/* ---- Toast notification ---- */
.toast-notification {
    position: fixed;
    bottom: 80px;
    right: 30px;
    background: var(--dark);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 3000;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.toast-notification.show { opacity: 1; transform: translateY(0); }

/* ---- 4.5 Author Page ---- */
.author-profile {
    text-align: center;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
body.dark-mode .author-profile { background: #1e1e30; }
.author-profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    margin-bottom: 15px;
}

/* ---- 4.6 Autocomplete ---- */
.search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 1050;
    display: none;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
body.dark-mode .search-autocomplete { background: #1e1e30; border-color: #333; }
.search-autocomplete.show { display: block; }
.search-autocomplete-item {
    padding: 10px 15px;
    font-size: 0.9rem;
    color: var(--text);
    text-decoration: none;
    display: block;
    border-bottom: 1px solid var(--border);
}
.search-autocomplete-item:hover { background: var(--bg-light); color: var(--primary); }
.search-autocomplete-item:last-child { border-bottom: none; }

/* ---- 2.3 Skip to Content ---- */
.skip-to-content {
    position: fixed;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    z-index: 9999;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    font-weight: 600;
    transition: top 0.2s;
}
.skip-to-content:focus {
    top: 0;
    color: #fff;
}

/* ---- 1.7 Mobile Search ---- */
.mobile-search {
    display: none;
    padding: 10px 15px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}
body.dark-mode .mobile-search { background: #1e1e30; border-color: #333; }

/* ---- 2.5 Mobile share button ---- */
.btn-mobile-share { display: none; }
.btn-print-only { display: inline-block; }

/* ---- 4.1 Comment threading ---- */
.comment-child { margin-left: 40px; border-left: 3px solid var(--border); }
body.dark-mode .comment-child { background: #2a2a3e !important; }

/* ---- 4.6 Breaking stories: improved touch ---- */
.breaking-stories {
    -webkit-overflow-scrolling: touch;
    position: relative;
}
.breaking-stories::before,
.breaking-stories::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    z-index: 1;
    pointer-events: none;
}
.breaking-stories::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-light), transparent);
}
.breaking-stories::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-light), transparent);
}
body.dark-mode .breaking-stories::before { background: linear-gradient(to right, #121212, transparent); }
body.dark-mode .breaking-stories::after { background: linear-gradient(to left, #121212, transparent); }
