/* ========================================
   BARANGAY HOTLINE MODAL
   index_hotline_modal.css — Refined Emergency Red
   ======================================== */

/* ── SECTION OVERHAUL: single trigger card ── */
.hotline-trigger-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
}

.hotline-trigger-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
    max-width: 520px;
    padding: 44px 40px;
    background: linear-gradient(145deg, #7f1d1d 0%, #991b1b 50%, #7f1d1d 100%);
    /* deep crimson — serious and urgent, not neon */
    border: 2px solid rgba(220, 100, 100, 0.25);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    text-align: center;
    box-shadow:
        0 20px 60px rgba(127, 29, 29, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* animated background pulse */
.hotline-trigger-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(220, 80, 80, 0.1) 0%, transparent 70%);
    animation: hotlinePulseGlow 2.4s ease-in-out infinite;
    pointer-events: none;
}

/* top accent line */
.hotline-trigger-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ef4444, #dc2626, #ef4444, transparent);
    border-radius: 24px 24px 0 0;
    animation: hotlineScan 3s ease-in-out infinite;
}

@keyframes hotlinePulseGlow {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0.9;
        transform: scale(1.06);
    }
}

@keyframes hotlineScan {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.9;
    }
}

.hotline-trigger-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(220, 100, 100, 0.45);
    box-shadow:
        0 30px 80px rgba(127, 29, 29, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* big siren emoji with pulse ring */
.hotline-trigger-icon {
    position: relative;
    font-size: 3.8rem;
    line-height: 1;
    display: inline-block;
    animation: sirenSpin 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes sirenSpin {

    0%,
    100% {
        filter: drop-shadow(0 0 6px rgba(220, 80, 80, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 18px rgba(220, 80, 80, 0.9));
    }
}

.hotline-trigger-icon::after {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 2px solid rgba(220, 100, 100, 0.4);
    animation: ringExpand 2s ease-out infinite;
}

@keyframes ringExpand {
    0% {
        transform: scale(0.85);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.hotline-trigger-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: #ffffff;
    /* solid white — always readable on deep red */
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.hotline-trigger-sub {
    font-size: 0.85rem;
    color: rgba(255, 220, 220, 0.88);
    /* warm white — readable on deep red */
    font-weight: 400;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}

.hotline-trigger-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 200, 200, 0.25);
    padding: 9px 22px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fca5a5;
    /* soft rose — readable on deep red */
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    z-index: 1;
    transition: all 0.25s ease;
}

.hotline-trigger-card:hover .hotline-trigger-badge {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 200, 200, 0.4);
    color: #fecaca;
}

/* count chip */
.hotline-count-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #dc2626;
    /* deeper red chip */
    color: #ffffff;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 800;
}


/* ══════════════════════════════════════
   MODAL OVERLAY
══════════════════════════════════════ */
.hotline-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(10px);
    z-index: 1200;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.hotline-overlay.active {
    opacity: 1;
    visibility: visible;
}


/* ══════════════════════════════════════
   MODAL CONTAINER
══════════════════════════════════════ */
.hotline-modal {
    background: #1a0a0a;
    /* solid very dark red-tinted black */
    border: 1px solid rgba(220, 80, 80, 0.18);
    border-radius: 28px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 50px 120px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(180, 40, 40, 0.1);
    transform: translateY(50px) scale(0.92);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
    opacity: 0;
    font-family: 'Poppins', sans-serif;
}

.hotline-overlay.active .hotline-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* top bar */
.hotline-modal::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, transparent, #dc2626, #b91c1c, #dc2626, transparent);
    flex-shrink: 0;
    border-radius: 28px 28px 0 0;
}


/* ── MODAL HEADER ── */
.hotline-modal-header {
    padding: 26px 32px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(220, 80, 80, 0.1);
    flex-shrink: 0;
    gap: 16px;
}

.hotline-modal-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hotline-modal-siren {
    font-size: 2.2rem;
    animation: sirenSpin 2s ease-in-out infinite;
    flex-shrink: 0;
}

.hotline-modal-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #f87171;
    /* soft red — readable on dark */
    display: block;
    margin-bottom: 3px;
}

.hotline-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: #ffffff;
    /* solid white — removed broken gradient clip */
    line-height: 1.2;
    margin: 0;
}

.hotline-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    color: #e2c8c8;
    /* warm light — readable on dark red-tinted bg */
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.hotline-modal-close:hover {
    background: rgba(220, 80, 80, 0.2);
    border-color: rgba(220, 80, 80, 0.45);
    color: #fca5a5;
    transform: rotate(90deg);
}


/* ── MODAL BODY ── */
.hotline-modal-body {
    padding: 24px 32px 32px;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(220, 80, 80, 0.3) transparent;
}

