/* =========================================
   RESET
========================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {

    --red: #b91c1c;
    --dark-red: #7f1d1d;
    --light-red: #fee2e2;

    --orange: #f97316;
    --saffron: #ff9933;
    --gold: #d4a017;
    --green: #138808;

    --dark: #111827;
    --text: #374151;
    --muted: #6b7280;

    --white: #ffffff;
    --background: #f8fafc;
    --border: #e5e7eb;

    --shadow:
        0 10px 30px rgba(15, 23, 42, 0.08);

    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}


/* =========================================
   HEADER
========================================= */

.emergency-header {

    height: 72px;

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

    padding: 0 6%;

    background: rgba(255, 255, 255, 0.96);

    border-bottom: 1px solid var(--border);

    position: sticky;
    top: 0;

    z-index: 100;
}

.brand {

    text-decoration: none;

    font-size: 1.35rem;
    font-weight: 800;

    letter-spacing: -0.03em;
}

.brand-saffron {
    color: var(--saffron);
}

.brand-gold {
    color: var(--gold);
}

.brand-green {
    color: var(--green);
}

.back-button {

    text-decoration: none;

    padding: 9px 16px;

    border: 1px solid var(--border);

    border-radius: 10px;

    color: var(--dark);

    font-size: 0.9rem;
    font-weight: 600;

    background: white;

    transition: 0.2s ease;
}

.back-button:hover {
    border-color: var(--red);
    color: var(--red);
}


/* =========================================
   HERO
========================================= */

.emergency-hero {

    background:
        linear-gradient(
            135deg,
            #7f1d1d,
            #b91c1c 50%,
            #dc2626
        );

    color: white;

    padding: 55px 6% 45px;

    position: relative;
}

.hero-content {

    max-width: 1100px;

    margin: auto;

    display: flex;

    gap: 25px;

    align-items: center;
}

.warning-icon {

    width: 74px;
    height: 74px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    background: rgba(255, 255, 255, 0.14);

    border-radius: 20px;

    font-size: 2.5rem;
}

.eyebrow {

    font-size: 0.78rem;

    letter-spacing: 0.15em;

    font-weight: 800;

    opacity: 0.8;

    margin-bottom: 5px;
}

.emergency-hero h1 {

    font-size: clamp(2rem, 5vw, 3.3rem);

    line-height: 1.1;

    margin-bottom: 12px;

    letter-spacing: -0.04em;
}

.hero-description {

    max-width: 700px;

    opacity: 0.9;

    font-size: 1.05rem;
}

.location-status {

    max-width: 1100px;

    margin: 25px auto 0;

    display: flex;

    align-items: center;

    gap: 9px;

    font-size: 0.9rem;

    opacity: 0.9;
}

.status-dot {

    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: #fbbf24;

    box-shadow:
        0 0 0 4px rgba(251, 191, 36, 0.2);
}


/* =========================================
   SOS
========================================= */

.sos-section {

    max-width: 1100px;

    margin: -15px auto 0;

    padding: 0 20px;

    position: relative;

    z-index: 5;
}

.sos-card {

    background: white;

    border-radius: var(--radius);

    box-shadow: var(--shadow);

    padding: 30px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 25px;

    border: 1px solid #fecaca;
}

.sos-label {

    color: var(--red);

    font-size: 0.75rem;

    font-weight: 800;

    letter-spacing: 0.12em;
}

.sos-card h2 {

    color: var(--dark);

    font-size: 1.7rem;

    margin: 4px 0 5px;
}

.sos-card p {

    color: var(--muted);

    max-width: 650px;
}

.sos-button {

    min-width: 150px;
    min-height: 100px;

    border: none;

    border-radius: 18px;

    background: var(--red);

    color: white;

    cursor: pointer;

    font-weight: 800;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 5px;

    box-shadow:
        0 8px 20px rgba(185, 28, 28, 0.25);

    transition: 0.2s ease;
}

.sos-button:hover {

    background: var(--dark-red);

    transform: translateY(-2px);
}

.sos-button:active {
    transform: scale(0.97);
}

.sos-button-icon {
    font-size: 2rem;
}


/* =========================================
   SECTIONS
========================================= */

.section {

    max-width: 1100px;

    margin: auto;

    padding: 55px 20px 0;
}

.section-heading {

    display: flex;

    justify-content: space-between;

    align-items: end;

    gap: 20px;

    margin-bottom: 25px;
}

.section-label {

    color: var(--red);

    font-size: 0.72rem;

    letter-spacing: 0.13em;

    font-weight: 800;

    margin-bottom: 4px;
}

.section-heading h2 {

    color: var(--dark);

    font-size: 1.9rem;

    line-height: 1.2;
}

.offline-badge {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    background: #ecfdf5;

    color: #047857;

    border: 1px solid #a7f3d0;

    padding: 7px 12px;

    border-radius: 20px;

    font-size: 0.78rem;

    font-weight: 700;
}


