/* Ayuntamiento de Valdaracete - personalización de Cassiopeia (colores de la web anterior) */
:root {
  --cassiopeia-color-primary: #154c7a;
  --cassiopeia-color-link: #205f93;
  --cassiopeia-color-hover: #e09b0f;
  --valda-oscuro: #0a3966;
  --valda-naranja: #e09b0f;
}

/* Cabecera azul lisa, como la original */
.container-header { background: var(--cassiopeia-color-primary); background-image: none; }
.container-header .navbar-brand img { max-height: 56px; }
.container-header .container-search { margin-top: .5rem; }
.botones-arriba p { margin: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.botones-arriba img { height: 33px; width: auto; border-radius: 3px; background: #fff; }

/* Menú principal en mayúsculas con marca naranja en la opción activa */
.container-header .mod-menu > li > a { text-transform: uppercase; font-weight: 600; font-size: .9rem; letter-spacing: .02em; }
.container-header .metismenu > li.active > a,
.container-header .metismenu > li > a:hover { box-shadow: inset 0 3px 0 var(--valda-naranja); }

/* Carrusel CSS (sin JavaScript) */
.carrusel { position: relative; height: 400px; overflow: hidden; background: var(--valda-oscuro); }
.carrusel .slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0;
  animation: valda-fade 18s infinite; }
.carrusel .slide:nth-child(1) { animation-delay: 0s; }
.carrusel .slide:nth-child(2) { animation-delay: 6s; }
.carrusel .slide:nth-child(3) { animation-delay: 12s; }
@keyframes valda-fade { 0% {opacity:0} 4% {opacity:1} 33% {opacity:1} 37% {opacity:0} 100% {opacity:0} }
.carrusel .caption { position: absolute; left: max(1rem, calc((100% - 1320px) / 2 + 1rem)); bottom: 3rem; max-width: 26rem;
  background: rgba(224,155,15,.92); color: #fff; padding: 1.25rem 1.5rem; }
.carrusel .caption h2 { color: #fff; text-transform: uppercase; font-size: 1.8rem; margin: 0 0 .5rem; }
.carrusel .caption p { margin: 0; }
.carrusel .caption a { color: #fff; text-decoration: underline; }
@media (max-width: 767px) { .carrusel { height: 260px; } .carrusel .caption { bottom: 1rem; right: 1rem; padding: .75rem 1rem; }
  .carrusel .caption h2 { font-size: 1.2rem; } .carrusel .caption p { display: none; } }
@media (prefers-reduced-motion: reduce) { .carrusel .slide { animation: none; } .carrusel .slide:first-child { opacity: 1; } }
.container-banner { margin-bottom: 1.5rem; }

/* Columna derecha */
.menu-lateral .card-header, .sidebar-right .card-header { background: none; border: 0; text-transform: uppercase; font-weight: 700;
  font-size: .95rem; color: #222; padding-bottom: 0; }
.menu-lateral ul.mod-menu { padding: 0; margin: 0; list-style: none; display: block; }
.menu-lateral ul.mod-menu li { border-bottom: 1px dotted #ccc; }
.menu-lateral ul.mod-menu li a { display: block; padding: .45rem 0; color: #555; text-decoration: none; }
.menu-lateral ul.mod-menu li a:hover, .menu-lateral ul.mod-menu li.current > a { color: var(--cassiopeia-color-link); }
.botones-sede p, .botones-empleo p { margin: 0 0 .5rem; }
.botones-sede img, .botones-empleo img { max-width: 100%; height: auto; }

/* Enlaces a documentos (antes DOCman) */
a.doclink::before { content: ""; display: inline-block; width: 1em; height: 1.15em; margin-right: .35em; vertical-align: -.15em;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Cpath fill='%23c0392b' d='M2 0h14l8 8v18a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2z'/%3E%3Cpath fill='%23fff' opacity='.5' d='M16 0v8h8z'/%3E%3Ctext x='12' y='22' font-size='7' font-family='Arial' font-weight='700' fill='%23fff' text-anchor='middle'%3EPDF%3C/text%3E%3C/svg%3E"); }

/* Bloque de enlaces de interés y pie */
.container-bottom-a { background: #f3f5f8; padding: 1.5rem 0; }
.botones-abajo p { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin: 0; }
.botones-abajo img { max-width: 100%; height: auto; }
.footer { background: var(--valda-oscuro); background-image: none; }
.footer .contact-list { list-style: none; padding: 0; margin: 0; }
.footer a { color: #fff; }

/* Portada: listado de noticias */
.blog-featured .blog-item { border-bottom: 1px solid #e5e5e5; padding-bottom: 1rem; margin-bottom: 1rem; }
.blog-featured .item-title, .blog-featured h2 { font-size: 1.3rem; font-weight: 400; }

/* Portada: noticias compactas (miniatura + extracto), como en la web anterior */
.blog-featured .item-content { position: relative; max-height: 15rem; overflow: hidden; }
.blog-featured .item-content::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3rem;
  background: linear-gradient(rgba(255,255,255,0), #fff); }
.blog-featured .item-content img { float: left; max-width: 140px !important; height: auto !important; margin: 0 1rem .5rem 0; border: 1px solid #e5e5e5; }
.blog-featured .item-content p:empty, .blog-featured .item-content p:has(> br:only-child) { display: none; }
.blog-featured .blog-item::after { content: ""; display: block; clear: both; }
.blog-featured .item-title a { text-decoration: none; }
.article-info .article-info-term { display: none; }

/* Columna derecha: quitar párrafos vacíos (&nbsp;) heredados */
.botones-sede p:not(:has(img)), .botones-empleo p:not(:has(img)) { display: none; }

/* Contenido antiguo con anchos fijos: que no desborde en móvil */
.com-content-article__body img, .item-content img { max-width: 100%; height: auto; }
.com-content-article__body table { display: block; max-width: 100%; overflow-x: auto; }
.com-content-article__body, .item-content { overflow-wrap: anywhere; }
