/* --- 1. CONFIGURACIÓN GLOBAL --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --verde-pnp: #004d3d;
    --naranja-pnp: #f39c12;
    --gris-fondo: #f4f4f4;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: white;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    min-height: 100%;
}

html {
    width: 100%;
    scroll-behavior: smooth;
}

.site-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.flex-between { display: flex; justify-content: space-between; align-items: center; }


/* --- BARRA SUPERIOR VERDE CON REDES --- */

.header-social-portal {
    background-color: #004d3d;
    color: white;
    padding: 8px 0;
    width: 100%;
    min-height: 48px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

/* Este bloque: INGRESAR a la izquierda, redes a la derecha */
.portal-flex {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.social-buttons-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* --- ESTILO DE LOS BOTONES (Basado en tu diseño de WhatsApp) --- */
.btn-pnp-social {
    text-decoration: none !important; /* Quita el subrayado azul */
    color: white !important;          /* Texto siempre blanco */
    padding: 8px 18px !important;     /* Ajuste de tamaño amigable */
    border-radius: 50px !important;   /* Bordes redondeados */
    font-size: 13px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2) !important;
    transition: all 0.3s ease !important;
}

/* Colores de fondo por cada red social */
.btn-pnp-social.fb { background-color: #1877F2 !important; } /* Facebook */
.btn-pnp-social.tk { background-color: #000000 !important; } /* TikTok */
.btn-pnp-social.wa { background-color: #25D366 !important; } /* WhatsApp */
.btn-pnp-social.ingresar {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
    border: 2px solid rgba(255,255,255,.9) !important;
    letter-spacing: 0.6px;
    font-size: 13px !important;
    padding: 8px 20px !important;
    box-shadow: 0 4px 12px rgba(243,156,18,.35) !important;
}
.btn-pnp-social.ingresar i { font-size: 14px !important; }

/* Efecto al pasar el mouse (Hover) — sin mover el layout */
.btn-pnp-social:hover {
    filter: brightness(1.08) !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25) !important;
}
.btn-pnp-social.ingresar:hover {
    filter: brightness(1.06);
    box-shadow: 0 4px 14px rgba(243,156,18,.45) !important;
}

.btn-pnp-social:active {
    filter: brightness(0.95) !important;
}

/* --- RESPONSIVO PARA CELULARES --- */
@media (max-width: 768px) {
    .portal-flex {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }
    .portal-flex > .ingresar {
        flex: 0 0 auto;
    }
    .social-buttons-group {
        flex: 1 1 auto;
        justify-content: flex-end;
        gap: 6px;
    }
    .btn-pnp-social {
        padding: 6px 12px !important;
        font-size: 11px !important;
    }
}

/* --- 2. HEADER --- */

.logo-pnp,
.img-escudo {
    height: 90px !important;
    width: auto !important;
    max-width: none !important;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

.main-header {
    background: white;
    border-bottom: 3px solid var(--verde-pnp);
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    flex-shrink: 0;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 12px 0;
    min-height: 96px;
}

.logo-container {
    flex-shrink: 0;
}

.title-text {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.title-text .portal-eslogan {
    color: var(--verde-pnp);
    font-size: clamp(16px, 2.5vw, 24px);
    font-weight: 900;
    margin: 0;
    line-height: 1.2;
    letter-spacing: 0.02em;
    font-style: normal;
}

.title-text .portal-subtitulo {
    color: #555;
    font-size: clamp(11px, 1.6vw, 13px);
    margin-top: 4px;
    line-height: 1.35;
    font-style: normal;
    font-weight: 500;
}

.header-fotos-panel {
    flex: 0 1 420px;
    width: min(44vw, 420px);
    max-width: 100%;
    margin-left: auto;
}

.header-fotos-viewport {
    overflow: hidden;
    width: 100%;
}

.header-fotos-track {
    display: flex;
    gap: 8px;
    transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.header-foto-item {
    flex: 0 0 auto;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e2ebe8;
    box-shadow: 0 2px 8px rgba(0, 77, 61, 0.1);
    background: #f4f8f6;
}

.header-foto-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    image-rendering: auto;
}

.header-foto-vacio {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b8c8c2;
    font-size: 1.25rem;
}

@media (max-width: 900px) {
    .header-fotos-panel {
        display: none;
    }
}

/* --- Inicio: pantalla completa (100% viewport) --- */
.portal-home .portal-viewport-wrap {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.portal-home .presentation-slider {
    flex: 1 1 auto;
    width: 100%;
    min-height: 260px;
    height: auto;
    max-height: none;
    background-color: #0a2818;
}

.portal-home .slide-img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    transform: scale(1.08);
    transform-origin: center center;
    backface-visibility: hidden;
    transition: transform 1.2s ease-out;
}

.portal-home .slide:not(.active):not(.was-active) .slide-img {
    animation: none;
    transform: scale(1.08);
}

.portal-home .slide.active .slide-img {
    animation: slideZoomHome 8s ease-out forwards;
}

.portal-home .slide.was-active .slide-img {
    animation: none;
    transform: scale(1.14);
}

@keyframes slideZoomHome {
    from { transform: scale(1.08); }
    to   { transform: scale(1.14); }
}

.portal-home-content {
    max-width: 1200px;
}

/* --- 3. NAVEGACIÓN (fija al hacer scroll en página de inicio) --- */
.nav-main {
    background: var(--verde-pnp);
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-shrink: 0;
    min-height: 50px;
    height: auto;
    border-bottom: 2px solid rgba(243, 156, 18, 0.35);
    width: 100%;
}

.portal-home .nav-main.nav-is-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.nav-main-placeholder {
    width: 100%;
    height: 0;
    flex-shrink: 0;
}

.nav-main .container {
    max-width: 100%;
    padding: 0;
    height: 100%;
}

.nav-main ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: nowrap;
    height: 50px;
    margin: 0;
    padding: 0 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav-main ul::-webkit-scrollbar { display: none; }

.nav-main ul li { flex-shrink: 0; }

.nav-main ul li a {
    color: white;
    text-decoration: none;
    padding: 0 13px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    box-sizing: border-box;
    transition: background 0.2s, color 0.2s;
}

.nav-main ul li a i { font-size: 11px; margin-right: 4px; }

.nav-main ul li a:hover {
    background: rgba(0,0,0,0.2);
    color: var(--naranja-pnp);
}

.nav-main ul li a.activo {
    background: rgba(0,0,0,0.22);
    color: var(--naranja-pnp);
    border-bottom-color: var(--naranja-pnp);
}

/* Banner compacto en páginas internas (sin carrusel) — altura exacta fija */
.portal-page-hero {
    background: linear-gradient(135deg, var(--verde-pnp) 0%, #002d24 100%);
    height: 88px;
    min-height: 88px;
    max-height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 16px;
    flex-shrink: 0;
    overflow: hidden;
}

.portal-page-hero h2 {
    color: #fff;
    font-size: clamp(1rem, 2.8vw, 1.45rem);
    font-weight: 800;
    letter-spacing: 0.4px;
    line-height: 1.25;
}

.presentation-slider.slider-cargando .slides,
.presentation-slider.slider-sin-imagenes .slides {
  background: linear-gradient(135deg, #003d2e 0%, #005244 50%, #1a7a5e 100%);
}

.presentation-slider.slider-cargando .slider-dots,
.presentation-slider.slider-sin-imagenes .slider-dots {
  display: none;
}

/* --- 4. SECCIÓN SLIDER --- */
.presentation-slider {
    position: relative;
    width: 100%;
    max-width: 100vw;
    height: clamp(380px, 58vh, 680px);
    min-height: 380px;
    max-height: 680px;
    background-color: #0d2818;
    overflow: hidden;
    flex-shrink: 0;
}

.slides {
    position: absolute;
    inset: 0;
    background-color: #0a2818;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 0;
    overflow: hidden;
    transition: opacity 1.2s ease-in-out;
    pointer-events: none;
    background-color: #0a2818;
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transform: scale(1.08);
    transform-origin: center center;
    backface-visibility: hidden;
    transition: transform 1.2s ease-out;
}

.slide:not(.active):not(.was-active) .slide-img {
    animation: none;
    transform: scale(1.08);
}

.slide.active .slide-img {
    animation: slideZoom 8s ease-out forwards;
}

.slide.was-active .slide-img {
    animation: none;
    transform: scale(1.14);
}

@keyframes slideZoom {
    from { transform: scale(1.08); }
    to   { transform: scale(1.14); }
}

.slide-img-imagen1 { object-position: center 40%; }
.slide-img-lunes   { object-position: center 22%; }
.slide-img-saludo  { object-position: center 38%; }

.slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.02) 0%,
        rgba(0, 0, 0, 0.12) 55%,
        rgba(0, 0, 0, 0.32) 100%
    );
    pointer-events: none;
}

.slide.active {
    opacity: 1 !important;
    z-index: 2;
}

.slide.was-active {
    opacity: 1 !important;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px 56px;
    color: #fff;
    text-align: center;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(0, 0, 0, 0.2) 45%,
        rgba(0, 0, 0, 0.45) 100%
    );
}

.hero-overlay .container {
    width: 100%;
    max-width: 1100px;
    padding: 0 24px;
}

.hero-overlay .portal-hero-titulo {
    color: #fff;
    font-size: clamp(2.2rem, 7.5vw, 4.75rem);
    font-weight: 900;
    margin: 0;
    line-height: 1.08;
    letter-spacing: 0.04em;
    font-style: normal;
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow:
        0 4px 18px rgba(0, 0, 0, 0.9),
        0 2px 4px rgba(0, 0, 0, 0.95);
}

.hero-overlay .portal-hero-lema {
    color: #fff;
    font-size: clamp(1.35rem, 4vw, 2.5rem);
    margin-top: 10px;
    line-height: 1.15;
    font-style: normal;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-shadow:
        0 3px 16px rgba(0, 0, 0, 0.9),
        0 1px 3px rgba(0, 0, 0, 0.95);
}

.hero-overlay .portal-hero-eslogan {
    color: #fff;
    font-size: clamp(1rem, 2.6vw, 1.55rem);
    margin-top: 12px;
    line-height: 1.35;
    font-style: normal;
    font-weight: 500;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
    text-shadow:
        0 3px 14px rgba(0, 0, 0, 0.88),
        0 1px 3px rgba(0, 0, 0, 0.95);
}


.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 10px;
}

.dot { width: 12px; height: 12px; background: rgba(255,255,255,0.5); border-radius: 50%; cursor: pointer; transition: background 0.3s; }
.dot:hover { background: rgba(255,255,255,0.85); }
.dot.active { background: var(--naranja-pnp); }

/* --- 5. TARJETAS Y OTROS --- */
.content-area { padding: 50px 0; }
.section-header {
  text-align: center;
  margin-bottom: 36px;
}
.section-header h3 {
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  font-weight: 900;
  color: var(--verde-pnp);
  letter-spacing: .6px;
  text-transform: uppercase;
  display: inline-block;
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 8px;
}
.section-header h3::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 52px;
  height: 3px;
  background: linear-gradient(90deg, #c8a94a, var(--naranja-pnp));
  border-radius: 2px;
}
.section-header p,
.section-header span {
  color: #6b7c78;
  font-size: 13px;
  display: block;
  margin-top: 4px;
}
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.card { background: white; padding: 40px; border-radius: 10px; text-align: center; box-shadow: 0 5px 20px rgba(0,0,0,0.05); border-top: 5px solid var(--verde-pnp); }
.card-icon { font-size: 40px; color: var(--naranja-pnp); margin-bottom: 20px; }
.btn-card { background: var(--verde-pnp); color: white; text-decoration: none; padding: 10px 25px; border-radius: 20px; display: inline-block; margin-top: 20px; font-weight: bold; }

.emergency-bar {
    background: linear-gradient(180deg, #003d32 0%, var(--verde-pnp) 100%);
    padding: 36px 0 40px;
    color: white;
}

.emergency-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    text-align: center;
    gap: 16px;
    align-items: start;
}

.e-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0 8px;
}

.e-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
}

