/* Modern Emergency Page Styles - Premium & Professional */
:root {
    --primary: #004d99;
    /* Deep Royal Blue */
    --primary-light: #0073e6;
    --secondary: #d9534f;
    /* Emergency Red */
    --secondary-dark: #c9302c;
    --accent: #f0f7ff;
    /* Very light blue bg */
    --text-dark: #1a1a2e;
    --text-grey: #666;
    --white: #ffffff;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 77, 153, 0.08);
    /* Blue-tinted shadow */
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.12);
    --radius-md: 16px;
    --radius-lg: 24px;
}

body {
    background-color: #fcfdff;
}

/* --- Hero Section with Curved Separator --- */
.emergency-hero {
    background: linear-gradient(120deg, var(--primary) 0%, #003366 100%);
    color: var(--white);
    padding: 60px 0 160px;
    /* Reduced top padding from 120px to 60px */
    /* Extra bottom padding for overlap */
    position: relative;
    overflow: hidden;
    clip-path: ellipse(150% 100% at 50% 0%);
    /* Subtle curve at the bottom */
}

/* Abstract Background Shapes */
.emergency-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.emergency-hero h1 {
    font-size: 3.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.emergency-hero p {
    font-size: 1.4rem;
    font-weight: 300;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

/* --- Floating Emergency Numbers Card --- */
.emergency-numbers-container {
    margin-top: -100px;
    /* Pull up to overlap hero */
    position: relative;
    z-index: 10;
    margin-bottom: 80px;
}

.emergency-numbers {
    background: var(--white);
    padding: 50px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.emergency-numbers h3 {
    color: var(--primary);
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.subtitle-text {
    color: var(--text-grey);
    margin-bottom: 35px;
    font-size: 1.1rem;
}

.btn-group-custom {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.emergency-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    color: white !important;
}

.btn-primary-urgent {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    box-shadow: 0 10px 25px rgba(217, 83, 79, 0.3);
}

.btn-primary-urgent:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(217, 83, 79, 0.4);
}

.btn-secondary-ambulance {
    background: linear-gradient(135deg, var(--primary) 0%, #003366 100%);
    box-shadow: 0 10px 25px rgba(0, 77, 153, 0.3);
}

.btn-secondary-ambulance:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 77, 153, 0.4);
}

.emergency-btn i {
    font-size: 1.5rem;
    margin-right: 12px;
}

/* --- Section Styling --- */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    color: var(--primary);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-subtitle {
    color: var(--text-grey);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Triage Process Modern Cards --- */
.triage-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 35px 25px;
    text-align: center;
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.triage-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.triage-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
}

.time-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    background: #f5f5f5;
    color: #888;
}

.triage-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 32px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.triage-card:hover .triage-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.triage-card h4 {
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.triage-card p {
    font-size: 0.95rem;
    color: var(--text-grey);
    line-height: 1.6;
}

/* Color schemes for Triage */
.triage-p1::before {
    background: var(--secondary);
}

.triage-p1 .triage-icon-wrapper {
    color: var(--secondary);
    background: #fdeded;
}

.triage-p1 h4 {
    color: var(--secondary);
}

.triage-p1 .time-badge {
    color: var(--secondary);
    background: #fdeded;
}

.triage-p2::before {
    background: #ffc107;
}

.triage-p2 .triage-icon-wrapper {
    color: #ffc107;
    background: #fff9e0;
}

.triage-p2 h4 {
    color: #e6ac00;
}

.triage-p3::before {
    background: #28a745;
}

.triage-p3 .triage-icon-wrapper {
    color: #28a745;
    background: #eafbf0;
}

.triage-p3 h4 {
    color: #28a745;
}

.triage-p0::before {
    background: #343a40;
}

.triage-p0 .triage-icon-wrapper {
    color: #343a40;
    background: #eaebec;
}

.triage-p0 h4 {
    color: #343a40;
}


/* --- Facility Cards Modern Horizontal --- */
.facility-wrapper {
    background: var(--white);
    border-radius: 12px;
    /* Slightly less rounded */
    padding: 20px;
    display: flex;
    flex-direction: row;
    /* Horizontal Layout */
    align-items: flex-start;
    /* Align top */
    text-align: left;
    /* Left align text */
    gap: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    height: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.facility-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 77, 153, 0.1);
    border-color: rgba(0, 77, 153, 0.1);
}

.facility-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: #e6f0ff;
    /* Light blue bg */
    color: var(--primary);
    border-radius: 8px;
    /* Square with rounded corners */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    margin-bottom: 0;
    /* Reset margin */
}

.facility-wrapper:hover .facility-icon {
    background: var(--primary);
    color: white;
}

.facility-content {
    flex-grow: 1;
}

.facility-content h5 {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
    font-size: 1rem;
    line-height: 1.4;
}

.facility-content p {
    font-size: 0.85rem;
    color: var(--text-grey);
    line-height: 1.4;
    margin: 0;
    opacity: 0.9;
}

/* --- Spacing Utilities --- */
.section-gap {
    padding-top: 100px;
    /* Increased top padding */
    padding-bottom: 80px;
}

/* --- Directions CTA Section --- */
.cta-directions {
    position: relative;
    padding: 80px 0;
    margin-top: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, #003366 100%);
    color: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.cta-directions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/cubes.png');
    /* Subtle pattern overlay */
    opacity: 0.05;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-btn {
    background: var(--white);
    color: var(--primary);
    padding: 18px 45px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.cta-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    color: var(--primary);
    background: #f8fbff;
}

.cta-btn i {
    margin-right: 10px;
}

/* --- Robust 4-Column Grid System --- */
.facilities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Force 4 columns */
    gap: 24px;
    width: 100%;
}

/* Responsive Grid Adjustments */
@media (max-width: 1200px) {
    .facilities-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 3 columns on smaller desktops */
    }
}

@media (max-width: 992px) {
    .facilities-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on tablets */
    }
}

@media (max-width: 576px) {
    .facilities-grid {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
    }
}

/* Ensure facility cards fill the grid cell */
.facility-wrapper {
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}