/*
Theme Name: Manual Crisis WP
Theme URI: https://manual.preppercircle.com/
Author: Baxahaun Venture Studio
Author URI: https://baxahaun.com/
Description: Tema personalizado para el Manual de PreparaciÃ³n ante Crisis en EspaÃ±a.
Version: 1.4.4
Date: 2025-08-24
License: Copyright (c) 2025 Baxahaun Venture Studio
License URI: https://baxahaun.com/
Text Domain: manual-crisis-wp
Tags: manual, crisis, preparacion, emergencia, proteccion civil, espaÃ±a, accesible, pwa, bootstrap
PEV_REF: WIDGETS-ICON-FIXED-FINAL-20250824
*/

/* ================================================================
   1. IMPORTACIÃ"N DE FUENTES LOCALES
   ================================================================ */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('./assets/vendor/google-fonts/roboto-v47-latin-300.woff2') format('woff2');
  }
  @font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./assets/vendor/google-fonts/roboto-v47-latin-regular.woff2') format('woff2');
  }
  @font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('./assets/vendor/google-fonts/roboto-v47-latin-500.woff2') format('woff2');
  }
  @font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('./assets/vendor/google-fonts/roboto-v47-latin-700.woff2') format('woff2');
  }
  @font-face {
    font-family: 'Roboto Slab';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./assets/vendor/google-fonts/roboto-slab-v34-latin-regular.woff2') format('woff2');
  }
  @font-face {
    font-family: 'Roboto Slab';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('./assets/vendor/google-fonts/roboto-slab-v34-latin-600.woff2') format('woff2');
  }
  @font-face {
    font-family: 'Roboto Slab';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('./assets/vendor/google-fonts/roboto-slab-v34-latin-700.woff2') format('woff2');
  }

/* ================================================================
        2. VARIABLES CSS (GUÃA DE ESTILOS PREPPERCIRCLE - OFICIAL)
        ================================================================ */

:root {
      --pc-barn-red: #780000;
      --pc-fire-brick: #c1121f;
      --pc-papaya-whip: #fdf0d5;
      --pc-prussian-blue: #003049;
      --pc-air-superiority-blue: #669bbc;
      --pc-eerie-black: #1f1f1f;
      --pc-platinum: #e0e0e0;
      --alert-red-primary: var(--pc-fire-brick);
      --alert-red-secondary: var(--pc-barn-red);
      /* R: Cambiado el color primario a un azul mÃ¡s oscuro para cumplir con el ratio de contraste WCAG AA. | Q/L: Lighthouse Report */
      --bs-primary: #005f8d;
      --bs-primary-rgb: 0, 95, 141;
      --bs-secondary: var(--pc-prussian-blue);
      --bs-secondary-rgb: 0, 48, 73;
      --pc-accent: var(--pc-fire-brick);
      --bs-danger: var(--pc-fire-brick);
      --bs-danger-rgb: 193, 18, 31;
      --bs-light: #f8f9fa;
      --bs-light-rgb: 248, 249, 250;
      --bs-dark: var(--pc-eerie-black);
      --bs-dark-rgb: 31, 31, 31;
      --bs-white: #fff;
      --bs-black: #000;
      --bs-alert-color: var(--bs-danger);
      --bs-alert-bg: rgba(var(--bs-danger-rgb), 0.1);
      --bs-alert-border-color: rgba(var(--bs-danger-rgb), 0.2);
      --bs-body-color: var(--pc-prussian-blue);
      --bs-body-bg: var(--pc-platinum);
      --bs-body-bg-rgb: 224, 224, 224;
      --bs-secondary-color: rgba(var(--bs-secondary-rgb), 0.75);
      --bs-tertiary-color: rgba(var(--bs-secondary-rgb), 0.5);
      --bs-emphasis-color: var(--pc-barn-red);
      --bs-body-color-rgb: 0, 48, 73;
      --pc-fire-color: var(--pc-fire-brick);
      --pc-flood-color: var(--pc-air-superiority-blue);
      --pc-earthquake-color: var(--pc-barn-red);
      --pc-storm-color: var(--pc-prussian-blue);
      --pc-pandemic-color: var(--pc-fire-brick);
      --pc-cyber-color: var(--pc-air-superiority-blue);
      --bs-body-font-family: 'Roboto', sans-serif;
      --bs-body-font-size: 1rem;
      --bs-body-line-height: 1.6;
      --bs-heading-font-family: 'Roboto Slab', serif;
      --bs-link-color: var(--bs-primary);
      --bs-link-hover-color: var(--bs-secondary);
      --bs-border-radius: 0.375rem;
      --bs-border-radius-sm: .25rem;
      --bs-border-radius-lg: .5rem;
      --bs-border-radius-pill: 50rem;
      --bs-border-width: 1px;
      --bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
      --bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
      --bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
      --bs-transition-base: all .2s ease-in-out;
      --header-base-height: 60px;
      --header-scrolled-height: 40px;
      --header-transition-duration: 0.3s;
      --scroll-top-transition-duration: 0.4s;
      --chapter-card-transition: 0.3s ease-in-out;
      --scroll-animation-duration: 1.2s;
      --scroll-animation-delay: 0s;
      --scroll-animation-translateY: 50px;
      --scroll-animation-timing: ease-out;
      --btn-hover-duration: 0.4s;
      --btn-download-hover-duration: 0.6s;
      --progress-bar-height: 5px;
      --combined-header-progress-height: 0px;
      --intro-card-hover-duration: 0.2s;
      --cookie-overlay-bg: rgba(0, 48, 73, 0.6);
      --cookie-blur-intensity: 4px;
      --a11y-font-size-lg: 1.15rem;
      --a11y-line-height-lg: 1.7;
      --a11y-font-size-xl: 1.3rem;
      --a11y-line-height-xl: 1.8;
      --a11y-font-size-xxl: 1.45rem;
      --a11y-line-height-xxl: 1.85;
      --a11y-font-size-xxxl: 1.6rem;
      --a11y-line-height-xxxl: 1.9;
      --search-input-height: calc(1.5em + .5rem + 2px);
      --search-input-height-scrolled: calc(1.5em + .3rem + 2px);
      --mobile-action-bar-height: 56px;
      --mobile-action-button-size: 38px;
      --mobile-action-button-icon-size: 1rem;
      --mobile-action-bar-bg: rgba(248, 249, 250, 0.92);
      --mobile-action-bar-blur: 8px;
      --mobile-action-bar-shadow: 0 -2px 10px rgba(0,0,0,0.1);
      --tts-resume-overlay-bg: rgba(0, 0, 0, 0.7);
      --tts-resume-button-bg: rgba(255, 255, 255, 0.95);
      --tts-resume-icon-size: 2.5rem;
      --tts-resume-text-size: 0.85rem;
      --desktop-tts-button-size: 36px;
      --desktop-tts-button-icon-size: 1rem;
}

