/* ==================================================
   Red de Apoyo - Directorio de ayuda
   Identidad visual: misma paleta oscura/cian del sitio,
   sin marca ni vínculos al sitio principal.
================================================== */

:root {
    --primary: #06b6d4;
    --primary-dark: #0891b2;
    --primary-light: #22d3ee;
    --background: #030712;
    --surface: #0a0f1e;
    --surface-alt: #0f172a;
    --light: #060b19;
    --soft-cyan: #0a1a2e;
    --border: #1e293b;
    --border-cyan: rgba(6, 182, 212, 0.18);
    --text: #cbd5e1;
    --heading: #f1f5f9;
    --gray-light: #94a3b8;
    --success: #22c55e;
    --whatsapp: #25d366;
    --instagram: #e1306c;
    --radius-sm: 0.75rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --shadow-sm: 0 0.75rem 2rem rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 2rem 6rem rgba(6, 182, 212, 0.12);
    --transition: 220ms ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", Arial, sans-serif;
    color: var(--text);
    background: var(--background);
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
}

::selection {
    color: #fff;
    background: var(--primary);
}

.container {
    max-width: 76.5rem;
}

/* ---------- Topbar ---------- */

.ayuda-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 0.85rem 0;
    background: rgba(3, 7, 18, 0.85);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(1rem);
    -webkit-backdrop-filter: blur(1rem);
}

.ayuda-topbar .container {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.ayuda-brand {
    display: inline-flex;
    gap: 0.65rem;
    align-items: center;
    color: var(--heading);
    font-size: 1.2rem;
    font-weight: 800;
}

.ayuda-brand-mark {
    display: grid;
    width: 2.4rem;
    height: 2.4rem;
    color: #fff;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #ef4444, var(--primary-dark));
    border-radius: 0.8rem;
    box-shadow: 0 0.9rem 1.9rem rgba(6, 182, 212, 0.22);
    place-items: center;
}

.ayuda-emergency {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    padding: 0.45rem 0.9rem;
    color: var(--primary-light);
    font-size: 0.82rem;
    font-weight: 800;
    background: var(--soft-cyan);
    border: 1px solid var(--border-cyan);
    border-radius: 999px;
}

/* ---------- Hero ---------- */

.ayuda-hero {
    position: relative;
    padding: 5rem 0 4rem;
    overflow: hidden;
    text-align: center;
    background:
        radial-gradient(circle at 88% 12%, rgba(6, 182, 212, 0.12), transparent 27rem),
        radial-gradient(circle at 10% 82%, rgba(6, 182, 212, 0.06), transparent 24rem),
        var(--background);
}

.ayuda-eyebrow {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.55rem 0.9rem;
    margin-bottom: 1rem;
    color: var(--primary-light);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    background: var(--soft-cyan);
    border: 1px solid var(--border-cyan);
    border-radius: 999px;
}

.ayuda-hero h1 {
    margin: 0 0 1.1rem;
    color: var(--heading);
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    font-weight: 800;
    line-height: 1.08;
}

.ayuda-lead {
    max-width: 46rem;
    margin: 0 auto 1.6rem;
    font-size: 1.08rem;
}

.ayuda-note {
    display: inline-flex;
    gap: 0.6rem;
    align-items: flex-start;
    max-width: 42rem;
    margin: 0 auto;
    padding: 0.95rem 1.2rem;
    color: var(--gray-light);
    text-align: left;
    font-size: 0.88rem;
    background: var(--surface-alt);
    border: 1px solid rgba(6, 182, 212, 0.12);
    border-radius: var(--radius-md);
}

.ayuda-note i {
    color: var(--primary-light);
    font-size: 1.1rem;
}

/* ---------- Main / filtros ---------- */

.ayuda-main {
    padding-bottom: 4rem;
}

.ayuda-filters {
    position: sticky;
    top: 4.1rem;
    z-index: 1020;
    display: grid;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
    margin-bottom: 2rem;
    background: rgba(10, 15, 30, 0.95);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(1rem);
}

.ayuda-filter-city {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.ayuda-filter-search {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.ayuda-filter-search label {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    flex: 0 0 auto;
    color: var(--heading);
    font-weight: 800;
    font-size: 0.9rem;
}

.ayuda-filter-search label i {
    color: var(--primary-light);
}

.ayuda-filter-search .form-control {
    color: var(--heading);
    background-color: var(--surface);
    border-color: var(--border);
}

.ayuda-filter-search .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(6, 182, 212, 0.25);
}

.ayuda-filter-city label {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    flex: 0 0 auto;
    color: var(--heading);
    font-weight: 800;
    font-size: 0.9rem;
}

.ayuda-filter-city label i {
    color: var(--primary-light);
}

.ayuda-filter-city .form-select {
    max-width: 22rem;
    color: var(--heading);
    background-color: var(--surface);
    border-color: var(--border);
}

.ayuda-filter-city .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(6, 182, 212, 0.25);
}

.ayuda-filter-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.ayuda-chip {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    padding: 0.5rem 0.95rem;
    color: var(--gray-light);
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    transition: all var(--transition);
}

.ayuda-chip:hover {
    color: var(--primary-light);
    border-color: var(--primary);
}

.ayuda-chip.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: transparent;
    box-shadow: 0 0.6rem 1.5rem rgba(6, 182, 212, 0.3);
}

