:root {
    --verde-principal: #2e7d32;
    --verde-medio: #388e3c;
    --verde-claro: #4caf50;
    --verde-hover: #1b5e20;
    --verde-bg: #f1f8e9;
    --fondo-nav: rgba(10, 14, 10, 0.95);
    --texto-oscuro: #1a1a1a;
    --texto-medio: #555;
    --gris-borde: #e5e7eb;
    --radio: 16px;
    --sombra: 0 4px 24px rgba(0,0,0,0.08);
    --sombra-hover: 0 8px 32px rgba(0,0,0,0.15);
    /* Paleta del logo — dorado/marrón */
    --oro: #c49a28;
    --oro-claro: #dbb84a;
    --oro-oscuro: #8b6318;
    --oro-bg: rgba(196,154,40,0.12);
    --crema: #faf6ed;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    color: var(--texto-oscuro);
    min-height: 100vh;
    padding-top: 68px;
    background: #0f1f0f;
}

/* FONDO FIJO CON BLUR — la background-image se inyecta dinámicamente desde index.ejs */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(5px) brightness(0.4) saturate(0.7);
    z-index: -1;
    transform: scale(1.08);
}

/* ===================== NAVBAR ===================== */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    background: var(--fondo-nav);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0 28px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: box-shadow 0.3s;
}
.navbar.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.5); }
.navbar { border-bottom: 1px solid rgba(196,154,40,0.18); }

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.logo-img {
    height: 38px;
    width: 38px;
    object-fit: contain;
    border-radius: 50%;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.45));
}
.logo-text {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--oro-claro);
    letter-spacing: -0.02em;
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2px;
    align-items: center;
}
.nav-link {
    display: block;
    text-decoration: none;
    color: rgba(255,255,255,0.82);
    font-weight: 500;
    font-size: 0.88rem;
    padding: 8px 13px;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}
.nav-link:hover { color: white; background: rgba(102,187,106,0.18); }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-toggle { cursor: pointer; user-select: none; }
.dd-arrow { font-size: 0.65rem; margin-left: 3px; display: inline-block; transition: transform 0.2s; }
.dropdown.open .dd-arrow { transform: rotate(180deg); }
.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18,28,18,0.97);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 8px;
    min-width: 190px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    z-index: 200;
    list-style: none;
    backdrop-filter: blur(12px);
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    font-size: 0.88rem;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}
.dropdown-menu li a:hover { background: rgba(102,187,106,0.18); color: white; }
.dd-sep { height: 1px; background: rgba(255,255,255,0.08); margin: 4px 8px; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===================== STATUS BADGE ===================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 7px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 900;
    white-space: nowrap;
    max-width: 90vw;
    overflow: hidden;
    text-overflow: ellipsis;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    animation: badgeIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
    cursor: default;
}
@keyframes badgeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-12px) scale(0.9); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: blink 2s infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