/* =========================================
   CONTACTS
========================================= */

.contact-grid {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 15px;
}

.contact-card {

    background: white;

    border: 1px solid var(--border);

    border-radius: 15px;

    padding: 20px;

    display: flex;

    flex-direction: column;

    gap: 13px;

    transition: 0.2s ease;
}

.contact-card:hover {

    transform: translateY(-3px);

    box-shadow: var(--shadow);

    border-color: #fecaca;
}

.contact-top {

    display: flex;

    justify-content: space-between;

    align-items: center;
}

.contact-icon {

    width: 45px;
    height: 45px;

    border-radius: 12px;

    display: grid;

    place-items: center;

    background: var(--light-red);

    font-size: 1.4rem;
}

.contact-card h3 {

    color: var(--dark);

    font-size: 1rem;
}

.contact-description {

    color: var(--muted);

    font-size: 0.84rem;

    line-height: 1.45;
}

.contact-number {

    color: var(--red);

    font-size: 1.45rem;

    font-weight: 800;

    text-decoration: none;
}

.call-button {

    width: 100%;

    border: none;

    border-radius: 10px;

    padding: 10px;

    background: #fef2f2;

    color: var(--red);

    cursor: pointer;

    font-weight: 700;

    transition: 0.2s ease;
}

.call-button:hover {

    background: var(--red);

    color: white;
}


/* =========================================
   LOCATION CARD
========================================= */

.location-card {

    background:
        linear-gradient(
            135deg,
            #fff7ed,
            #ffffff
        );

    border: 1px solid #fed7aa;

    border-radius: var(--radius);

    padding: 30px;

    display: flex;

    gap: 25px;

    align-items: flex-start;
}

.location-card-icon {

    width: 58px;
    height: 58px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 15px;

    background: #ffedd5;

    font-size: 1.8rem;
}

.location-card h2 {

    color: var(--dark);

    margin-bottom: 5px;
}

.location-card p {

    color: var(--muted);
}

.location-actions {

    display: flex;

    gap: 10px;

    margin-top: 20px;

    flex-wrap: wrap;
}

.primary-button,
.secondary-button {

    border: none;

    border-radius: 10px;

    padding: 11px 17px;

    cursor: pointer;

    font-weight: 700;

    transition: 0.2s ease;
}

.primary-button {

    background: var(--red);

    color: white;
}

.primary-button:hover {

    background: var(--dark-red);
}

.secondary-button {

    background: white;

    color: var(--dark);

    border: 1px solid var(--border);
}

.secondary-button:hover {

    border-color: var(--red);

    color: var(--red);
}


/* =========================================
   FACILITIES
========================================= */

.facility-grid {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 15px;
}

.facility-card {

    background: white;

    border: 1px solid var(--border);

    border-radius: 16px;

    padding: 22px;

    display: flex;

    flex-direction: column;

    gap: 17px;

    transition: 0.2s ease;
}

.facility-card:hover {

    transform: translateY(-3px);

    box-shadow: var(--shadow);
}

.facility-icon {

    width: 48px;
    height: 48px;

    display: grid;

    place-items: center;

    border-radius: 13px;

    font-size: 1.45rem;
}

.facility-icon.hospital {
    background: #fee2e2;
}

.facility-icon.police {
    background: #dbeafe;
}

.facility-icon.pharmacy {
    background: #dcfce7;
}

.facility-icon.fire {
    background: #ffedd5;
}

.facility-icon.tourist {
    background: #fef3c7;
}

.facility-icon.emergency {
    background: #f3e8ff;
}

.facility-content {

    display: flex;

    flex-direction: column;

    flex: 1;
}

.facility-content h3 {

    color: var(--dark);

    margin-bottom: 5px;
}

.facility-content p {

    color: var(--muted);

    font-size: 0.87rem;

    flex: 1;
}

.facility-button {

    margin-top: 17px;

    border: none;

    background: transparent;

    color: var(--red);

    text-align: left;

    cursor: pointer;

    font-weight: 700;
}

.facility-button:hover {
    text-decoration: underline;
}


/* =========================================
   MAP
========================================= */

.map-card {

    border-radius: var(--radius);

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #e0f2fe,
            #f0fdf4
        );

    border: 1px solid #bae6fd;
}

.map-placeholder {

    min-height: 280px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding: 35px;
}

.map-placeholder-icon {

    font-size: 3rem;

    margin-bottom: 12px;
}

.map-placeholder h2 {

    color: var(--dark);

    margin-bottom: 6px;
}

.map-placeholder p {

    max-width: 600px;

    color: var(--muted);

    margin-bottom: 20px;
}


/* =========================================
   SAFETY
========================================= */

.safety-information {

    background: white;

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 30px;

    margin-bottom: 55px;
}

.safety-grid {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 15px;
}