.hotline-modal-body::-webkit-scrollbar {
    width: 5px;
}

.hotline-modal-body::-webkit-scrollbar-thumb {
    background: rgba(220, 80, 80, 0.3);
    border-radius: 3px;
}

.hotline-modal-intro {
    font-size: 0.88rem;
    color: #c8a8a8;
    /* warm muted rose — readable on dark */
    margin-bottom: 24px;
    line-height: 1.7;
    font-weight: 300;
}


/* ── HOTLINE CARDS LIST ── */
.hotline-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hotline-item {
    display: flex;
    align-items: center;
    gap: 18px;
    background: rgba(40, 10, 10, 0.85);
    /* dark red-tinted card row */
    border: 1px solid rgba(220, 80, 80, 0.12);
    border-radius: 16px;
    padding: 20px 22px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.hotline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--hotline-color, #dc2626);
    border-radius: 16px 0 0 16px;
    opacity: 0.7;
    transition: opacity 0.25s ease;
}

.hotline-item:hover {
    transform: translateX(6px);
    border-color: rgba(220, 80, 80, 0.3);
    box-shadow: 0 8px 28px rgba(127, 29, 29, 0.25);
}

.hotline-item:hover::before {
    opacity: 1;
}

/* icon bubble */
.hotline-item-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(220, 80, 80, 0.1);
    border: 1px solid rgba(220, 80, 80, 0.18);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.hotline-item:hover .hotline-item-icon {
    background: rgba(220, 80, 80, 0.2);
    transform: scale(1.08) rotate(-4deg);
}

.hotline-item-info {
    flex: 1;
    min-width: 0;
}

.hotline-item-dept {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    /* solid white — readable on dark row */
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hotline-item-number {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fca5a5;
    /* soft rose number — readable on dark */
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.hotline-item-call {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #b91c1c;
    /* deep solid red button */
    color: #ffffff;
    text-decoration: none;
    padding: 9px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: all 0.25s ease;
    border: 2px solid #b91c1c;
    white-space: nowrap;
    flex-shrink: 0;
}

.hotline-item-call:hover {
    background: transparent;
    color: #fca5a5;
    border-color: #fca5a5;
    transform: scale(1.05);
}

/* per-card accent colors */
.hotline-item[data-type="barangay"] {
    --hotline-color: #4370ff;
}

.hotline-item[data-type="police"] {
    --hotline-color: #2196f3;
}

.hotline-item[data-type="fire"] {
    --hotline-color: #f97316;
}

.hotline-item[data-type="health"] {
    --hotline-color: #10b981;
}

.hotline-item[data-type="disaster"] {
    --hotline-color: #9c27b0;
}

.hotline-item[data-type="default"] {
    --hotline-color: #dc2626;
}

.hotline-item[data-type="barangay"] .hotline-item-icon {
    background: rgba(67, 112, 255, 0.12);
    border-color: rgba(67, 112, 255, 0.25);
}

.hotline-item[data-type="police"] .hotline-item-icon {
    background: rgba(33, 150, 243, 0.12);
    border-color: rgba(33, 150, 243, 0.25);
}

.hotline-item[data-type="fire"] .hotline-item-icon {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.25);
}

.hotline-item[data-type="health"] .hotline-item-icon {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
}

.hotline-item[data-type="disaster"] .hotline-item-icon {
    background: rgba(156, 39, 176, 0.12);
    border-color: rgba(156, 39, 176, 0.25);
}


/* ── MODAL FOOTER ── */
.hotline-modal-footer {
    padding: 14px 32px 22px;
    border-top: 1px solid rgba(220, 80, 80, 0.08);
    flex-shrink: 0;
    text-align: center;
}

.hotline-modal-footer p {
    font-size: 0.75rem;
    color: rgba(200, 150, 150, 0.5);
    font-weight: 300;
}

.hotline-modal-footer strong {
    color: rgba(220, 150, 150, 0.75);
}


/* ── RESPONSIVE ── */
@media (max-width: 600px) {
    .hotline-modal {
        border-radius: 20px;
    }

    .hotline-modal-header {
        padding: 20px 20px 16px;
    }

    .hotline-modal-title {
        font-size: 1.35rem;
    }

    .hotline-modal-body {
        padding: 18px 18px 24px;
    }

    .hotline-modal-footer {
        padding: 12px 18px 18px;
    }

    .hotline-item {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px 16px;
    }

    .hotline-item-call {
        width: 100%;
        justify-content: center;
    }

    .hotline-trigger-card {
        padding: 32px 24px;
    }

    .hotline-trigger-title {
        font-size: 1.5rem;
    }
}