.status-warning { background: rgba(255,248,225,0.95); color: #7a5800; border: 1px solid rgba(255,193,7,0.5); }
.status-warning .status-dot { background: #f59e0b; }
.status-danger  { background: rgba(254,226,226,0.95); color: #7f1d1d; border: 1px solid rgba(239,68,68,0.4); }
.status-danger .status-dot  { background: #ef4444; }
.status-success { background: rgba(220,252,231,0.95); color: #14532d; border: 1px solid rgba(74,222,128,0.4); }
.status-success .status-dot { background: #22c55e; }
.status-info    { background: rgba(224,242,254,0.95); color: #0c4a6e; border: 1px solid rgba(56,189,248,0.4); }
.status-info .status-dot    { background: #38bdf8; }

/* ===================== PAGE WRAP ===================== */
.page-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 16px 70px;
}

/* ===================== HERO ===================== */
.hero {
    position: relative;
    min-height: 56vh;
    border-radius: var(--radio);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 22px;
}
.hero-bg {
    position: absolute;
    inset: 0;
    /* background-image se inyecta dinámicamente desde index.ejs */
    background-size: cover;
    background-position: center;
    transition: transform 8s ease;
}
.hero:hover .hero-bg { transform: scale(1.03); }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(0,0,0,0.72) 0%, rgba(22,72,24,0.6) 100%);
}
.hero-content {
    position: relative;
    z-index: 1;
    color: white;
    padding: 60px 24px;
    max-width: 720px;
}
.hero-badge {
    display: inline-block;
    background: rgba(196,154,40,0.2);
    border: 1px solid rgba(196,154,40,0.5);
    color: var(--oro-claro);
    padding: 5px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 22px;
}
.hero h1 {
    font-size: clamp(1.9rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    letter-spacing: -0.02em;
}
.hero p {
    font-size: clamp(0.95rem, 2vw, 1.12rem);
    opacity: 0.88;
    line-height: 1.65;
    margin-bottom: 36px;
    text-shadow: 0 1px 5px rgba(0,0,0,0.4);
}
.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--verde-principal);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.93rem;
    transition: all 0.25s;
    box-shadow: 0 4px 18px rgba(46,125,50,0.45);
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.btn-primary:hover { background: var(--verde-hover); transform: translateY(-2px); box-shadow: 0 7px 24px rgba(46,125,50,0.55); }
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.14);
    color: white;
    border: 1.5px solid rgba(255,255,255,0.35);
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.93rem;
    backdrop-filter: blur(4px);
    transition: all 0.25s;
    font-family: inherit;
    cursor: pointer;
}
.btn-secondary:hover { background: rgba(255,255,255,0.24); transform: translateY(-2px); }

/* Botón Asociate — blanco/crema con acento dorado-marrón */
.btn-gold {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    background: linear-gradient(145deg, #ffffff 0%, #fdf5e4 60%, #f5e8c8 100%);
    color: #4a2e00;
    border: 2px solid rgba(196,154,40,0.7);
    padding: 17px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.08rem;
    letter-spacing: 0.03em;
    transition: all 0.28s cubic-bezier(0.34,1.4,0.64,1);
    box-shadow:
        0 4px 24px rgba(196,154,40,0.35),
        0 1px 0 rgba(255,255,255,0.9) inset,
        0 -1px 0 rgba(139,99,24,0.15) inset;
    font-family: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
/* Brillo interno al hover */
.btn-gold::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}
.btn-gold:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow:
        0 10px 36px rgba(196,154,40,0.5),
        0 2px 0 rgba(255,255,255,0.9) inset,
        0 -1px 0 rgba(139,99,24,0.2) inset;
    border-color: var(--oro);
    color: #3a2000;
}
.btn-gold:hover::after { opacity: 1; }
.btn-gold:active { transform: translateY(-1px) scale(1.01); }
/* Ícono levemente más grande */
.btn-gold span.btn-icon { font-size: 1.25em; line-height: 1; }

/* ===================== SECTION CARDS ===================== */
.section-card {
    background: rgba(255,255,255,0.97);
    border-radius: var(--radio);
    padding: 38px 40px;
    margin-bottom: 22px;
    box-shadow: 0 2px 40px rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.9);
}
.section-header { margin-bottom: 28px; }
.section-tag {
    display: inline-block;
    background: var(--verde-bg);
    color: var(--verde-principal);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 10px;
    border: 1px solid #c8e6c9;
}
.section-header h2 {
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 800;
    color: var(--texto-oscuro);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.section-subtitle {
    color: var(--texto-medio);
    font-size: 0.93rem;
    line-height: 1.65;
    max-width: 600px;
}

/* ===================== NOTICIAS SLIDER ===================== */
.noticias-slider-wrap {
    position: relative;
    padding: 0 0 16px;
}

/* Flechas flotantes */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(calc(-50% - 12px));
    z-index: 10;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    color: var(--texto-oscuro);
    transition: all 0.2s;
    font-family: inherit;
}
.slider-arrow:hover  { background: var(--verde-principal); color: white; }
.slider-arrow:disabled { opacity: 0.25; cursor: default; pointer-events: none; }
.slider-arrow.arrow-prev { left: -18px; }
.slider-arrow.arrow-next { right: -18px; }

/* Track */
.noticias-slider {
    display: flex;
    flex-direction: row;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.noticias-slider::-webkit-scrollbar { display: none; }

/* Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}
.slider-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--gris-borde);
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    padding: 0;
}
.slider-dot.active {
    background: var(--verde-principal);
    width: 22px;
    border-radius: 4px;
}

/* Card */
.noticia-card {
    scroll-snap-align: start;
    flex-shrink: 0;
    width: calc(100% - 40px);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--gris-borde);
    transition: box-shadow 0.25s, border-color 0.25s;
    background: white;
    display: flex;
    flex-direction: row;
    min-height: 220px;
    cursor: pointer;
}
.noticia-card:hover {
    box-shadow: var(--sombra-hover);
    border-color: #c8e6c9;
}
.noticia-img-wrap {
    position: relative;
    width: 42%;
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
}
.noticia-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.noticia-card:hover .noticia-img-wrap img { transform: scale(1.04); }
.noticia-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 3.2rem;
}
.noticia-fecha-tag {
    position: absolute;
    bottom: 10px; left: 10px;
    background: rgba(0,0,0,0.58);
    color: white;
    font-size: 0.68rem; font-weight: 600;
    padding: 4px 10px;
    border-radius: 50px;
    backdrop-filter: blur(4px);
    letter-spacing: 0.02em;
}
.noticia-body {
    padding: 22px 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.noticia-body h3 {
    font-size: 1.05rem; font-weight: 700;
    color: var(--texto-oscuro);
    line-height: 1.35;
}
.noticia-body .noticia-preview {
    color: var(--texto-medio);
    font-size: 0.87rem;
    line-height: 1.6;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}
.noticia-fade {
    height: 36px;
    margin-top: -36px;
    position: relative;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    pointer-events: none;
    flex-shrink: 0;
}
.btn-leer-mas {
    align-self: flex-start;
    margin-top: auto;
    padding-top: 4px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--verde-principal);
    background: none;
    border: none;
    cursor: pointer;
    display: flex; align-items: center; gap: 4px;
    transition: color 0.15s;
    font-family: inherit;
}
.btn-leer-mas:hover { color: var(--verde-hover); }

/* Modal noticia */
.novedad-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(3px);
    padding: 24px 16px;
    overflow-y: auto;
    animation: fadeInOverlay 0.2s ease;
}
.novedad-modal-overlay.open { display: flex; align-items: flex-start; justify-content: center; }
@keyframes fadeInOverlay { from { opacity: 0; } to { opacity: 1; } }
.novedad-modal-box {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    width: 100%;
    max-width: 680px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUpModal 0.25s ease;
    position: relative;
}
@keyframes slideUpModal { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.novedad-modal-img {
    width: 100%; height: 280px;
    object-fit: cover;
}
.novedad-modal-img-placeholder {
    width: 100%; height: 200px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    display: flex; align-items: center; justify-content: center;
    font-size: 4rem;
}
.novedad-modal-body {
    padding: 28px 28px 32px;
}
.novedad-modal-body h2 {
    font-size: 1.3rem; font-weight: 800;
    color: var(--texto-oscuro);
    line-height: 1.3;
    margin-bottom: 8px;
}
.novedad-modal-fecha {
    font-size: 0.8rem; color: var(--texto-medio); margin-bottom: 18px;
}
.novedad-modal-contenido {
    font-size: 0.92rem; color: #444;
    line-height: 1.75;
    white-space: pre-line;
}
.novedad-modal-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    border: none; cursor: pointer;
    color: white; font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.novedad-modal-close:hover { background: rgba(0,0,0,0.7); }
/* ===================== PDF RED VIAL ===================== */
.pdf-embed-wrap {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gris-borde);
    background: #e8e8e8;
    position: relative;
}
.pdf-viewer-wrap {
    position: relative;
    width: 100%;
    height: 540px;
    overflow: hidden;
    background: #d0d0d0;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}
.pdf-viewer-wrap.grabbing { cursor: grabbing; }
#pdf-canvas {
    display: block;
    position: absolute;
    top: 0; left: 0;
    transform-origin: 0 0;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.18);
    transition: none;
}
.pdf-controls {
    position: absolute;
    bottom: 14px;
    right: 14px;
    display: flex;
    gap: 6px;
    z-index: 10;
}
.pdf-ctrl-btn {
    width: 36px; height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.12);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(6px);
    cursor: pointer;
    font-size: 1.05rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.14);
    transition: background 0.15s, box-shadow 0.15s;
    color: var(--texto-oscuro);
    font-family: inherit;
}
.pdf-ctrl-btn:hover { background: white; box-shadow: 0 4px 14px rgba(0,0,0,0.2); }
.pdf-zoom-label {
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.12);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(6px);
    font-size: 0.78rem;
    font-weight: 700;
    display: flex; align-items: center;
    color: var(--texto-medio);
    box-shadow: 0 2px 8px rgba(0,0,0,0.14);
    min-width: 48px;
    justify-content: center;
}
.pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f3f4f6;
    border-top: 1px solid var(--gris-borde);
    flex-wrap: wrap;
    gap: 8px;
}
.pdf-toolbar span { font-size: 0.82rem; color: var(--texto-medio); }
.btn-pdf-download {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--verde-principal); color: white;
    text-decoration: none; padding: 7px 16px;
    border-radius: 8px; font-size: 0.83rem; font-weight: 600;
    transition: background 0.2s;
}
.btn-pdf-download:hover { background: var(--verde-hover); color: white; }
.noticia-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--verde-principal);
    margin-bottom: 2px;
}

