
/* ==================================================
   AYUNTAMIENTO DE FUENTES DE EBRO
   CSS PERSONALIZADO - PLANTILLA WESTAND

   Identidad visual y diseño editorial
   Rojo corporativo: #ca0000
   Negro: #000000
   Gris secundario: #666666
   ================================================== */


/* ==================================================
   01. TIPOGRAFÍA GENERAL DE LA WEB
   ================================================== */

h2 {
    font-size: 38px !important;
}

h3 {
    font-size: 30px !important;
}

h4 {
    font-size: 24px !important;
}

h5 {
    font-size: 20px !important;
}


/* ==================================================
   02. SERVICIOS Y MÓDULOS DE PORTADA
   ================================================== */

.services article .text h2 a {
    font-size: 18px !important;
    line-height: 24px !important;
}

.services article .text {
    padding: 0 0 12px 16px;
}

.services article .text h2 {
    line-height: 0.5;
}

.services {
    margin-bottom: 0;
}

.services.border-bottom::before {
    border: none;
}

.caption h2 {
    font-size: 24px !important;
}

.left-timeline-sec h2 {
    font-size: 18px !important;
}

.home-info h5 {
    font-size: 18px !important;
}

.cs-post-title {
    font-size: 16px !important;
}

.cs-section-title {
    font-size: 20px !important;
}


/* ==================================================
   03. MENÚ DE NAVEGACIÓN
   ================================================== */

.navigation ul ul {
    width: 232px;
}


/* ==================================================
   04. CABECERAS Y MIGAS DE PAN
   ================================================== */

.breadcrumbs {
    display: none;
}

.breadcrumb-inner {
    background: none;
}


/* ==================================================
   05. CARRUSELES Y DIAPOSITIVAS
   ================================================== */

.cs-carousel-control {
    font-size: 24px;
    line-height: 28px;
}

#sliderbanner {
    max-height: 600px;
}

.cs-blog figure figcaption .btn {
    display: none;
}

.cs-blog.blog-grid.blog-carousel-view article .post-options {
    border-bottom: 0 solid #c30217;
}

.cs-blog.blog-grid.blog-carousel-view article.featured-slide {
    width: 197px;
}

.cs-blog.blog-grid.blog-carousel-view article figure {
    height: 202px;
    overflow: hidden;
    position: relative;
}

.cs-blog.blog-grid.blog-carousel-view article figure img {
    position: absolute;
    transform: translate(-50%, -50%);
    height: 200% !important;
    width: auto !important;
}


/* ==================================================
   06. PIE DE PÁGINA Y BOLETÍN DE NOTICIAS
   ================================================== */

#footer-widgets .widget header.cs-heading-title h2 {
    font-size: 18px !important;
}

#footer-widgets {
    margin-top: 60px;
}

.tnp-widget {
    color: white;
}


/* ==================================================
   07. ELEMENTOS ADICIONALES DE LAS NOTICIAS
   ================================================== */

.share-post {
    display: none;
}

.about-author {
    display: none;
}


/* ==================================================
   08. GALERÍAS FOTOGRÁFICAS
   ================================================== */

.gallery {
    float: none;
}


/* ==================================================
   09. FORMULARIOS DE CONTACTO
   ================================================== */

.wpcf7-textarea {
    border: 1px solid #acacac;
    padding: 4px 30px;
    border-radius: 0;
    height: 200px;
}


/* ==================================================
   10. CABECERA PRINCIPAL DE LAS NOTICIAS
   ================================================== */


/* Reducción de la altura de la franja roja */

.single-post .breadcrumb-inner {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}


/* Titular principal sin mayúsculas forzadas */

.single-post h1,
.single-post .breadcrumb-inner h1,
.single-post .breadcrumb-inner h2 {
    text-transform: none !important;
}


/* Eliminación de márgenes adicionales del titular */

.single-post .breadcrumb-inner h1,
.single-post .breadcrumb-inner h2 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    line-height: 1.35 !important;
}


/* Titulares de noticias en portada */

.cs-post-title,
.cs-post-title a,
.cs-blog article h2,
.cs-blog article h2 a {
    text-transform: none !important;
}


/* Separación entre cabecera y contenido */

.single-post .cs-blog.blog_detail {
    margin-top: 0 !important;
    padding-top: 0 !important;
}


/* ==================================================
   11. IMAGEN DESTACADA DE LAS NOTICIAS
   ================================================== */


/* Contenedor de la imagen a todo el ancho */

