/* ========== RESET & BASE ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #F5F5F0;
    color: #1A1A1A;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a,
a:hover,
a:visited,
a:active {
  text-decoration: none;
}

/* ========== HEADER ========== */
.header {
    background: linear-gradient(135deg, #1B5E20, #2E7D32);
    color: white;
    padding: 16px 16px 16px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.header-content {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.header-title {
    font-size: 18px;
    font-weight: 700;
}

.header-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

/* ========== MAIN CONTENT ========== */
.main-content {
    max-width: 480px;
    margin: 0 auto;
    padding: 12px 16px 80px;
}

/* ========== PAGES ========== */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== CAROUSEL ========== */
.carousel-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    aspect-ratio: 16 / 9;
}

.carousel-track {
    display: flex;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 16px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.2), transparent);
    color: white;
}

.carousel-overlay h2 {
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.carousel-overlay p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.dot.active {
    background: #FFD54F;
    width: 24px;
}

/* ========== QUICK MENU ========== */
.quick-menu {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.quick-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: white;
    border-radius: 12px;
    padding: 12px 4px;
    border: none;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
}

.quick-menu-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.quick-menu-item:active {
    transform: translateY(0);
}

.quick-icon {
    font-size: 24px;
}

.quick-label {
    font-size: 10px;
    font-weight: 600;
    color: #555;
    text-align: center;
    line-height: 1.2;
}

/* ========== CARDS ========== */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-bottom: 16px;
}

.card.no-padding {
    padding: 0;
}

.card-header-green {
    background: linear-gradient(135deg, #1B5E20, #2E7D32);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header-green h3 {
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.card-header-white {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.card-header-white h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1A1A1A;
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    color: #1A1A1A;
    padding: 16px 16px 12px;
}

.star-icon {
    font-size: 16px;
}

/* ========== ICONS ========== */
.icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.mini-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ========== PRAYER TIMES ========== */
.prayer-list {
    padding: 0;
}

.prayer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}

.prayer-item:last-child {
    border-bottom: none;
}

.prayer-item:hover {
    background: rgba(27, 94, 32, 0.03);
}

.prayer-name {
    font-size: 14px;
    font-weight: 500;
    color: #444;
}

.prayer-time {
    font-size: 14px;
    font-weight: 700;
    color: #1B5E20;
}

/* ========== HADITS ========== */
.hadits-card {
    background: linear-gradient(135deg, #1B5E20, #2E7D32);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(27, 94, 32, 0.2);
}

.hadits-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.hadits-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.hadits-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    font-style: italic;
}

.hadits-source {
    font-size: 12px;
    color: #FFD54F;
    font-weight: 600;
    margin-top: 8px;
}

/* ========== UPCOMING EVENTS ========== */
.upcoming-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upcoming-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.date-badge {
    background: #E8F5E9;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    min-width: 48px;
    flex-shrink: 0;
}

.date-day {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #1B5E20;
}

.date-month {
    display: block;
    font-size: 10px;
    color: #2E7D32;
}

.upcoming-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1A1A1A;
}

.upcoming-item p {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

/* ========== PAGE HEADER ========== */
.page-header {
    background: linear-gradient(135deg, #1B5E20, #2E7D32);
    color: white;
    padding: 16px;
    border-radius: 12px;
    margin: -12px -16px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.page-header p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 2px;
}

.page-header .icon {
    width: 20px;
    height: 20px;
}

/* ========== KEGIATAN CARDS ========== */
.kegiatan-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}

.kegiatan-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.kegiatan-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 8px 0;
}

.kegiatan-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.kegiatan-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.6;
    margin-bottom: 12px;
}

.kegiatan-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #555;
}

/* ========== BADGES ========== */
.badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.badge-green { background: #E8F5E9; color: #2E7D32; }
.badge-blue { background: #E3F2FD; color: #1565C0; }
.badge-purple { background: #F3E5F5; color: #7B1FA2; }
.badge-orange { background: #FFF3E0; color: #E65100; }
.badge-pink { background: #FCE4EC; color: #C2185B; }
.badge-amber { background: #FFF8E1; color: #FF8F00; }

/* ========== INFO PAGE ========== */
.info-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 16px 8px;
}

.info-section-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1A1A1A;
}

.info-icon-circle {
    width: 32px;
    height: 32px;
    background: #E8F5E9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.info-text {
    font-size: 12px;
    color: #555;
    line-height: 1.7;
    padding: 4px 16px 16px;
}

/* ========== CONTACT ========== */
.contact-list {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.contact-icon-circle {
    width: 32px;
    height: 32px;
    background: #E8F5E9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.contact-label {
    font-size: 12px;
    font-weight: 600;
    color: #444;
}

.contact-value {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

/* ========== PENGURUS ========== */
.pengurus-list {
    padding: 4px 16px 16px;
}

.pengurus-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.pengurus-item:last-child {
    border-bottom: none;
}

.pengurus-name {
    font-size: 12px;
    font-weight: 600;
    color: #444;
}

.pengurus-role {
    font-size: 10px;
    background: #E8F5E9;
    color: #1B5E20;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

/* ========== PENGUMUMAN ========== */
.pengumuman-list {
    padding: 0;
}

.pengumuman-item {
    padding: 16px;
    border-bottom: 1px solid #f5f5f5;
}

.pengumuman-item:last-child {
    border-bottom: none;
}

.pengumuman-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1A1A1A;
    margin-bottom: 2px;
}

.pengumuman-date {
    font-size: 10px;
    color: #2E7D32;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.pengumuman-item p {
    font-size: 12px;
    color: #888;
    line-height: 1.6;
}

/* ========== DONASI ========== */
.donasi-card {
    background: linear-gradient(135deg, #1B5E20, #2E7D32);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(27, 94, 32, 0.2);
}

.donasi-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.donasi-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.donasi-item:last-child {
    margin-bottom: 0;
}

.donasi-bank {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.donasi-number {
    font-size: 16px;
    font-weight: 700;
    color: #FFD54F;
    margin: 2px 0;
}

.donasi-name {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

/* ========== BOTTOM NAVIGATION ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1B5E20;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 50;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 480px;
    margin: 0 auto;
    height: 64px;
    width: 360px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
    padding: 8px 16px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.nav-item.active {
    color: #FFD54F;
    transform: scale(1.05);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 32px;
    height: 2px;
    background: #FFD54F;
    border-radius: 1px;
}

.nav-icon {
    width: 20px;
    height: 20px;
}

.nav-item span {
    font-size: 11px;
    font-weight: 600;
}

.nav-item.active span {
    font-weight: 700;
}

.bottom-nav .nav-item a {
    color: inherit;
    text-decoration: none;
}
.bottom-nav .nav-item a:visited {
    color: inherit;
}
.bottom-nav .nav-item a:hover {
    color: inherit;
}
.bottom-nav .nav-item a:active {
    color: inherit;
}

/* ========== RESPONSIVE ========== */
@media (min-width: 481px) {
    .bottom-nav {
        /* Samakan dengan lebar konten dalam main-content (480px - padding 16px kiri/kanan) */
        max-width: calc(480px - 32px);
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        border-radius: 16px 16px 0 0;
    }

    .header {
        display: flex;
        justify-content: center;
    }

    .header-content {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .quick-menu {
        gap: 6px;
    }

    .quick-menu-item {
        padding: 10px 2px;
    }

    .quick-icon {
        font-size: 20px;
    }

    .quick-label {
        font-size: 9px;
    }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

/* ========== TOUCH FEEDBACK ========== */
.quick-menu-item:active,
.kegiatan-card:active,
.nav-item:active {
    opacity: 0.8;
}
