.am-top-bg {        /* top:0 right:0 bottom:0 left:0 */
  width: 100%;
  height: auto;
  object-fit: cover;  /* makes image cover text */
}

/* 1. Base Section Styles */
.info-section {
    padding: 80px 0;
    background-color: #ffffff;
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #000000;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 2. Flexbox Layout */
.row {
    display: flex;
    align-items: center; /* Vertically centers text with image */
    justify-content: space-between;
    gap: 50px;
}

.content-left {
    flex: 1.2; /* Gives more space to the text */
}

.content-right {
    flex: 0.8;
    text-align: right;
}

/* 3. Typography Styles */
.main-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 25px;
    letter-spacing: -0.5px;
}

.intro-text {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.description-text {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #333;
    text-align: justify;
}

/* 5. Clickable Image Button */
.btn-wrapper {
    display: inline-block;
    margin-bottom: 40px;
    transition: transform 0.2s ease;
}

.btn-wrapper img {
    display: block;
    width: 320px; /* Adjust based on your image size */
    height: auto;
    cursor: pointer;
}

.btn-wrapper:hover {
    transform: translateY(-3px);
    filter: brightness(1.05);
}

.btn-wrapper:active {
    transform: translateY(1px);
}

/* 6. Side Illustration */
.side-illustration {
    max-width: 100%;
    height: auto;
}

/* 7. Disclaimer (Bottom Text) */
.disclaimer {
    font-size: 10px;
    font-weight: 300;
    color: #222;
    line-height: 1.4;
    max-width: 480px;
    margin: 0;
    margin-top: 20px;
}

/* 8. Mobile Responsiveness */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
        text-align: left;
    }

    .content-right {
        order: -1; /* Puts the image on top for mobile users */
        text-align: center;
        margin-bottom: 30px;
    }

    .main-title {
        font-size: 32px;
    }

    .btn-wrapper img {
        width: 100%;
        max-width: 300px;
    }
}

/* Update this section to handle the stacking */
.img-btn-link {
    display: block;        /* Forces each link to take up the full width/new line */
    width: fit-content;    /* Prevents the clickable area from stretching to the edge */
    margin-bottom: 20px;   /* Space between the stacked buttons */
    transition: transform 0.2s ease;
}

.download-img-btn {
    display: block;
            /* Matches your previous preferred width */
    height: auto;
    cursor: pointer;
}

/* Hover effect */
.img-btn-link:hover {
    transform: translateY(-3px);
    filter: brightness(1.05);
}

/* Added style for your green text class */
.description-text-green {
    color: #009245;        /* A professional medical green */
    font-weight: 600;
    margin-top: -10px;     /* Pulls it closer to the text above if needed */
    margin-bottom: 30px;
}

/* The Close Button */
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* Makes the hover area a circle */
    transition: background-color 0.2s;
}

.close-btn:hover,
.close-btn:focus {
    color: #333;
    text-decoration: none;
}

.close-btn:hover {
    background-color: #f0f2f5; /* Light gray circle on hover */
    color: #000;
}
/* 1. Define the Fade-In Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 2. Define a Slide-Down Keyframes for the white box */
@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal {
    display: none; /* JS toggles to 'flex' */
    position: fixed;
    /* Adjust 'top' to match your header height */
    top: 70px; 
    left: 0;
    width: 100%;
    /* Calculate height: 100% of viewport minus the header height */
    height: calc(100vh - 70px); 
    background: rgba(0, 0, 0, 0.5);
    z-index: 999; /* Ensure this is lower than your header's z-index if you want it 'below' */
    
    justify-content: center;
    align-items: flex-start; /* Align to top so it stays below header */
    padding-top: 20px; /* Some breathing room below the header */
    margin-top: 25px;
}

.modal {
    display: none; /* JS toggles to flex */
    position: fixed;
    /* Use 'inset' to cover the screen, then adjust the top */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    
    /* Centering logic */
    justify-content: center;
    align-items: center; 
    padding: 10px;
    margin-top: 25px;
}

.modal-content {
    width: 95%;
    max-width: 650px;
    /* Important: The content itself should not exceed the available space */
    max-height: calc(100vh - 120px); 
    background: #fff;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Keeps the rounded corners while internal parts scroll */
}

/* --- 2. Fix Menu Overlap --- */
.modal-menu-container {
    display: flex;
    background-color: #f0f2f5;
    padding: 6px;
    border-radius: 14px;
    gap: 4px;
    margin-bottom: 20px;
    overflow-x: auto; /* Adds a scroll if items are too wide on tiny phones */
    scrollbar-width: none; /* Hide scrollbar for clean look */
    margin-top: 25px;
}

.modal-menu-container::-webkit-scrollbar { display: none; }

