/* Kalender & Navigation Section Styles */

/* Scrollable Container Styles */
.calendar-scroll-container {
    height: calc(100vh - 200px); /* Tinggi viewport dikurangi header dan tab */
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    margin-top: 10px;
}

.prayer-scroll-container {
    height: calc(100vh - 150px); /* Tinggi viewport dikurangi header prayer */
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    margin-top: 10px;
    -webkit-overflow-scrolling: touch; /* Smooth scroll untuk iOS */
}

/* Custom scrollbar untuk container scroll */
.calendar-scroll-container::-webkit-scrollbar,
.prayer-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.calendar-scroll-container::-webkit-scrollbar-track,
.prayer-scroll-container::-webkit-scrollbar-track {
    background: var(--secondary-color);
    border-radius: 3px;
}

.calendar-scroll-container::-webkit-scrollbar-thumb,
.prayer-scroll-container::-webkit-scrollbar-thumb {
    background: var(--highlight-color);
    border-radius: 3px;
}

.calendar-scroll-container::-webkit-scrollbar-thumb:hover,
.prayer-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Mobile responsive untuk scroll container */
@media (max-width: 768px) {
    .calendar-scroll-container {
        height: calc(100vh - 250px); /* Lebih kecil untuk mobile */
        padding-bottom: 20px;
    }
    
    .prayer-scroll-container {
        height: calc(100vh - 160px); /* Sesuaikan untuk mobile dengan header yang lebih kecil */
        padding-bottom: 20px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scroll untuk iOS */
        min-height: 400px; /* Minimal height untuk memastikan scroll */
    }
}

/* Navigation */
.nav-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-header h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
}

/* Mobile Navigation Override */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: row !important;
        gap: 5px;
        width: 100%;
        justify-content: space-around;
        align-items: center;
    }
    
    .nav-item {
        flex: 1;
        flex-direction: column !important;
        gap: 5px;
        padding: 8px 5px;
        border-radius: 8px;
        min-height: 60px;
        justify-content: center;
        text-align: center;
        font-size: 0.7rem;
        display: flex;
        align-items: center;
    }
}

.nav-item:hover, .nav-item.active {
    background-color: var(--highlight-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav-item i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

/* Mobile Navigation Enhancements */
@media (max-width: 768px) {
    .nav-item {
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }
    
    .nav-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        transition: left 0.5s;
    }
    
    .nav-item:hover::before {
        left: 100%;
    }
    
    .nav-item.active {
        background-color: var(--highlight-color);
        color: var(--primary-color);
        transform: translateY(-3px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    }
    
    .nav-item.active i {
        transform: scale(1.1);
    }
    
    .nav-item:active {
        transform: translateY(-1px);
        transition: transform 0.1s ease;
    }
    
    .nav-item i {
        font-size: 1.2rem;
        margin-bottom: 2px;
    }
    
    .nav-item span {
        font-size: 0.65rem;
        line-height: 1.2;
    }
}

/* Kalender Section */
.header {
    text-align: center;
    padding: 0px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--secondary-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header h2 {
    font-size: 1.4rem;
    margin-bottom: 0;
    margin: 0;
}

.digital-clock {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--text-color);
    position: relative;
    flex-shrink: 0;
}

.digital-clock span {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

/* Timezone Dropdown Styles */
.timezone-dropdown-container {
    position: relative;
    cursor: pointer;
}

.timezone-dropdown-container:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

.timezone-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background-color: var(--secondary-color);
    border: 2px solid var(--highlight-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 100px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.timezone-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.timezone-options {
    padding: 8px 0;
}

.timezone-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-color);
    font-size: 0.8rem;
}

.timezone-option:hover {
    background-color: var(--highlight-color);
    color: var(--primary-color);
}

.timezone-option.active {
    background-color: var(--highlight-color);
    color: var(--primary-color);
    font-weight: bold;
}

.timezone-option i {
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.timezone-label {
    position: relative;
    font-size: 1rem;
    color: var(--highlight-color);
    margin-left: 4px;
    opacity: 0.9;
    font-weight: bold;
    z-index: 10;
    white-space: nowrap;
    margin-left: 0;
}

/* Mobile responsive untuk timezone dropdown */
@media (max-width: 768px) {
    .timezone-dropdown {
        min-width: 90px;
        right: -10px;
    }
    
    .timezone-option {
        padding: 6px 8px;
        font-size: 0.7rem;
    }
    
    .timezone-option i {
        font-size: 0.8rem;
    }
    
    .timezone-label {
        font-size: 0.7rem;
    }
    
    .digital-clock {
        font-size: 1rem;
    }
    
    .digital-clock span {
        font-size: 1rem;
    }
}

/* Pastikan jam sholat juga bisa diklik */
#prayerClock.timezone-dropdown-container {
    cursor: pointer;
}

.location-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
    padding: 1px 5px;
    background-color: var(--secondary-color);
    border-radius: 8px;
    border: 1px solid var(--highlight-color);
    flex-shrink: 0; /* Tidak boleh menyusut */
}

.location-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.9;
}