/* ================================================================
        3. ESTILOS BASE Y TIPOGRAFÃA
        ================================================================ */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-family: var(--bs-body-font-family);
    font-size: var(--bs-body-font-size);
    line-height: var(--bs-body-line-height);
    transition: background-color 0.3s ease, color 0.3s ease, font-size 0.3s ease;
}
@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--bs-heading-font-family);
    font-weight: 600;
    color: var(--bs-secondary);
}
h1, .h1 {
    font-weight: 700;
    font-size: 2.5rem; /* R: AÃ±adido tamaÃ±o base para H1 para solucionar advertencia de API obsoleta. | Q/L: Lighthouse Report */
}
a {
    transition: color 0.15s ease-in-out;
    color: var(--bs-link-color);
}
a:hover {
    color: var(--bs-link-hover-color);
}

/* ================================================================
        4. SOBRESCRITURAS DE BOOTSTRAP Y ESTILOS BOTONES GENERALES
        ================================================================ */
.btn {
    transition: color var(--btn-hover-duration) ease-out,
                background-color var(--btn-hover-duration) ease-out,
                border-color var(--btn-hover-duration) ease-out,
                transform 0.2s ease-in-out,
                box-shadow 0.2s ease-in-out,
                height var(--header-transition-duration) ease-in-out,
                padding var(--header-transition-duration) ease-in-out;
    border-width: var(--bs-border-width);
    border-style: solid;
}
.btn:focus-visible {
    outline: 2px solid rgba(var(--bs-primary-rgb), 0.5);
    outline-offset: 2px;
    box-shadow: none;
}

