/* ============================================================
   Dark Mode – html[data-theme="dark"]
   ============================================================ */

html[data-theme="dark"] {
    color-scheme: dark;
}

/* --- Base --- */
html[data-theme="dark"] body {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* --- Generic headings & links --- */
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6 {
    color: #e0e0e0;
}

html[data-theme="dark"] a {
    color: inherit;
}

/* ============================================================
   Header
   ============================================================ */
html[data-theme="dark"] header {
    background-color: #1c1c1c;
}

html[data-theme="dark"] .top-menu {
    border-bottom-color: #333;
}

html[data-theme="dark"] .social-top span {
    color: #a8a8a8;
}

html[data-theme="dark"] .search-btn {
    color: #e0e0e0;
}

html[data-theme="dark"] .search-btn:hover {
    color: #C52934;
}

/* Hamburger lines – desktop */
html[data-theme="dark"] .desktop-hamburger-line {
    background-color: #e0e0e0;
}

/* Bottom menu links */
html[data-theme="dark"] .bottom-menu li a,
html[data-theme="dark"] .bottom-menu li a:hover {
    color: #e0e0e0;
}

/* Bottom nav – main menu item links (#000 by default) */
html[data-theme="dark"] #menu-main-menu li a {
    color: #e0e0e0;
}

html[data-theme="dark"] #menu-main-menu li a:hover {
    background-color: #C52934;
    color: #fff;
}

html[data-theme="dark"] #menu-main-menu li.current-menu-item a {
    color: #C52934;
}

/* Bottom nav – dropdown sub-menus (#fff background by default) */
html[data-theme="dark"] #menu-main-menu ul.sub-menu {
    background-color: #242424;
    border-color: #444;
    column-rule-color: #444;
}

html[data-theme="dark"] #menu-main-menu ul.sub-menu li {
    border-bottom-color: #444;
}

html[data-theme="dark"] #menu-main-menu li:hover > ul.sub-menu a {
    color: #e0e0e0;
}

html[data-theme="dark"] #menu-main-menu li:hover > ul.sub-menu li:hover {
    background-color: rgba(197, 41, 52, 0.7);
}

/* Header search panel */
html[data-theme="dark"] .header-search-panel {
    background: #1c1c1c;
    border-bottom-color: #333;
}

html[data-theme="dark"] .header-search-form input[type="search"] {
    background: #2a2a2a;
    color: #e0e0e0;
    border-color: #444;
}

html[data-theme="dark"] .header-search-form input[type="search"]::placeholder {
    color: #888;
}

html[data-theme="dark"] .header-search-submit,
html[data-theme="dark"] .header-search-close {
    color: #e0e0e0;
}

/* Account dropdown */
html[data-theme="dark"] .header-account-dropdown summary {
    color: #e0e0e0;
}

html[data-theme="dark"] .header-account-dropdown__menu {
    background: #2a2a2a;
    border-color: #444;
}

html[data-theme="dark"] .header-account-dropdown__menu a {
    color: #e0e0e0;
}

html[data-theme="dark"] .header-account-dropdown__menu a:hover {
    background: #333;
    color: #C52934;
}

/* Desktop sidebar drawer */
html[data-theme="dark"] #desktop-sidebar {
    background: #1c1c1c;
    border-color: #333;
}

html[data-theme="dark"] #desktop-sidebar li a {
    color: #e0e0e0;
}

html[data-theme="dark"] #desktop-sidebar li a:hover {
    color: #C52934;
}

html[data-theme="dark"] #desktop-sidebar .sub-menu li a {
    color: #c0c0c0;
}

html[data-theme="dark"] .desktop-sidebar-close {
    color: #e0e0e0;
}

/* ============================================================
   Mobile header
   ============================================================ */
html[data-theme="dark"] header#mobile {
    background-color: #1c1c1c;
}

html[data-theme="dark"] header#mobile .navbar {
    background-color: #1c1c1c;
}

/* The top bar strip – has its own explicit bg in the media query */
html[data-theme="dark"] header#mobile .navbar .container {
    background-color: #1c1c1c;
}

/* Hamburger lines – original color is #0e2431 (very dark navy) */
html[data-theme="dark"] header#mobile .nav-container .hamburger-lines .line {
    background-color: #e0e0e0;
}

/* Slide-out menu panel */
html[data-theme="dark"] header#mobile .navbar .menu-items {
    background-color: #1c1c1c;
}

/* Social icons strip inside the menu */
html[data-theme="dark"] header#mobile .social-top {
    border-bottom-color: #333;
}

html[data-theme="dark"] header#mobile .social-top i {
    color: #C52934;
}

/* Search button */
html[data-theme="dark"] header#mobile .search-btn {
    background-color: #333;
}

html[data-theme="dark"] header#mobile .search-btn i {
    color: #e0e0e0;
}

/* Menu links */
html[data-theme="dark"] header#mobile .menu-items li a {
    color: #e0e0e0;
}

html[data-theme="dark"] header#mobile .menu-items li a:hover {
    color: #C52934;
}

/* Mobile logo shadow – reduce glow on dark bg */
html[data-theme="dark"] header#mobile .menu-items .menu-mobile-logo {
    box-shadow: 0px 3px 10px -6px rgba(0, 0, 0, 0.8);
}

/* ============================================================
   Banner / Hero section
   ============================================================ */
html[data-theme="dark"] .banner-latest-news {
    background: #242424;
    border-left-color: #444;
}

html[data-theme="dark"] .banner-latest-title {
    color: #e0e0e0;
}

html[data-theme="dark"] .banner-latest-headline {
    color: #e0e0e0;
}