.location-info i {
    color: var(--highlight-color);
    font-size: 0.9rem;
}

.location-info span {
    font-size: 0.75rem;
    line-height: 1.3;
}

.location-btn {
    background-color: var(--highlight-color);
    color: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.location-btn:hover {
    background-color: var(--primary-color);
    color: var(--highlight-color);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.location-btn:active {
    transform: scale(0.95);
}

/* Kalender Tabs */
.calendar-tabs {
    display: flex !important;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 0 10px;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    max-width: 100%;
    flex-shrink: 0; /* Tidak boleh menyusut */
}

.tab-btn {
    background-color: var(--secondary-color);
    color: var(--text-color);
    border: 2px solid var(--secondary-color);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Amiri', serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 50%;
    display: flex !important;
    align-items: center;
    gap: 6px;
    justify-content: center;
    flex: 1;
    max-width: 200px;
    min-width: 0;
    text-align: center;
    white-space: nowrap !important;
    flex-shrink: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.tab-btn:hover {
    background-color: var(--secondary-color);
    color: var(--text-color);
    border-color: var(--highlight-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tab-btn.active {
    background-color: var(--highlight-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-width: 3px;
}

.tab-btn i {
    font-size: 1rem;
}

.tab-btn span {
    font-size: 1rem;
    font-weight: bold;
}

.today-btn {
    background-color: var(--highlight-color);
    color: var(--primary-color);
    border: 2px solid var(--highlight-color);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Amiri', serif;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 3px;
    justify-content: center;
    min-width: 60px;
    max-width: 80px;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
    overflow: hidden;
    box-sizing: border-box;
    font-weight: bold;
    height: 28px;
}

.today-btn:hover {
    background-color: var(--primary-color);
    color: var(--highlight-color);
    border-color: var(--highlight-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.today-btn i {
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.today-btn span {
    font-size: 0.75rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

/* Fixed Calendar Header Elements */
.year-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-shrink: 0; /* Tidak boleh menyusut */
    margin-bottom: 15px;
}

.month-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0; /* Tidak boleh menyusut */
    margin-bottom: 15px;
    position: relative;
}

.date-range-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0; /* Tidak boleh menyusut */
    margin-bottom: 15px;
    justify-content: space-between;
}

/* Calendar Grid */
.calendar {
    flex: 1; /* Ambil sisa ruang yang tersedia */
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px; /* gap: baris kolom, perbesar kolom jika ingin lebih renggang horizontal juga */
    row-gap: 10px; /* tambah jarak vertikal antar baris */
    padding: 10px;
    background: var(--secondary-color);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    direction: ltr; /* Default arah kiri ke kanan */
}

/* Kalender Hijriyah - arah dari kanan ke kiri (Ahad di kanan) */
.calendar.hijri-direction {
    direction: rtl;
}

/* Kalender Masehi - arah dari kiri ke kanan (Ahad di kiri) */
.calendar.gregorian-direction {
    direction: ltr;
}

.day-header, .day {
    min-width: 36px;
    max-width: 48px;
    width: 100%;
    box-sizing: border-box;
}

.day-header {
    text-align: center;
    padding: 3px 10px;
    height: 30px;
    font-weight: bold;
    background-color: var(--secondary-color);
    border-radius: 5px;
    color: var(--text-color);
    direction: ltr; /* Default arah kiri ke kanan */
}

/* Header hari untuk kalender Hijriyah - arah dari kanan ke kiri */
.calendar.hijri-direction .day-header {
    direction: rtl;
}

/* Header hari untuk kalender Masehi - arah dari kiri ke kanan */
.calendar.gregorian-direction .day-header {
    direction: ltr;
}

.day {
    background-color: var(--secondary-color);
    border: 1px solid var(--highlight-color);
    border-radius: 8px;
    padding: 16px 8px;
    min-height: 60px;
    max-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.empty-day {
    background-color: transparent;
    border: none;
    min-height: 60px;
    max-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.day:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tanggal-utama {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
    text-align: center;
    margin: 0;
    line-height: 1;
    position: relative;
    z-index: 1;
    transform: translateY(0);
    transition: transform 0.3s ease;
    /* Memastikan posisi tetap di tengah */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.tanggal-tambahan {
    font-size: var(--badge-font-size);
    color: var(--text-color);
    text-align: center;
    opacity: 0.7;
    position: absolute;
    top: 3px;
    left: 3px;
    margin: 0;
    padding: var(--badge-padding);
    height: var(--badge-height);
    width: auto;
    min-width: var(--badge-min-width);
    border-radius: 6px;
    background: var(--nav-bg);
    z-index: 2;
    line-height: 1;
    font-weight: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Memastikan tidak mempengaruhi layout */
    pointer-events: none;
    user-select: none;
}

/* Pasaran styling - sama dengan tanggal-tambahan */
.pasaran {
    font-size: var(--badge-font-size);
    color: var(--text-color);
    text-align: center;
    opacity: 0.7;
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: var(--badge-padding);
    height: var(--badge-height);
    width: auto;
    min-width: var(--badge-min-width);
    border-radius: 6px;
    background: var(--nav-bg);
    z-index: 2;
    line-height: 1;
    font-weight: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Memastikan tidak mempengaruhi layout */
    pointer-events: none;
    user-select: none;
}

/* Today Highlight */
.day.today {
    background-color: var(--highlight-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 0 2px var(--highlight-color);
    transform: scale(1.05);
    position: relative;
}

.day.today .tanggal-utama {
    color: var(--primary-color);
    font-weight: bold;
}

.day.today .tanggal-tambahan {
    background: var(--primary-color);
    color: var(--highlight-color);
    font-weight: bold;
}

.day.today .pasaran {
    background: var(--primary-color);
    color: var(--highlight-color);
    font-weight: bold;
}

.day.today::before {
    content: 'اليوم';
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: var(--highlight-color);
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.day.today:hover {
    background-color: var(--highlight-color);
    transform: scale(1.08);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Selected Day */
.day.selected {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border: 2px solid var(--highlight-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.day.selected .tanggal-utama {
    color: var(--bg-color);
    font-weight: bold;
}

.day.selected .tanggal-tambahan {
    background: var(--highlight-color);
    color: var(--primary-color);
    font-weight: bold;
}

.day.selected .pasaran {
    background: var(--highlight-color);
    color: var(--primary-color);
    font-weight: bold;
}

/* Weekend Highlight */
.day.weekend {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--highlight-color);
}

.day.weekend .tanggal-utama {
    color: var(--highlight-color);
}

/* Special Day Highlight */
.day.special {
    background: linear-gradient(135deg, var(--highlight-color), var(--primary-color));
    color: var(--bg-color);
    border: 2px solid var(--highlight-color);
}

.day.special .tanggal-utama {
    color: var(--bg-color);
    font-weight: bold;
}

.day.special .tanggal-tambahan {
    background: var(--bg-color);
    color: var(--primary-color);
    font-weight: bold;
}

.day.special .pasaran {
    background: var(--bg-color);
    color: var(--primary-color);
    font-weight: bold;
}

/* Mobile Responsive for Day Highlights */
@media (max-width: 768px) {
    .day.today {
        transform: scale(1.02);
    }
    
    .day.today:hover {
        transform: scale(1.05);
    }
    
    .day.today::before {
        font-size: 0.5rem;
        padding: 1px 4px;
        top: -6px;
        right: -6px;
    }
    
    .day {
        min-height: 42px;
        max-height: 42px;
        padding: 6px;
    }
    
    .empty-day {
        min-height: 42px;
        max-height: 42px;
    }
    
    .tanggal-utama {
        font-size: 1rem;
    }
    
    .tanggal-tambahan {
        font-size: var(--badge-font-size-mobile);
        height: var(--badge-height-mobile);
        width: auto;
        min-width: var(--badge-min-width-mobile);
        padding: var(--badge-padding-mobile);
        top: 2px;
        left: 2px;
    }
    
    .pasaran {
        font-size: var(--badge-font-size-mobile);
        height: var(--badge-height-mobile);
        width: auto;
        min-width: var(--badge-min-width-mobile);
        padding: var(--badge-padding-mobile);
        bottom: 0px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* Mobile responsive for tab buttons */
    .tab-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
        gap: 4px;
        border-radius: 4px;
    }
    
    .tab-btn i {
        font-size: 0.85rem;
    }
    
    .tab-btn span {
        font-size: 0.85rem;
    }
    
    /* Mobile responsive for month selector buttons */
    .month-selector button {
        padding: 6px 12px;
        font-size: 0.85rem;
        border-radius: 4px;
    }
    
    .month-selector h4 {
        font-size: 1rem;
    }
    
    
    
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .day {
        min-height: 46px;
        max-height: 46px;
        padding: 7px;
    }
    
    .empty-day {
        min-height: 46px;
        max-height: 46px;
    }
    
    .tanggal-utama {
        font-size: 1.1rem;
    }
    
    .tanggal-tambahan {
        font-size: var(--badge-font-size-tablet);
        height: var(--badge-height-tablet);
        min-width: var(--badge-min-width-tablet);
        padding: var(--badge-padding-tablet);
        top: 2px;
        left: 2px;
    }
    
    .pasaran {
        font-size: var(--badge-font-size-tablet);
        height: var(--badge-height-tablet);
        min-width: var(--badge-min-width-tablet);
        padding: var(--badge-padding-tablet);
        bottom: 2px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* Tablet responsive for date range and today button */
    .date-range-info {
        padding: 5px 9px;
        font-size: 0.7rem;
        line-height: 1.25;
        border-radius: 5px;
    }
    
    .today-btn {
        padding: 5px 9px;
        font-size: 0.7rem;
        min-width: 55px;
        max-width: 75px;
        height: 26px;
        gap: 2px;
        border-radius: 5px;
    }
    
    .today-btn i {
        font-size: 0.75rem;
    }
    
    .today-btn span {
        font-size: 0.7rem;
    }
    
    /* Tablet responsive for tab buttons */
    .tab-btn {
        padding: 7px 14px;
        font-size: 0.9rem;
        gap: 4px;
        border-radius: 5px;
    }
    
    .tab-btn i {
        font-size: 0.9rem;
    }
    
    .tab-btn span {
        font-size: 0.9rem;
    }
    
    /* Tablet responsive for month selector buttons */
    .month-selector button {
        padding: 7px 14px;
        font-size: 0.9rem;
        border-radius: 5px;
    }
    
    .month-selector h4 {
        font-size: 1.1rem;
    }
}

/* Large Screen Responsive */
@media (min-width: 1025px) {
    .day {
        min-height: 54px;
        max-height: 54px;
        padding: 9px;
    }
    
    .empty-day {
        min-height: 54px;
        max-height: 54px;
    }
    
    .tanggal-utama {
        font-size: 1.3rem;
    }
    
    .tanggal-tambahan {
        font-size: var(--badge-font-size-large);
        height: var(--badge-height-large);
        min-width: var(--badge-min-width-large);
        padding: var(--badge-padding-large);
        top: 3px;
        left: 3px;
    }
    
    .pasaran {
        font-size: var(--badge-font-size-large);
        height: var(--badge-height-large);
        min-width: var(--badge-min-width-large);
        padding: var(--badge-padding-large);
        bottom: 3px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* Large screen responsive for date range and today button */
    .date-range-info {
        padding: 7px 11px;
        font-size: 0.8rem;
        line-height: 1.35;
        border-radius: 6px;
    }
    
    .today-btn {
        padding: 7px 11px;
        font-size: 0.8rem;
        min-width: 65px;
        max-width: 85px;
        height: 30px;
        gap: 3px;
        border-radius: 6px;
    }
    
    .today-btn i {
        font-size: 0.85rem;
    }
    
    .today-btn span {
        font-size: 0.8rem;
    }
    
    /* Large screen responsive for tab buttons */
    .tab-btn {
        padding: 8px 16px;
        font-size: 1rem;
        gap: 6px;
        border-radius: 6px;
    }
    
    .tab-btn i {
        font-size: 1rem;
    }
    
    .tab-btn span {
        font-size: 1rem;
    }
    
    /* Large screen responsive for month selector buttons */
    .month-selector button {
        padding: 8px 16px;
        font-size: 1rem;
        border-radius: 6px;
    }
    
    .month-selector h4 {
        font-size: 1.2rem;
    }
    
    .digital-clock {
        font-size: 1.2rem;
    }
    
    .digital-clock span {
        font-size: 1.2rem;
    }
    
    .timezone-label {
        font-size: 0.9rem;
    }
}

.hari-penting {
    border: 2px solid var(--hari-penting-color, #3b82f6) !important;
    background: rgba(59, 130, 246, 0.12) !important;
    position: relative;
}
.hari-penting::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hari-penting-color, #3b82f6);
    opacity: 0.95;
    z-index: 2;
    box-shadow: 0 0 1px #fff, 0 0 0 1px #fff;
}

/* Modal info hari penting */
.hp-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.35);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hp-modal-content {
    background: var(--bg-color, #fff);
    color: var(--text-color, #222);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    padding: 0;
    min-width: 320px;
    max-width: 90vw;
    max-height: 85vh;
    overflow: hidden;
    position: relative;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    direction: ltr;
    unicode-bidi: bidi-override;
}
.hp-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 1.8rem;
    color: var(--secondary-text, #666);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    direction: ltr;
    unicode-bidi: bidi-override;
}
.hp-modal-close:hover {
    background: rgba(0,0,0,0.1);
    color: var(--text-color, #333);
    direction: ltr;
    unicode-bidi: bidi-override;
}
.hp-modal-title {
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0;
    color: var(--text-color, #333);
    direction: ltr;
    unicode-bidi: bidi-override;
}
.hp-modal-desc {
    font-size: 0.98rem;
    margin-bottom: 6px;
    color: var(--secondary-text, #666);
    direction: ltr;
    unicode-bidi: bidi-override;
}
.hp-modal-date {
    font-size: 0.92rem;
    color: var(--highlight-color, #3b82f6);
    margin-bottom: 10px;
    direction: ltr;
    unicode-bidi: bidi-override;
}

.hp-modal-date-group {
    margin-bottom: 1em;
    color: var(--text-color);
}

.hp-modal-date-group div {
    display: flex;
    align-items: center;
    margin-bottom: 0.5em;
}

.hp-modal-date-group i {
    margin-right: 8px;
    color: var(--highlight-color);
}

.hp-modal-hp-list {
    margin-top: 1em;
}

.hp-modal-hp-list b {
    color: var(--highlight-color);
    margin-bottom: 0.5em;
    display: block;
}

/* Modal Hari Khusus - Modern Design */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    direction: ltr;
    unicode-bidi: bidi-override;
}

.modal-content {
    background: var(--bg-color, #fff);
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.3);
    max-width: 90vw;
    max-height: 85vh;
    overflow: hidden;
    position: relative;
    min-width: 320px;
    animation: modalSlideIn 0.3s ease-out;
    direction: ltr;
    unicode-bidi: bidi-override;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--highlight-color, #3b82f6), var(--secondary-color, #1d4ed8));
    color: var(--text-color, #fff);
    padding: 24px 28px 20px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
    direction: ltr;
    unicode-bidi: bidi-override;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.3;
    direction: ltr;
    unicode-bidi: bidi-override;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: var(--text-color, #fff);
    font-size: 1.8rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    direction: ltr;
    unicode-bidi: bidi-override;
}

.close-modal:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
    direction: ltr;
    unicode-bidi: bidi-override;
}

.modal-body {
    padding: 28px;
    max-height: 60vh;
    overflow-y: auto;
    background: var(--bg-color, #fafafa);
    direction: ltr;
    unicode-bidi: bidi-override;
}

/* Custom scrollbar untuk modal-body */
.modal-body::-webkit-scrollbar {
    width: 6px;
    direction: ltr;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--secondary-color, #f1f1f1);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--highlight-color, #c1c1c1);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color, #a8a8a8);
}

/* Modern list item styling */
.special-day-item {
    background: var(--bg-color, #fff);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid var(--secondary-color, #e8e8e8);
    padding: 18px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    direction: ltr;
    unicode-bidi: bidi-override;
}

.special-day-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-color: var(--highlight-color, #3b82f6);
    direction: ltr;
    unicode-bidi: bidi-override;
}

.special-day-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--highlight-color, #3b82f6), var(--secondary-color, #1d4ed8));
    border-radius: 0 2px 2px 0;
}

.special-day-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 7px;
    direction: ltr;
    unicode-bidi: bidi-override;
}

.special-day-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-color, #333);
    flex: 1;
    margin-right: 12px;
    direction: ltr;
    unicode-bidi: bidi-override;
    line-height: 1.3;
}

.special-day-date {
    font-size: 0.75rem;
    color: var(--highlight-color, #3b82f6);
    font-weight: 600;
    direction: ltr;
    unicode-bidi: bidi-override;
    text-align: right;
    white-space: nowrap;
    margin-left: 12px;
    flex-shrink: 0;
}

.special-day-row2 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2px;
  gap: 8px;
}
.special-day-subtitle {
  font-size: 0.85rem;
  color: var(--text-color);
  font-weight: 500;
  flex: 1;
  min-width: 0;
  text-align: left;
  direction: ltr;
  unicode-bidi: bidi-override;
  opacity: 0.8;
}
.special-day-period {
  font-size: 0.7rem;
  color: var(--text-color);
  font-style: italic;
  text-align: right;
  min-width: 60px;
  flex-shrink: 0;
  direction: ltr;
  unicode-bidi: bidi-override;
  opacity: 0.7;
}



.special-day-description {
    font-size: 0.85rem;
    color: var(--secondary-text, #777);
    font-style: italic;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid var(--secondary-color, #f0f0f0);
    line-height: 1.4;
    direction: ltr;
    unicode-bidi: bidi-override;
}

/* Empty state styling */
.special-day-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary-text, #888);
    font-style: italic;
    font-size: 1rem;
    direction: ltr;
    unicode-bidi: bidi-override;
}

.special-day-empty i {
    font-size: 3rem;
    color: var(--secondary-color, #ddd);
    margin-bottom: 16px;
    display: block;
    direction: ltr;
    unicode-bidi: bidi-override;
}

/* Tema Light - Modal adjustments */
[data-theme="light"] .modal-content {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .modal-body {
    background: #f8f9fa;
}

[data-theme="light"] .special-day-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

[data-theme="light"] .special-day-title {
    color: #333333;
}



[data-theme="light"] .special-day-description {
    color: #777777;
    border-top: 1px solid #e0e0e0;
}

[data-theme="light"] .special-day-empty {
    color: #888888;
}

[data-theme="light"] .special-day-date {
    color: #3b82f6;
}

[data-theme="light"] .special-day-subtitle {
    color: #333333;
    opacity: 0.8;
}

[data-theme="light"] .special-day-period {
    color: #333333;
    opacity: 0.7;
}

/* Tema Light - HP Modal adjustments */
[data-theme="light"] .hp-modal-content {
    background: #ffffff;
    color: #333333;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .hp-modal-title {
    color: #333333;
}

[data-theme="light"] .hp-modal-desc {
    color: #666666;
}

[data-theme="light"] .hp-modal-date {
    color: #3b82f6;
}

[data-theme="light"] .hp-modal-close {
    color: #666666;
}

[data-theme="light"] .hp-modal-close:hover {
    color: #333333;
}

/* Responsive design */
@media (max-width: 768px) {
    .modal-content {
        min-width: 320px;
        max-width: 90vw;
        margin: 20px;
        max-height: 90vh;
        direction: ltr;
        unicode-bidi: bidi-override;
    }
    
    .hp-modal-content {
        min-width: 320px;
        max-width: 90vw;
        margin: 20px;
        direction: ltr;
        unicode-bidi: bidi-override;
    }
    
    .modal-header {
        padding: 20px 24px 16px 24px;
        direction: ltr;
        unicode-bidi: bidi-override;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
        direction: ltr;
        unicode-bidi: bidi-override;
    }
    
    .modal-body {
        padding: 20px;
        max-height: 70vh;
        direction: ltr;
        unicode-bidi: bidi-override;
    }
    
    .special-day-item {
        padding: 14px;
        margin-bottom: 12px;
        direction: ltr;
        unicode-bidi: bidi-override;
    }
    
    .special-day-header {
        margin-bottom: 4px;
        direction: ltr;
        unicode-bidi: bidi-override;
    }
    
    .special-day-title {
        font-size: 0.85rem;
        direction: ltr;
        unicode-bidi: bidi-override;
        line-height: 1.2;
    }
    

    
    .special-day-date {
        font-size: 0.6rem;
        direction: ltr;
        unicode-bidi: bidi-override;
        margin-left: 8px;
    }
    
    .special-day-row2 {
        gap: 4px;
    }
    
    .special-day-subtitle {
        font-size: 0.75rem;
        direction: ltr;
        unicode-bidi: bidi-override;
        color: var(--text-color);
        opacity: 0.8;
    }
    
    .special-day-period {
        font-size: 0.6rem;
        min-width: 40px;
        direction: ltr;
        unicode-bidi: bidi-override;
        color: var(--text-color);
        opacity: 0.7;
    }
    
    .special-day-description {
        font-size: 0.8rem;
        margin-top: 3px;
        padding-top: 3px;
        direction: ltr;
        unicode-bidi: bidi-override;
    }
}

/* Content Section Styles */
.content-section {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Pastikan prayer section bisa scroll di mobile */
@media (max-width: 768px) {
    #prayer-section {
        overflow: hidden;
    }
    
    #prayer-section .prayer-scroll-container {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

/* Calendar Content Styles */
.calendar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Year Selector Button Styles */
.year-selector button {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    background: var(--highlight-color);
    color: var(--primary-color);
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.year-selector button:hover {
    background: var(--primary-color);
    color: var(--highlight-color);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--highlight-color);
}

.year-selector h3 {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--text-color);
    margin: 0 10px;
}

/* Month Selector Button Styles */
.month-selector button {
    background: var(--secondary-color);
    color: var(--text-color);
    border: 2px solid var(--secondary-color);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.month-selector button:hover {
    background: var(--highlight-color);
    color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--highlight-color);
}

.month-selector h4 {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

/* Date Range Info Styles */
.date-range-info {
    text-align: center;
    padding: 6px 10px;
    background-color: var(--secondary-color);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.9;
    line-height: 1.3;
    direction: ltr;
    unicode-bidi: bidi-override;
    flex: 1;
    margin-bottom: 0;
}

/* Fixed Header Elements */ 