/* ===================== RED VIAL - MAPA ===================== */
#mapa-publico {
    height: 420px;
    border-radius: 12px;
    border: 1px solid var(--gris-borde);
    overflow: hidden;
}

/* ===================== COMISIÓN ===================== */
.comision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}
.comision-card {
    background: var(--verde-bg);
    border: 1px solid #c8e6c9;
    border-radius: 12px;
    padding: 22px 20px;
    text-align: center;
    transition: all 0.2s;
}
.comision-card:hover { border-color: var(--verde-claro); box-shadow: 0 4px 14px rgba(46,125,50,0.1); }
.comision-rol {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--verde-medio);
    margin-bottom: 8px;
}
.comision-icono { font-size: 1.6rem; margin-bottom: 8px; }
.comision-nombre {
    font-size: 0.97rem;
    font-weight: 600;
    color: var(--texto-oscuro);
}
.comision-info {
    background: var(--verde-bg);
    border: 1px solid #c8e6c9;
    border-radius: 12px;
    padding: 24px;
    line-height: 1.7;
    color: var(--texto-oscuro);
    grid-column: 1 / -1;
}

/* ===================== FORMULARIO RECLAMO ===================== */
.reclamo-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.84rem; font-weight: 600; color: #374151; }
.form-group input,
.form-group textarea,
.form-group select {
    padding: 13px 16px;
    border: 1.5px solid var(--gris-borde);
    border-radius: 10px;
    font-size: 0.94rem;
    font-family: inherit;
    width: 100%;
    background: #fafafa;
    color: var(--texto-oscuro);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--verde-claro);
    box-shadow: 0 0 0 3px rgba(76,175,80,0.14);
    background: white;
}
.form-group textarea { resize: vertical; min-height: 110px; }

