/* Memanggil custom font berformat OTF */
@font-face {
    font-family: 'Retro Signature';
    src: url('../fonts/RetroSignature.otf') format('opentype'); /* Gunakan .otf dan format opentype */
    font-weight: normal;
    font-style: normal;
}

/* Memanggil custom font Arab (Arabic Typesetting) */
@font-face {
    font-family: 'Arabic Typesetting Custom';
    src: url('../fonts/ArabicTypesettingRegular.ttf') format('truetype'); 
    font-weight: normal;
    font-style: normal;
}

h2 {
    font-family: 'Retro Signature', cursive; /* Menggunakan font baru */
    font-size: 3.5em; /* Ukuran diperbesar agar tulisan latinnya terbaca jelas */
    font-weight: normal; /* Font signature biasanya lebih bagus tanpa bold */
    margin-bottom: 15px;
    text-align: center;
    color: #000000; /* Sesuaikan warnanya, misalnya putih */
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.273); /* Tambahan bayangan agar elegan */
}


/* Aturan dasar yang berlaku untuk semua resolusi */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-image: url('img/bg.jpg'); /* Ganti dengan path ke foto Anda */
    background-size: cover;       /* Memastikan gambar menutupi seluruh layar */
    background-position: center;  /* Memusatkan gambar */
    background-attachment: fixed; /* Membuat background tetap saat di-scroll */
    height: 100%;
    width: 100%;
    margin: 0;
}

.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
    height: 100%;
    margin-bottom: 20px;
}

.additional-info {
    background-color: rgba(255, 255, 255, 0.478);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(159, 159, 159, 0.168);
}

.prayer-schedule {
    background-color: transparent; /* Menghilangkan warna putih transparan */
    padding: 0; /* Menghilangkan jarak agar kotak kecil bisa meluas maksimal */
    border-radius: 0;
    box-shadow: none; /* Menghapus bayangan pembungkus */
    height: 30vh;
}

.schedule,
.announcements {
    background-color: rgba(255, 255, 255, 0.345);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.288);
}

.additional-info {
    height: 60vh;
}

.prayer-schedule {
    height: 30vh;
}

.schedule {
    height: 60vh;
    text-align: center;
}

.announcements {
    height: 30vh;
}

h2 {
    margin-bottom: 10px;
    text-align: center;
}


/* 
#hijri-date {
    direction: rtl;
    unicode-bidi: isolate;
} */


.prayer-schedule .times {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 kolom dengan lebar sama */
    grid-template-rows: repeat(2, 1fr);    /* 2 baris dengan tinggi sama */
    gap: 10px; /* Jarak antar kotak */
    height: 100%; /* Agar memenuhi ruang kosong yang ditinggalkan jam */
}

/* Container masing-masing kotak jadwal (Efek Kaca) */
.prayer-time {
    display: flex;
    flex-direction: row; 
    align-items: stretch;
    background-color: rgba(255, 255, 255, 0.312); /* Putih hampir transparan */
    color: #ffffff; /* Teks warna hitam */
    border-radius: 10px;
    overflow: hidden; 
    height: 100%;
    border: 1px solid rgb(255, 255, 255); /* Efek pantulan cahaya di pinggir kotak */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.145); /* Bayangan lembut agar kotak terlihat melayang */
}

/* Styling untuk Nama Waktu Shalat (Vertikal di Kiri) */
.prayer-time div:first-child {
    background-color: transparent; 
    color: #ffffff; /* Teks judul warna hitam */
    writing-mode: vertical-rl; 
    transform: rotate(180deg); 
    text-align: center;
    padding: 0 10px;
    font-size: 1.4em;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    min-width: 50px;
    opacity: 0.8; /* Sedikit diredupkan agar angka jam lebih menonjol */
}

.prayer-time div {
    margin: 5px 0;
}