.single-post .cs-blog.blog_detail article > figure.detail_figure {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    float: none !important;
    clear: both !important;
    margin: 0 0 20px !important;
    padding: 0 !important;
    text-align: center !important;
    box-sizing: border-box;
    overflow: visible;
}


/* Fotografía centrada, reducida y sin recortes */

.single-post .cs-blog.blog_detail article > figure.detail_figure img {
    display: block !important;
    position: static !important;
    transform: none !important;
    float: none !important;
    width: auto !important;
    max-width: 80% !important;
    height: auto !important;
    max-height: 400px !important;
    object-fit: contain;
    margin: 0 auto !important;
    border-radius: 0;
    box-shadow: none;
}


/* Garantizar que los elementos posteriores
   no se sitúen al lado de la imagen */

.single-post .cs-blog.blog_detail article > .cs-blog-panel,
.single-post .cs-blog.blog_detail article > .detail_text.rich_editor_text {
    display: block !important;
    clear: both !important;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}


/* ==================================================
   12. FECHA Y CATEGORÍAS DE LAS NOTICIAS
   ================================================== */

.single-post .cs-blog.blog_detail .cs-blog-panel {
    font-size: 12px !important;
    color: #666666 !important;
    margin-bottom: 14px;
}

.single-post .cs-blog.blog_detail .cs-blog-panel time,
.single-post .cs-blog.blog_detail .cs-blog-panel li,
.single-post .cs-blog.blog_detail .cs-blog-panel span,
.single-post .cs-blog.blog_detail .cs-blog-panel a {
    font-size: 12px !important;
    color: #666666 !important;
}

.single-post .cs-blog.blog_detail .cs-blog-panel a:hover {
    color: #ca0000 !important;
}


/* ==================================================
   13. CUERPO DE TEXTO DE LAS NOTICIAS
   ================================================== */

.single-post .detail_text.rich_editor_text p {
    font-size: 14.5px !important;
    font-weight: 400;
    line-height: 1.7 !important;
    color: #000000 !important;
    margin-bottom: 18px !important;
    text-align: left;
    overflow-wrap: break-word;
}


/* ==================================================
   14. JERARQUÍA TIPOGRÁFICA DE LAS NOTICIAS
   ================================================== */


/* Configuración común de encabezados */

.single-post .detail_text.rich_editor_text h2,
.single-post .detail_text.rich_editor_text h3,
.single-post .detail_text.rich_editor_text h4,
.single-post .detail_text.rich_editor_text h5 {
    text-transform: none !important;
    text-align: left;
    letter-spacing: normal;
    overflow-wrap: break-word;
}


/* H2: encabezado principal de sección */

.single-post .detail_text.rich_editor_text h2 {
    font-size: 30px !important;
    font-weight: 700 !important;
    color: #ca0000 !important;
    line-height: 1.3 !important;
    margin-top: 32px !important;
    margin-bottom: 12px !important;
}


/* H3: encabezado secundario */

.single-post .detail_text.rich_editor_text h3 {
    font-size: 26px !important;
    font-weight: 600 !important;
    color: #ca0000 !important;
    line-height: 1.35 !important;
    margin-top: 28px !important;
    margin-bottom: 10px !important;
}


/* H4: subtítulo en negro */

.single-post .detail_text.rich_editor_text h4 {
    font-size: 22px !important;
    font-weight: 600 !important;
    color: #000000 !important;
    line-height: 1.4 !important;
    margin-top: 24px !important;
    margin-bottom: 8px !important;
}


/* H5: subtítulo en rojo corporativo */

.single-post .detail_text.rich_editor_text h5 {
    font-size: 22px !important;
    font-weight: 600 !important;
    color: #ca0000 !important;
    line-height: 1.4 !important;
    margin-top: 24px !important;
    margin-bottom: 8px !important;
}


/* ==================================================
   15. LISTADOS Y ENUMERACIONES
   ================================================== */


/* Configuración original de listados generales */

.detail_inner .text ul li {
    font-size: 1.5rem !important;
}


/* Listados dentro de las noticias */

.single-post .detail_text.rich_editor_text ul:not(.gallery),
.single-post .detail_text.rich_editor_text ol {
    margin-top: 8px;
    margin-bottom: 20px;
    padding-left: 24px;
}


/* Elementos de los listados */

.single-post .detail_text.rich_editor_text ul li,
.single-post .detail_text.rich_editor_text ol li {
    font-size: 14.5px !important;
    font-weight: 400;
    line-height: 1.7 !important;
    color: #000000 !important;
    margin-bottom: 8px;
    text-align: left;
}


/* Marcadores en rojo corporativo */