/* File upload */
.file-upload-area {
    border: 2px dashed #c8e6c9;
    border-radius: 12px;
    background: var(--verde-bg);
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}
.file-upload-area:hover { border-color: var(--verde-claro); background: #e8f5e9; }
.file-input { display: none; }
.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    cursor: pointer;
    gap: 8px;
    text-align: center;
}
.file-icon { font-size: 2rem; }
.file-text { font-weight: 600; color: var(--verde-principal); font-size: 0.93rem; }
.file-hint { font-size: 0.78rem; color: #888; }
.file-preview {
    display: none; /* oculto hasta que se seleccione al menos un archivo */
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: white;
}
.file-preview.has-files { display: flex; }
.file-thumb-wrap {
    position: relative;
    width: 72px;
    flex-shrink: 0;
}
.file-thumb-wrap img {
    width: 72px; height: 56px;
    border-radius: 8px; object-fit: cover;
    border: 1px solid #e5e7eb;
    display: block;
}
.file-thumb-remove {
    position: absolute; top: -6px; right: -6px;
    background: #dc2626; color: white; border: none;
    width: 20px; height: 20px; border-radius: 50%;
    cursor: pointer; font-size: 0.7rem; display: flex;
    align-items: center; justify-content: center;
    padding: 0; font-family: inherit; line-height: 1;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.file-preview-count {
    font-size: 0.8rem; color: var(--verde-principal);
    font-weight: 600; width: 100%; margin-top: 4px;
}
.file-preview-name { font-size: 0.85rem; color: var(--texto-medio); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-remove {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s;
    flex-shrink: 0;
    font-family: inherit;
}
.file-remove:hover { background: #fecaca; }

.btn-submit {
    background: var(--verde-principal);
    color: white;
    border: none;
    padding: 15px 32px;
    border-radius: 50px;
    font-size: 0.97rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    align-self: flex-start;
}
.btn-submit:hover { background: var(--verde-hover); transform: translateY(-2px); box-shadow: 0 5px 18px rgba(46,125,50,0.35); }

/* Mensaje éxito */
#mensaje-exito { text-align: center; padding: 48px 20px; }
.success-icon { font-size: 3.5rem; margin-bottom: 16px; }
#mensaje-exito h3 { font-size: 1.5rem; font-weight: 800; color: var(--verde-principal); margin-bottom: 8px; }
#mensaje-exito p { color: var(--texto-medio); margin-bottom: 24px; line-height: 1.6; }
.btn-otro {
    background: var(--verde-principal); color: white; border: none;
    padding: 12px 28px; border-radius: 50px; font-size: 0.93rem;
    font-weight: 600; cursor: pointer; transition: 0.2s; font-family: inherit;
}
.btn-otro:hover { background: var(--verde-hover); }

/* ===================== FOOTER ===================== */
.footer {
    background: rgba(8,16,8,0.88);
    backdrop-filter: blur(12px);
    color: rgba(255,255,255,0.65);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 44px 24px 22px;
}
.footer-content {
    max-width: 1100px;
    margin: 0 auto 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 28px;
}
.footer-brand .logo-text { font-size: 1.05rem; }
.footer-brand p { font-size: 0.8rem; color: rgba(255,255,255,0.4); margin-top: 6px; line-height: 1.5; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 0.84rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--oro-claro); }
.footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    border-top: 1px solid rgba(196,154,40,0.15);
    padding-top: 18px;
    font-size: 0.77rem;
    color: rgba(255,255,255,0.3);
    text-align: center;
    line-height: 1.8;
}
.footer-bottom a { color: var(--oro-claro); text-decoration: none; transition: color 0.2s; }
.footer-bottom a:hover { color: var(--oro-claro); opacity: 0.8; }
.footer-logo-img {
    height: 48px;
    width: 48px;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 1px 6px rgba(0,0,0,0.5));
    margin-bottom: 8px;
    display: block;
}

/* ===================== PÁGINAS INTERNAS (Adherite, Cuotas) ===================== */
.page-inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 32px 16px 80px;
}
.page-header-inner {
    text-align: center;
    padding: 40px 20px 32px;
    color: white;
}
.page-header-inner .section-tag { border-color: rgba(102,187,106,0.4); }
.page-header-inner h1 {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    font-weight: 800;
    color: white;
    margin: 12px 0 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.page-header-inner p {
    font-size: 0.97rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.6;
}

/* Form card dentro de páginas */
.form-card {
    background: rgba(255,255,255,0.97);
    border-radius: var(--radio);
    padding: 36px 40px;
    box-shadow: 0 4px 40px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.9);
}
.form-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--verde-principal);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--verde-bg);
    margin-bottom: 20px;
    margin-top: 28px;
}
.form-section-title:first-child { margin-top: 0; }
.form-section-num {
    background: var(--verde-principal);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* Toggle empresa */
.empresa-toggle-wrap {
    background: #f8faf8;
    border: 1.5px solid var(--gris-borde);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.empresa-toggle-wrap:hover { border-color: var(--verde-claro); background: var(--verde-bg); }
.empresa-toggle-wrap input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--verde-principal); cursor: pointer; flex-shrink: 0; }
.empresa-toggle-label { font-weight: 600; font-size: 0.92rem; color: var(--texto-oscuro); cursor: pointer; }
.empresa-fields { display: none; }
.empresa-fields.visible { display: contents; }

