/*
Theme Name: Valdesanmartin Aguas - Child
Template: astra
Version: 3.4.6
Description: Rediseño completo con identidad de agua, layout coherente y hero reutilizable.
Author: Comunidad de Propietarios Valdesanmartin
Text Domain: aguasvdsm-child
*/

/* ==========================================================================
   VARIABLES
   ========================================================================== */
:root {
    --vdsm-azul-profundo: #0b3d5c;
    --vdsm-azul-medio:    #11567f;
    --vdsm-azul-océano:   #1a7fa8;
    --vdsm-turquesa:      #1ba6bd;
    --vdsm-aguamarina:    #3cc6d6;
    --vdsm-cielo:         #dff3f7;
    --vdsm-burbuja:       #f0fafc;
    --vdsm-grafito:       #1c2b33;
    --vdsm-texto:         #33464f;
    --vdsm-grad-hero:     linear-gradient(135deg, #0b3d5c 0%, #11567f 45%, #1a7fa8 100%);
}

/* ==========================================================================
   TIPOGRAFIA
   ========================================================================== */
body {
    color: var(--vdsm-texto);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
    color: var(--vdsm-azul-profundo);
    font-weight: 700;
}

/* ==========================================================================
   HEADER - Logo MUY grande, sin nombre
   ========================================================================== */
.site-logo-img .custom-logo {
    max-height: 80px;
    width: auto;
}
.ast-site-title-wrap {
    display: none !important;
}

/* ==========================================================================
   HEADER - Menu en 1 linea, iconos monocromaticos mas grandes
   ========================================================================== */
#ast-hf-menu-1 {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    align-items: center;
}
#ast-hf-menu-1 > li.menu-item {
    list-style: none;
}
#ast-hf-menu-1 > li.menu-item > a.menu-link {
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    text-decoration: none;
    color: var(--vdsm-grafito);
    transition: color 0.2s ease;
}
#ast-hf-menu-1 > li.menu-item > a.menu-link:hover {
    color: var(--vdsm-turquesa);
}

/* Ocultar Inicio del menu */
li.menu-item-home {
    display: none !important;
}

/* ==========================================================================
   HEADER - Buscador: sin borde, solo lupa, animacion invertida
   ========================================================================== */
.vdsm-header-search-form {
    display: flex;
    align-items: center;
    border: none;
    border-radius: 999px;
    padding: 0.3rem;
    background: transparent;
    margin-left: 0.5rem;
}
.vdsm-header-search-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.85rem;
    width: 0;
    padding: 0;
    transition: width 0.3s ease, padding 0.3s ease;
}
.vdsm-header-search-wrap:focus-within .vdsm-header-search-input {
    width: 180px;
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid var(--vdsm-turquesa);
}
.vdsm-header-search-submit {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    color: var(--vdsm-azul-medio);
    display: flex;
    align-items: center;
    line-height: 1;
}
.vdsm-header-search-submit:hover {
    color: var(--vdsm-turquesa);
}
.vdsm-header-search-submit svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   BREADCRUMB - Transparente, texto oscuro, sin barras de fondo
   ========================================================================== */
.main-header-bar.ast-header-breadcrumb {
    background: transparent;
    padding: 0.3rem 0;
    min-height: auto;
    border-bottom: none;
    box-shadow: none;
}
.ast-breadcrumbs-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.ast-breadcrumbs {
    padding: 0;
}
ul.trail-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.82rem;
}
li.trail-item {
    display: flex;
    align-items: center;
}
li.trail-item.trail-begin a {
    color: var(--vdsm-azul-medio);
    text-decoration: none;
    font-weight: 500;
}
li.trail-item.trail-begin a:hover {
    color: var(--vdsm-turquesa);
    text-decoration: underline;
}
li.trail-item.trail-begin::after {
    content: "›";
    margin: 0 0.4rem;
    color: #8fa8b8;
    font-size: 0.9em;
}
li.trail-item.trail-end span {
    color: var(--vdsm-azul-profundo);
    font-weight: 600;
}

/* ==========================================================================
   SIDEBAR - Bocadillos, titulos reducidos
   ========================================================================== */