.single-post .detail_text.rich_editor_text ul li::marker,
.single-post .detail_text.rich_editor_text ol li::marker {
    color: #ca0000;
}


/* Listados anidados */

.single-post .detail_text.rich_editor_text li ul,
.single-post .detail_text.rich_editor_text li ol {
    margin-top: 8px;
    margin-bottom: 8px;
}


/* ==================================================
   16. ENLACES Y ACCESIBILIDAD
   ================================================== */


/* Enlaces normales y visitados */

.single-post .detail_text.rich_editor_text a,
.single-post .detail_text.rich_editor_text a:visited {
    color: #ca0000 !important;
    transition: color 0.2s ease;
    overflow-wrap: anywhere;
}


/* Subrayado editorial */

.single-post .detail_text.rich_editor_text p a:not(.wp-block-button__link),
.single-post .detail_text.rich_editor_text li a:not(.wp-block-button__link),
.single-post .detail_text.rich_editor_text td a:not(.wp-block-button__link) {
    text-decoration: underline !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 3px;
}


/* Enlaces al pasar el cursor */

.single-post .detail_text.rich_editor_text a:hover,
.single-post .detail_text.rich_editor_text a:focus-visible,
.single-post .detail_text.rich_editor_text a:active {
    color: #000000 !important;
}


/* Accesibilidad mediante teclado */

.single-post .detail_text.rich_editor_text a:focus-visible {
    outline: 2px solid #ca0000;
    outline-offset: 3px;
}


/* Botones de WordPress */

.single-post .detail_text.rich_editor_text a.wp-block-button__link,
.single-post .detail_text.rich_editor_text a.wp-block-button__link:visited {
    color: #ffffff !important;
    background-color: #ca0000;
    text-decoration: none !important;
    transition: background-color 0.2s ease;
}

.single-post .detail_text.rich_editor_text a.wp-block-button__link:hover,
.single-post .detail_text.rich_editor_text a.wp-block-button__link:focus-visible,
.single-post .detail_text.rich_editor_text a.wp-block-button__link:active {
    color: #ffffff !important;
    background-color: #000000;
}


/* ==================================================
   17. FOTOGRAFÍAS Y PIES DE IMAGEN
   ================================================== */


/* Imágenes interiores adaptables */

.single-post .detail_text.rich_editor_text img {
    max-width: 100%;
    height: auto;
}


/* Fotografías con pie de imagen */

.single-post .detail_text.rich_editor_text .wp-caption {
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 24px;
}


/* Pies de fotografía */

.single-post .wp-caption-text,
.single-post .detail_text.rich_editor_text p.wp-caption-text,
.single-post .detail_text.rich_editor_text figcaption,
.single-post .detail_text.rich_editor_text .wp-element-caption {
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: #666666 !important;
    text-align: left !important;
    margin-top: 8px !important;
    margin-bottom: 20px !important;
}


/* ==================================================
   18. CITAS Y DECLARACIONES
   ================================================== */


/* Contenedor editorial de citas */

.single-post .detail_text.rich_editor_text blockquote {
    background-color: #f6f6f6;
    border: none;
    border-left: 4px solid #ca0000;
    border-radius: 0;
    padding: 20px 24px;
    margin: 26px 0;
    box-shadow: none;
    color: #000000;
    font-size: 16px;
    line-height: 1.7;
    font-style: italic;
    box-sizing: border-box;
}


/* Eliminación de adornos de la plantilla */

.single-post .detail_text.rich_editor_text blockquote::before,
.single-post .detail_text.rich_editor_text blockquote::after {
    content: none !important;
}


/* Texto interior de las citas */

.single-post .detail_text.rich_editor_text blockquote p {
    font-size: 16px !important;
    font-weight: 400;
    font-style: italic;
    line-height: 1.7 !important;
    color: #000000 !important;
    margin-bottom: 12px !important;
}

.single-post .detail_text.rich_editor_text blockquote p:last-child {
    margin-bottom: 0 !important;
}


/* Autor o fuente de la cita */

.single-post .detail_text.rich_editor_text blockquote cite {
    display: block;
    font-size: 13px !important;
    font-style: normal;
    font-weight: 600;
    color: #666666;
    margin-top: 12px;
}


/* ==================================================
   19. TABLAS Y SEPARADORES EDITORIALES
   ================================================== */


/* Contenedor de tablas */

.single-post .detail_text.rich_editor_text .wp-block-table {
    max-width: 100%;
    overflow-x: auto;
    margin: 24px 0;
}


/* Tablas */

.single-post .detail_text.rich_editor_text table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 24px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #000000;
    background-color: #ffffff;
}

