@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* =============================================
   Fasilitas Kesehatan - Puskesmas & Rumah Sakit
   ============================================= */

/* ── Page Wrapper ─────────────────────────────────────────────── */
.faskes-page-wrapper {
    width: 100%;
    min-height: 100vh;
    background-color: #FFFFFF;
    font-family: 'Plus Jakarta Sans', sans-serif;
    box-sizing: border-box;
    padding-top: 103px;
}

/* ── Header Section ──────────────────────────────────────────── */
.faskes-header {
    background-color: #006045;
    padding: 60px 0;
    text-align: left;
    box-sizing: border-box;
}

.faskes-header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

.faskes-header-title {
    font-size: 48px;
    font-weight: 800;
    color: #FFFFFF;
    margin: 0 0 12px 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.faskes-header-subtitle {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.6;
    max-width: 800px;
}

/* ── Main Content Section ────────────────────────────────────── */
.faskes-content {
    padding: 80px 0;
    box-sizing: border-box;
}

.faskes-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

/* ── Title Section ───────────────────────────────────────────── */
.faskes-title-section {
    margin-bottom: 45px;
}

.faskes-main-title {
    font-size: 32px;
    font-weight: 800;
    color: #1A1A1A;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.faskes-main-subtitle {
    font-size: 16px;
    font-weight: 400;
    color: #A3A3A3;
    margin: 0;
    line-height: 1.6;
}

/* ── Filter Card ─────────────────────────────────────────────── */
.faskes-filter-card {
    background: #FFFFFF;
    border: 1px solid #EAEAEA;
    border-radius: 1px;
    padding: 24px;
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    margin-bottom: 32px;
}

.faskes-filter-section {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.faskes-select {
    height: 44px;
    padding: 0 36px 0 16px;
    border: 1px solid #E0E0E0;
    border-radius: 3px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #332C2B;
    background: #FFFFFF;
    outline: none;
    appearance: none;
    cursor: pointer;
    min-width: 200px;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A3A3A3' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.faskes-select:focus {
    border-color: #00BC7D;
}

.faskes-filter-stats {
    margin-left: auto;
}

.faskes-stat-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #E6F4EA;
    color: #004F3B;
    font-size: 13px;
    font-weight: 700;
    border-radius: 3px;
}

/* ── Search Wrap ─────────────────────────────────────────────── */
.faskes-search-wrap {
    display: flex;
    align-items: stretch;
    flex: 1;
    min-width: 260px;
    max-width: 525px;
}

.faskes-search-input {
    flex: 1;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #CBD5E1;
    border-right: none;
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1E293B;
    text-align: left;
    outline: none;
    background: #FFFFFF;
    box-sizing: border-box;
    -webkit-appearance: none;
    transition: border-color 0.2s ease;
}

.faskes-search-input::placeholder {
    color: #94A3B8;
    text-align: left;
}

.faskes-search-input:focus {
    border-color: #009966;
}

.faskes-search-btn {
    height: 44px;
    padding: 0 24px;
    background-color: #009966;
    color: #FFFFFF;
    border: 1px solid #009966;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-sizing: border-box;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.faskes-search-btn:hover {
    background-color: #004F3B;
    border-color: #004F3B;
}

/* ── Dropdowns Group & Custom Select ───────────────────────────── */
.faskes-dropdowns-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-wrap: wrap;
}

.faskes-filter-wrap {
    min-width: 170px;
    flex: 0 1 auto;
}

.faskes-custom-select {
    position: relative;
    width: 100%;
}

.faskes-custom-select-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #CBD5E1;
    border-radius: 3px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1E293B;
    background: #FFFFFF;
    cursor: pointer;
    box-sizing: border-box;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.faskes-custom-select-btn:hover,
.faskes-custom-select-btn:focus,
.faskes-custom-select.active .faskes-custom-select-btn,
.faskes-custom-select.open .faskes-custom-select-btn {
    border-color: #009966;
    outline: none;
}