.widget-area.secondary .widget {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 1.1rem;
    margin-bottom: 0.7rem;
    border: 1px solid rgba(11, 61, 92, 0.07);
    box-shadow: 0 2px 8px rgba(11, 61, 92, 0.05);
}
.widget-area.secondary .widget-title,
.widget-area.secondary h2 {
    font-size: 0.75rem;
    color: var(--vdsm-azul-profundo);
    margin-bottom: 0.4rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid var(--vdsm-cielo);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.widget-area.secondary .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget-area.secondary .widget li {
    padding: 0.2rem 0;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(11, 61, 92, 0.05);
    line-height: 1.4;
}
.widget-area.secondary .widget li:last-child {
    border-bottom: none;
}
.widget-area.secondary .widget li a {
    color: var(--vdsm-azul-medio);
    text-decoration: none;
}
.widget-area.secondary .widget li a:hover {
    color: var(--vdsm-turquesa);
}

/* Comentarios en el sidebar bajo los widgets de acceso directo */
.vdsm-sidebar-comentarios .vdsm-sidebar-comentario {
    padding: 0.55rem 0;
    border-bottom: 1px dashed rgba(11, 61, 92, 0.12);
}
.vdsm-sidebar-comentarios .vdsm-sidebar-comentario:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.vdsm-sidebar-comentarios .vdsm-sidebar-comentario__enlace {
    display: block;
    text-decoration: none;
}
.vdsm-sidebar-comentarios .vdsm-sidebar-comentario__texto {
    display: block;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--vdsm-texto, #33464f);
    text-transform: none;
    letter-spacing: 0;
}
.vdsm-sidebar-comentarios .vdsm-sidebar-comentario__enlace:hover .vdsm-sidebar-comentario__texto {
    color: var(--vdsm-turquesa);
}
.vdsm-sidebar-comentarios .vdsm-sidebar-comentario__autor {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--vdsm-azul-profundo, #0b3d5c);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Widget de bloques "Comentarios" (listado de comentarios recientes) */
.widget-area.secondary .wp-block-latest-comments {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget-area.secondary .wp-block-latest-comments__comment {
    font-size: 0.82rem;
    line-height: 1.35;
    padding: 0.55rem 0;
    border-bottom: 1px dashed rgba(11, 61, 92, 0.12);
}
.widget-area.secondary .wp-block-latest-comments__comment:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.widget-area.secondary .wp-block-latest-comments__comment-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
}
.widget-area.secondary .wp-block-latest-comments__comment-author {
    color: var(--vdsm-azul-profundo, #0b3d5c);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.widget-area.secondary .wp-block-latest-comments__comment-excerpt p {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: var(--vdsm-texto, #33464f);
}
.widget-area.secondary .wp-block-latest-comments a {
    color: var(--vdsm-azul-profundo, #0b3d5c);
    text-decoration: none;
}
.widget-area.secondary .wp-block-latest-comments a:hover {
    color: var(--vdsm-turquesa);
}

/* Ocultar widget de busqueda en sidebar */
.widget.widget_search,
aside.widget_search {
    display: none !important;
}

/* ==========================================================================
   SIDEBAR FIJO - Panel lateral sin scroll de página, secciones con scroll
   interno (títulos fijos; cada sección desplaza su contenido por dentro)
   ========================================================================== */
.ast-left-sidebar #secondary {
    position: sticky;
    top: 1rem;
    -webkit-align-self: flex-start;
    align-self: flex-start;
    max-height: calc(100vh - 2rem);
}
.widget-area.secondary {
    display: -webkit-box;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    flex-direction: column;
    gap: 0.7rem;
    height: calc(100vh - 2rem);
    overflow: hidden;
}
.widget-area.secondary .widget {
    display: -webkit-box;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 0;
    overflow: hidden;
}
.widget-area.secondary .widget-title,
.widget-area.secondary .widget h2,
.widget-area.secondary .widget h5 {
    -webkit-box-flex: 0;
    flex: 0 0 auto;
}
.widget-area.secondary .widget .wp-block-group {
    display: -webkit-box;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    flex-direction: column;
    -webkit-box-flex: 1;
    flex: 1 1 auto;
    min-height: 0;
}
.widget-area.secondary .widget ul,
.widget-area.secondary .widget ol,
.widget-area.secondary .widget .wp-block-latest-posts,
.widget-area.secondary .widget .wp-block-list {
    -webkit-box-flex: 1;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-right: 0.2rem;
}
@media (max-width: 820px) {
    .ast-left-sidebar #secondary {
        position: static;
        max-height: none;
    }
    .widget-area.secondary {
        height: auto;
        display: block;
        gap: 0;
        overflow: visible;
    }
    .widget-area.secondary .widget {
        display: block;
        min-height: auto;
        margin-bottom: 0.7rem;
        overflow: visible;
    }
    .widget-area.secondary .widget .wp-block-group {
        display: block;
    }
    .widget-area.secondary .widget ul,
    .widget-area.secondary .widget ol {
        overflow: visible;
    }
}

/* ==========================================================================
   LAYOUT - Sidebar izquierda, contenido derecha
   ========================================================================== */
.ast-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}
.ast-left-sidebar .ast-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}
.ast-left-sidebar #secondary {
    flex: 0 0 250px;
    order: -1;
    min-width: 250px;
}
.ast-left-sidebar #primary {
    flex: 1;
    min-width: 0;
}
.entry-content {
    max-width: 100%;
}

/* ==========================================================================
   HERO REUTILIZABLE
   ========================================================================== */