.single-post .detail_text.rich_editor_text .wp-block-table table {
    margin: 0;
}


/* Encabezados de tabla */

.single-post .detail_text.rich_editor_text table th {
    background-color: #ca0000 !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600;
    text-align: left;
    text-transform: none !important;
    padding: 12px 14px;
    border: 1px solid #ca0000;
}


/* Celdas */

.single-post .detail_text.rich_editor_text table td {
    padding: 11px 14px;
    border: 1px solid #e0e0e0;
    color: #000000;
    text-align: left;
    vertical-align: top;
}


/* Filas alternas */

.single-post .detail_text.rich_editor_text table tbody tr:nth-child(odd) td {
    background-color: #ffffff;
}

.single-post .detail_text.rich_editor_text table tbody tr:nth-child(even) td {
    background-color: #f5f5f5;
}


/* Texto dentro de las tablas */

.single-post .detail_text.rich_editor_text table td p {
    font-size: inherit !important;
    line-height: inherit !important;
    margin-bottom: 8px !important;
}

.single-post .detail_text.rich_editor_text table td p:last-child {
    margin-bottom: 0 !important;
}


/* Contraste en las cabeceras de tabla */

.single-post .detail_text.rich_editor_text table th p,
.single-post .detail_text.rich_editor_text table th a,
.single-post .detail_text.rich_editor_text table th a:visited {
    color: #ffffff !important;
}

.single-post .detail_text.rich_editor_text table th a:hover,
.single-post .detail_text.rich_editor_text table th a:focus-visible {
    color: #ffffff !important;
    text-decoration: underline !important;
}

.single-post .detail_text.rich_editor_text table th a:focus-visible {
    outline-color: #ffffff;
}

.single-post .detail_text.rich_editor_text table th p {
    font-size: inherit !important;
    font-weight: 600;
    margin-bottom: 0 !important;
}


/* Separadores horizontales */

.single-post .detail_text.rich_editor_text hr {
    display: block;
    position: relative;
    width: 100%;
    max-width: none;
    height: 1px;
    border: none !important;
    background-color: #dddddd;
    margin: 32px auto;
    overflow: visible;
    opacity: 1;
}


/* Detalle rojo central */

.single-post .detail_text.rich_editor_text hr::after {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    background-color: #ca0000;
}


/* ==================================================
   20. NOTICIAS RELACIONADAS - JETPACK
   ================================================== */


/* Contenedor general */

.single-post #jp-relatedposts {
    margin-top: 40px !important;
    margin-bottom: 28px !important;
    padding-top: 20px !important;
    border-top: 1px solid #dddddd;
}


/* Encabezado de noticias relacionadas */

.single-post #jp-relatedposts h3.jp-relatedposts-headline {
    font-family: 'Roboto Slab', serif;
    font-size: 22px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #000000 !important;
    text-transform: none !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    display: block;
    float: none;
}

.single-post #jp-relatedposts h3.jp-relatedposts-headline em {
    font-weight: 600 !important;
    font-style: normal;
}

.single-post #jp-relatedposts h3.jp-relatedposts-headline em::before {
    display: none !important;
}


/* Cuadrícula de tres columnas */

.single-post #jp-relatedposts .jp-relatedposts-items {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 0 !important;
}


/* Contenedor individual de cada noticia */

.single-post #jp-relatedposts .jp-relatedposts-post {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    opacity: 1 !important;
    box-sizing: border-box;
    text-align: left;
}


/* Eliminar elementos sobrantes de la cuadrícula */

.single-post #jp-relatedposts .jp-relatedposts-items::before,
.single-post #jp-relatedposts .jp-relatedposts-items::after {
    display: none !important;
}


/* Miniaturas de noticias relacionadas */

.single-post #jp-relatedposts img.jp-relatedposts-post-img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    opacity: 1 !important;
    margin: 0 0 10px !important;
    border-radius: 0;
    box-shadow: none;
}


/* Titulares de noticias relacionadas */

.single-post #jp-relatedposts .jp-relatedposts-post-title {
    display: block;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
    margin-top: 10px !important;
    margin-bottom: 8px !important;
    text-transform: none !important;
    color: #ca0000 !important;
}


/* Enlaces de noticias relacionadas */

.single-post #jp-relatedposts .jp-relatedposts-post-title a,
.single-post #jp-relatedposts .jp-relatedposts-post-title a:visited {
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
    color: #ca0000 !important;
    text-decoration: none !important;
    opacity: 1 !important;
}

.single-post #jp-relatedposts .jp-relatedposts-post-title a:hover,
.single-post #jp-relatedposts .jp-relatedposts-post-title a:focus-visible {
    color: #000000 !important;
    text-decoration: underline !important;
}