.e-item strong {
    font-size: 32px;
    font-weight: 800;
    color: #3dd6c6;
    line-height: 1;
    letter-spacing: 0.02em;
}

.e-item p {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    max-width: 180px;
}

.portal-jefatura-bar {
    background: linear-gradient(180deg, var(--verde-pnp) 0%, #002d24 100%);
    padding: 36px 0 42px;
    color: #fff;
    border-top: 3px solid rgba(200, 169, 74, 0.45);
}

.contacto-redes-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    max-width: 900px;
    margin: 0 auto 32px;
    text-align: center;
}

.contacto-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    transition: transform 0.2s ease;
}

.contacto-item:hover {
    transform: translateY(-4px);
    color: #fff;
}

.contacto-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(61, 214, 198, 0.45);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.contacto-item:hover .contacto-icon {
    background: rgba(61, 214, 198, 0.2);
    border-color: #3dd6c6;
}

.contacto-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

.jefatura-direccion {
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.jefatura-linea {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
}

.jefatura-titulo {
    font-size: 15px;
    font-weight: 800;
    color: #c8a94a;
    margin-bottom: 14px;
}

.jefatura-dir {
    margin-bottom: 0;
    color: #3dd6c6;
    font-weight: 700;
}

@media (max-width: 900px) {
    .emergency-grid,
    .contacto-redes-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px 12px;
    }
}