/* Styling untuk Angka Jam (Besar di Kanan) */
.shalat {
    flex: 1;
    font-size: 5.5em; 
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    line-height: 1;
    letter-spacing: -2px;
    padding-right: 10px; 
    color: #ffffff; /* Teks jam warna putih */
}



.table-container {
    height: 100%;
    overflow-y: auto;
    border-radius: 10px;
}

.announcements table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #ccc;
    border-radius: 10px;
}

.announcements th,
.announcements td {
    padding: 10px;
    border: 1px solid #ccc;
    text-align: center;
}

.announcements th {
    background-color: #00aaff;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1;
}

.announcements th:first-child {
    border-top-left-radius: 10px;
}

.announcements th:last-child {
    border-top-right-radius: 10px;
}

.announcements tbody tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

.announcements tbody tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

#no-announcement-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 1.5em;
    font-weight: bold;
    color: #00aaff;
    text-align: center;
    background-color: rgba(240, 244, 255, 0.5);
    border: 2px dashed #00aaff;
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
}

.schedule-items {
    padding-top: 20px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.photo-box img {
    width: 200px;
    height: 250px;
    object-fit: cover;
    border-radius: 10%;
    margin: 10px;
}

.title-box-1,
.title-box-2 {
    background-color: #ffa500;
    color: rgb(0, 0, 0);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-size: 25px;
}

#media-box {
    display: flex;
    justify-content: center; /* Pusatkan secara horizontal */
    align-items: center; /* Pusatkan secara vertikal */
    background-color: #2b51bb00;
    border-radius: 10px;
    height: 100%;
    overflow: hidden; /* Pastikan media tidak keluar dari container */
    position: relative; /* Penting untuk animasi */
    padding: 10px; /* Tambahkan padding untuk memberi ruang */
    box-sizing: border-box; /* Pastikan padding tidak mempengaruhi ukuran total */
}

.media-image,
.media-video {
    max-width: calc(100% - 20px); /* Kurangi lebar untuk mengakomodasi padding */
    max-height: calc(100% - 20px); /* Kurangi tinggi untuk mengakomodasi padding */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover; /* Pastikan gambar/video tetap proporsional */
    position: absolute; /* Media ditumpuk satu sama lain */
    top: 26px; /* Pusatkan secara vertikal */
    left: 26px; /* Pusatkan secara horizontal */
    transform: translateX(100%); /* Mulai dari luar layar (kanan) */
    width: auto; /* Biarkan lebar menyesuaikan dengan rasio aspek */
    height: auto; /* Biarkan tinggi menyesuaikan dengan rasio aspek */
    transition: transform 1s ease-in-out; /* Efek transisi slide */
}

/* Animasi slide-in */
.media-image.active,
.media-video.active {
    transform: translateX(0); /* Geser ke posisi tengah */
}

/* Styling untuk media statis */
.media-image.static,
.media-video.static {
    position: static; /* Hapus posisi absolut untuk media statis */
    transform: none; /* Hapus transformasi */
    width: auto; /* Sesuaikan lebar dengan rasio aspek */
    height: auto; /* Sesuaikan tinggi dengan rasio aspek */
    max-width: 100%; /* Pastikan media tidak melebihi lebar container */
    max-height: 100%; /* Pastikan media tidak melebihi tinggi container */
    margin: 0 auto; /* Pusatkan secara horizontal */
    display: block; /* Pastikan elemen ditampilkan sebagai blok */
}

/* Styling untuk halaman web fallback */
.web-page {
    width: 100%;
    height: 100%;
    border: none; /* Hilangkan border iframe */
    border-radius: 10px; /* Opsional: Tambahkan border radius */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Opsional: Tambahkan shadow */
}

#slideshow-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.slideshow-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Animasi untuk swipe masuk */
.swipe-in {
    animation: swipe-in 0.5s forwards;
}

/* Animasi untuk swipe keluar */
.swipe-out {
    animation: swipe-out 0.5s forwards;
}

@keyframes swipe-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes swipe-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

