/* =====================================================
   DZIKIR PRIBADI
   STYLE.CSS
   Modern Mobile UI
===================================================== */

:root {
    --primary: #12c48b;
    --primary-dark: #0ea374;
    --bg: #eef5f3;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-solid: #ffffff;
    --text: #1b1b1b;
    --text-soft: #707070;
    --border: rgba(255, 255, 255, 0.35);
    --shadow: 0 12px 35px rgba(0, 0, 0, 0.10);
    --radius: 22px;
    --header-height: 72px;
    --bottom-height: 82px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: url("../assets/images/background.jpg") center center/cover fixed;
    color: var(--text);
    min-height: 100vh;
}

/* overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(8px);
    z-index: -1;
}

/* ======================= CONTAINER UTAMA ======================= */
main {
    max-width: 600px;
    margin: auto;
    padding: calc(var(--header-height) + 20px) 18px calc(var(--bottom-height) + 30px);
}

/* ======================= HEADER / TOPBAR ======================= */
.topbar {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between; /* Mendorong logo ke kiri dan ikon ke kanan */
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    z-index: 999;
}

.topbar.scrolled {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(25px);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #0b6847;
}

.logo-area img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

/* Kumpulan Ikon & Pencarian di Kanan */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Tombol Ikon Bundar (Search, Moon, User) */
.icon-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: white;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    position: relative;
    z-index: 2; /* Memastikan tombol selalu di atas */
}

.icon-btn:hover {
    transform: translateY(-2px);
}

/* Animasi Expandable Search */
.search-container {
    display: flex;
    align-items: center;
    position: relative;
}

.search-input {
    width: 44px; /* Lebar awal mengikuti lebar tombol */
    height: 44px;
    opacity: 0;
    padding: 0;
    border: none;
    border-radius: 30px;
    background: #ffffff;
    box-shadow: var(--shadow);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    right: 0; /* Input akan memanjang ke arah kiri dari tombol */
    pointer-events: none;
    z-index: 1;
}

/* Kondisi saat ikon kaca pembesar diklik */
.search-input.active {
    width: 200px; /* Lebar pencarian saat terbuka */
    opacity: 1;
    padding: 0 45px 0 15px; /* Area kanan dikosongkan agar teks tidak tertutup ikon */
    pointer-events: auto;
}

/* ======================= HERO & CLOCK ======================= */
.hero {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 28px;
}

.hero-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(18, 196, 139, 0.25);
}

.hero h1 {
    margin-top: 15px;
    font-size: 26px;
    font-weight: 700;
}

.clock {
    margin-top: 18px;
    background: var(--surface);
    border-radius: 20px;
    padding: 18px;
    backdrop-filter: blur(15px);
    box-shadow: var(--shadow);
}

#clock {
    font-size: 42px;
    font-weight: 700;
    color: var(--primary-dark);
}

#date {
    margin-top: 8px;
    color: var(--text-soft);
}

.greeting {
    margin-top: 12px;
    color: #12c48b;
    font-weight: 600;
    font-size: 15px;
}

#hijriDate {
    margin-top: 8px;
    font-size: 13px;
    color: #8d8d8d;
}

/* ======================= MENU GRID ======================= */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.card {
    text-decoration: none;
    color: inherit;
    background: var(--surface);
    backdrop-filter: blur(18px);
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    /* Initial state for animation */
    opacity: 0;
    transform: translateY(25px);
    transition: 0.45s;
}

.card.show {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    transform: translateY(-6px);
}

.card i {
    font-size: 34px;
    color: var(--primary);
    margin-bottom: 18px;
}

.card h3 {
    font-size: 17px;
    margin-bottom: 6px;
}

.card p {
    font-size: 13px;
    color: var(--text-soft);
}

/* ======================= BOTTOM NAVIGATION ======================= */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    height: var(--bottom-height);
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(25px);
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    z-index: 999;
}

.bottom-nav a {
    text-decoration: none;
    color: #7d7d7d;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    transition: 0.25s;
}

.bottom-nav a i {
    font-size: 22px;
}

.bottom-nav a.active {
    color: var(--primary);
}

/* ======================= MODAL ======================= */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
}

.modal-content {
    width: 88%;
    max-width: 360px;
    background: white;
    border-radius: 22px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.modal-content h2 {
    margin-top: 18px;
    margin-bottom: 10px;
}

.modal-content p {
    color: #666;
    line-height: 1.6;
}

.modal-content button {
    margin-top: 25px;
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 14px;
    background: var(--primary);
    color: white;
    cursor: pointer;
}

/* ======================= TOAST & SCROLLBAR ======================= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: #b7d5cb;
    border-radius: 10px;
}

.empty-search {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 50px;
    color: #999;
}

.empty-search i {
    font-size: 60px;
    margin-bottom: 15px;
    opacity: 0.3;
}

.empty-search h3 {
    margin-bottom: 10px;
}

.empty-search p {
    font-size: 14px;
}

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(40px);
    background: #222;
    color: #fff;
    padding: 14px 20px;
    border-radius: 30px;
    opacity: 0;
    transition: 0.35s;
    z-index: 99999;
    font-size: 14px;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Ripple Effect for Buttons */
button {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 0.6s linear;
}

@keyframes ripple {
    to {
        transform: translate(-50%, -50%) scale(25);
        opacity: 0;
    }
}