/* Individual menu items */
.menu-item {
    flex: 1;
    display: flex;
    flex-direction: column; /* Stack icons on mobile to save horizontal space */
    align-items: center;
    font-size: 11px;
    padding: 8px 4px;
    min-width: 0; /* Prevents flex items from overlapping/overflowing */
    cursor: pointer;
}

/* Fix for the white active box overlapping */
.menu-item.active {
    background-color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    color: #2d3748;
    /* Add this line */
    border-radius: 10px; 
    /* If you want a full 'pill' shape, use 25px or higher */
}

.menu-item:hover:not(.active) {
    background-color: rgba(0,0,0,0.03);
    border-radius: 10px; 
}

/* Placeholder icons - Replace with FontAwesome or actual SVGs */
.menu-item i::before {
    font-style: normal;
    font-size: 16px;
}
.icon-stethoscope::before { content: "🩺"; }
.icon-hospital::before { content: "🏢"; }
.icon-ambulance::before { content: "🚑"; }
.icon-home::before { content: "🏠"; }

@media (min-width: 480px) {
    .modal-content {
        width: 90%;
        max-width: 650px; /* Stops it from getting too wide on desktop */
        padding: 25px;
        /* margin: 10% auto is no longer needed because of Flexbox centering above */
    }

    .menu-item {
        flex-direction: row; /* Side-by-side icon and text on larger screens */
        font-size: 14px;
        padding: 12px 10px;
        gap: 8px;
    }
    
    .modal-menu-container {
        padding: 8px;
        gap: 8px;
    }
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 32px; /* Bigger for mobile */
    padding: 10px;   /* Larger hit area */
    line-height: 1;
    margin-bottom: 10px;
}

/* Tab Logic */
.tab-content {
    display: none; /* Hide all by default */
    flex-direction: column;
}

.tab-content.active {
    display: flex; /* Show only the active tab */
}

.tab-container {
    flex: 1; /* Takes up all remaining space */
    overflow-y: auto; /* Only this part scrolls */
    padding: 0 15px 15px 15px;
}

/* Hide scrollbar for a cleaner look while keeping functionality */
.tab-container::-webkit-scrollbar {
    width: 6px;
}
.tab-container::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}
/* Result List Area */
.result-list {
    margin-top: 15px;
    overflow-y: auto; /* Scroll inside this area only */
    flex-grow: 1;
}

.card {
    padding: 15px;
    border: 1px solid #eee;
    margin-bottom: 10px;
    border-radius: 12px;
}


/* Container for the whole search section */
.filter-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap; /* Keeps it responsive on mobile */
    margin-top: 10px;
}

.search-row {
    display: flex;
    flex-direction: column; /* Stack search inputs vertically on mobile */
    gap: 12px;
    margin-bottom: 15px;
}

/* The Search Input Box */
.search-input-group {
    flex: 1; /* Takes up the most space */
    min-width: 250px; /* Prevents it from getting too tiny on tablets */
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
}

.search-input-group input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 14px;
    margin-left: 8px;
    color: #4a5568;
}

/* Dropdowns (Select Menus) */
.custom-select {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    outline: none;
    /* Optional: Customizing the appearance slightly */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Adding a custom dropdown arrow */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%234a5568%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 10px auto;
    padding-right: 30px; /* Make room for the custom arrow */
}

/* Result Count Text */
.results-count {
    margin-top: 15px;
    margin-bottom: 0;
    font-size: 13px;
    color: #718096;
    text-align: left;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch; /* Makes children take full width */
    }
    .custom-select {
        width: 100%;
    }
}


/* Location Header Styling */
.location-group {
    margin-top: 20px;
}

.location-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.location-header h2 {
    font-size: 18px;
    font-family: serif; /* Matches the slightly formal font in your image */
    color: #1a202c;
    margin: 0;
}

.count-badge {
    background-color: #64748b;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 10px;
    border-radius: 12px; /* Pill shape for the number 2 */
}

/* Responsive Grid for Cards */
.doctor-grid {
    display: grid;
    /* This creates side-by-side cards on desktop, and stacks them on mobile automatically */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

/* Individual Card Styling */
.doctor-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    
    /* 2. Set a subtle base shadow so the transition isn't harsh */
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    
    /* 3. Ensure the card can move */
    position: relative;
}

.doctor-card:hover {
    /* 1. Lift the card up by 5 pixels */
    transform: translateY(-5px);
    
    /* 2. Add a prominent, soft shadow to look like it's floating */
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    
    /* 3. Optional: Slightly darken the border to make it 'pop' */
    border-color: #cbd5e0; 
}

.doc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.doc-name {
    font-size: 16px;
    font-family: serif; /* Matches the formal name font */
    color: #1a202c;
    margin: 0;
    font-weight: 600;
}

.doc-specialty {
    font-size: 13px;
    color: #4a5568;
    margin: 0 0 10px 28px; /* Indented to align with the text, not the icon */
}