.faskes-custom-select-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.faskes-custom-select-icon {
    width: 10px;
    height: 6px;
    flex-shrink: 0;
    fill: none;
    stroke: #A3A3A3;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.faskes-custom-select.open .faskes-custom-select-icon {
    transform: rotate(180deg);
}

.faskes-custom-select-list {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 3px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 9999;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 220px;
    overflow-y: auto;
}

.faskes-custom-select.open .faskes-custom-select-list {
    display: block;
}

.faskes-custom-option {
    padding: 10px 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #332C2B;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.faskes-custom-option:hover {
    background: rgba(0, 153, 102, 0.08);
    color: #009966;
}

.faskes-custom-option.selected {
    color: #009966;
    font-weight: 700;
    background: rgba(0, 153, 102, 0.06);
}



/* ── Filter Wrap (Dropdowns) ─────────────────────────────────── */
.faskes-filter-wrap {
    position: relative;
    flex-shrink: 0;
    /* jangan overflow hidden agar dropdown list bisa keluar */
    overflow: visible;
}

.faskes-filter-wrap::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #A3A3A3;
    pointer-events: none;
}

.faskes-select-wilayah,
.faskes-select-layanan {
    height: 44px;
    padding: 0 36px 0 16px;
    border: 1px solid #E0E0E0;
    border-radius: 3px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 16px;
    color: #332C2B;
    background: #FFFFFF;
    outline: none;
    appearance: none;
    cursor: pointer;
    min-width: 235px;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.faskes-select-wilayah:focus,
.faskes-select-layanan:focus {
    border-color: #00BC7D;
}

/* ── Map & List Layout ───────────────────────────────────────── */
.faskes-main-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

/* ── Map Section ─────────────────────────────────────────────── */
.faskes-map-container {
    width: 100%;
    height: 650px;
    border-radius: 1px;
    overflow: hidden;
    border: 1px solid #EAEAEA;
    background: #f3f4f6;
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.05);
}

.faskes-map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ── Facility List ───────────────────────────────────────────── */
.faskes-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 650px;
    overflow-y: auto;
    padding-right: 8px;
}

.faskes-list::-webkit-scrollbar {
    width: 6px;
}