/* Tipos de socio */
.tipos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.tipo-option {
    position: relative;
}
.tipo-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.tipo-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1.5px solid var(--gris-borde);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.87rem;
    font-weight: 500;
    color: var(--texto-oscuro);
    transition: all 0.2s;
    background: #fafafa;
}
.tipo-label:hover { border-color: var(--verde-claro); background: var(--verde-bg); }
.tipo-option input:checked + .tipo-label {
    border-color: var(--verde-principal);
    background: var(--verde-bg);
    color: var(--verde-principal);
    font-weight: 700;
}
.tipo-dot {
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid currentColor;
    flex-shrink: 0;
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.tipo-option input:checked + .tipo-label .tipo-dot::after {
    content: '';
    display: block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--verde-principal);
}

/* Info de cuotas */
.cuota-info-box {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 18px 20px;
    font-size: 0.88rem;
    color: #78350f;
    line-height: 1.6;
}
.cuota-info-box strong { display: block; margin-bottom: 6px; font-size: 0.9rem; }

/* Declaración */
.declaracion-box {
    background: #f8faf8;
    border: 1.5px solid var(--gris-borde);
    border-radius: 12px;
    padding: 18px 20px;
    font-size: 0.85rem;
    color: var(--texto-medio);
    line-height: 1.7;
}
.declaracion-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 14px;
    cursor: pointer;
}
.declaracion-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--verde-principal); cursor: pointer; flex-shrink: 0; margin-top: 2px; }
.declaracion-check label { font-size: 0.87rem; font-weight: 600; color: var(--texto-oscuro); cursor: pointer; line-height: 1.5; }