html[data-theme="dark"] .banner-latest-item {
    border-bottom-color: #333;
}

html[data-theme="dark"] .banner-latest-time {
    color: #888;
}

/* ============================================================
   News sections (Coimbra, Figueira, etc.)
   ============================================================ */
html[data-theme="dark"] .lastestnews h3,
html[data-theme="dark"] #last-news h3 {
    color: #e0e0e0;
}

html[data-theme="dark"] .lastestnews h4 {
    color: #e0e0e0;
}

html[data-theme="dark"] .lastestnews .data-meta,
html[data-theme="dark"] .lastestnews .comments-meta {
    color: #888;
}

html[data-theme="dark"] .news-block-2 {
    border-color: #333;
    background-color: #242424;
}

html[data-theme="dark"] .news-block-2 .details {
    background-color: #242424;
}

html[data-theme="dark"] .coimbra-ad-slide {
    background: #2a2a2a;
    border-color: #333;
}

html[data-theme="dark"] .coimbra-ad-label {
    color: #666;
}

/* Last news (grey background section) */
html[data-theme="dark"] #last-news {
    background-color: #202020;
}

/* Opinion section image placeholder */
html[data-theme="dark"] .opiniao-section .news-block-image {
    background-color: #2a2a2a;
}

/* ============================================================
   Digital edition image panel (inline background override)
   ============================================================ */
html[data-theme="dark"] .banner-latest-slide a[style*="background"] {
    background: #242424 !important;
}

/* ============================================================
   Paywall
   ============================================================ */
html[data-theme="dark"] .critec-paywall {
    background: linear-gradient(180deg, #242424 0%, #1e1e1e 100%);
    border-color: #3a3a3a;
}

html[data-theme="dark"] .critec-paywall h4,
html[data-theme="dark"] .critec-paywall p {
    color: #e0e0e0;
}

html[data-theme="dark"] .critec-paywall__card {
    background: #2a2a2a;
    border-color: #3a3a3a;
}

html[data-theme="dark"] .critec-paywall__card h5 {
    color: #e0e0e0;
}

html[data-theme="dark"] .critec-paywall__plan-toggle {
    background: #1e1e1e;
    border-color: #444;
}

html[data-theme="dark"] .critec-paywall__plan-toggle-btn {
    color: #c0c0c0;
}

html[data-theme="dark"] .critec-paywall__plan-toggle-btn.is-active {
    background: #c52934;
    color: #fff;
}

html[data-theme="dark"] .critec-paywall__btn--outline {
    background: transparent;
    color: #c52934;
    border-color: #c52934;
}

html[data-theme="dark"] .critec-paywall__btn--outline:hover {
    background: #c52934;
    color: #fff;
}

html[data-theme="dark"] .critec-paywall__btn--disabled {
    background: #333;
    border-color: #333;
    color: #666;
}

html[data-theme="dark"] .critec-paywall__savings {
    color: #4ade80;
}

html[data-theme="dark"] .critec-paywall__register-hint {
    color: #a0a0a0;
}

html[data-theme="dark"] .critec-paywall__register-hint a {
    color: #e0e0e0;
}

/* ============================================================
   Comment form
   ============================================================ */
html[data-theme="dark"] #commentform {
    background-color: #242424;
}

html[data-theme="dark"] #commentform label,
html[data-theme="dark"] #commentform p {
    color: #e0e0e0;
}

html[data-theme="dark"] #commentform input:not([type="submit"]):not([type="checkbox"]),
html[data-theme="dark"] #commentform textarea {
    background-color: #1a1a1a;
    color: #e0e0e0;
    border: 1px solid #444;
}

html[data-theme="dark"] #commentform input::placeholder,
html[data-theme="dark"] #commentform textarea::placeholder {
    color: #666;
}

html[data-theme="dark"] #commentform .comment-form-cookies-consent label {
    color: #c0c0c0;
}

html[data-theme="dark"] ol.commentlist li {
    border-color: #333;
    background-color: #242424;
}

html[data-theme="dark"] .comment-author cite {
    color: #e0e0e0;
}

html[data-theme="dark"] .comment-body p {
    color: #c0c0c0;
}

html[data-theme="dark"] .comment-body .comment-meta a {
    color: #888;
}

/* ============================================================
   Sidebar
   ============================================================ */
html[data-theme="dark"] #last-news-sidebar {
    border-color: #333;
    background-color: #242424;
}

html[data-theme="dark"] #last-news-sidebar h3 {
    color: #e0e0e0;
}

html[data-theme="dark"] #last-news-sidebar .news-sidebar h4 {
    color: #e0e0e0;
}

html[data-theme="dark"] #last-news-sidebar .news-sidebar .data-meta {
    color: #888;
}

/* ============================================================
   Banner ad slider dots
   ============================================================ */
html[data-theme="dark"] .dot {
    background-color: #555;
}

html[data-theme="dark"] .dot.active {
    background-color: #e0e0e0;
}

html[data-theme="dark"] .prev-btn,
html[data-theme="dark"] .next-btn {
    color: #e0e0e0;
}

/* ============================================================
   Logo swap (light/dark variants)
   ============================================================ */
.logo-dark {
    display: none;
}

html[data-theme="dark"] .logo-light {
    display: none;
}

html[data-theme="dark"] .logo-dark {
    display: inline-block;
}

/* ============================================================
   Dark mode toggle button
   ============================================================ */
.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    color: #333;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.dark-mode-toggle:hover {
    color: #C52934;
}

html[data-theme="dark"] .dark-mode-toggle {
    color: #e0e0e0;
}

html[data-theme="dark"] .dark-mode-toggle:hover {
    color: #C52934;
}