.btn-primary { background-color: var(--bs-primary) !important; border-color: var(--bs-primary) !important; color: #fff !important; }
.btn-primary:hover, .btn-primary:focus { background-color: var(--bs-secondary) !important; border-color: var(--bs-secondary) !important; color: #fff !important; transform: scale(1.03); box-shadow: var(--bs-box-shadow-sm); }
.btn-primary:focus-visible { transform: none; }

.btn-secondary:not(#download-pdf) {
    background-color: var(--bs-secondary) !important;
    border-color: var(--bs-secondary) !important;
    color: #fff !important;
}
.btn-secondary:not(#download-pdf):hover,
.btn-secondary:not(#download-pdf):focus {
    background-color: var(--pc-barn-red) !important;
    border-color: var(--pc-barn-red) !important;
    color: #fff !important;
    transform: scale(1.03);
    box-shadow: var(--bs-box-shadow-sm);
}
.btn-secondary:not(#download-pdf):focus-visible {
    transform: none;
    outline-color: rgba(var(--bs-secondary-rgb), 0.5);
}

.btn-danger { background-color: var(--bs-danger) !important; border-color: var(--bs-danger) !important; color: #fff !important; }
.btn-danger:hover, .btn-danger:focus { background-color: var(--pc-barn-red) !important; border-color: var(--pc-barn-red) !important; color: #fff !important; transform: scale(1.03); box-shadow: var(--bs-box-shadow-sm); }
.btn-danger:focus-visible { transform: none; outline-color: rgba(var(--bs-danger-rgb), 0.5); }

#chapter-sidebar .btn-success { background-color: var(--bs-success); border-color: var(--bs-success); color: #fff; }
#chapter-sidebar .btn-success:hover, #chapter-sidebar .btn-success:focus { background-color: #146c43; border-color: #13653f; color: #fff; transform: scale(1.03); box-shadow: var(--bs-box-shadow-sm); }
#chapter-sidebar .btn-warning { background-color: var(--bs-warning); border-color: var(--bs-warning); color: #000; }
#chapter-sidebar .btn-warning:hover, #chapter-sidebar .btn-warning:focus { background-color: #ffb007; border-color: #cc8f06; color: #000; transform: scale(1.03); box-shadow: var(--bs-box-shadow-sm); }

.cta-actions .btn.btn-light { color: var(--bs-secondary) !important; background-color: var(--bs-white) !important; border-color: var(--bs-white) !important; }
.cta-actions .btn.btn-light:hover, .cta-actions .btn.btn-light:focus { color: var(--bs-white) !important; background-color: var(--bs-primary) !important; border-color: var(--bs-primary) !important; transform: scale(1.03); box-shadow: var(--bs-box-shadow-sm); }
.cta-actions .btn.btn-light:focus-visible { transform: none; outline-color: rgba(var(--bs-primary-rgb), 0.5); }

.btn-outline-primary, .btn-outline-secondary, .btn-outline-light {
    position: relative; overflow: hidden; z-index: 1; background-color: transparent !important;
    border-width: 2px !important; border-style: solid !important; vertical-align: middle;
}

.chapter-carousel .card-footer .btn-outline-secondary, .chapter-carousel .card-footer .btn-outline-primary,
#chapter-sidebar .sidebar-widget .btn.btn-sm.btn-outline-primary:not(.chapter-nav-btn):not(.tts-desktop-btn),
#chapter-sidebar .sidebar-widget .btn.btn-sm.btn-outline-secondary:not(.chapter-nav-btn):not(.tts-desktop-btn) {
    padding: 0.25rem 0.75rem !important; font-size: 0.8rem !important;
    border-radius: var(--bs-border-radius-sm) !important;
}

.btn-outline-primary::before, .btn-outline-secondary::before, .btn-outline-light::before {
    content: ''; position: absolute; top: 0; left: 0; width: 0; height: 100%;
    transition: width var(--btn-hover-duration) ease-out; z-index: -1;
}

.btn-outline-primary { color: var(--bs-primary) !important; border-color: var(--bs-primary) !important; }
.btn-outline-primary::before { background-color: var(--bs-primary); }
.btn-outline-primary:hover, .btn-outline-primary:focus { color: var(--bs-white) !important; border-color: var(--bs-primary) !important; }

.btn-outline-secondary {
    color: var(--bs-secondary) !important; border-color: var(--bs-secondary) !important;
}
.btn-outline-secondary::before { background-color: var(--bs-secondary); }
.btn-outline-secondary:hover, .btn-outline-secondary:focus {
    color: var(--bs-white) !important; border-color: var(--bs-secondary) !important;
}

.cta-actions .btn.btn-outline-light { color: var(--bs-white) !important; border-color: var(--bs-white) !important; }
.cta-actions .btn.btn-outline-light::before { background-color: var(--bs-white); }
.cta-actions .btn.btn-outline-light:hover, .cta-actions .btn.btn-outline-light:focus { color: var(--bs-secondary) !important; border-color: var(--bs-white) !important; }
.cta-actions .btn.btn-outline-light:focus-visible { outline-color: rgba(255, 255, 255, 0.5); }

.btn-outline-primary:not([disabled]):hover::before, .btn-outline-primary:not([disabled]):focus::before,
.btn-outline-secondary:not([disabled]):hover::before, .btn-outline-secondary:not([disabled]):focus::before,
.btn-outline-light:not([disabled]):hover::before, .btn-outline-light:not([disabled]):focus::before {
    width: 100%;
}

.chapter-carousel button.btn-outline-secondary[disabled] {
    opacity: 0.75 !important; pointer-events: auto !important; cursor: not-allowed;
    color: var(--bs-secondary) !important; border-color: var(--bs-secondary) !important;
    background-color: transparent !important; border-width: 2px !important; border-style: solid !important;
}
.chapter-carousel button.btn-outline-secondary[disabled]:hover::before { width: 100% !important; background-color: var(--bs-secondary); }
.chapter-carousel button.btn-outline-secondary[disabled]:hover { color: var(--bs-white) !important; }

.text-primary { color: var(--bs-primary) !important; } .text-secondary { color: var(--bs-secondary) !important; } .text-danger { color: var(--bs-danger) !important; } .text-dark { color: var(--bs-dark) !important; } .text-light { color: var(--bs-light) !important; } .text-white { color: var(--bs-white) !important; } .text-body { color: var(--bs-body-color) !important; } .text-muted { color: var(--bs-secondary-color) !important; }
.bg-primary { background-color: var(--bs-primary) !important; } .bg-secondary { background-color: var(--bs-secondary) !important; } .bg-danger { background-color: var(--bs-danger) !important; } .bg-dark { background-color: var(--bs-dark) !important; } .bg-light { background-color: var(--bs-light) !important; } .bg-white { background-color: var(--bs-white) !important; } .bg-body { background-color: var(--bs-body-bg) !important; }
.alert-primary { color: color-contrast(var(--bs-primary) vs #fff #000) !important; background-color: rgba(var(--bs-primary-rgb), 0.15) !important; border-color: rgba(var(--bs-primary-rgb), 0.2) !important; }
.alert-secondary { color: color-contrast(var(--bs-secondary) vs #fff #000) !important; background-color: rgba(var(--bs-secondary-rgb), 0.15) !important; border-color: rgba(var(--bs-secondary-rgb), 0.2) !important; }
.alert-danger:not(#emergency-alert-bar-container) { color: color-contrast(var(--bs-danger) vs #fff #000) !important; background-color: rgba(var(--bs-danger-rgb), 0.15) !important; border-color: rgba(var(--bs-danger-rgb), 0.2) !important; }
.badge.bg-primary { background-color: var(--bs-primary) !important; color: color-contrast(var(--bs-primary) vs #fff #000) !important; } .badge.bg-secondary { background-color: var(--bs-secondary) !important; color: color-contrast(var(--bs-secondary) vs #fff #000) !important; } .badge.bg-danger { background-color: var(--bs-danger) !important; color: color-contrast(var(--bs-danger) vs #fff #000) !important; } .badge.bg-dark { background-color: var(--bs-dark) !important; color: color-contrast(var(--bs-dark) vs #fff #000) !important; } .badge.bg-light { background-color: var(--bs-light) !important; color: color-contrast(var(--bs-light) vs #fff #000) !important; }

/* ================================================================
        5. ESTILOS PERSONALIZADOS PARA COMPONENTES DEL TEMA
        ================================================================ */

#search-results-container .list-group-item,
#search-results-container-mobile .list-group-item,
#search-results-container-404 .list-group-item {
    padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--bs-border-color-translucent);
    transition: background-color 0.15s ease-in-out;
}
#search-results-container .list-group-item:last-child,
#search-results-container-mobile .list-group-item:last-child,
#search-results-container-404 .list-group-item:last-child { border-bottom: none; }
#search-results-container .list-group-item a,
#search-results-container-mobile .list-group-item a,
#search-results-container-404 .list-group-item a { text-decoration: none; color: var(--bs-body-color); }
#search-results-container .list-group-item a:hover, #search-results-container .list-group-item a:focus,
#search-results-container-mobile .list-group-item a:hover, #search-results-container-mobile .list-group-item a:focus,
#search-results-container-404 .list-group-item a:hover, #search-results-container-404 .list-group-item a:focus {
    background-color: var(--bs-light); color: var(--bs-primary);
}
#search-results-container .search-result-title,
#search-results-container-mobile .search-result-title,
#search-results-container-404 .search-result-title {
    font-weight: 600; color: var(--bs-secondary); font-size: 0.95rem;
}
#search-results-container .list-group-item a:hover .search-result-title, #search-results-container .list-group-item a:focus .search-result-title,
#search-results-container-mobile .list-group-item a:hover .search-result-title, #search-results-container-mobile .list-group-item a:focus .search-result-title,
#search-results-container-404 .list-group-item a:hover .search-result-title, #search-results-container-404 .list-group-item a:focus .search-result-title {
    color: var(--bs-primary);
}
#search-results-container .search-result-excerpt,
#search-results-container-mobile .search-result-excerpt,
#search-results-container-404 .search-result-excerpt { font-size: 0.8rem; line-height: 1.4; }
.search-highlight {
    background-color: rgba(var(--bs-primary-rgb), 0.2); color: var(--pc-prussian-blue);
    font-weight: bold; padding: 0.1em 0.2em; border-radius: 0.2em;
}

.hero-section .scenario-card { transition: transform 0.2s ease-out, box-shadow 0.2s ease-out; transform: translateY(-3px); box-shadow: var(--bs-box-shadow-lg) !important; }
.hero-section .scenario-card:hover { transform: translateY(-6px); box-shadow: 0 1.25rem 3.5rem rgba(0, 0, 0, 0.2) !important; }
.intro-section .intro-card { background-color: var(--bs-white) !important; transition: transform var(--intro-card-hover-duration, 0.2s) ease-in-out, box-shadow var(--intro-card-hover-duration, 0.2s) ease-in-out; }
.intro-section .intro-card:hover { transform: translateY(-8px) scale(1.04); box-shadow: var(--bs-box-shadow-lg) !important; z-index: 10; position: relative; }
.chapter-carousel .carousel-item { transition: transform .6s ease-in-out; }
.chapter-carousel .chapter-card-wrapper { padding: 0.5rem; display: flex; justify-content: center; }
.chapter-carousel .chapter-card { background-color: #fff; border: 1px solid rgba(var(--bs-secondary-rgb), 0.1); border-radius: var(--bs-border-radius); transition: transform var(--chapter-card-transition), box-shadow var(--chapter-card-transition); text-decoration: none; overflow: hidden; width: 100%; max-width: 60%; }
.chapter-carousel .chapter-card .col-md-5 { padding: 0; display: flex; align-items: center; }
.chapter-carousel .chapter-card-img-container { position: relative; overflow: hidden; aspect-ratio: 3 / 2; background-color: var(--bs-light); height: 100%; width: 100%; }
.chapter-carousel .chapter-card-img { display: block; width: 100% !important; height: 100% !important; object-fit: cover !important; max-width: none !important; max-height: none !important; }
.chapter-carousel .chapter-card-img-placeholder { width: 100%; height: 100%; aspect-ratio: 3 / 2; display: flex; align-items: center; justify-content: center; background-color: var(--bs-secondary); }
.chapter-carousel .chapter-card-img-placeholder .material-symbols-filled {
    font-size: 3rem !important;
    color: rgba(255, 255, 255, 0.5);
    font-variation-settings:
        'FILL' 1,
        'wght' 300,
        'GRAD' 0,
        'opsz' 48;
}
.chapter-carousel .chapter-card .col-md-7 { display: flex; flex-direction: column; }
.chapter-carousel .chapter-card-text-content { padding: 1rem 1.25rem; flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.chapter-carousel .chapter-card .card-title { color: var(--bs-secondary); font-weight: 700; margin-bottom: 0.5rem; font-size: 1.1rem; }
.chapter-carousel .chapter-card .card-text { font-size: 0.85rem; color: var(--bs-body-color); line-height: 1.5; margin-bottom: 0; }
.chapter-carousel .chapter-card .card-footer { background-color: var(--bs-light); border-top: 1px solid rgba(var(--bs-secondary-rgb), 0.1); padding: 0.5rem 1.25rem; }
.chapter-carousel .carousel-item:hover .chapter-card { transform: translateY(-6px) scale(1.01); box-shadow: var(--bs-box-shadow-lg); z-index: 10; }
.chapter-carousel .carousel-item:hover .chapter-card-img { transform: scale(1.05); filter: brightness(1.05); transition: transform var(--chapter-card-transition), filter 0.3s ease-in-out; }
.chapter-carousel .carousel-control-prev, .chapter-carousel .carousel-control-next { opacity: 0.7; transition: opacity 0.2s ease; background-color: rgba(0, 0, 0, 0.1); border-radius: 50%; width: 40px; height: 40px; top: 50%; transform: translateY(-50%); }
.chapter-carousel .carousel-control-prev { left: 10px; } .chapter-carousel .carousel-control-next { right: 10px; }
.chapter-carousel .carousel-control-prev-icon, .chapter-carousel .carousel-control-next-icon { filter: invert(1) brightness(0.8); }
.chapter-carousel:hover .carousel-control-prev, .chapter-carousel:hover .carousel-control-next { opacity: 1; background-color: rgba(0, 0, 0, 0.3); }
.chapter-carousel .carousel-indicators { bottom: -30px; }
.chapter-carousel .carousel-indicators button { background-color: rgba(var(--bs-secondary-rgb), 0.4); border: none; height: 5px; width: 25px; margin: 0 4px; border-radius: 3px; opacity: 0.6; transition: opacity 0.3s ease, background-color 0.3s ease; }
.chapter-carousel .carousel-indicators button.active { background-color: var(--bs-secondary); opacity: 1; }
.features-section .feature-item { transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; border: 1px solid transparent; }
.features-section .col:nth-child(odd) .feature-item { background-color: var(--bs-white) !important; }
.features-section .col:nth-child(even) .feature-item { background-color: var(--bs-light) !important; }
.features-section .feature-icon { flex-shrink: 0; line-height: 1; }
.features-section .feature-icon .material-symbols-filled { font-size: 2rem; }
.features-section .feature-text h3 { font-size: 1rem; }
.features-section .feature-text p { line-height: 1.5; }
.features-section .feature-item:hover { transform: translateY(-3px); box-shadow: var(--bs-box-shadow) !important; border-color: rgba(var(--bs-secondary-rgb), 0.1); }
.cta-section { background-color: var(--bs-secondary); color: var(--bs-white); padding-top: 4rem; padding-bottom: 4rem; }
.cta-section h2 { color: var(--bs-white); margin-bottom: 1rem; }
.cta-section p { color: rgba(255, 255, 255, 0.85); margin-bottom: 2rem; }
.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.cta-actions .btn {
    width: 100%;
    max-width: 320px;
}

@media (min-width: 576px) {
    .cta-actions {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    .cta-actions .btn {
        width: auto;
        max-width: none;
    }
}

.site-footer { color: var(--pc-platinum) !important; }
.site-footer .footer-column-title { color: var(--pc-platinum) !important; padding-bottom: 0.5rem !important; margin-bottom: 1rem !important; border-bottom: 3px solid var(--pc-fire-brick) !important; display: inline-block !important; position: relative; font-weight: 700 !important; text-transform: uppercase !important; }
.site-footer p, .site-footer li, .site-footer small, .site-footer strong, .site-footer em { color: var(--pc-platinum) !important; }
.site-footer a { color: var(--pc-platinum) !important; text-decoration: none !important; transition: color 0.15s ease-in-out, transform 0.15s ease-in-out, background-color 0.15s ease-in-out, text-decoration 0.15s ease-in-out; display: inline-block; position: relative; padding: 0.1rem 0.3rem; border-radius: 0.25rem; margin: -0.1rem -0.3rem; }
.site-footer a:hover, .site-footer a:focus { color: var(--bs-white) !important; text-decoration: underline !important; transform: translateY(-1px); background-color: rgba(255, 255, 255, 0.15) !important; }
.site-footer .footer-icons .material-symbols-filled,
.site-footer ul li .material-symbols-filled {
    color: var(--pc-platinum) !important;
    transition: color 0.15s ease-in-out;
    vertical-align: middle;
    font-size: 1.2em;
    display: inline-flex;
    align-items: center;
}
.site-footer .footer-icons a:hover .material-symbols-filled,
.site-footer ul li a:hover .material-symbols-filled {
    color: var(--bs-white) !important;
}
.site-footer .footer-bottom { border-top-color: rgba(255, 255, 255, 0.15) !important; }

.footer-logo img { max-height: 100px !important; margin-bottom: 1rem; }
.site-footer .col-lg-3:first-child .footer-column-title.visually-hidden + p { margin-top: 0; }

/* ================================================================
        6. ESTILOS PARA EL EDITOR DE BLOQUES (GUTENBERG)
        ================================================================ */
      /* VacÃ­o por ahora */

/* ================================================================
        7. ANIMACIONES Y TRANSICIONES (Adicionales)
        ================================================================ */
.animated-on-scroll {
    opacity: 0;
    transform: translateY(var(--scroll-animation-translateY, 50px));
    transition: opacity var(--scroll-animation-duration, 1.2s) var(--scroll-animation-timing, ease-out) var(--scroll-animation-delay, 0s),
                transform var(--scroll-animation-duration, 1.2s) var(--scroll-animation-timing, ease-out) var(--scroll-animation-delay, 0s);
}
.animated-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* ================================================================
        8. ESTILOS DE ACCESIBILIDAD ADICIONALES
        ================================================================ */
.skip-links a {
    position: absolute; top: -40px; left: 0;
    background: var(--bs-secondary); color: white;
    padding: 8px; z-index: 1050;
    transition: top 0.3s ease-in-out;
}
.skip-links a:focus { top: 0; }

body.grayscale {
    filter: grayscale(100%);
    -webkit-filter: grayscale(100%);
    background-color: #fff;
}

/* ================================================================
        9. MEDIA QUERIES Y RESPONSIVE
        ================================================================ */
@media (max-width: 991.98px) {
    #chapter-sidebar { margin-top: 2rem; }
    #emergency-alert-bar-container .container { flex-direction: column; text-align: center; }
    #emergency-alert-bar-container #alert-bar-message, #emergency-alert-bar-container #alert-bar-source-link { margin-left: 0 !important; margin-right: 0 !important; display: block; }
    #emergency-alert-bar-container #alert-bar-close-btn { position: static !important; transform: none !important; margin-top: 0.5rem; align-self: center; }
}

@media (max-width: 767.98px) {
    .site-footer .col-lg-3 { text-align: center; }
    .site-footer .footer-icons { justify-content: center; }
    .site-footer .footer-column-title { display: inline-block; }
    .site-footer ul { padding-left: 0; }
    .site-footer ul li { justify-content: center; text-align: center; }
    .chapter-carousel .carousel-control-prev, .chapter-carousel .carousel-control-next { width: 30px; height: 30px; }
    .chapter-carousel .carousel-indicators { bottom: -20px; }
    .chapter-carousel .chapter-card { max-width: 95%; }
    .chapter-carousel .chapter-card .col-md-5, .chapter-carousel .chapter-card .col-md-7 { width: 100%; flex: 0 0 100%; }
    .chapter-carousel .chapter-card-text-content { padding: 0.75rem 1rem; min-height: 100px; }
    .chapter-carousel .chapter-card .card-footer { padding: 0.5rem 1rem; }
    .cta-section h2 { font-size: 1.75rem; }
}

/* ================================================================
        10. ESTILOS ESPECÃFICOS SINGLE-CAPITULO.PHP
        ================================================================ */
.progress-container { height: var(--progress-bar-height, 5px); position: sticky; left: 0; width: 100%; z-index: 1019; }
.progress-container .progress-bar { height: 100%; transition: width 0.2s ease-out; background-color: var(--bs-secondary) !important; }

.chapter-visual-header {
    min-height: 200px;
    padding-top: 2rem;
    padding-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--pc-eerie-black);
    color: var(--bs-white);
    position: relative;
    overflow: hidden;
}
/* R: ModificaciÃ³n para que la imagen dentro de <picture> actÃºe como fondo */
.chapter-visual-header .chapter-header-background,
.chapter-visual-header .chapter-header-background img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Reemplaza background-size: cover */
    object-position: center center; /* Reemplaza background-position: center */
    z-index: 0;
}

.chapter-visual-header .chapter-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--bs-secondary-rgb), 0.55);
    z-index: 1;
}
.chapter-visual-header .container {
    z-index: 2;
}

.chapter-visual-header .entry-title { color: var(--bs-white) !important; font-size: calc(1.375rem + 1.5vw); word-break: break-word; overflow-wrap: break-word; hyphens: auto; }
@media (min-width: 1200px) { .chapter-visual-header .entry-title { font-size: 2.5rem; } }
.chapter-visual-header .chapter-metadata { color: rgba(255, 255, 255, 0.8) !important; font-size: 0.85rem; margin-top: 0.75rem; }
.chapter-visual-header .chapter-metadata span { display: inline-block; margin-right: 0.5rem; word-break: break-all; }
.chapter-visual-header .chapter-metadata .material-symbols-filled,
.chapter-visual-header .chapter-metadata i {
    margin-right: 0.25rem;
    vertical-align: middle;
    font-size: 1.1em;
}
.chapter-visual-header .chapter-metadata a { color: rgba(255, 255, 255, 0.9) !important; text-decoration: underline !important; text-decoration-style: dotted; transition: color 0.15s ease; }
.chapter-visual-header .chapter-metadata a:hover { color: var(--bs-white) !important; text-decoration-style: solid; }

.chapter-content-column .entry-content h2, .chapter-content-column .entry-content h3 { margin-top: 2.5rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--bs-border-color); }
/* CorrecciÃ³n para desbordamiento de contenido en mÃ³vil */
.entry-content {
    overflow-wrap: break-word;
    word-wrap: break-word; /* Fallback para navegadores antiguos */
    -ms-word-break: break-all;
    word-break: break-word;
    -ms-hyphens: auto;
    -moz-hyphens: auto;
    -webkit-hyphens: auto;
    hyphens: auto;
}

#chapter-sidebar { padding: 1.5rem; background-color: var(--bs-light); border-radius: var(--bs-border-radius); border: 1px solid rgba(var(--bs-secondary-rgb), 0.1); box-shadow: var(--bs-box-shadow); }
@media (min-width: 992px) { #chapter-sidebar.sticky-lg-top { position: sticky !important; top: calc(var(--combined-header-progress-height, 0px) + 20px) !important; max-height: calc(100vh - (var(--combined-header-progress-height, 0px) + 40px)) !important; overflow-y: auto !important; z-index: 1000; } }
.sidebar-widget { margin-bottom: 1.5rem; }
.sidebar-widget:last-child { margin-bottom: 0; }
.sidebar-widget .widget-title { font-size: 0.85rem; font-weight: 700; color: var(--bs-secondary-color); border-bottom: 2px solid var(--bs-primary); padding-bottom: 0.3rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
#chapter-toc ul { padding-left: 0.5rem; border-left: 2px solid var(--bs-border-color); list-style: none; }
#chapter-toc ul li a, #chapter-toc-mobile ul li a { display: block; padding: 0.3rem 0.5rem; color: var(--bs-body-color); text-decoration: none; border-radius: 0.25rem; transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out; font-size: 0.9em; }
#chapter-toc ul li a:hover, #chapter-toc ul li a.active, #chapter-toc-mobile ul li a:hover, #chapter-toc-mobile ul li a.active { background-color: var(--bs-primary); color: var(--bs-white); }
#chapter-sidebar .sidebar-widget .btn.btn-sm:not(.chapter-nav-btn):not(.tts-desktop-btn) { padding: 0.25rem 0.75rem !important; font-size: 0.8rem !important; }
.chapter-navigation-widget { background-color: rgba(var(--bs-secondary-rgb), 0.03); border: 1px solid rgba(var(--bs-secondary-rgb), 0.1); border-radius: var(--bs-border-radius-sm); padding: 0.75rem; margin-bottom: 1rem; }
.chapter-navigation-widget .widget-title { font-size: 0.8rem; color: var(--bs-secondary-color); margin-bottom: 0.5rem !important; border-bottom: none; text-transform: uppercase; letter-spacing: 0.05em; }
.chapter-navigation-widget .current-chapter-title { color: var(--bs-body-color); font-size: 0.95rem; font-weight: 600; margin-bottom: 0.75rem !important; padding-bottom: 0.5rem; border-bottom: 1px solid var(--bs-border-color-translucent); line-height: 1.3; }
.chapter-navigation-widget .d-flex.justify-content-between { gap: 0.5rem; margin-bottom: 0 !important; }
.chapter-navigation-widget .chapter-nav-btn { flex-grow: 1; display: inline-flex; align-items: center; justify-content: center; padding: 0.375rem 0.75rem; font-size: 0.875rem; line-height: 1.5; border-width: 1px; transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s ease-in-out, transform 0.15s ease-out; }
.chapter-navigation-widget .chapter-nav-btn .material-symbols-filled,
.chapter-navigation-widget .chapter-nav-btn i { font-size: 1em; }
.chapter-navigation-widget .chapter-nav-btn:not(.disabled):hover, .chapter-navigation-widget .chapter-nav-btn:not(.disabled):focus { background-color: var(--bs-primary) !important; border-color: var(--bs-primary) !important; color: var(--bs-white) !important; transform: translateY(-1px); box-shadow: var(--bs-box-shadow-sm); }
.chapter-navigation-widget .chapter-nav-btn.disabled { background-color: transparent !important; border-color: var(--bs-border-color) !important; color: var(--bs-secondary-color) !important; opacity: 0.65; }
.chapter-navigation-widget hr.my-2 { display: none; }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); overflow: hidden; }
.post-navigation .nav-previous, .post-navigation .nav-next { flex: 1; padding: 1rem 1.5rem; text-decoration: none; transition: background-color 0.2s ease-in-out; display: block; }
.post-navigation .nav-previous { text-align: left; border-right: 1px solid var(--bs-border-color); }
.post-navigation .nav-next { text-align: right; }
.post-navigation .nav-links a:hover { background-color: var(--bs-light); text-decoration: none; transform: none; }
.post-navigation .nav-subtitle { display: block; font-size: 0.8rem; color: var(--bs-secondary-color); margin-bottom: 0.25rem; }
.post-navigation .nav-subtitle .material-symbols-filled,
.post-navigation .nav-subtitle i { font-size: 1.1em; vertical-align: -0.1em; }

/* ================================================================
        12. BANNER DE COOKIES MODAL
        ================================================================ */
.cookie-overlay { position: fixed; inset: 0; background-color: var(--cookie-overlay-bg); backdrop-filter: blur(var(--cookie-blur-intensity)); -webkit-backdrop-filter: blur(var(--cookie-blur-intensity)); z-index: 1050; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; transition: opacity 0.3s ease-in-out; }
.cookie-overlay.visible { opacity: 1; }
.cookie-banner { background-color: var(--bs-light); color: var(--bs-body-color); border-radius: var(--bs-border-radius); box-shadow: var(--bs-box-shadow-lg); max-width: 600px; width: 100%; position: static; bottom: auto; left: auto; right: auto; z-index: auto; border-top: none; text-align: left; }
.cookie-banner p { color: var(--bs-body-color); margin-bottom: 1rem !important; }
.cookie-banner a.cookie-policy-link { color: var(--bs-link-color); text-decoration: underline !important; font-weight: 500; }
.cookie-banner a.cookie-policy-link:hover { color: var(--bs-link-hover-color); }
.cookie-banner #accept-cookies.btn { background-color: var(--bs-secondary) !important; border-color: var(--bs-secondary) !important; color: #fff !important; padding: 0.375rem 1rem !important; font-size: 0.9rem !important; }
.cookie-banner #accept-cookies.btn:hover { background-color: var(--pc-barn-red) !important; border-color: var(--pc-barn-red) !important; }

/* ================================================================
     13. ESTILOS PARA BOTONES DE ACCIÃ"N MÃ"VILES EN EL HEADER Y SINGLE-CAPITULO
     ================================================================ */

#offcanvasMobileToc { --bs-offcanvas-width: 300px; background-color: var(--bs-light); }
#offcanvasMobileToc .offcanvas-header { background-color: var(--bs-secondary); color: var(--bs-white); padding-top: 0.75rem; padding-bottom: 0.75rem; }
#offcanvasMobileToc .offcanvas-title { color: var(--bs-white); }
#offcanvasMobileToc .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
#chapter-toc-mobile ul { border-left-color: var(--bs-primary); }

/* ================================================================
        14. REGLAS TEMPORALES DE DEPURACIÃ"N
        ================================================================ */

/* ================================================================
        15. OVERRIDES Y SOLUCIONES PARA WIDGETS DE TERCEROS
        ================================================================ */

/* --- Ocultar Badge de Google reCAPTCHA v3 --- */
.grecaptcha-badge {
    visibility: hidden;
}

/* ================================================================
        16. CORRECCIONES DE UX Y CURSOR
        ================================================================ */
/* R: Evitar que el cursor cambie a modo texto en Ã¡reas no deseadas. | Q/L: CSS Best Practices */
body {
    cursor: default;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10+ */
    user-select: none; /* Standard syntax */
}

/* R: Permitir explÃ­citamente la selecciÃ³n de texto en el contenido principal. */
.entry-content,
.entry-content p,
.entry-content li,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.entry-content blockquote,
.entry-content pre,
.entry-content code,
.entry-content table {
    cursor: text;
    -webkit-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* R: Asegurar que los inputs y textareas siempre permitan la selecciÃ³n de texto. */
input,
textarea {
    -webkit-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* ================================================================
        17. ESTILOS PARA BARRA DE ÃšLTIMA LECTURA
        ================================================================ */
.last-read-banner {
    position: relative;
    padding: 1rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid #9eeaf9;
    border-radius: var(--bs-border-radius);
    background-color: #cff4fc;
    color: #055160;
}

.last-read-banner a {
    color: inherit;
    font-weight: bold;
    text-decoration: none;
}

.last-read-banner a:hover {
    text-decoration: underline;
}



/* ================================================================
        19. FIX DEFINITIVO ICONO BOOKMARK - ICON-001
        ================================================================ */

/* Clase base para iconos PPC - DEFINICIÓN COMPLETA */
.ppc-icon {
    font-family: 'Material-Icons-for-PPC' !important;
    font-style: normal !important;
    font-weight: normal !important;
    font-variant: normal !important;
    text-transform: none !important;
    line-height: 1 !important;
    letter-spacing: normal !important;
    display: inline-block !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
    direction: ltr !important;
    font-feature-settings: 'liga' !important;
    -webkit-font-feature-settings: 'liga' !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Definición específica del icono bookmark - CORREGIDA */
.icon-bookmark:before {
    content: "\e800" !important;
    font-family: 'Material-Icons-for-PPC' !important;
}