/* =========================================
   MODAL COUNTDOWN (PENYESUAIAN POSISI & FONT)
========================================= */
#countdown-modal {
    background-image: url('img/backgroundcountdown.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    color: rgb(255, 255, 255);
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Mode Split Screen Iqomah */
#countdown-modal.iqomah-mode {
    flex-direction: row;
    align-items: flex-start; /* Mengubah dari center ke flex-start agar bisa diatur padding atasnya */
    padding-top: 35vh; /* MEMBERIKAN RUANG UNTUK LOGO DI ATAS (Sesuaikan nilainya jika kurang turun) */
}

/* Bagian Kiri (Timer) */
#countdown-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    transition: all 0.5s ease;
}

#countdown-modal.iqomah-mode #countdown-left {
    width: 35%;
    border-right: 2px dashed rgba(255, 255, 255, 0.3);
    padding: 20px;
}

/* =========================================
   UKURAN DEFAULT (UNTUK ADZAN & SYURUQ) - BESAR
========================================= */
#countdown-timer {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 6em; /* KEMBALI BESAR UNTUK ADZAN */
    transition: all 0.5s ease; /* Efek animasi saat membesar/mengecil */
}

#countdown-timer span {
    background-color: #ff5e00;
    padding: 25px 40px;
    border-radius: 15px;
    transition: all 0.5s ease;
}

#countdown-message {
    margin-top: 30px;
    font-size: 4em; /* TEKS ADZAN KEMBALI BESAR */
    color: #ff5e00;
    font-weight: bold;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
    transition: all 0.5s ease;
}

/* =========================================
   UKURAN KHUSUS (HANYA UNTUK IQOMAH) - MENGECIL
========================================= */
#countdown-modal.iqomah-mode #countdown-timer {
    font-size: 3.5em; /* Ukuran mengecil untuk panel kiri */
}

#countdown-modal.iqomah-mode #countdown-timer span {
    padding: 15px 25px; /* Kotak angka ikut mengecil */
    border-radius: 12px;
}

#countdown-modal.iqomah-mode #countdown-message {
    font-size: 2em; /* Teks pesan ikut mengecil */
    margin-top: 20px;
}

/* Bagian Kanan (Hadits & Doa) */
#countdown-right {
    display: none;
    width: 65%;
    flex-direction: column;
    justify-content: flex-start; /* Konten dimulai dari atas */
    padding: 0 60px; /* Menghilangkan padding top bawaan agar sejajar kiri */
    box-sizing: border-box;
}

#countdown-modal.iqomah-mode #countdown-right {
    display: flex;
}

.hadits-box {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    border-left: 5px solid #00aaff;
    margin-bottom: 25px; /* Jarak ke kotak doa dikurangi */
}

.hadits-title {
    color: #00aaff;
    font-weight: bold;
    font-size: 1.1em; /* UKURAN DIKECILKAN */
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.hadits-text {
    font-size: 1.4em; /* UKURAN DIKECILKAN (Sebelumnya 2em) */
    font-style: italic;
    line-height: 1.3;
}

.hadits-riwayat {
    font-size: 0.9em; /* UKURAN DIKECILKAN */
    color: #cccccc;
    margin-top: 5px;
}

.doa-box {
    text-align: center;
}

.doa-title {
    color: #ff5e00;
    font-size: 1.3em; /* UKURAN DIKECILKAN */
    font-weight: bold;
    margin-bottom: 15px;
}

.doa-arabic {
    font-family: 'Arabic Typesetting Custom', "Traditional Arabic", serif; /* Gunakan font baru */
    font-size: 3em; /* Ukuran sedikit diperbesar karena Arabic Typesetting biasanya tampil lebih ramping */
    line-height: 1.5;
    margin-bottom: 20px;
    font-weight: normal;
    /* text-shadow: 2px 2px 8px rgba(0,0,0,0.9); */
}

.doa-translation {
    font-size: 1.1em; /* UKURAN DIKECILKAN (Sebelumnya 1.8em) */
    line-height: 1.4;
    color: #e0e0e0;
    font-style: italic;
}

/* =========================================
   PANEL DASHBOARD MINIMALIS (TUGAS KOSONG)
========================================= */
#no-announcement-panel {
    display: flex;
    flex-direction: row;
    align-items: center; /* Posisi teks persis di tengah vertikal */
    width: 100%;
    height: 100%;
}