.vdsm-hero {
    position: relative;
    overflow: hidden;
    padding: 5rem 2rem 6rem;
    text-align: center;
    color: #fff;
    background: var(--vdsm-grad-hero);
    margin: -1.5rem -1.5rem 2rem;
    border-radius: 0;
}
.vdsm-hero--image {
    background-size: cover;
    background-position: center;
}
.vdsm-hero--image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(11, 61, 92, 0.5);
    z-index: 1;
}
.vdsm-hero--image > * {
    position: relative;
    z-index: 2;
}
.vdsm-hero::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 80px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'><path fill='%23ffffff' d='M0,40L60,35C120,30,240,20,360,24C480,28,600,46,720,54C840,62,960,62,1080,54C1200,46,1320,30,1380,22L1440,14L1440,80L1380,80C1320,80,1200,80,1080,80C960,80,840,80,720,80C600,80,480,80,360,80C240,80,120,80,60,80L0,80Z'/></svg>");
    background-size: cover;
    background-position: bottom;
    z-index: 3;
}
.vdsm-hero h1 {
    color: #fff;
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    max-width: 700px;
    margin: 0 auto 0.8rem;
    line-height: 1.15;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.vdsm-hero p {
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    max-width: 580px;
    margin: 0 auto 1.5rem;
    opacity: 0.92;
    text-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
/* Hero sobre fondo claro con título azul marino */
.vdsm-hero--plano {
    background: linear-gradient(180deg, #f0fafc 0%, #dff3f7 100%);
    color: var(--vdsm-azul-profundo, #0b3d5c);
}
.vdsm-hero--plano h1 {
    color: var(--vdsm-azul-profundo, #0b3d5c);
    text-shadow: none;
}
.vdsm-hero--plano p {
    color: var(--vdsm-texto, #33464f);
    text-shadow: none;
}

/* Hero del podcast/archivo de comunicados: dentro de la columna, sobre la lista */
.vdsm-hero--blog {
    margin: 0 0 2rem !important;
    border-radius: 16px;
}

/* Botones CTA */
.vdsm-btn {
    display: inline-block;
    background: var(--vdsm-turquesa);
    color: #fff;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 2px solid transparent;
}
.vdsm-btn:hover {
    background: var(--vdsm-aguamarina);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.vdsm-btn--ghost {
    background: transparent;
    border-color: rgba(255,255,255,0.7);
}
.vdsm-btn--ghost:hover {
    background: rgba(255,255,255,0.12);
}

/* ==========================================================================
   TARJETAS HOMEPAGE - 3 en linea, sin subrayados
   ========================================================================== */
.vdsm-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin: 2rem 0;
}
.vdsm-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(11, 61, 92, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}
.vdsm-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(11, 61, 92, 0.15);
}
.vdsm-card__img {
    height: 140px;
    background-size: cover;
    background-position: center;
}
.vdsm-card__body {
    padding: 1rem;
    flex: 1;
}
.vdsm-card__title {
    font-size: 1rem;
    margin: 0 0 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.vdsm-card__text {
    color: var(--vdsm-texto);
    font-size: 0.85rem;
    margin: 0 0 0.6rem;
    line-height: 1.45;
}
.vdsm-card__link {
    color: var(--vdsm-turquesa);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.vdsm-card__link::after {
    content: "\2192";
    transition: transform 0.2s ease;
}
.vdsm-card:hover .vdsm-card__link::after {
    transform: translateX(4px);
}

/* Quitar subrayado de tarjetas */
.vdsm-card,
.vdsm-card * {
    text-decoration: none !important;
}

/* ==========================================================================
   QUIENES SOMOS - Titulos de cards reducidos
   ========================================================================== */
.vdsm-qs-icono {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--vdsm-azul-profundo);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: var(--vdsm-turquesa);
    background: var(--vdsm-burbuja);
}
.wp-block-column h3 {
    text-align: center;
    font-size: 1rem !important;
    white-space: nowrap;
}
.wp-block-column p {
    text-align: center;
    font-size: 0.88rem;
    line-height: 1.55;
}

/* ==========================================================================
   COMUNICADOS
   ========================================================================== */
.vdsm-comunicado {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(11,61,92,0.08);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(11,61,92,0.06);
}
.vdsm-comunicado__img {
    height: 200px;
    background-size: cover;
    background-position: center;
}
.vdsm-comunicado__body {
    padding: 1.5rem;
}
.vdsm-comunicado__fecha {
    font-size: 0.82rem;
    color: var(--vdsm-turquesa);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.vdsm-comunicado__titulo {
    font-size: 1.2rem;
    margin: 0 0 0.6rem;
}
.vdsm-comunicado__excerpt {
    color: var(--vdsm-texto);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* Paginas individuales de comunicados - estilo limpio */
.single-post .entry-content {
    font-size: 0.95rem;
    line-height: 1.65;
    padding: 1.5rem;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(11,61,92,0.08);
}
.single-post .entry-content p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}
.single-post .entry-content img {
    border-radius: 12px;
    max-height: 350px;
    width: 100%;
    object-fit: cover;
}
.single-post .entry-title,
.single-post h1.entry-title {
    font-size: 1.6rem !important;
    margin-bottom: 0.3rem;
}
.single-post .entry-meta {
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

/* Seccion comentarios reducida y compacta */
.comments-area,
#comments {
    font-size: 0.85rem;
    padding: 1rem 0;
}
.comments-area .comment-respond,
#respond {
    padding: 0.8rem 1rem;
    background: var(--vdsm-burbuja);
    border-radius: 14px;
    margin-top: 1rem;
}
.comment-reply-title {
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
}
.comments-area .comment-respond p,
#respond p {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
}
.comments-area .comment-respond label,
#respond label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--vdsm-azul-profundo);
    margin-bottom: 0.2rem;
}
.comments-area .comment-respond input[type="text"],
.comments-area .comment-respond input[type="email"],
.comments-area .comment-respond textarea,
#respond input[type="text"],
#respond input[type="email"],
#respond textarea {
    font-size: 0.85rem;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    border: 1px solid #d0dbe2;
    width: 100%;
    box-sizing: border-box;
}
.comments-area .comment-respond textarea,
#respond textarea {
    min-height: 60px;
    max-height: 100px;
}
.comment-form-author-flex {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.comment-form-author-flex input {
    flex: 1 1 140px;
    min-width: 0;
}
.form-submit .submit {
    background: var(--vdsm-turquesa);
    color: #fff;
    border: none;
    padding: 0.5rem 1.2rem !important;
    border-radius: 999px !important;
    font-size: 0.85rem !important;
    cursor: pointer;
}
.form-submit .submit:hover {
    background: var(--vdsm-azul-medio);
}
.comments-area .comment-list,
#comments .comment-list {
    display: none !important;
}
.comments-title,
h2.comments-title {
    display: none !important;
}
.comment-form-url,
.comment-form-cookies-consent,
p.comment-form-email {
    display: none !important;
}

/* ==========================================================================
   PIE DE PAGINA - OCULTO
   ========================================================================== */
.site-footer,
.ast-footer-overlay,
.ast-builder-footer-focus-item,
.vdsm-footer-contacto {
    display: none !important;
}

/* ==========================================================================
   BOTONES GENERICOS
   ========================================================================== */
.ast-button,
.wp-block-button__link,
button,
input[type="submit"] {
    border-radius: 999px !important;
    font-weight: 600;
    transition: all 0.25s ease;
}

/* ==========================================================================
   FORMULARIO CONTACTO - Mejorado
   ========================================================================== */
.wpcf7 .wpcf7-form label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--vdsm-azul-profundo);
    margin-bottom: 0.2rem;
}
.wpcf7 .wpcf7-form label .wpcf7-req {
    color: #e74c3c;
    font-weight: 700;
    margin-left: 0.15rem;
}
.wpcf7 .wpcf7-form .wpcf7-text,
.wpcf7 .wpcf7-form .wpcf7-email,
.wpcf7 .wpcf7-form .wpcf7-textarea {
    border-radius: 8px;
    border: 1px solid #d0dbe2;
    padding: 0.55rem 0.8rem;
    font-size: 0.88rem;
    width: 100%;
    box-sizing: border-box;
}
.wpcf7 .wpcf7-form .wpcf7-text:focus,
.wpcf7 .wpcf7-form .wpcf7-email:focus,
.wpcf7 .wpcf7-form .wpcf7-textarea:focus {
    border-color: var(--vdsm-turquesa);
    outline: none;
    box-shadow: 0 0 0 3px rgba(27,166,189,0.15);
}
.wpcf7 .wpcf7-submit {
    background: var(--vdsm-turquesa) !important;
    color: #fff !important;
    border: none !important;
    padding: 0.65rem 1.8rem !important;
    font-size: 0.92rem !important;
    cursor: pointer;
}
.wpcf7 .wpcf7-submit:hover {
    background: var(--vdsm-azul-medio) !important;
}