/* Signature pad */
.firma-wrap {
    border: 2px solid var(--gris-borde);
    border-radius: 12px;
    overflow: hidden;
    background: white;
    position: relative;
}
.firma-canvas {
    display: block;
    width: 100%;
    height: 160px;
    touch-action: none;
    cursor: crosshair;
}
.firma-actions {
    display: flex;
    justify-content: flex-end;
    padding: 8px 12px;
    background: #f9f9f9;
    border-top: 1px solid var(--gris-borde);
}
.firma-clear {
    background: none;
    border: 1px solid var(--gris-borde);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.82rem;
    cursor: pointer;
    color: var(--texto-medio);
    font-family: inherit;
    transition: all 0.2s;
}
.firma-clear:hover { background: #fee2e2; border-color: #fca5a5; color: #dc2626; }
.firma-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 0.9rem;
    pointer-events: none;
    transition: opacity 0.2s;
}
.firma-placeholder.hidden { opacity: 0; }

/* ===================== CUOTAS PÚBLICO ===================== */
.search-card {
    background: rgba(255,255,255,0.97);
    border-radius: var(--radio);
    padding: 36px 40px;
    margin-bottom: 22px;
    box-shadow: 0 4px 40px rgba(0,0,0,0.2);
}
.search-form { display: flex; gap: 12px; flex-wrap: wrap; }
.search-form input {
    flex: 1;
    min-width: 200px;
    padding: 14px 18px;
    border: 1.5px solid var(--gris-borde);
    border-radius: 50px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
}
.search-form input:focus {
    border-color: var(--verde-claro);
    box-shadow: 0 0 0 3px rgba(76,175,80,0.14);
    background: white;
}
.search-form button {
    background: var(--verde-principal);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 0.93rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    white-space: nowrap;
}
.search-form button:hover { background: var(--verde-hover); }