.ayuda-count {
    color: var(--gray-light);
    font-size: 0.85rem;
    font-weight: 700;
}

/* ---------- Grid de centros ---------- */

.ayuda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 1.25rem;
}

.ayuda-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.ayuda-card:hover {
    border-color: rgba(6, 182, 212, 0.25);
    box-shadow: var(--shadow-lg);
    transform: translateY(-0.35rem);
}

.ayuda-card.is-hidden {
    display: none;
}

.ayuda-card-head {
    display: flex;
    gap: 0.9rem;
    align-items: center;
}

.ayuda-card-icon {
    display: grid;
    flex: 0 0 auto;
    width: 3rem;
    height: 3rem;
    color: var(--primary-light);
    font-size: 1.25rem;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.16), rgba(6, 182, 212, 0.05));
    border: 1px solid rgba(6, 182, 212, 0.22);
    border-radius: var(--radius-md);
    place-items: center;
}

.ayuda-card-head h3 {
    margin: 0 0 0.2rem;
    color: var(--heading);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
}

.ayuda-card-city {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    color: var(--gray-light);
    font-size: 0.85rem;
}

.ayuda-card-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ayuda-badge {
    display: inline-flex;
    gap: 0.3rem;
    align-items: center;
    padding: 0.3rem 0.6rem;
    color: var(--primary-light);
    font-size: 0.74rem;
    font-weight: 700;
    background: var(--soft-cyan);
    border: 1px solid var(--border-cyan);
    border-radius: 999px;
}

.ayuda-card-desc {
    margin: 0;
    color: var(--gray-light);
    font-size: 0.9rem;
}

.btn-ayuda {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    margin-top: auto;
    padding: 0.6rem 1.1rem;
    color: #fff;
    font-weight: 800;
    font-size: 0.88rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: 0;
    border-radius: 999px;
    box-shadow: 0 0.8rem 2rem rgba(6, 182, 212, 0.25);
    transition: transform var(--transition), box-shadow var(--transition);
}

.btn-ayuda:hover {
    transform: translateY(-0.15rem);
    box-shadow: 0 1.1rem 2.4rem rgba(6, 182, 212, 0.35);
}

.btn-ayuda-outline {
    color: var(--primary-light);
    background: rgba(6, 182, 212, 0.06);
    border: 1px solid var(--border-cyan);
    box-shadow: none;
}

.ayuda-empty {
    grid-column: 1 / -1;
    padding: 3rem;
    text-align: center;
    color: var(--gray-light);
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}

.ayuda-empty i {
    font-size: 2.2rem;
    color: var(--primary-light);
}

/* ---------- Info útil ---------- */

.ayuda-info {
    padding: 4.5rem 0 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border);
}

.ayuda-section-head {
    max-width: 45rem;
    margin: 0 auto 2.4rem;
    text-align: center;
}

.ayuda-section-head h2 {
    margin: 0 0 0.8rem;
    color: var(--heading);
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 800;
}

.ayuda-section-head p {
    margin: 0;
    color: var(--gray-light);
}

.ayuda-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: 1.25rem;
}