/* Campos nombre y email en 1 linea */
.wpcf7-fila {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.wpcf7-campo {
    flex: 1 1 220px;
    min-width: 0;
}
.wpcf7 .wpcf7-form .wpcf7-not-valid-tip {
    font-size: 0.78rem;
    color: #e74c3c;
}
.wpcf7-response-output {
    font-size: 0.85rem;
    border-radius: 8px !important;
    padding: 0.5rem 0.8rem !important;
}
.wpcf7 .wpcf7-req {
    color: #e74c3c;
    font-weight: 700;
}

/* ==========================================================================
   MAPA
   ========================================================================== */
.vdsm-mapa {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(11,61,92,0.1);
    margin: 1.5rem 0;
    border: 2px solid var(--vdsm-cielo);
}
.vdsm-mapa iframe {
    display: block;
    width: 100%;
    height: 350px;
    border: none;
}

/* ==========================================================================
   GRID DOCUMENTOS
   ========================================================================== */
.vdsm-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin: 1.5rem 0;
}
.vdsm-doc-cat {
    background: #fff;
    border-radius: 14px;
    padding: 1.3rem;
    text-align: center;
    box-shadow: 0 3px 12px rgba(11,61,92,0.08);
    border: 1px solid rgba(11,61,92,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}
.vdsm-doc-cat:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(11,61,92,0.12);
}
.vdsm-doc-cat__icono {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--vdsm-cielo);
    color: var(--vdsm-azul-profundo);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.7rem;
    font-size: 1.4rem;
}
.vdsm-doc-cat__titulo {
    font-size: 1rem;
    margin: 0 0 0.25rem;
    color: var(--vdsm-azul-profundo);
}
.vdsm-doc-cat__count {
    font-size: 0.78rem;
    color: var(--vdsm-turquesa);
    font-weight: 600;
}

/* ==========================================================================
   QUITAR FACEBOOK - ocultar en AddToAny
   ========================================================================== */
a.a2a_button_facebook,
[class*="facebook"],
a2a_kit a[href*="facebook"] {
    display: none !important;
}

/* ==========================================================================
   OCULTAR TITULO DE PAGINA ASTRA (ya esta en el hero)
   ========================================================================== */
.page .entry-header,
.single .entry-header,
.blog .entry-header,
.archive .entry-header {
    display: none !important;
}

/* En pagina de contacto: campos nombre y email en 1 linea */
.wpcf7-form .wpcf7-columns {
    display: flex;
    gap: 1rem;
}
.wpcf7-form .wpcf7-column {
    flex: 1;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 921px) {
    .ast-left-sidebar .ast-container {
        flex-direction: column;
    }
    .ast-left-sidebar #secondary {
        flex: none;
        width: 100%;
        min-width: auto;
        order: 1;
    }
    .ast-left-sidebar #primary {
        max-width: 100%;
    }
    #ast-hf-menu-1 {
        flex-wrap: wrap;
        justify-content: center;
    }
    .vdsm-hero {
        padding: 3.5rem 1rem 4.5rem;
    }
    .vdsm-cards {
        grid-template-columns: 1fr;
    }
    .vdsm-doc-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   DOCUMENTOS - TABLA CON BUSCADOR, FILTROS Y VISTA MODAL (shortcode)
   ========================================================================== */