.cuota-result-card {
    background: rgba(255,255,255,0.97);
    border-radius: var(--radio);
    padding: 32px 36px;
    margin-bottom: 20px;
    box-shadow: 0 4px 40px rgba(0,0,0,0.2);
}
.cuota-socio-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--verde-bg);
}
.socio-avatar {
    width: 52px; height: 52px;
    background: var(--verde-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    border: 2px solid #c8e6c9;
}
.socio-info h3 { font-size: 1.05rem; font-weight: 700; color: var(--texto-oscuro); }
.socio-info p { font-size: 0.83rem; color: var(--texto-medio); margin-top: 3px; }

.cuotas-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.cuotas-table th {
    text-align: left;
    padding: 10px 14px;
    background: #f8faf8;
    color: var(--texto-medio);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--gris-borde);
}
.cuotas-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f3f4f6;
    color: var(--texto-oscuro);
    vertical-align: middle;
}
.cuotas-table tr:last-child td { border-bottom: none; }
.cuotas-table tr:hover td { background: #fafbfa; }

.badge-cuota {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-pagada { background: #dcfce7; color: #15803d; }
.badge-pendiente { background: #fef3c7; color: #92400e; }
.badge-vencida { background: #fee2e2; color: #991b1b; }

.pago-info {
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: 12px;
    padding: 20px 22px;
    margin-top: 24px;
}
.pago-info h4 { font-size: 0.92rem; font-weight: 700; color: #15803d; margin-bottom: 12px; }
.pago-dato {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.87rem;
}
.pago-dato strong { color: var(--texto-oscuro); min-width: 80px; }
.copy-btn {
    background: #dcfce7;
    border: none;
    border-radius: 6px;
    padding: 3px 9px;
    font-size: 0.75rem;
    cursor: pointer;
    color: #15803d;
    font-family: inherit;
    transition: background 0.2s;
    font-weight: 600;
}
.copy-btn:hover { background: #bbf7d0; }
.pago-nota { font-size: 0.82rem; color: var(--texto-medio); margin-top: 12px; line-height: 1.5; }
.btn-wsp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25d366;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.87rem;
    font-weight: 700;
    margin-top: 14px;
    transition: all 0.2s;
}
.btn-wsp:hover { background: #1ebe5d; transform: translateY(-1px); }

/* ===================== ALERTAS INLINE ===================== */
.alert-box {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert-box-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-box-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-box-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    body { padding-top: 68px; }
    .navbar { padding: 0 16px; }
    .hamburger { display: flex; }

    .nav-links {
        display: none;
        position: fixed;
        top: 68px; left: 0; right: 0;
        background: rgba(10,15,10,0.97);
        flex-direction: column;
        padding: 12px;
        gap: 2px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        max-height: calc(100vh - 68px);
        overflow-y: auto;
        backdrop-filter: blur(16px);
    }
    .nav-links.open { display: flex; }
    .nav-link { padding: 13px 16px; border-radius: 10px; font-size: 0.97rem; }

    .dropdown-menu {
        display: none !important;
        position: static;
        transform: none;
        border-radius: 10px;
        margin-top: 4px;
        margin-left: 16px;
        margin-right: 16px;
        box-shadow: none;
        background: rgba(255,255,255,0.06);
        border: none;
    }
    .dropdown.open .dropdown-menu { display: block !important; }
    .dd-sep { display: none; }

    .status-badge { top: 76px; font-size: 0.76rem; padding: 6px 14px; }

    .page-wrap { padding: 20px 12px 60px; }

    .hero { min-height: 48vh; }
    .hero-content { padding: 44px 16px; }

    .section-card { padding: 24px 18px; }

    .noticia-card { min-height: 160px; width: calc(100% - 24px); }
    .noticia-img-wrap { width: 38%; }
    .noticia-body { padding: 14px 16px 12px; gap: 6px; }
    .noticia-body h3 { font-size: 0.9rem; }
    .noticia-body .noticia-preview { font-size: 0.8rem; -webkit-line-clamp: 3; }
    .slider-arrow.arrow-prev { left: -12px; }
    .slider-arrow.arrow-next { right: -12px; }
    .novedad-modal-img { height: 180px; }
    .novedad-modal-body { padding: 20px 18px 24px; }

    .form-row { grid-template-columns: 1fr; }
    #mapa-publico { height: 290px; }
    .comision-grid { grid-template-columns: 1fr 1fr; }

    .form-card { padding: 24px 18px; }
    .page-inner { padding: 20px 12px 70px; }

    .search-card { padding: 24px 18px; }
    .cuota-result-card { padding: 22px 16px; }

    .cuotas-table { font-size: 0.82rem; }
    .cuotas-table th, .cuotas-table td { padding: 9px 10px; }

    .footer-content { flex-direction: column; gap: 20px; }
    .footer-links { gap: 8px 16px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.65rem; }
    .comision-grid { grid-template-columns: 1fr; }
    .tipos-grid { grid-template-columns: 1fr; }
    .search-form { flex-direction: column; }
    .search-form button { width: 100%; }
}