.safety-item {

    display: flex;

    gap: 14px;

    padding: 16px;

    border-radius: 13px;

    background: #f9fafb;
}

.safety-item > span {

    font-size: 1.5rem;
}

.safety-item h3 {

    color: var(--dark);

    font-size: 0.95rem;

    margin-bottom: 3px;
}

.safety-item p {

    color: var(--muted);

    font-size: 0.82rem;
}


/* =========================================
   MODAL
========================================= */

.modal-overlay {

    position: fixed;

    inset: 0;

    background: rgba(15, 23, 42, 0.7);

    backdrop-filter: blur(4px);

    display: none;

    align-items: center;

    justify-content: center;

    padding: 20px;

    z-index: 500;
}

.modal-overlay.active {

    display: flex;
}

.sos-modal {

    width: min(500px, 100%);

    max-height: 90vh;

    overflow-y: auto;

    background: white;

    border-radius: 22px;

    padding: 30px;

    position: relative;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.25);

    text-align: center;
}

.modal-close {

    position: absolute;

    right: 16px;
    top: 12px;

    border: none;

    background: transparent;

    font-size: 2rem;

    color: var(--muted);

    cursor: pointer;
}

.modal-icon {

    width: 65px;
    height: 65px;

    margin: 5px auto 15px;

    border-radius: 50%;

    display: grid;

    place-items: center;

    background: var(--light-red);

    font-size: 2rem;
}

.sos-modal h2 {

    color: var(--dark);

    margin-bottom: 4px;
}

.sos-modal > p {

    color: var(--muted);

    margin-bottom: 20px;
}

.modal-contact-list {

    display: grid;

    gap: 10px;

    text-align: left;
}

.modal-contact {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    padding: 14px;

    border: 1px solid var(--border);

    border-radius: 12px;
}

.modal-contact-info {

    display: flex;

    align-items: center;

    gap: 10px;
}

.modal-contact-icon {

    font-size: 1.4rem;
}

.modal-contact-name {

    color: var(--dark);

    font-weight: 700;

    font-size: 0.9rem;
}

.modal-contact-number {

    color: var(--muted);

    font-size: 0.8rem;
}

.modal-call {

    background: var(--red);

    color: white;

    text-decoration: none;

    padding: 8px 12px;

    border-radius: 8px;

    font-size: 0.8rem;

    font-weight: 700;

    white-space: nowrap;
}

.modal-location-button {

    width: 100%;

    margin-top: 15px;

    border: 1px solid var(--border);

    background: #f9fafb;

    padding: 11px;

    border-radius: 10px;

    cursor: pointer;

    font-weight: 700;

    color: var(--dark);
}


/* =========================================
   TOAST
========================================= */

.toast {

    position: fixed;

    left: 50%;

    bottom: 25px;

    transform:
        translate(-50%, 100px);

    background: #111827;

    color: white;

    padding: 12px 18px;

    border-radius: 10px;

    font-size: 0.88rem;

    opacity: 0;

    pointer-events: none;

    transition: 0.3s ease;

    z-index: 1000;

    max-width: calc(100% - 30px);

    text-align: center;
}

.toast.show {

    opacity: 1;

    transform:
        translate(-50%, 0);
}


/* =========================================
   FOCUS ACCESSIBILITY
========================================= */

button:focus-visible,
a:focus-visible {

    outline: 3px solid #fbbf24;

    outline-offset: 3px;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 850px) {

    .contact-grid,
    .facility-grid {

        grid-template-columns:
            repeat(2, 1fr);
    }

    .sos-card {

        flex-direction: column;

        align-items: stretch;
    }

    .sos-button {

        width: 100%;

        min-height: 75px;
    }

}

@media (max-width: 600px) {

    .emergency-header {

        padding: 0 18px;

        height: 64px;
    }

    .brand {

        font-size: 1rem;
    }

    .back-button {

        padding: 7px 10px;

        font-size: 0.75rem;
    }

    .emergency-hero {

        padding: 38px 20px 40px;
    }

    .hero-content {

        align-items: flex-start;
    }

    .warning-icon {

        width: 52px;
        height: 52px;

        font-size: 1.6rem;
    }

    .emergency-hero h1 {

        font-size: 2rem;
    }

    .hero-description {

        font-size: 0.9rem;
    }

    .section {

        padding-top: 40px;
    }

    .section-heading {

        align-items: flex-start;

        flex-direction: column;
    }

    .contact-grid,
    .facility-grid,
    .safety-grid {

        grid-template-columns: 1fr;
    }

    .location-card {

        flex-direction: column;
    }

    .sos-card {

        padding: 22px;
    }

    .sos-card h2 {

        font-size: 1.35rem;
    }

    .safety-information {

        padding: 20px;
    }

    .modal-contact {

        align-items: flex-start;
    }

    .modal-call {

        padding: 7px 9px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {

        scroll-behavior: auto !important;

        transition: none !important;
    }
}