.ayuda-info-card {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.ayuda-info-icon {
    display: grid;
    width: 2.8rem;
    height: 2.8rem;
    color: var(--primary-light);
    font-size: 1.15rem;
    background: var(--soft-cyan);
    border-radius: var(--radius-md);
    place-items: center;
}

.ayuda-info-card h3 {
    margin: 0;
    color: var(--heading);
    font-size: 1rem;
    font-weight: 800;
}

.ayuda-info-card p {
    margin: 0;
    color: var(--gray-light);
    font-size: 0.88rem;
}

.ayuda-info-link {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    align-self: flex-start;
    margin-top: auto;
    color: var(--primary-light);
    font-weight: 800;
    font-size: 0.88rem;
}

/* ---------- Modal de detalle ---------- */

.ayuda-modal {
    color: var(--text);
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.ayuda-modal .modal-header {
    border-bottom: 1px solid var(--border);
}

.ayuda-modal .modal-title {
    color: var(--heading);
    font-weight: 800;
}

.ayuda-modal .modal-footer {
    border-top: 1px solid var(--border);
}

.detalle-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.detalle-meta-item {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
}

.detalle-meta-item i {
    display: grid;
    flex: 0 0 auto;
    width: 2.2rem;
    height: 2.2rem;
    color: var(--primary-light);
    font-size: 1rem;
    background: var(--soft-cyan);
    border-radius: 0.7rem;
    place-items: center;
}

.detalle-meta-item strong {
    display: block;
    color: var(--heading);
    font-size: 0.88rem;
}

.detalle-meta-item span {
    color: var(--gray-light);
    font-size: 0.85rem;
    word-break: break-word;
}

.detalle-desc {
    margin: 0 0 1.2rem;
    color: var(--gray-light);
    font-size: 0.95rem;
    white-space: pre-line;
}

.detalle-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.2rem;
}

.detalle-mapa {
    position: relative;
    width: 100%;
    height: 16rem;
    margin-bottom: 1.2rem;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.detalle-mapa iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.detalle-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1.2rem;
}

.detalle-acciones .btn-ayuda {
    align-self: auto;
    margin-top: 0;
}

.btn-whatsapp {
    background: linear-gradient(135deg, var(--whatsapp), #1da851);
    box-shadow: 0 0.8rem 2rem rgba(37, 211, 102, 0.25);
}

.btn-instagram {
    background: linear-gradient(135deg, #f09433, #e1306c, #bc2a8d);
    box-shadow: 0 0.8rem 2rem rgba(225, 48, 108, 0.25);
}

.detalle-donar {
    padding: 1.2rem;
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.22);
    border-radius: var(--radius-md);
}

.detalle-donar h4 {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 0 0 0.9rem;
    color: var(--heading);
    font-size: 1rem;
    font-weight: 800;
}

.detalle-donar h4 i {
    color: var(--success);
}

.detalle-campo {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.6rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.detalle-campo > div {
    min-width: 0;
}

.detalle-campo span {
    display: block;
    color: var(--gray-light);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detalle-campo strong {
    display: block;
    color: var(--heading);
    font-size: 0.95rem;
    word-break: break-all;
}

.btn-copiar {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    flex: 0 0 auto;
    padding: 0.4rem 0.8rem;
    color: var(--primary-light);
    font-size: 0.8rem;
    font-weight: 800;
    background: var(--soft-cyan);
    border: 1px solid var(--border-cyan);
    border-radius: 999px;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-copiar.copiado {
    color: #fff;
    background: var(--success);
    border-color: transparent;
}

/* ---------- Footer ---------- */

.ayuda-footer {
    padding: 2.2rem 0;
    color: var(--gray-light);
    font-size: 0.85rem;
    text-align: center;
    background: var(--secondary, #020617);
    border-top: 1px solid var(--border);
}

.ayuda-footer p {
    max-width: 52rem;
    margin: 0 auto;
}

.ayuda-footer i {
    color: var(--success);
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    .ayuda-topbar .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .ayuda-hero {
        padding: 3.5rem 0 3rem;
    }

    .ayuda-filters {
        position: static;
    }

    .ayuda-filter-city,
    .ayuda-filter-search {
        flex-wrap: wrap;
    }

    .ayuda-filter-city .form-select,
    .ayuda-filter-search .form-control {
        max-width: none;
        flex: 1 1 100%;
    }
}

@media (max-width: 480px) {
    .ayuda-hero h1 {
        font-size: 2rem;
    }

    .ayuda-emergency {
        font-size: 0.78rem;
        padding: 0.45rem 0.8rem;
    }

    .ayuda-card {
        padding: 1.25rem;
    }

    .detalle-acciones .btn-ayuda {
        width: 100%;
    }

    .detalle-campo {
        flex-wrap: wrap;
    }

    .detalle-campo > div {
        flex: 1 1 100%;
    }

    .btn-copiar {
        width: 100%;
        justify-content: center;
    }
}