@media (max-width: 560px) {
    .emergency-grid,
    .contacto-redes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .e-icon {
        width: 60px;
        height: 60px;
        font-size: 22px;
    }

    .e-item strong {
        font-size: 26px;
    }

    .contacto-icon {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }

    .jefatura-linea {
        font-size: 11px;
    }
}

footer { background: #1a1a1a; color: #888; padding: 20px 0; text-align: center; font-size: 13px; }

/* --- CURSOS Y CONVENIOS --- */
.body-cursos,
.body-convenios { background: var(--gris-fondo); min-height: 100vh; }

.header-moderno {
    background: white;
    border-bottom: 4px solid var(--verde-pnp);
    padding: 16px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.page-intro {
    text-align: center;
    margin: 40px 0 30px;
}

.page-intro h2 {
    color: var(--verde-pnp);
    font-size: 22px;
    margin-bottom: 8px;
}

.page-intro p {
    color: #666;
}

.btn-volver {
    display: inline-block;
    margin-top: 12px;
    background: var(--verde-pnp);
    color: white;
    padding: 8px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}

.btn-volver:hover { background: #003329; }

.grid-modern a {
    text-decoration: none;
    color: inherit;
    display: flex;
    height: 100%;
}

.grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 22px;
    margin-bottom: 8px;
    align-items: stretch;
}

.card-modern {
    background: white;
    border-radius: 14px;
    padding: 26px 22px 22px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 77, 61, 0.08);
    border: 1px solid #e8efec;
    border-top: 4px solid var(--verde-pnp);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s;
    height: 100%;
    width: 100%;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.grid-modern a:hover .card-modern {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 77, 61, 0.14);
    border-color: #c8e6d8;
}

.card-modern h4 {
    color: var(--verde-pnp);
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-modern p {
    color: #667;
    font-size: 13px;
    margin-bottom: 0;
    line-height: 1.55;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-modern .card-estado,
.card-modern > span[style*="font-weight"] {
    margin-top: auto;
    padding-top: 14px;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: .3px;
}

.text-area h1 {
    color: var(--verde-pnp);
    font-size: 22px;
    font-weight: 900;
    line-height: 1.2;
}

.text-area p {
    color: #666;
    font-size: 13px;
    margin-top: 4px;
}

.btn-home-modern {
    background: var(--verde-pnp);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    transition: background .2s;
}

.btn-home-modern:hover { background: #003329; }

.icon-wrapper {
    width: 64px;
    height: 64px;
    background: var(--verde-pnp);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    font-size: 26px;
}

.card-modern--foto {
    padding-top: 0;
    overflow: hidden;
}

.card-modern-foto {
    width: calc(100% + 44px);
    margin: 0 -22px 16px;
    height: 130px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #e8efec, #d0ddd8);
}

.card-modern-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.grid-pdf-modern { margin-bottom: 16px; }

.pdf-item {
    background: white;
    padding: 18px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    border-left: 4px solid #e74c3c;
}

.pdf-item h5 { color: #333; font-size: 14px; }

.btn-download {
    color: var(--verde-pnp);
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
}

.btn-download:hover { text-decoration: underline; }

.pdf-item-caja { align-items: flex-start; }
.pdf-item-icono { font-size: 34px; color: #e74c3c; flex-shrink: 0; margin-top: 2px; }
.pdf-item-body { flex: 1; min-width: 0; }
.pdf-item-sub { font-size: 11px; color: #888; margin: 2px 0 8px; }
.pdf-item-acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-pdf-ver, .btn-pdf-desc {
    border: none; border-radius: 6px; padding: 7px 12px; font-size: 11.5px; font-weight: 700;
    cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.btn-pdf-ver { background: #004d3d; color: #fff; }
.btn-pdf-ver:hover { background: #006b55; }
.btn-pdf-desc { background: #f0f7f0; color: #004d3d; border: 1.5px solid #c8e6c9; }
.btn-pdf-desc:hover { background: #e2f0e2; }

.modal-pdf-portal {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,.65); align-items: center; justify-content: center; padding: 16px;
}
.modal-pdf-portal.open { display: flex; }
.modal-pdf-portal-box {
    background: #fff; border-radius: 12px; width: min(920px, 96vw); max-height: 92vh;
    display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.modal-pdf-portal-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; background: #004d3d; color: #fff;
}
.modal-pdf-portal-head strong { font-size: 14px; }
.modal-pdf-portal-head button {
    background: none; border: none; color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
}
#modal-pdf-portal-frame { flex: 1; min-height: 420px; border: none; background: #f5f5f5; }
.modal-pdf-portal-foot { padding: 12px 16px; border-top: 1px solid #eee; text-align: right; }

/* --- DETALLE CONVENIOS / CURSOS --- */
.py-5 { padding: 40px 0; }

.grid-detalles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.card-detalle {
    background: white;
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
    border-top: 4px solid var(--verde-pnp);
}

.card-detalle h3 {
    color: var(--verde-pnp);
    font-size: 16px;
    margin-bottom: 16px;
    text-align: center;
}

.card-detalle ul {
    list-style: none;
    padding: 0;
}

.card-detalle ul li {
    margin-bottom: 10px;
    font-size: 14px;
    color: #444;
}

.card-detalle ul li i {
    color: var(--verde-pnp);
    margin-right: 8px;
}

.icon-circle {
    width: 56px;
    height: 56px;
    background: var(--verde-pnp);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    font-size: 22px;
}

.icon-circle.gold { background: var(--naranja-pnp); }

.highlight-card {
    border-top-color: var(--naranja-pnp);
    text-align: center;
}

.info-item {
    margin-bottom: 12px;
}

.info-item span {
    display: block;
    font-weight: 700;
    color: var(--verde-pnp);
    font-size: 12px;
    text-transform: uppercase;
}

.info-item p {
    color: #444;
    font-size: 14px;
}

.price {
    font-size: 32px;
    font-weight: 900;
    color: var(--naranja-pnp);
    margin: 8px 0;
}

.registro-section { margin: 40px 0; }

.registro-box {
    background: white;
    border-radius: 12px;
    padding: 36px;
    text-align: center;
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
    border: 2px dashed var(--verde-pnp);
}

.registro-box h2 {
    color: var(--verde-pnp);
    margin-bottom: 10px;
}

.btn-registro-grande {
    display: inline-block;
    margin-top: 20px;
    background: var(--naranja-pnp);
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: background .2s;
}

.btn-registro-grande:hover { background: #e67e22; }

.footer-simple,
footer.portal-footer {
    background: #1a1a1a;
    color: #888;
    text-align: center;
    padding: 20px 0;
    font-size: 13px;
    margin-top: 50px;
}

@media (max-width: 768px) {
    .header-moderno .flex-between { flex-direction: column; gap: 16px; text-align: center; }
    .header-moderno .flex-between > div { flex-direction: column; }
    .logo-pnp, .img-escudo { height: 72px !important; }
    .header-flex {
        min-height: 80px;
        gap: 12px;
        padding: 10px 0;
    }
    .title-text { text-align: left; }
    .nav-main ul li a {
        padding: 0 10px;
        font-size: 11px;
    }
    .presentation-slider {
        height: clamp(320px, 52vh, 480px);
        min-height: 320px;
        max-height: 480px;
    }
    .portal-home .presentation-slider {
        flex: 1 1 auto;
        height: auto;
        max-height: none;
        min-height: 200px;
    }
    .nav-main ul { height: auto; min-height: 46px; }
    .hero-overlay { padding: 16px 12px 44px; }
    .hero-overlay .portal-hero-titulo { font-size: clamp(1.6rem, 7.5vw, 2.4rem); white-space: normal; }
    .hero-overlay .portal-hero-lema { font-size: clamp(1rem, 4.8vw, 1.45rem); margin-top: 8px; }
    .hero-overlay .portal-hero-eslogan { font-size: clamp(0.9rem, 3.6vw, 1.15rem); margin-top: 8px; }
    .portal-page-hero {
        height: 72px;
        min-height: 72px;
        max-height: 72px;
    }
    .content-area { padding: 32px 0; }
}

@media (min-width: 1200px) {
    .presentation-slider {
        height: clamp(520px, 65vh, 720px);
        min-height: 520px;
        max-height: 720px;
    }
    .portal-home .presentation-slider {
        flex: 1 1 auto;
        height: auto;
        max-height: none;
        min-height: 360px;
    }
    .nav-main ul li a { padding: 0 16px; font-size: 13px; }
}

/* --- CONTENIDO PORTAL / NOVEDADES --- */
.body-portal { background: var(--gris-fondo); min-height: 100vh; }

.contenido-texto {
    background: white;
    border-radius: 12px;
    padding: 28px 32px;
    box-shadow: 0 4px 18px rgba(0,0,0,.06);
    line-height: 1.8;
    color: #444;
}

.contenido-texto p { margin-bottom: 16px; }

.grid-pilares {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.card-pilar {
    background: white;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
    border-top: 4px solid var(--verde-pnp);
}

.card-pilar h4 { color: var(--verde-pnp); margin: 12px 0 8px; font-size: 15px; }
.card-pilar p { color: #666; font-size: 13px; line-height: 1.55; }

.lista-novedades { display: flex; flex-direction: column; gap: 16px; }

.noticia-card {
    background: white;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
    border-left: 4px solid var(--naranja-pnp);
}

.noticia-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.noticia-cat {
    background: rgba(0,77,61,.1);
    color: var(--verde-pnp);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.noticia-fecha { color: #888; font-size: 12px; }
.noticia-card h3 { color: var(--verde-pnp); font-size: 17px; margin-bottom: 8px; }
.noticia-card p { color: #555; font-size: 14px; line-height: 1.6; }

.lista-novedades-home .noticia-card { border-left-color: var(--verde-pnp); }
.texto-vacio { color: #888; text-align: center; padding: 24px; }

/* ═══════════════════════════════════════════════
   RESPONSIVE FIXES — todos los tamaños de pantalla
   ═══════════════════════════════════════════════ */

/* Tablas: nunca se salen del contenedor */
.tabla-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { min-width: 600px; }

/* Grid de tarjetas: columna única en móvil */
@media (max-width: 480px) {
  .grid-modern {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .card-modern {
    padding: 20px 16px;
  }
}

/* Nav móvil: más visible y fácil de tocar */
@media (max-width: 600px) {
  .nav-main ul {
    justify-content: flex-start;
    padding: 0 4px;
  }
  .nav-main ul li a {
    padding: 0 10px;
    font-size: 11px;
    height: 46px;
    min-width: 44px;
  }
  /* Header social más compacto */
  .social-buttons-group {
    gap: 4px;
  }
  .btn-pnp-social {
    padding: 7px 10px !important;
    font-size: 10px !important;
    gap: 4px !important;
  }
  /* Ocultar texto de redes en móvil muy pequeño */
  .btn-pnp-social.fb span,
  .btn-pnp-social.tk span,
  .btn-pnp-social.wa span { display: none; }
}

/* Botones: tamaño mínimo de toque 44px */
.btn-pnp-social {
  min-height: 36px;
}
.btn-registro-grande,
.btn-volver {
  min-height: 44px;
}

/* Cards de novedades en móvil */
@media (max-width: 600px) {
  .noticia-card { padding: 16px; }
  .noticia-card h3 { font-size: 15px; }
  .grid-pilares { grid-template-columns: 1fr; }
  .breakdown-grid { grid-template-columns: 1fr; }
  .header-flex { gap: 12px; padding: 8px 0; }
  .logo-pnp, .img-escudo { height: 64px !important; }
  .content-area { padding: 20px 0; }
  .page-intro h2 { font-size: 18px; }
}

/* Panel admin sidebar — colapsable en tablet/móvil */
@media (max-width: 768px) {
  /* Inscritos tabla — siempre scrollable */
  #inscritos-tabla { overflow-x: auto; }
  /* Stats grid — 2 columnas en tablet */
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .breakdown-grid { grid-template-columns: 1fr; }
}

/* Carrusel — encajado perfecto en todas las pantallas */
.presentation-slider {
  position: relative;
  overflow: hidden;
  background: #001a12;
}
.presentation-slider .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Formularios: columna única en móvil */
@media (max-width: 560px) {
  .fi-grid {
    grid-template-columns: 1fr !important;
  }
  .pdf-upload-box { padding: 12px; }
  .plantilla-banner { flex-direction: column; gap: 10px; text-align: center; }
  .btn-desc-plantilla { width: 100%; justify-content: center; }
}

/* Sorteos flyers — columna única en móvil */
@media (max-width: 480px) {
  .sorteos-grid { grid-template-columns: 1fr; }
}

/* Novedades con foto */
.noticia-card-foto { padding: 0; overflow: hidden; }
.noticia-card-foto .noticia-foto { width: 100%; height: 180px; overflow: hidden; }
.noticia-card-foto .noticia-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.noticia-card-foto .noticia-contenido { padding: 16px 20px; }
.noticia-card-foto h3 { margin-top: 6px; }

/* Caption dentro del slider */
.slide-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  padding: 18px 24px 14px; color: #fff;
}
.slide-caption strong { display: block; font-size: 16px; font-weight: 700; }
.slide-caption span   { font-size: 13px; opacity: .85; }

/* --- PÁGINAS INSTITUCIONALES (Reseña / Labor) --- */
.institucional-page { max-width: 920px; margin: 0 auto; }

.institucional-cabecera {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  background: linear-gradient(135deg, #fff 0%, #f4faf7 100%);
  border: 1px solid #dde8e5;
  border-left: 5px solid var(--verde-pnp);
  border-radius: 14px;
  padding: 28px 28px 26px;
  margin-bottom: 28px;
  box-shadow: 0 8px 28px rgba(0, 77, 61, 0.07);
}

.institucional-icono {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--verde-pnp);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 14px rgba(0, 77, 61, 0.25);
}

.institucional-icono-naranja { background: var(--naranja-pnp); box-shadow: 0 4px 14px rgba(243, 156, 18, 0.35); }

.institucional-cabecera-texto h2 {
  color: var(--verde-pnp);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 900;
  margin-bottom: 10px;
  line-height: 1.2;
}

.institucional-lead {
  color: #555;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.75;
}

.institucional-cuerpo {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.institucional-bloque {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: #fff;
  border-radius: 12px;
  padding: 22px 24px;
  border: 1px solid #e8efec;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s, transform 0.2s;
}

.institucional-bloque:hover {
  box-shadow: 0 8px 24px rgba(0, 77, 61, 0.1);
  transform: translateY(-2px);
}

.institucional-num {
  flex-shrink: 0;
  font-size: 1.5rem;
  font-weight: 900;
  color: rgba(0, 77, 61, 0.15);
  line-height: 1.2;
  min-width: 36px;
}

.institucional-bloque p {
  color: #444;
  font-size: 15px;
  line-height: 1.8;
  margin: 0;
}

.pilares-grid-v2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
  align-items: stretch;
}

.card-pilar-v2 {
  background: #fff;
  border-radius: 14px;
  padding: 28px 22px 24px;
  text-align: center;
  border: 1px solid #e8efec;
  border-top: 4px solid var(--verde-pnp);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  height: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-pilar-v2:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 77, 61, 0.12);
}

.card-pilar-v2-icono {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--verde-pnp), #006b54);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.card-pilar-v2 h4 {
  color: var(--verde-pnp);
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 10px;
}

.card-pilar-v2 p {
  color: #667;
  font-size: 13.5px;
  line-height: 1.65;
  flex: 1;
}

@media (max-width: 768px) {
  .institucional-cabecera { flex-direction: column; align-items: center; text-align: center; padding: 22px 18px; }
  .institucional-bloque { flex-direction: column; gap: 8px; padding: 18px; }
  .institucional-num { font-size: 1.1rem; }
}
/* ═══════════════════════════════════════════════════════════
   BANNERS HERO DE PÁGINAS (Reseña, Labor, Novedades)
═══════════════════════════════════════════════════════════ */
.pagina-hero-banner {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #003d2e 0%, #005244 50%, #1a7a5e 100%);
  box-shadow: 0 6px 28px rgba(0,0,0,0.22);
}

.pagina-hero-banner.hero-resena {
  background: linear-gradient(135deg, #1a2a4a 0%, #2c3e6a 40%, #3a5a8a 70%, #c8a94a 100%);
}

.pagina-hero-banner.hero-labor {
  background: linear-gradient(135deg, #002d1e 0%, #004d3d 40%, #006b54 70%, #1a9a7a 100%);
}

.pagina-hero-banner.hero-novedades {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #004d3d 100%);
}

.pagina-hero-banner--solo-img {
  display: block;
  background: #e8efec;
}

.pagina-hero-banner--solo-img .pagina-hero-img {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pagina-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.pagina-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.55) 100%);
  z-index: 1;
}

.pagina-hero-contenido {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 36px;
  width: 100%;
}

.pagina-hero-icono {
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2.5px solid rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  backdrop-filter: blur(4px);
}

.pagina-hero-texto h2 {
  color: #fff;
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  margin-bottom: 6px;
}

.pagina-hero-texto p {
  color: rgba(255,255,255,0.82);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* Cuando la cabecera ya no muestra el título h2 (se movió al banner) */
.institucional-page .institucional-cabecera {
  padding: 18px 28px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  margin-bottom: 20px;
}

@media (max-width: 560px) {
  .pagina-hero-banner { height: 180px; border-radius: 10px; }
  .pagina-hero-contenido { padding: 0 18px; gap: 14px; }
  .pagina-hero-icono { width: 50px; height: 50px; font-size: 20px; }
  .pagina-hero-texto h2 { font-size: 1.15rem; }
  .pagina-hero-texto p { font-size: 0.8rem; }
}

/* ═══════════════════════════════════════════════════════════
   GRID DE NOVEDADES 3x3
═══════════════════════════════════════════════════════════ */
.novedades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  margin-bottom: 8px;
  align-items: stretch;
}

.nov-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 77, 61, 0.08);
  border: 1px solid #e8efec;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 340px;
}
.nov-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 32px rgba(0,77,61,0.18);
  border-color: #004d3d;
}

.nov-card-img {
  height: 180px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #002d24, #004d3d);
}
.nov-card-img--vacio {
  background: linear-gradient(135deg, #002d24, #004d3d);
}
.nov-card-img-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  z-index: 0;
}
.nov-card-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, transparent 55%);
  z-index: 1;
  pointer-events: none;
}
.nov-card-cat {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #c8a94a;
  color: #002d24;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 10px;
  z-index: 2;
}
.nov-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.nov-card-fecha {
  font-size: 11px;
  color: #999;
  margin-bottom: 8px;
  font-weight: 600;
}
.nov-card-fecha i { color: #c8a94a; margin-right: 4px; }
.nov-card-titulo {
  font-size: 14.5px;
  font-weight: 800;
  color: #004d3d;
  line-height: 1.35;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nov-card-resumen {
  font-size: 12.5px;
  color: #666;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}
.nov-card-link {
  font-size: 12px;
  font-weight: 700;
  color: #004d3d;
  letter-spacing: .3px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}
.nov-card-link i { font-size: 11px; transition: transform .15s; }
.nov-card:hover .nov-card-link i { transform: translateX(4px); }

@media (max-width: 560px) {
  .nov-card-img { height: 140px; }
}

/* ── TABLA UNIDADES ─────────────────────────────────── */
.unidades-seccion { margin-bottom: 42px; }
.unidades-seccion-titulo {
  color: #004d3d; font-size: 14px; font-weight: 800; letter-spacing: .5px;
  text-transform: uppercase; border-bottom: 3px solid #c8a94a;
  padding-bottom: 10px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.unidades-seccion-titulo i { color: #c8a94a; }
.tabla-unidades-wrap {
  overflow-x: auto; border-radius: 10px;
  box-shadow: 0 2px 14px rgba(0,77,61,.10);
  border: 1px solid #e0ece8;
}
.tabla-unidades {
  width: 100%; border-collapse: collapse; font-size: 13px;
  background: #fff; table-layout: fixed;
}
.tabla-unidades thead th {
  background: linear-gradient(90deg,#004d3d,#006b55);
  color: #fff; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .5px;
  padding: 12px 14px; text-align: left; white-space: nowrap;
}
.tabla-unidades thead th:first-child { border-radius: 10px 0 0 0; width: 38px; text-align: center; }
.tabla-unidades thead th:nth-child(2) { width: 22%; }
.tabla-unidades thead th:nth-child(3) { }
.tabla-unidades thead th:nth-child(4) { width: 125px; text-align: center; }
.tabla-unidades thead th:last-child   { width: 105px; border-radius: 0 10px 0 0; text-align: center; }
.tabla-unidades tbody tr { border-bottom: 1px solid #edf2ef; transition: background .12s; }
.tabla-unidades tbody tr:last-child { border-bottom: none; }
.tabla-unidades tbody tr:hover { background: #f0f7f4; }
.tabla-unidades tbody tr:nth-child(even) { background: #f8faf8; }
.tabla-unidades tbody tr:nth-child(even):hover { background: #e8f4f0; }
.tabla-unidades td { padding: 10px 14px; vertical-align: middle; word-break: break-word; }
.td-num   { width: 38px; text-align: center; color: #c8a94a; font-weight: 900; font-size: 15px; padding: 10px 6px; }
.td-nombre { font-weight: 700; color: #004d3d; font-size: 12.5px; }
.td-dir   { color: #555; font-size: 12px; line-height: 1.45; }
.td-tel   { text-align: center; white-space: nowrap; }
.td-mapa  { text-align: center; white-space: nowrap; }
.tel-link { color: #004d3d; text-decoration: none; font-weight: 600; font-size: 12px; }
.tel-link:hover { text-decoration: underline; }
.btn-mapa {
  display: inline-flex; align-items: center; gap: 5px;
  background: #1a73e8; color: #fff; font-size: 11px; font-weight: 700;
  padding: 5px 10px; border-radius: 6px; text-decoration: none;
  transition: background .15s; white-space: nowrap;
}
.btn-mapa:hover { background: #1557b0; color: #fff; }
.sin-dato { color: #bbb; font-size: 12px; }

/* ═══════════════════════════════════════════════════════════
   PORTAL INICIO — secciones y tarjetas uniformes
═══════════════════════════════════════════════════════════ */
.body-portal.portal-home {
  background: #f0f4f2;
}

.portal-home-content {
  padding: 32px 0 48px;
}

#inicio.portal-viewport-wrap {
  scroll-margin-top: 58px;
}

.portal-home-content .portal-seccion {
  scroll-margin-top: 58px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e5ece8;
  box-shadow: 0 4px 24px rgba(0, 77, 61, 0.06);
  padding: 36px 28px 32px;
  margin-bottom: 28px;
}

.portal-home-content .portal-seccion:nth-child(even) {
  background: #fafcfb;
}

.sorteos-section { margin: 28px 0 0; }

.sorteos-section-titulo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #004d3d;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  border-bottom: 3px solid #c8a94a;
  padding-bottom: 10px;
  margin-bottom: 18px;
}

.sorteos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.sorteo-flyer {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 280px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 77, 61, 0.12);
  border: 1px solid #e8efec;
  background: #fff;
  transition: transform .22s ease, box-shadow .22s ease;
}

.sorteo-flyer:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 77, 61, 0.16);
}

.sorteo-flyer-img {
  height: 160px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #002d24, #004d3d);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.sorteo-flyer-img img { width: 100%; height: 100%; object-fit: cover; }

.sorteo-placeholder { text-align: center; color: rgba(255, 255, 255, 0.75); }
.sorteo-placeholder i { font-size: 40px; display: block; margin-bottom: 8px; color: #c8a94a; }

.sorteo-flyer-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #c8a94a;
  color: #002d24;
  font-size: 9px;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 10px;
}

.sorteo-flyer-body {
  padding: 16px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sorteo-flyer-fecha { font-size: 11px; font-weight: 800; color: #c8a94a; margin-bottom: 6px; }
.sorteo-flyer-titulo { font-size: 14px; font-weight: 800; color: #004d3d; line-height: 1.35; }
.sorteo-flyer-desc { font-size: 12px; color: #666; margin-top: 8px; line-height: 1.55; flex: 1; }

.resultado-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8efec;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(0, 77, 61, 0.08);
}

.resultado-header {
  background: linear-gradient(90deg, #004d3d, #006b55);
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.resultado-header i { color: #c8a94a; font-size: 20px; }

.resultado-tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.resultado-tabla th {
  background: #f0f7f0;
  color: #004d3d;
  font-size: 11px;
  padding: 10px 14px;
  text-align: left;
}
.resultado-tabla td { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; }
.resultado-nro {
  width: 32px;
  height: 32px;
  background: #c8a94a;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #002d24;
}
.resultado-nombre { font-weight: 700; color: #004d3d; }

.bienestar-home-card {
  background: linear-gradient(145deg, #fff 0%, #f5faf7 100%);
  border-radius: 16px;
  border: 1px solid #e8efec;
  border-top: 4px solid #c8a94a;
  padding: 36px 28px;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: 0 6px 24px rgba(0, 77, 61, 0.08);
}

.bienestar-home-card h4 { color: #004d3d; font-size: 18px; margin-bottom: 10px; font-weight: 800; }
.bienestar-home-card p { color: #667; font-size: 14px; margin-bottom: 22px; line-height: 1.65; }

.btn-bienestar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #004d3d;
  color: #fff;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
  transition: background .2s, transform .2s;
}

.btn-bienestar:hover { background: #006b55; transform: translateY(-2px); }

.texto-vacio {
  color: #889;
  text-align: center;
  padding: 32px 20px;
  background: #f8faf9;
  border-radius: 12px;
  border: 1px dashed #d0ddd8;
  font-size: 14px;
}

.icon-wrapper {
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 77, 61, 0.2);
}

#modal-novedad {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.65);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#modal-novedad.visible { display: flex; }

.modal-nov-box {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.modal-nov-close { display: flex; justify-content: flex-end; padding: 12px 14px 0; }
.modal-nov-close button {
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
}
#modal-nov-inner { padding: 20px 28px 28px; }
.modal-nov-titulo { font-size: 1.35rem; font-weight: 900; color: #004d3d; margin-bottom: 14px; }
.modal-nov-cuerpo { font-size: 14.5px; color: #444; line-height: 1.75; }

@media (max-width: 768px) {
  .portal-home-content .portal-seccion { padding: 28px 18px 24px; margin-bottom: 20px; }
  .novedades-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

@media (max-width: 560px) {
  .portal-home-content .portal-seccion { border-radius: 12px; padding: 24px 16px; }
  .novedades-grid { grid-template-columns: 1fr; }
  .nov-card { min-height: 300px; }
  .nov-card-img { height: 150px; }
  .grid-modern { grid-template-columns: 1fr; }
}