/* --- Panel Kiri (Makkah) --- */
#makkah-panel {
    width: 35%; /* 1/3 Layar */
    border-right: 2px dashed rgba(255, 255, 255, 0.4); /* Garis vertikal pemisah */
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.makkah-title {
    color: #ffffff;
    font-size: 0.9em; /* Ukuran font dikecilkan */
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

#makkah-time {
    font-size: 3.5em; /* Ukuran font dikecilkan dari 5em */
    font-weight: bold;
    color: #ffffff;
    text-shadow: 2px 2px 5px rgba(255, 255, 255, 0);
    line-height: 1;
    margin-bottom: 5px;
}

#makkah-temp {
    font-size: 1.5em; /* Ukuran font dikecilkan */
    color: #ffffff;
    font-weight: bold;
}

/* --- Panel Kanan (Sepak Bola Slideshow) --- */
#sports-panel {
    width: 65%; /* 2/3 Layar */
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

#sports-content {
    transition: opacity 0.5s ease-in-out; /* Efek memudar saat skor berganti */
    text-align: center;
    width: 100%;
}

.match-teams {
    font-size: 1.5em; /* Ukuran nama tim disesuaikan (dikecilkan) */
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 2px 2px 5px rgba(255, 255, 255, 0);
}

.match-score {
    font-size: 1.5em; /* Ukuran skor */
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 5px; /* Jarak antara angka dan titik dua */
    background-color: rgba(0, 0, 0, 0.2); /* Kotak transparan sangat tipis agar skor fokus */
    padding: 10px 40px;
    border-radius: 12px;
    display: inline-block;
    border: 1px solid rgba(255,255,255,0.15); /* Efek garis kaca */
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Variasi warna tulisan VS */
.vs-text {
    color: #ffffff;
    font-size: 0.7em;
    vertical-align: middle;
    margin: 0 10px;
}

/* Media Query Khusus untuk Resolusi 3840x2160 */
@media (min-width: 1920px) {
    
    body {
        font-size: 1.5vw;
    }

    .container {
        padding: 1.5vw;
        gap: 1vw;
/*        grid-template-columns: none;*/
        height: 100vh;
        margin-bottom: 0.5vw;
    }

    .additional-info {
        height: 60vh;
        border-radius: 0.5vw;
    }
    
  .prayer-schedule {
        height: 30vh;
        padding: 0; /* Pastikan ini 0 agar kotak meluas maksimal */
        border-radius: 0;
    }

    .schedule {
        height: 60vh;
        text-align: center;
        padding: 1vw;
        border-radius: 0.5;
    }
    
    .announcements {
        height: 30vh;
        border-radius: 0.5vw;
    }

    h2 {
        font-size: 2vw;
        margin-bottom: 0.5vw;
    }

    .prayer-schedule .times {
        gap: 1vw; /* Jarak antar kotak sedikit lebih lebar di layar besar */
    }

    .prayer-time {
        padding: 0;
        border-radius: 0.5vw;
        height: auto;
    }

   .prayer-time div:first-child {
        font-size: 1.1vw;
        min-width: 3vw;
    }

    .shalat {
        font-size: 4vw; /* Menggunakan ukuran relatif layar agar tetap proporsional */
    }
   
}

    .announcements th, 
    .announcements td {
        font-size: 1vw;
        padding: 0.5vw;
    }

    .no-announcement-message {
        font-size: 1.5vw;
    }

    .media-image,
    .media-video,
    .yt-video {
        max-width: 95%;
        max-height: 95%;
    }

