/* Gaya dasar untuk semua perangkat */
body {
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

/* Breadcrumb custom styling */
.breadcrumb {
    background-color: transparent;
    padding: 0.75rem 0;
    border-radius: 0;
    border-bottom: 1px solid #eaeaea;
}

.breadcrumb-item a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Card styling enhancements */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06) !important;
}

.card-body {
    padding: 1.5rem;
}

.shadow {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
}

/* Icon styling */
.fas {
    transition: transform 0.3s ease;
}

.card:hover .fas {
    transform: scale(1.2);
}

/* Button styling */
.btn {
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.25);
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.25);
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.25);
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.25);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Export dropdown styling */
.dropdown-menu {
    border-radius: 10px;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
}

.dropdown-header {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #0056b3;
}

.dropdown-divider {
    margin: 0.5rem 0;
}

/* Export button styling */
.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.25);
}

/* Button gap spacing */
.gap-2 {
    gap: 0.5rem;
}

/* Table styling */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
    padding: 12px;
}

.table-light {
    background-color: #f8f9fa;
}

.table td {
    padding: 12px;
    vertical-align: middle;
}

/* Custom design for category boxes */
.category-card .card-body {
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.category-card:hover .card-body {
    background-color: #f8f9fa;
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Enhanced Pagination Styling */
.pagination {
    display: flex;
    justify-content: center;
    padding: 0;
    list-style: none;
    margin: 20px 0;
    border-radius: 50px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    background-color: white;
    padding: 5px;
}

.pagination .page-item {
    margin: 0 3px;
}

.pagination .page-item .page-link {
    position: relative;
    display: block;
    padding: 0.6rem 0.85rem;
    line-height: 1.25;
    color: #007bff;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pagination .page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
    font-weight: 500;
    box-shadow: 0 3px 6px rgba(0, 123, 255, 0.25);
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
    opacity: 0.65;
}

.pagination .page-link:hover {
    z-index: 2;
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .pagination .page-item .page-link {
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .pagination .page-item {
        margin: 0 2px;
    }
}

/* Search form styling */
.form-control {
    border-radius: 50px;
    padding: 0.5rem 1rem;
    border: 1px solid #ced4da;
    transition: all 0.3s ease;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    border-color: #80bdff;
}

/* Alert styling */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.alert-info {
    background-color: #e6f7ff;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert-link {
    text-decoration: none;
    font-weight: 600;
}

.alert-link:hover {
    text-decoration: underline;
}

/* Header and section titles */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #212529;
}

.lead {
    font-weight: 300;
    font-size: 1.25rem;
    line-height: 1.6;
}

/* Card header styling */
.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.bg-primary {
    background-color: #007bff !important;
}

.bg-info {
    background-color: #17a2b8 !important;
}

.bg-warning {
    background-color: #ffc107 !important;
}

/* Detail page styling */
.detail-label {
    font-weight: 600;
    color: #495057;
}

/* Map container */
#minimap {
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

/* Animation for data count */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counters .card {
    animation: countUp 0.6s ease forwards;
}

/* Custom fadeIn animation for content */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Additional information box */
.info-box {
    background-color: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.info-box:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.info-box i {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: #007bff;
}

/* Custom background */
.bg-light-blue {
    background-color: #f0f7ff;
}

.bg-light-green {
    background-color: #f0fff4;
}

.bg-light-yellow {
    background-color: #fffbf0;
}

.bg-light-red {
    background-color: #fff0f0;
}

/* Badge styling */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 500;
}

.badge-primary {
    background-color: #cfe2ff;
    color: #0043a5;
}

.badge-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Focus animation */
.focus-trigger:hover .focus-target {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Modal custom styles */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
}

.modal-body .detail-row {
    margin-bottom: 1rem;
}

.modal-body .detail-label {
    font-weight: 600;
    color: #495057;
}

/* Map container in modal */
#modalMap {
    height: 300px;
    width: 100%;
    border-radius: 12px;
    margin-top: 15px;
}

/* MEDIA QUERIES - Pengaturan responsif */

/* Large desktop screens */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .lead {
        font-size: 1.3rem;
    }
}

/* Desktop and large tablets */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    h1 {
        font-size: 2.25rem;
    }
    
    .category-icon {
        width: 70px;
        height: 70px;
    }
    
    .fas.fa-3x {
        font-size: 2.5em;
    }
}

/* Tablets */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1.2rem;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
    }
    
    .fas.fa-3x {
        font-size: 2em;
    }
    
    .card-body {
        padding: 1.25rem;
    }
}

/* Small tablets and large smartphones */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
    }
    
    h1 {
        font-size: 1.75rem;
        text-align: center;
    }
    
    .lead {
        font-size: 1.1rem;
        text-align: center;
    }
    
    .btn {
        padding: 0.4rem 1.2rem;
    }
    
    .table-responsive {
        border: 0;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
    }
    
    .fas.fa-3x {
        font-size: 1.75em;
    }
    
    /* Responsive adjustments for export buttons */
    .col-md-6 .d-flex {
        flex-direction: column;
        align-items: stretch;
    }
    
    .gap-2 {
        gap: 0.75rem;
    }
    
    .dropdown-menu {
        width: 100%;
    }
}