/* Fecha de publicación */

.single-post #jp-relatedposts .jp-relatedposts-post-date {
    display: block;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: #666666 !important;
    opacity: 1 !important;
}


/* Ocultar categorías y extractos */

.single-post #jp-relatedposts .jp-relatedposts-post-context,
.single-post #jp-relatedposts .jp-relatedposts-post-excerpt {
    display: none !important;
}


/* ==================================================
   21. ADAPTACIÓN A DISPOSITIVOS MÓVILES
   ================================================== */

@media (max-width: 767px) {


    /* Cabecera principal */

    .single-post .breadcrumb-inner {
        padding-top: 16px !important;
        padding-bottom: 16px !important;
    }


    /* Imagen destacada a todo el ancho */

    .single-post .cs-blog.blog_detail article > figure.detail_figure {
        width: 100% !important;
        margin-bottom: 15px !important;
    }

    .single-post .cs-blog.blog_detail article > figure.detail_figure img {
        width: 100% !important;
        max-width: 100% !important;
        max-height: none !important;
        height: auto !important;
    }


    /* Cuerpo de texto y listados */

    .single-post .detail_text.rich_editor_text p,
    .single-post .detail_text.rich_editor_text ul li,
    .single-post .detail_text.rich_editor_text ol li {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }

    .single-post .detail_text.rich_editor_text p {
        margin-bottom: 18px !important;
    }


    /* Encabezados */

    .single-post .detail_text.rich_editor_text h2 {
        font-size: 28px !important;
        margin-top: 28px !important;
    }

    .single-post .detail_text.rich_editor_text h3 {
        font-size: 25px !important;
        margin-top: 26px !important;
    }

    .single-post .detail_text.rich_editor_text h4,
    .single-post .detail_text.rich_editor_text h5 {
        font-size: 22px !important;
        margin-top: 22px !important;
    }


    /* Listados */

    .single-post .detail_text.rich_editor_text ul:not(.gallery),
    .single-post .detail_text.rich_editor_text ol {
        padding-left: 20px;
    }


    /* Pies de fotografía */

    .single-post .wp-caption-text,
    .single-post .detail_text.rich_editor_text p.wp-caption-text,
    .single-post .detail_text.rich_editor_text figcaption,
    .single-post .detail_text.rich_editor_text .wp-element-caption {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }


    /* Citas */

    .single-post .detail_text.rich_editor_text blockquote {
        padding: 16px 18px;
        margin: 22px 0;
    }

    .single-post .detail_text.rich_editor_text blockquote p {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }

    .single-post .detail_text.rich_editor_text blockquote p:last-child {
        margin-bottom: 0 !important;
    }


    /* Tablas clásicas */

    .single-post .detail_text.rich_editor_text table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        font-size: 14px;
    }


    /* Tablas de bloques de WordPress */

    .single-post .detail_text.rich_editor_text .wp-block-table table {
        display: table;
        overflow-x: visible;
    }

    .single-post .detail_text.rich_editor_text table th,
    .single-post .detail_text.rich_editor_text table td {
        padding: 10px;
        overflow-wrap: break-word;
    }

    .single-post .detail_text.rich_editor_text table td p,
    .single-post .detail_text.rich_editor_text table th p {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }


    /* Separadores */

    .single-post .detail_text.rich_editor_text hr {
        margin: 26px auto;
    }


    /* Noticias relacionadas: una columna */

    .single-post #jp-relatedposts .jp-relatedposts-items {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .single-post #jp-relatedposts .jp-relatedposts-post {
        padding-bottom: 18px !important;
        border-bottom: 1px solid #e5e5e5;
    }

    .single-post #jp-relatedposts .jp-relatedposts-post:last-child {
        padding-bottom: 0 !important;
        border-bottom: none;
    }

    .single-post #jp-relatedposts .jp-relatedposts-post-title,
    .single-post #jp-relatedposts .jp-relatedposts-post-title a {
        font-size: 16px !important;
    }

    .single-post #jp-relatedposts h3.jp-relatedposts-headline {
        font-size: 22px !important;
    }
}


/* ==================================================
   22. ACCESIBILIDAD Y MOVIMIENTO REDUCIDO
   ================================================== */

@media (prefers-reduced-motion: reduce) {

    .single-post .detail_text.rich_editor_text a {
        transition: none !important;
    }
}


/* ==================================================
   FIN DEL CSS PERSONALIZADO
   AYUNTAMIENTO DE FUENTES DE EBRO
   ================================================== */