.vdsm-doc-panel,
.vdsm-doc-panel *,
.vdsm-doc-modal,
.vdsm-doc-modal * {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}
.vdsm-doc-panel {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(11,61,92,0.1);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(11,61,92,0.06), inset 0 2px 0 rgba(46,134,171,0.12);
    padding: 1.25rem 1.2rem 1.35rem;
    margin: 1.4rem 0;
    font-size: 0.9rem;
    color: var(--vdsm-azul-profundo, #0b3d5c);
}
/* ── Barra de búsqueda y filtros ──────────────────────────────── */
.vdsm-doc-toolbar {
    display: -webkit-box;
    display: flex;
    gap: 0.8rem 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(11,61,92,0.08);
}
.vdsm-doc-search {
    position: relative;
    -webkit-box-flex: 1;
    flex: 1 1 20px;
    min-width: 180px;
}
.vdsm-doc-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    color: #7fa6bd;
    pointer-events: none;
}
.vdsm-doc-search input {
    width: 100%;
    padding: 0.6rem 0.8rem 0.6rem 2.35rem;
    border: 1px solid rgba(11,61,92,0.18);
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--vdsm-azul-profundo, #0b3d5c);
    background: #fbfdff;
    -webkit-transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.vdsm-doc-search input:focus {
    outline: none;
    background: #fff;
    border-color: var(--vdsm-turquesa, #2e86ab);
    box-shadow: 0 0 0 3px rgba(46,134,171,0.12);
}
.vdsm-doc-filtros {
    display: -webkit-box;
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-left: auto;
}
.vdsm-doc-filtro {
    display: -webkit-box;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--vdsm-turquesa, #2e86ab);
}
.vdsm-doc-filtro select {
    appearance: none;
    -webkit-appearance: none;
    min-width: 132px;
    padding: 0.56rem 2rem 0.56rem 0.8rem;
    border: 1px solid rgba(11,61,92,0.18);
    border-radius: 10px;
    background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232e86ab' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 0.7rem center;
    background-size: 11px;
    font-size: 0.87rem;
    color: var(--vdsm-azul-profundo, #0b3d5c);
    font-family: inherit;
    cursor: pointer;
    -webkit-transition: border-color 0.15s, box-shadow 0.15s;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.vdsm-doc-filtro select:focus {
    outline: none;
    border-color: var(--vdsm-turquesa, #2e86ab);
    box-shadow: 0 0 0 3px rgba(46,134,171,0.12);
}
/* ── Tabla ────────────────────────────────────────────────────── */
.vdsm-doc-tabla-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.vdsm-doc-tabla {
    width: 100%;
    border: none;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 640px;
    font-size: 0.88rem;
}
.vdsm-doc-tabla thead th {
    border: none;
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--vdsm-azul-profundo, #0b3d5c);
    background: linear-gradient(180deg, #f6fbfd 0%, #eef5f9 100%);
    border-bottom: 2px solid rgba(46,134,171,0.22);
    white-space: nowrap;
    -webkit-box-align: center;
    align-items: center;
}
.vdsm-doc-tabla thead th.vdsm-doc-th-doc {
    padding-left: calc(1rem + 36px + 0.6rem);
}
.vdsm-doc-tabla td {
    border: none;
    padding: 0.78rem 1rem;
    border-bottom: 1px solid rgba(11,61,92,0.07);
    vertical-align: middle;
    color: var(--vdsm-azul-profundo, #0b3d5c);
}
.vdsm-doc-tabla tbody tr { display: none; }
.vdsm-doc-tabla tbody tr.vdsm-doc-fila--visible { display: table-row; }
.vdsm-doc-tabla tbody tr:last-child td { border-bottom: none; }
.vdsm-doc-tabla tbody tr.vdsm-doc-fila--visible:hover td { background: linear-gradient(180deg, rgba(46,134,171,0.06) 0%, rgba(46,134,171,0.03) 100%); }
.vdsm-doc-tabla tbody tr.vdsm-doc-fila--visible:hover td.vdsm-doc-cel-doc { box-shadow: inset 3px 0 0 var(--vdsm-turquesa, #2e86ab); }
.vdsm-doc-cel-doc {
    max-width: 280px;
    display: -webkit-box;
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    gap: 0.6rem;
}
.vdsm-doc-cel-icono {
    -webkit-box-flex: 0;
    flex: 0 0 auto;
    width: 36px;
    height: 42px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--vdsm-cielo, #e8f1f6) 0%, #d5e5ef 100%);
    display: -webkit-box;
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    color: var(--vdsm-azul-profundo, #0b3d5c);
}
.vdsm-doc-cel-icono svg {
    width: 18px;
    height: 18px;
    opacity: 0.7;
}
.vdsm-doc-cel-texto {
    -webkit-box-flex: 1;
    flex: 1 1 0;
    min-width: 0;
}
.vdsm-doc-fila-titulo {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.vdsm-doc-fila-desc {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.76rem;
    color: #6b8aa0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.vdsm-doc-badge {
    display: inline-block;
    padding: 0.2em 0.6em;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    background: var(--vdsm-cielo, #e8f1f6);
    color: var(--vdsm-azul-profundo, #0b3d5c);
}
.vdsm-doc-badge--analisis { background: #e6f4ea; color: #1a7f4b; }
.vdsm-doc-badge--acuerdos { background: #fff4e5; color: #b36b00; }
.vdsm-doc-badge--estatutos { background: #ede9fe; color: #6d28d9; }
.vdsm-doc-badge--comunicaciones { background: #fee2e2; color: #c02626; }
.vdsm-doc-fecha-chip,
.vdsm-doc-tam-chip {
    display: inline-block;
    padding: 0.15em 0.55em;
    border-radius: 6px;
    background: rgba(11,61,92,0.05);
    font-size: 0.8rem;
    color: rgba(11,61,92,0.75);
    white-space: nowrap;
}
.vdsm-doc-fecha-chip { background: rgba(46,134,171,0.09); color: #2c6a8a; }
.vdsm-doc-tam-chip { background: rgba(11,61,92,0.06); color: rgba(11,61,92,0.8); }
.vdsm-doc-fecha,
.vdsm-doc-tam {
    white-space: nowrap;
    color: #6b8aa0;
    font-size: 0.83rem;
}
.vdsm-doc-acciones {
    display: -webkit-inline-box;
    display: inline-flex;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: end;
    justify-content: flex-end;
    white-space: nowrap;
    width: 104px;
}
/* Acción "Ver" como etiqueta de texto; la descarga conserva su icono */
.vdsm-doc-acciones .vdsm-doc-acc--ver {
    width: auto;
    height: 38px;
    min-width: 58px;
    padding: 0 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
}
.vdsm-doc-acciones .vdsm-doc-acc--ver svg { display: none; }
.vdsm-doc-acciones .vdsm-doc-acc--bajar svg {
    width: 24px;
    height: 24px;
    stroke-width: 3;
}
.vdsm-doc-acciones .vdsm-doc-acc--ver .vdsm-doc-sr {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
    border: 0;
}
.vdsm-doc-tabla th.vdsm-doc-cel-acciones { text-align: right; }
.vdsm-doc-acc {
    display: -webkit-inline-box;
    display: inline-flex;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(11,61,92,0.15);
    border-radius: 50%;
    background: #fff;
    color: var(--vdsm-azul-profundo, #0b3d5c);
    cursor: pointer;
    text-decoration: none;
    -webkit-transition: background 0.15s, color 0.15s;
    transition: background 0.15s, color 0.15s;
}
.vdsm-doc-acc svg { width: 20px; height: 20px; stroke-width: 2.6; }
.vdsm-doc-acc + .vdsm-doc-acc { margin-left: 0.1rem; }
.vdsm-doc-acc:hover,
.vdsm-doc-acc:focus-visible {
    background: var(--vdsm-cielo, #e8f1f6);
    color: var(--vdsm-azul-profundo, #0b3d5c);
}
.vdsm-doc-acc--ver {
    background: #1a7f4b;
    border-color: #1a7f4b;
    color: #fff;
}
.vdsm-doc-acc--ver:hover,
.vdsm-doc-acc--ver:focus-visible {
    background: #15693f;
    border-color: #15693f;
    color: #fff;
}
.vdsm-doc-acc--bajar {
    background: var(--vdsm-turquesa, #1ba6bd);
    border-color: var(--vdsm-turquesa, #1ba6bd);
    color: #fff;
}
.vdsm-doc-acc--bajar:hover,
.vdsm-doc-acc--bajar:focus-visible {
    background: #14899d;
    border-color: #14899d;
    color: #fff;
}
.vdsm-doc-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
/* ── Pie y paginación ─────────────────────────────────────────── */
.vdsm-doc-pie {
    display: -webkit-box;
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.vdsm-doc-contador {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--vdsm-turquesa, #2e86ab);
}
.vdsm-doc-pager {
    display: -webkit-box;
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    gap: 0.35rem;
}
.vdsm-doc-pager button {
    display: -webkit-inline-box;
    display: inline-flex;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    color: var(--vdsm-turquesa, #2e86ab);
    border-radius: 9px;
    cursor: pointer;
    -webkit-transition: background 0.15s, color 0.15s;
    transition: background 0.15s, color 0.15s;
}
.vdsm-doc-pager button svg { width: 19px; height: 19px; }
.vdsm-doc-pager button:hover:not(:disabled) {
    background: var(--vdsm-cielo, #e8f1f6);
    color: var(--vdsm-azul-profundo, #0b3d5c);
}
.vdsm-doc-pager button:focus-visible {
    outline: 2px solid rgba(46,134,171,0.45);
    outline-offset: 2px;
}
.vdsm-doc-pager button:disabled { opacity: 0.3; cursor: default; }
.vdsm-doc-pager-info {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--vdsm-turquesa, #2e86ab);
    padding: 0 0.4rem;
}
.vdsm-doc-sin-resultados {
    margin: 0.5rem 0 0;
    padding: 1.6rem 1rem;
    text-align: center;
    color: var(--vdsm-turquesa, #2e86ab);
    background: #f6fafd;
    border: 1px dashed rgba(11,61,92,0.25);
    border-radius: 10px;
}
/* ── Modal de vista previa ────────────────────────────────────── */
.vdsm-doc-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    padding: 1.5rem;
}
.vdsm-doc-modal--abierto { display: flex; }
.vdsm-doc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6,27,41,0.65);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.vdsm-doc-modal__panel {
    position: relative;
    display: -webkit-box;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    flex-direction: column;
    width: min(980px, 96vw);
    height: 86vh;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0,0,0,0.4);
}
.vdsm-doc-modal__barra {
    display: -webkit-box;
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.9rem 0.65rem 1.1rem;
    background: var(--vdsm-azul-profundo, #0b3d5c);
    color: #fff;
    -webkit-box-flex: 0;
    flex: none;
}
.vdsm-doc-modal__titulo {
    font-weight: 600;
    font-size: 0.88rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.vdsm-doc-modal__cerrar {
    display: -webkit-inline-box;
    display: inline-flex;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    -webkit-box-flex: 0;
    flex: none;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,0.16);
    color: #fff;
    cursor: pointer;
    -webkit-transition: background 0.15s;
    transition: background 0.15s;
}
.vdsm-doc-modal__cerrar svg { display: none; }
.vdsm-doc-modal__cerrar::before {
    content: "\D7";
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}
.vdsm-doc-modal__cerrar:hover { background: rgba(224, 86, 74, 0.9); }
.vdsm-doc-modal__iframe {
    -webkit-box-flex: 1;
    flex: 1;
    width: 100%;
    border: none;
    background: #fff;
}
/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 820px) {
    .vdsm-doc-panel { padding: 0.9rem 0.85rem 1rem; }
    .vdsm-doc-toolbar { -webkit-box-orient: vertical; -webkit-box-direction: normal; flex-direction: column; -webkit-box-align: stretch; align-items: stretch; }
    .vdsm-doc-filtros { margin-left: 0; }
    .vdsm-doc-filtro {
        -webkit-box-orient: horizontal;
        -webkit-box-direction: normal;
        flex-direction: row;
        -webkit-box-align: center;
        align-items: center;
        gap: 0.6rem;
    }
    .vdsm-doc-acc { width: 34px; height: 34px; border-radius: 50%; }
    .vdsm-doc-acc svg { width: 16px; height: 16px; }
    .vdsm-doc-acciones { width: 96px; }
    .vdsm-doc-acciones .vdsm-doc-acc--ver {
        width: auto;
        min-width: 52px;
        height: 34px;
        padding: 0 0.7rem;
        border-radius: 999px;
    }
.vdsm-doc-acciones .vdsm-doc-acc--ver svg { display: none; }
    .vdsm-doc-acciones .vdsm-doc-acc--bajar svg {
        width: 20px;
        height: 20px;
        stroke-width: 3;
    }
    .vdsm-doc-acciones .vdsm-doc-acc--ver .vdsm-doc-sr {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        margin: 0;
        overflow: visible;
        clip: auto;
        white-space: nowrap;
        border: 0;
    }
}
    .vdsm-doc-filtro span { min-width: 78px; }
    .vdsm-doc-filtro select { -webkit-box-flex: 1; flex: 1; }
    .vdsm-doc-modal { padding: 0; }
    .vdsm-doc-modal__panel { width: 100%; height: 100%; border-radius: 0; }
}
@media (max-width: 768px) {
    .vdsm-doc-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .vdsm-doc-cards {
        grid-template-columns: 1fr;
    }
}
.vdsm-doc-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.2rem;
}
.vdsm-pager-btn {
    background: #fff;
    color: var(--vdsm-azul-profundo);
    border: 1px solid rgba(11,61,92,0.2);
    border-radius: 8px;
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
    font-family: inherit;
}
.vdsm-pager-btn:hover:not(:disabled) {
    background: var(--vdsm-cielo);
}
.vdsm-pager-btn:disabled {
    opacity: 0.4;
    cursor: default;
}
.vdsm-pager-info {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--vdsm-turquesa);
}
.vdsm-doc-vacio {
    background: #f4f8fb;
    border: 1px dashed rgba(11,61,92,0.25);
    color: var(--vdsm-turquesa);
    padding: 1rem 1.2rem;
    border-radius: 10px;
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 768px) {
    .site-logo-img .custom-logo {
        max-height: 55px;
    }
    .vdsm-hero {
        padding: 2.5rem 1rem 3.5rem;
        margin: -1rem -1rem 1.5rem;
    }
    .vdsm-hero h1 {
        font-size: 1.6rem;
    }
    .ast-container {
        padding: 1rem;
    }
    .vdsm-cards {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   RESPONSIVE GENERAL: migas ocultas, sidebar colapsada y barra inferior
   (móvil y tablet; en escritorio se mantiene la disposición original)
   ========================================================================== */
@media (max-width: 1024px) {
    /* Rastro de migas: solo en pantallas grandes */
    .ast-breadcrumbs-wrapper {
        display: none !important;
    }

    /* La columna lateral no ocupa ya el principio de la página */
    #secondary.widget-area.secondary {
        display: none;
    }

    /* Deja hueco para no tapar el final de la página con la barra */
    body {
        padding-bottom: 66px;
    }
}

.vdsm-botbar {
    display: none;
}

@media (max-width: 1024px) {
    .vdsm-botbar {
        display: -webkit-box;
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 99970;
        gap: 0.5rem;
        padding: 0.45rem 0.6rem calc(0.45rem + env(safe-area-inset-bottom));
        background: var(--vdsm-azul-profundo, #0b3d5c);
        box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.18);
    }
    .vdsm-botbar__btn {
        -webkit-box-flex: 1;
        flex: 1;
        display: -webkit-box;
        display: flex;
        -webkit-box-align: center;
        align-items: center;
        -webkit-box-pack: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.6rem 0.5rem;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.10);
        color: #fff;
        text-decoration: none;
        font-size: 0.85rem;
        font-weight: 600;
        -webkit-transition: background 0.15s;
        transition: background 0.15s;
    }
    .vdsm-botbar__btn svg {
        width: 20px;
        height: 20px;
    }
    .vdsm-botbar__btn:hover,
    .vdsm-botbar__btn:active {
        background: rgba(255, 255, 255, 0.22);
        color: #fff;
    }
}


/* ==========================================================================
   CABECERA FIJA: logo y menú siempre visibles al hacer scroll
   La barra va en position:fixed y un espaciador (JS) conserva su sitio,
   para que el contenido no salte y las anclas no queden ocultas.
   ========================================================================== */
.ast-main-header-wrap {
    position: relative;
    height: var(--vdsm-header-h, 96px);
}
.ast-primary-header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99950;
    background-image: linear-gradient(135deg, rgb(247, 248, 249) 0%, rgb(108, 199, 240) 100%) !important;
    background-color: transparent !important;
    box-shadow: 0 2px 14px rgba(11, 61, 92, 0.12);
}
html {
    scroll-padding-top: var(--vdsm-header-h, 96px);
}
body.admin-bar .ast-primary-header-bar {
    top: 32px;
}
@media (max-width: 782px) {
    body.admin-bar .ast-primary-header-bar {
        top: 46px;
    }
}


/* ==========================================================================
   MENÚ MÓVIL FIJO: el panel desplegable queda anclado bajo la cabecera
   aunque el usuario haya hecho scroll (el padre es fijo y no "empuja"
   el contenido, así que sin esto el menú quedaría fuera de la vista).
   ========================================================================== */
@media (max-width: 1024px) {
    .ast-mobile-header-content {
        position: fixed;
        z-index: 99960;
        top: var(--vdsm-header-h, 96px);
        left: 0;
        right: 0;
        max-height: calc(100vh - var(--vdsm-header-h, 96px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: #ffffff;
        border-top: 1px solid rgba(11, 61, 92, 0.08);
        box-shadow: 0 12px 24px rgba(11, 61, 92, 0.16);
        padding: 0.4rem 1rem calc(0.4rem + env(safe-area-inset-bottom));
    }
    body.admin-bar .ast-mobile-header-content {
        top: calc(32px + var(--vdsm-header-h, 96px));
    }
    @media (max-width: 782px) {
        body.admin-bar .ast-mobile-header-content {
            top: calc(46px + var(--vdsm-header-h, 96px));
        }
    }
}


/* ==========================================================================
   ICONOS DE MENÚ: alineación y tamaño de los iconos de cada opción
   (aplican tanto al menú superior como al desplegable móvil)
   ========================================================================== */
#masthead .menu-link {
    display: -webkit-inline-box;
    display: inline-flex;
    -webkit-box-align: center;
    align-items: center;
    gap: 0.5rem;
}
#masthead .vdsm-menu-ico {
    width: 17px;
    height: 17px;
    -webkit-box-flex: 0;
    flex: 0 0 auto;
}
#masthead .vdsm-menu-ico-agua > .menu-link::before {
    content: "";
    width: 17px;
    height: 17px;
    -webkit-box-flex: 0;
    flex: 0 0 auto;
    background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b3d5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z'/%3E%3C/svg%3E")
        no-repeat center / contain;
}
.ast-header-break-point .main-header-menu .menu-link {
    display: -webkit-box;
    display: flex;
}


/* ==========================================================================
   PLANOS: sección de miniaturas sobre la tabla de documentos
   ========================================================================== */
.vdsm-doc-planos {
    margin-bottom: 1.5rem;
}
.vdsm-doc-planos__titulo {
    font-size: 1.3rem;
    color: var(--vdsm-azul-profundo, #0b3d5c);
    margin-bottom: 0.75rem;
}
.vdsm-doc-otra__titulo {
    font-size: 1.3rem;
    color: var(--vdsm-azul-profundo, #0b3d5c);
    margin: 1.8rem 0 0.75rem;
}
.vdsm-doc-planos__buscador {
    display: -webkit-box;
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    gap: 0.5rem;
    -webkit-box-flex: 1;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.vdsm-doc-planos__buscador .vdsm-doc-planos__q {
    -webkit-box-flex: 1;
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    padding: 0.5rem 0.7rem;
    border: 1px solid rgba(11, 61, 92, 0.25);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--vdsm-azul-profundo, #0b3d5c);
    background: #fff;
}
.vdsm-doc-planos__buscador .vdsm-doc-planos__a {
    -webkit-box-flex: 1;
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    padding: 0.5rem 0.7rem;
    border: 1px solid rgba(11, 61, 92, 0.25);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--vdsm-azul-profundo, #0b3d5c);
    background: #fff;
}
.vdsm-doc-planos__buscador .vdsm-doc-planos__btn {
    -webkit-box-flex: 1;
    flex: 1 1 100%;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    background: var(--vdsm-azul-profundo, #0b3d5c);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.15rem;
}
.vdsm-doc-planos__buscador .vdsm-doc-planos__btn:hover {
    background: var(--vdsm-turquesa, #2e86ab);
}
.vdsm-doc-planos__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.9rem;
}
.vdsm-doc-plano {
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(11, 61, 92, 0.08);
    box-shadow: 0 2px 8px rgba(11, 61, 92, 0.07);
    -webkit-transition: box-shadow 0.2s;
    transition: box-shadow 0.2s;
}
.vdsm-doc-plano:hover {
    box-shadow: 0 4px 16px rgba(11, 61, 92, 0.16);
}
.vdsm-doc-plano__visual {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}
.vdsm-doc-plano__img {
    width: 100%;
    height: 100%;
    -webkit-object-fit: cover;
    object-fit: cover;
    display: block;
}
.vdsm-doc-plano__fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--vdsm-turquesa, #2e86ab), var(--vdsm-azul-profundo, #0b3d5c));
    display: -webkit-box;
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
}
.vdsm-doc-plano__fallback svg {
    width: 50%;
    height: 50%;
    opacity: 0.6;
}
.vdsm-doc-plano__chip {
    position: absolute;
    left: 0;
    bottom: 0;
    padding: 0.2rem 0.5rem;
    background: rgba(255, 255, 255, 0.92);
    color: var(--vdsm-azul-profundo, #0b3d5c);
    font-size: 0.75rem;
    font-weight: 600;
}
.vdsm-doc-plano__nombre {
    display: block;
    padding: 0.5rem 0.5rem 0.25rem;
    font-size: 0.82rem;
    line-height: 1.25;
    color: var(--vdsm-azul-profundo, #0b3d5c);
    word-break: break-word;
}
.vdsm-doc-plano__enlace {
    display: block;
    padding: 0.25rem 0.5rem 0.5rem;
    text-align: right;
    color: var(--vdsm-azul-profundo, #0b3d5c);
}
.vdsm-doc-plano__enlace svg {
    width: 16px;
    height: 16px;
    opacity: 0.5;
    -webkit-transition: opacity 0.2s;
    transition: opacity 0.2s;
}
.vdsm-doc-plano__enlace:hover svg {
    opacity: 1;
}
.vdsm-doc-plano__total,
.vdsm-doc-planos__total {
    margin: 0.5rem 0 0;
    font-size: 0.82rem;
    color: rgba(11, 61, 92, 0.65);
}
.vdsm-doc-planos__vacio {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(11, 61, 92, 0.05);
    color: rgba(11, 61, 92, 0.75);
    font-size: 0.9rem;
    margin: 0;
}
.vdsm-doc-planos__paginacion {
    display: -webkit-box;
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    -webkit-box-flex: 1;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 1rem;
}
.vdsm-doc-planos__pg,
.vdsm-doc-planos__nav {
    display: inline-block;
    min-width: 2rem;
    padding: 0.35rem 0.55rem;
    text-align: center;
    border: 1px solid rgba(11, 61, 92, 0.22);
    border-radius: 8px;
    color: var(--vdsm-azul-profundo, #0b3d5c);
    font-size: 0.85rem;
    text-decoration: none;
    background: #fff;
}
.vdsm-doc-planos__pg:hover,
.vdsm-doc-planos__nav:hover {
    border-color: var(--vdsm-azul-profundo, #0b3d5c);
}
.vdsm-doc-planos__pg.is-actual {
    background: var(--vdsm-azul-profundo, #0b3d5c);
    border-color: var(--vdsm-azul-profundo, #0b3d5c);
    color: #fff;
    font-weight: 700;
}
.vdsm-doc-planos__nav.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}
@media (max-width: 600px) {
    .vdsm-doc-planos__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }
    .vdsm-doc-plano__nombre {
        font-size: 0.78rem;
    }
    .vdsm-doc-plano__chip {
        font-size: 0.66rem;
    }
}
@media (max-width: 420px) {
    .vdsm-doc-planos__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
}

/* ══════════════════════════════════════════════════════════════════
   GALERÍA: carrusel con miniaturas y pie semitransparente
   ══════════════════════════════════════════════════════════════════ */
.vdsm-gal {
    margin: 1.4rem 0 0.4rem;
    color: var(--vdsm-azul-profundo, #0b3d5c);
}
.vdsm-gal__vacio {
    padding: 1.5rem;
    text-align: center;
    color: #6b8aa0;
    background: #fff;
    border-radius: 14px;
}
.vdsm-gal__visor {
    position: relative;
    overflow: hidden;
    height: clamp(300px, 58vh, 560px);
    border-radius: 14px;
    background: #0a2636;
    box-shadow: 0 6px 22px rgba(11, 61, 92, 0.18);
}
.vdsm-gal__pista {
    display: -webkit-box;
    display: flex;
    height: 100%;
    -webkit-transition: -webkit-transform 0.45s ease;
    transition: transform 0.45s ease;
    will-change: transform;
}
.vdsm-gal__slide {
    -webkit-box-flex: 0;
    flex: 0 0 100%;
    min-width: 100%;
    position: relative;
    height: 100%;
    margin: 0;
}
.vdsm-gal__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    display: block;
}
.vdsm-gal__pie {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: -webkit-box;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    flex-direction: column;
    gap: 0.12rem;
    padding: 1.1rem 1.2rem;
    color: #fff;
    background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.74) 100%);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.74) 0%, rgba(0, 0, 0, 0) 100%);
    text-align: left;
    pointer-events: none;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.vdsm-gal__nombre {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.vdsm-gal__desc {
    font-size: 0.85rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    max-width: 60ch;
}
.vdsm-gal__meta {
    margin-top: 0.18rem;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.78);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.vdsm-gal__contador {
    position: absolute;
    top: 0.7rem;
    right: 0.8rem;
    z-index: 2;
    padding: 0.22em 0.75em;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.vdsm-gal__flecha {
    position: absolute;
    z-index: 3;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    display: -webkit-inline-box;
    display: inline-flex;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    color: var(--vdsm-azul-profundo, #0b3d5c);
    cursor: pointer;
    -webkit-transition: background 0.15s, color 0.15s, -webkit-transform 0.15s;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}
.vdsm-gal__flecha svg { width: 22px; height: 22px; }
.vdsm-gal__flecha--prev { left: 0.8rem; }
.vdsm-gal__flecha--next { right: 0.8rem; }
.vdsm-gal__flecha:hover { background: #fff; color: var(--vdsm-turquesa, #2e86ab); }
.vdsm-gal__barra-thumbs {
    display: -webkit-box;
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.7rem;
}
.vdsm-gal__thumbs {
    -webkit-box-flex: 1;
    flex: 1 1 0;
    min-width: 0;
    display: -webkit-box;
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding: 0.15rem 0.2rem;
    scrollbar-width: thin;
}
.vdsm-gal__thumbs::-webkit-scrollbar { height: 8px; }
.vdsm-gal__thumbs::-webkit-scrollbar-thumb { background: rgba(46, 134, 171, 0.4); border-radius: 4px; }
.vdsm-gal__thumb {
    -webkit-box-flex: 0;
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: 104px;
    height: 70px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 9px;
    overflow: hidden;
    background: none;
    cursor: pointer;
    -webkit-transition: border-color 0.15s, -webkit-transform 0.15s;
    transition: border-color 0.15s, transform 0.15s;
}
.vdsm-gal__thumb img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    display: block;
}
.vdsm-gal__thumb:hover { border-color: rgba(46, 134, 171, 0.45); }
.vdsm-gal__thumb.is-activa {
    border-color: var(--vdsm-turquesa, #2e86ab);
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(46, 134, 171, 0.28);
}
.vdsm-gal__nav {
    -webkit-box-flex: 0;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(11, 61, 92, 0.2);
    border-radius: 50%;
    background: #fff;
    color: var(--vdsm-azul-profundo, #0b3d5c);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    -webkit-transition: background 0.15s, color 0.15s;
    transition: background 0.15s, color 0.15s;
}
.vdsm-gal__nav:hover { background: var(--vdsm-cielo, #e8f1f6); color: var(--vdsm-turquesa, #2e86ab); }

@media (max-width: 600px) {
    .vdsm-gal__visor { height: clamp(250px, 48vh, 360px); }
    .vdsm-gal__pie { padding: 0.75rem 0.85rem; }
    .vdsm-gal__nombre { font-size: 0.95rem; }
    .vdsm-gal__desc { font-size: 0.78rem; }
    .vdsm-gal__flecha { width: 34px; height: 34px; }
    .vdsm-gal__flecha svg { width: 18px; height: 18px; }
    .vdsm-gal__flecha--prev { left: 0.5rem; }
    .vdsm-gal__flecha--next { right: 0.5rem; }
    .vdsm-gal__thumb { width: 76px; height: 56px; }
    .vdsm-gal__contador { font-size: 0.68rem; }
}