/* Smartphones */
@media (max-width: 575px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .form-control {
        margin-bottom: 1rem;
    }
    
    .col-md-4 form {
        margin-bottom: 1rem;
    }
    
    .btn {
        padding: 0.375rem 1rem;
        font-size: 0.9rem;
    }
    
    .table thead th {
        padding: 8px;
    }
    
    .table td {
        padding: 8px;
    }
    
    .category-icon {
        width: 45px;
        height: 45px;
    }
    
    .fas.fa-3x {
        font-size: 1.5em;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 20px 0;
}

.pagination .page-item {
    margin: 0 2px;
}

.pagination .page-link {
    border-radius: 4px;
}

/* Category and grouping styles */
.category-header {
    background-color: #f8f9fa;
    padding: 8px 15px;
    font-weight: 600;
    color: #4e73df;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.category-header i {
    margin-right: 8px;
}

/* Item list styling */
.item-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 15px;
}

.item-list li {
    padding: 8px 15px 8px 35px;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
}

.item-list li:last-child {
    border-bottom: none;
}

.item-list li i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Badge styling */
.badge-specialty {
    background-color: #e8f0fe;
    color: #4285f4;
    font-weight: 500;
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 20px;
    margin-left: 8px;
}

/* Card hover effects for hospital listings */
.hospital-card {
    overflow: hidden;
}

.hospital-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background-color: #4e73df;
    transition: height 0.3s ease;
}

.hospital-card:hover::before {
    height: 100%;
}

/* Doctor info styling */
.doctor-info {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.doctor-info:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.doctor-info .doctor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e8f0fe;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.doctor-info .doctor-avatar i {
    color: #4285f4;
    font-size: 1.2rem;
}

.doctor-info .doctor-details {
    flex-grow: 1;
}

.doctor-info .doctor-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.doctor-info .doctor-specialty {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Accordion styling for grouped items */
.custom-accordion .accordion-button {
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #495057;
}

.custom-accordion .accordion-button:not(.collapsed) {
    color: #4e73df;
    background-color: #f8f9fa;
    box-shadow: none;
}

.custom-accordion .accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0, 0, 0, 0.125);
}

.custom-accordion .accordion-button::after {
    width: 1rem;
    height: 1rem;
    background-size: 1rem;
}

.custom-accordion .accordion-body {
    padding: 0;
}

/* Map container styling */
.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.map-container .map-placeholder {
    height: 300px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
}

.map-container .map-placeholder i {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 15px;
}

/* Modal improvements */
.detail-modal .modal-header {
    background-color: #4e73df;
    color: white;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.detail-modal .modal-title {
    font-weight: 600;
}

.detail-modal .modal-body {
    padding: 0;
}

.detail-modal .info-section {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.detail-modal .info-section:last-child {
    border-bottom: none;
}

.detail-modal .modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 1.5rem;
}

/* ===== TABEL RESPONSIF UNTUK MOBILE ===== */
/* Responsive table styles for mobile devices */
@media (max-width: 767px) {
    /* Override bootstrap table-responsive behavior */
    .table-responsive {
        overflow-x: visible;
    }
    
    /* Mengubah tampilan tabel pada mobile */
    .responsive-card-table {
        border: none;
    }
    
    .responsive-card-table thead {
        display: none; /* Hide table header on mobile */
    }
    
    .responsive-card-table, 
    .responsive-card-table tbody,
    .responsive-card-table tr {
        display: block;
        width: 100%;
    }
    
    .responsive-card-table tr {
        margin-bottom: 1rem;
        border-radius: 10px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
        background-color: #fff;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    
    .responsive-card-table tr:hover {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
        transform: translateY(-2px);
    }
    
    .responsive-card-table td {
        display: flex;
        padding: 0.8rem 1rem;
        text-align: left;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .responsive-card-table td:last-child {
        border-bottom: none;
    }
    
    /* Menambahkan label untuk setiap cell pada mobile */
    .responsive-card-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #495057;
        width: 35%;
        margin-right: 5%;
    }
    
    /* Konten cell pada mobile */
    .responsive-card-table td .cell-content {
        width: 60%;
    }
    
    /* Styling untuk detail button */
    .responsive-card-table td.text-center {
        justify-content: flex-start;
    }
    
    .responsive-card-table td.text-center .btn {
        width: 60%;
        margin-left: auto;
    }
    
    /* Header card row pada mobile */
    .responsive-card-table tr .card-header-row {
        background-color: #f8f9fa;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        padding: 0.8rem 1rem;
        font-weight: 600;
        color: #0056b3;
        display: flex;
        align-items: center;
    }
    
    .responsive-card-table tr .card-header-row .number-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background-color: #007bff;
        color: white;
        margin-right: 10px;
        font-size: 0.8rem;
    }
}

/* CSS tambahan untuk modal yang lebih responsif */
/* Tambahkan kode CSS ini ke data-layanan.css */

@media (max-width: 767px) {
    /* Penyesuaian modal untuk tampilan mobile */
    .modal-body .row {
        flex-direction: column;
    }
    
    .modal-body .col-md-6:first-child {
        margin-bottom: 1.5rem;
    }
    
    .modal-body .detail-row {
        margin-bottom: 0.75rem;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    /* Tab responsif di modal rumah sakit */
    .nav-tabs .nav-link {
        padding: 0.5rem 0.5rem;
        font-size: 0.85rem;
    }
    
    /* Ukuran peta dalam modal */
    #modalMap {
        height: 200px;
    }
    
    /* Detail info pada modal */
    .detail-row .detail-label {
        font-size: 0.9rem;
    }
    
    .detail-row div:not(.detail-label) {
        font-size: 0.9rem;
    }
    
    /* Adjustments untuk modal header */
    .modal-header h5 {
        font-size: 1.1rem;
    }
}

/* Tambahan untuk modal di viewport sangat kecil */
@media (max-width: 400px) {
    .modal-header {
        padding: 0.75rem 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 0.75rem 1rem;
    }
    
    .nav-tabs .nav-link {
        padding: 0.4rem 0.4rem;
        font-size: 0.8rem;
    }
}