.faskes-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.faskes-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.faskes-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* ── Facility Card ───────────────────────────────────────────── */
.faskes-card {
    background: #FFFFFF;
    border: 1px solid #EAEAEA;
    border-radius: 1px !important; /* Card: 1px */
    padding: 20px;
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.faskes-card:hover {
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

/* ── Card Header ─────────────────────────────────────────────── */
.faskes-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.faskes-card-name {
    font-size: 16px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0;
}

.faskes-card-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.faskes-badge {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 3px !important; /* Di dalam card radius 3px */
    white-space: nowrap;
}

.faskes-badge-green {
    color: #065f46;
    background: #E6F4EA;
}

.faskes-badge-blue {
    color: #1e40af;
    background: #DBEAFE;
}

.faskes-badge-red {
    color: #991B1B;
    background: #FEE2E2;
}

/* ── Empty State ─────────────────────────────────────────────── */
.faskes-empty {
    text-align: center;
    padding: 48px 24px;
    color: #9CA3AF;
    background: #F9FAFB;
    border: 1px dashed #E5E7EB;
    border-radius: 3px;
}

.faskes-empty p {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

/* ── Card Info ───────────────────────────────────────────────── */
.faskes-card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.faskes-info-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    color: #555555;
    line-height: 1.5;
}

.faskes-info-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 2px;
    color: #A3A3A3;
}

.faskes-info-icon svg {
    width: 100%;
    height: 100%;
}

/* ── Card Actions ────────────────────────────────────────────── */
.faskes-card-actions {
    display: flex;
    gap: 10px;
}

.faskes-btn {
    flex: 1;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-sizing: border-box;
}

.faskes-btn-peta {
    background: #00BC7D;
    border: 1px solid #00BC7D;
    color: #FFFFFF;
}

.faskes-btn-peta:hover {
    background-color: #009A66;
    border-color: #009A66;
}

.faskes-btn-wa {
    background: #FFFFFF;
    border: 1px solid #00BC7D;
    color: #00BC7D;
}

.faskes-btn-wa:hover {
    background-color: #f0fdf4;
}

.faskes-btn-icon {
    width: 14px;
    height: 14px;
}

.faskes-btn-icon svg {
    width: 100%;
    height: 100%;
}

/* ── Responsive Design ───────────────────────────────────────── */
@media (max-width: 1024px) {
    .faskes-main-layout {
        grid-template-columns: 1fr;
    }

    .faskes-map-container {
        height: 400px;
    }

    .faskes-list {
        max-height: none;
    }

    .faskes-filter-card {
        padding: 20px;
    }
}

/* ── Tablet (<=768px) ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .faskes-page-wrapper {
        padding-top: 80px;
    }

    .faskes-header {
        padding: 40px 0 50px;
    }

    .faskes-header-container {
        padding: 0 24px;
    }

    .faskes-header-title {
        font-size: 30px;
    }

    .faskes-header-subtitle {
        font-size: 14px;
    }

    .faskes-content {
        padding: 36px 0 56px;
    }

    .faskes-container {
        padding: 0 24px;
    }

    .faskes-main-title {
        font-size: 22px;
    }

    .faskes-filter-section {
        flex-wrap: wrap;
        align-items: stretch;
        gap: 12px;
    }

    .faskes-search-wrap {
        max-width: 100%;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .faskes-dropdowns-group {
        width: 100%;
        margin-left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .faskes-filter-wrap {
        width: 100%;
    }

    .faskes-select {
        width: 100%;
        height: 44px;
        font-size: 13px;
        padding: 0 36px 0 12px;
    }

    .faskes-search-input {
        height: 44px;
        font-size: 13px;
        padding: 0 12px;
        min-width: 0;
        width: 100%;
    }

    .faskes-search-btn {
        height: 44px;
        padding: 0 12px;
        font-size: 13px;
        flex-shrink: 0;
        box-sizing: border-box;
    }

    .faskes-filter-card {
        padding: 20px;
        margin-bottom: 24px;
    }

    .faskes-card {
        padding: 20px;
    }

    .faskes-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .faskes-card-name {
        font-size: 16px;
    }

    .faskes-badge {
        font-size: 12px;
        padding: 4px 12px;
    }

    .faskes-card-info {
        gap: 10px;
        margin-bottom: 16px;
    }

    .faskes-info-item {
        font-size: 13px;
        gap: 10px;
    }

    .faskes-card-actions {
        flex-direction: row;
        gap: 10px;
    }

    .faskes-btn {
        flex: 1;
        height: 44px;
        font-size: 14px;
    }

    .faskes-list {
        gap: 18px;
    }
}

/* ── Mobile (<=480px) ─────────────────────────────────────────── */
@media (max-width: 480px) {

    .faskes-header {
        padding: 32px 0 44px;
    }

    .faskes-header-container {
        padding: 0 20px;
    }

    .faskes-header-title {
        font-size: 26px;
        line-height: 1.25;
    }

    .faskes-content {
        padding: 28px 0 52px;
    }

    .faskes-container {
        padding: 0 20px;
    }

    .faskes-title-section {
        margin-bottom: 24px;
    }

    .faskes-main-title {
        font-size: 20px;
    }

    .faskes-main-subtitle {
        font-size: 14px;
    }

    .faskes-filter-card {
        padding: 18px;
        margin-bottom: 20px;
    }

    .faskes-map-container {
        height: 350px;
    }

    .faskes-list {
        gap: 20px;
    }

    .faskes-card {
        padding: 18px;
    }
}

/* ── Very small (<=375px) ─────────────────────────────────────── */
@media (max-width: 375px) {
    .faskes-header-container,
    .faskes-container {
        padding: 0 16px;
    }

    .faskes-header-title {
        font-size: 22px;
    }

    .faskes-main-title {
        font-size: 18px;
    }

    .faskes-filter-card {
        padding: 14px;
    }

    .faskes-card-actions {
        flex-direction: column;
        gap: 10px;
    }

    .faskes-btn {
        width: 100%;
        flex: none;
    }

    .faskes-map-container {
        height: 280px;
    }
}