/* The Orange Badge */
.doc-org-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #eab308; /* Yellow/Orange color */
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: 28px;
    margin-bottom: 15px;
    align-self: flex-start; /* Keeps it from stretching */
}

/* The Light Gray Info Box */
.doc-info-box {
    background-color: #f3f4f6;
    border-radius: 8px;
    padding: 12px;
    margin-top: auto; /* Pushes the box to the bottom if cards are different heights */
    margin-bottom: 15px;
}

.doc-info-box p {
    font-size: 13px;
    color: #4a5568;
    margin: 4px 0;
}

.doc-info-box b {
    color: #1a202c;
}

/* Footer (Lihat detail) */
.doc-footer {
    display: flex;
    justify-content: flex-end; /* Aligns to the right */
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #718096;
    cursor: pointer;
    transition: color 0.2s;
}

.doc-footer:hover {
    color: #1a202c;
}

.rs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.rs-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rs-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.rs-header {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.rs-name {
    font-size: 17px;
    font-family: serif;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.rs-tags {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.rs-tag {
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.rs-info p {
    font-size: 13px;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}

/* Facility Buttons Grid */
.facility-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 15px 0;
}

.fac-item {
    background: #f1f5f9;
    padding: 8px;
    border-radius: 8px;
    font-size: 12px;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Phone Pill */
.rs-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ecfdf5;
    color: #10b981;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Doctor List in Card */
.rs-doctor-list {
    border-top: 1px solid #edf2f7;
    padding-top: 15px;
}

.rs-doctor-list h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #2d3748;
}

.rs-doctor-list ul {
    list-style: none;
    padding: 0;
}

.rs-doctor-list li {
    font-size: 12px;
    color: #4a5568;
    margin-bottom: 5px;
    padding-left: 12px;
    position: relative;
}

.rs-doctor-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #cbd5e0;
}

.rs-doctor-list li span {
    color: #718096;
}

.disclaimer {
    font-size: 11px;
    font-style: italic;
    color: #a0aec0;
    margin-top: 10px;
}

.rs-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #718096;
    margin-top: 15px;
    cursor: pointer;
}

/* Hide these sections by default in every RS card */
.rs-card .facility-grid,
.rs-card .rs-doctor-list,
.rs-card .rs-phone,
.rs-card .rs-address {
    display: none;
}

/* Optional: Smooth transition for the footer arrow */
.rs-footer svg {
    transition: transform 0.3s ease;
}

.rs-card.is-expanded .rs-footer svg {
    transform: rotate(180deg); /* Flips the arrow when open */
}

.ambulans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.amb-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.amb-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.amb-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.amb-name {
    font-size: 17px;
    font-family: serif;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.amb-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.amb-tag {
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
}

.amb-tag.tag-green {
    background: #ecfdf5;
    color: #10b981;
}

.amb-info-box {
    background: #f3f4f6;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.amb-info-box p {
    font-size: 13px;
    color: #4a5568;
    margin: 6px 0;
    line-height: 1.5;
}

.amb-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-contact {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #e2e8f0;
}

.btn-phone { background: #f8f9fa; color: #64748b; }
.btn-wa { background: #ecfdf5; color: #10b981; border-color: #d1fae5; }

.amb-disclaimer {
    font-size: 11px;
    font-style: italic;
    color: #94a3b8;
    margin: 0;
}

.amb-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 15px;
    cursor: pointer;
}

.amb-card.is-expanded .amb-footer svg { transform: rotate(180deg); }

/* Singgah Section */
.singgah-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.singgah-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.singgah-name {
    font-size: 17px;
    font-family: serif;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 4px;
}

.singgah-org {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.singgah-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.singgah-tag {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.tag-orange { background: #fff7ed; color: #f97316; border: 1px solid #ffedd5; }
.tag-green { background: #ecfdf5; color: #10b981; border: 1px solid #d1fae5; }
.tag-gray { background: #f1f5f9; color: #94a3b8; border: 1px solid #e2e8f0; }
.tag-yellow { background: #fefce8; color: #eab308; border: 1px solid #fef08a; }

.singgah-details p {
    font-size: 13px;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.singgah-info-box {
    background: #f3f4f6;
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
}

.singgah-info-box p { display: block; margin: 5px 0; line-height: 1.4; }

.singgah-how { font-size: 12px !important; display: block !important; border-top: 1px solid #edf2f7; padding-top: 10px; }

.singgah-actions { display: flex; gap: 8px; margin-top: 10px; }

.btn-singgah {
    flex: 1;
    text-align: center;
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 11px;
    color: #94a3b8;
    text-decoration: none;
}

.btn-phone { background: #ecfdf5; color: #10b981; border-color: #d1fae5; }

.singgah-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 15px;
    cursor: pointer;
}