/* 
 * Pondok Pesantren Modern Al-Hidayah
 * Custom Stylesheet for Modern & Premium Look
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

:root {
    --primary: #064e3b;          /* Deep Emerald */
    --primary-light: #0d9488;    /* Teal Accent */
    --secondary: #10b981;        /* Mint Green */
    --accent: #d4af37;           /* Warm Gold */
    --accent-dark: #b8901c;      /* Darker Gold */
    --bg-light: #f4f8f6;         /* Soft Green-Gray Background */
    --bg-white: #ffffff;
    --text-dark: #1e293b;        /* Slate Dark */
    --text-muted: #64748b;       /* Slate Muted */
    --text-light: #f8fafc;
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 10px 30px rgba(6, 78, 59, 0.04);
    --shadow-lg: 0 20px 40px rgba(6, 78, 59, 0.08);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* Floating Glass Navbar */
.glass-navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px) saturate(190%);
    -webkit-backdrop-filter: blur(12px) saturate(190%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.4s ease;
}

.glass-navbar .navbar-brand {
    font-size: 1.4rem;
    letter-spacing: 0.5px;
    transition: transform 0.3s;
}

.glass-navbar .navbar-brand:hover {
    transform: scale(1.02);
}

.glass-navbar .nav-link {
    color: var(--text-dark) !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 16px !important;
    position: relative;
    transition: color 0.3s;
}

.glass-navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.glass-navbar .nav-link:hover::after,
.glass-navbar .nav-link.active::after {
    width: 60%;
}

.glass-navbar .nav-link:hover,
.glass-navbar .nav-link.active {
    color: var(--primary) !important;
}

/* Buttons */
.btn-primary-modern {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--text-light) !important;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 32px;
    border: none;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(6, 78, 59, 0.15);
    transition: all 0.3s ease;
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(6, 78, 59, 0.3);
}

.btn-accent-modern {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--primary) !important;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 32px;
    border: none;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
    transition: all 0.3s ease;
}

.btn-accent-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.35);
}

.btn-outline-modern {
    background: transparent;
    color: var(--primary) !important;
    border: 2px solid var(--primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-outline-modern:hover {
    background: var(--primary);
    color: var(--text-light) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(6, 78, 59, 0.15);
}

/* Custom Dividers */
.divider-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px auto 35px auto;
}

.divider-line {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--accent), transparent);
    width: 80px;
}

.divider-icon {
    color: var(--accent);
    font-size: 1rem;
}

/* Section Headings */
.section-tag {
    font-family: 'Plus Jakarta Sans', sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: 2px;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 8px;
}

.section-title-modern {
    font-size: 2.75rem;
    color: var(--primary);
    margin-bottom: 15px;
}

/* Modern Card */
.card-modern {
    background: var(--bg-white);
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
}

.card-modern:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(6, 78, 59, 0.08);
}

/* Hero Section Modern */
.hero-modern {
    position: relative;
    background: linear-gradient(145deg, rgba(4, 47, 36, 0.8) 0%, rgba(6, 78, 59, 0.85) 100%), 
                url('https://images.unsplash.com/photo-1590076214667-cda933b9347d?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    min-height: 95vh;
    display: flex;
    align-items: center;
    color: white;
    padding: 100px 0;
    overflow: hidden;
}

.hero-modern::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-badge {
    background: rgba(212, 175, 55, 0.12);
    color: var(--accent);
    border: 1px solid rgba(212, 175, 55, 0.25);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    display: inline-block;
    backdrop-filter: blur(8px);
    margin-bottom: 25px;
}

.hero-modern h1 {
    font-size: 4rem;
    line-height: 1.15;
    margin-bottom: 25px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.hero-modern p.lead {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 650px;
}

/* Kyai Profile Card */
.kyai-profile-card {
    background: white;
    border-radius: 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.02);
    padding: 50px;
    position: relative;
    overflow: hidden;
}

.kyai-profile-card::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.kyai-image-wrapper {
    position: relative;
    display: inline-block;
    padding: 12px;
    margin-bottom: 25px;
}

.kyai-image-wrapper img {
    width: 240px;
    height: 240px;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    border: 6px solid white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.kyai-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 2px dashed var(--accent);
    border-radius: 50%;
    animation: rotate-dashed 30s linear infinite;
    z-index: 1;
}

@keyframes rotate-dashed {
    100% { transform: rotate(360deg); }
}

.quote-classic {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: var(--primary);
    border-left: 4px solid var(--accent);
    padding-left: 20px;
    margin: 25px 0;
    font-size: 1.15rem;
    background: rgba(6, 78, 59, 0.02);
    padding: 15px 20px;
    border-radius: 0 12px 12px 0;
}

/* Gallery Card Modern */
.gallery-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    height: 340px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255,255,255,0.2);
    display: block;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(4, 47, 36, 0.92) 0%, rgba(4, 47, 36, 0.4) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    opacity: 0;
    transition: all 0.4s ease;
    color: white;
}

.gallery-overlay i {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 12px;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.gallery-overlay h5 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    transform: translateY(20px);
    transition: all 0.4s ease 0.05s;
}

.gallery-overlay p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
    margin: 0;
    transform: translateY(20px);
    transition: all 0.4s ease 0.1s;
}

.gallery-card:hover img {
    transform: scale(1.08);
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-card:hover .gallery-overlay i,
.gallery-card:hover .gallery-overlay h5,
.gallery-card:hover .gallery-overlay p {
    transform: translateY(0);
}

/* Visi Misi Card */
.value-card {
    background: rgba(255,255,255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 35px;
    height: 100%;
    transition: all 0.3s ease;
}

.value-card:hover {
    background: rgba(255,255,255, 0.12);
    transform: translateY(-5px);
}

.icon-box-gold {
    width: 60px;
    height: 60px;
    background: rgba(212, 175, 55, 0.15);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 20px;
    border: 1px solid rgba(212, 175, 55, 0.25);
}

/* Agenda list item */
.agenda-item {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.agenda-item:hover {
    transform: translateX(8px);
    border-color: rgba(6, 78, 59, 0.15) !important;
    box-shadow: var(--shadow-sm) !important;
}

.agenda-date-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 5px 15px rgba(6, 78, 59, 0.12);
}

/* Footer modern styles */
.footer-modern {
    background-color: #03251c;
    color: rgba(255,255,255,0.7);
    padding: 80px 0 30px 0;
    font-size: 0.95rem;
    position: relative;
}

.footer-modern::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary-light), var(--accent), var(--secondary));
}

.footer-modern h5 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-modern h5::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent);
}

.footer-link {
    color: rgba(255,255,255,0.7) !important;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    margin-bottom: 12px;
}

.footer-link:hover {
    color: var(--accent) !important;
    transform: translateX(5px);
}

.social-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.social-circle:hover {
    background: var(--accent);
    color: #03251c !important;
    transform: translateY(-3px);
}

/* Responsive Media Queries */
@media (max-width: 991.98px) {
    .hero-modern h1 {
        font-size: 2.75rem;
    }
    .section-title-modern {
        font-size: 2.25rem;
    }
    .kyai-profile-card {
        padding: 30px;
    }
}

.wa-container { position: fixed; bottom: 30px; right: 30px; z-index: 9999; }
.wa-btn {
    width: 65px; height: 65px; background: #25d366; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 30px; cursor: pointer; box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
    border: none; transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.wa-btn:hover { transform: scale(1.1); box-shadow: 0 10px 25px rgba(37, 211, 102, 0.6); }

.wa-menu {
    display: none; position: absolute; bottom: 85px; right: 0;
    width: 280px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3); border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15); overflow: hidden;
}
.wa-header { 
    background: #25d366; color: white; padding: 18px; 
    font-weight: bold; text-align: center; font-size: 15px;
}
.wa-link { 
    display: flex; align-items: center; padding: 15px 20px; 
    text-decoration: none; color: #444; border-bottom: 1px solid #f0f0f0;
    transition: 0.3s;
}
.wa-link:hover { background: #f8f9fa; color: #25d366; }
.wa-link i { font-size: 22px; color: #25d366; margin-right: 18px; }
.wa-link small { color: #888; font-size: 11px; display: block; }

.carousel-control-prev, .carousel-control-next {
    width: 50px;
    opacity: 1;
}
.carousel-control-prev { left: -60px; }
.carousel-control-next { right: -60px; }

/* Menyesuaikan jarak jika layar kecil */
@media (max-width: 992px) {
    .carousel-control-prev { left: 0; }
    .carousel-control-next { right: 0; }
}

@media (max-width: 767px) {
    /* Hanya tampilkan 1 item per slide di HP */
    .carousel-item .row .col-md-4 {
        display: none; /* Sembunyikan semua kolom dulu */
    }
    
    .carousel-item .row .col-md-4:first-child {
        display: block; /* Hanya tampilkan item pertama */
        width: 100%;    /* Paksa lebar jadi 100% */
    }
}

/* ==========================================================================
   Dark Mode & Light Mode Styles (Bootstrap 5.3 data-bs-theme)
   ========================================================================== */

/* Variables for Dark Theme */
[data-bs-theme="dark"] {
    --primary: #10b981;          /* Lighter emerald for dark mode */
    --primary-light: #14b8a6;    /* Teal */
    --secondary: #34d399;        /* Mint Green */
    --accent: #ffd700;           /* Brighter Gold */
    --accent-dark: #f59e0b;
    --bg-light: #0f172a;         /* Slate 900 */
    --bg-white: #1e293b;         /* Slate 800 */
    --text-dark: #f8fafc;        /* Slate 50 */
    --text-muted: #94a3b8;       /* Slate 400 */
    --text-light: #f8fafc;
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
    
    color-scheme: dark;
}

/* Bootstrap Utility Classes Override under Dark Theme */
[data-bs-theme="dark"] .bg-white {
    background-color: var(--bg-white) !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: var(--bg-light) !important;
}

[data-bs-theme="dark"] .text-dark {
    color: var(--text-dark) !important;
}

[data-bs-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

/* Border overrides under Dark Theme */
[data-bs-theme="dark"] .border,
[data-bs-theme="dark"] .border-top,
[data-bs-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-start,
[data-bs-theme="dark"] .border-end {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Component specific overrides */
[data-bs-theme="dark"] body {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

[data-bs-theme="dark"] .glass-navbar {
    background: rgba(30, 41, 59, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .glass-navbar .nav-link {
    color: var(--text-dark) !important;
}

[data-bs-theme="dark"] .glass-navbar .nav-link:hover,
[data-bs-theme="dark"] .glass-navbar .nav-link.active {
    color: var(--primary) !important;
}

[data-bs-theme="dark"] .glass-navbar .navbar-toggler-icon {
    filter: invert(1);
}

/* Card components */
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .card-modern,
[data-bs-theme="dark"] .registration-card,
[data-bs-theme="dark"] .content-card,
[data-bs-theme="dark"] .kyai-profile-card {
    background-color: var(--bg-white) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: var(--shadow-md) !important;
}

[data-bs-theme="dark"] .kyai-image-wrapper img {
    border-color: var(--bg-white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .kyai-profile-card::before {
    background: rgba(212, 175, 55, 0.02);
}

[data-bs-theme="dark"] .quote-classic {
    background: rgba(16, 185, 129, 0.05);
    color: var(--primary);
}

/* Page content wrappers */
[data-bs-theme="dark"] .page-content-wrapper {
    background: linear-gradient(to bottom, var(--bg-white) 0%, var(--bg-light) 100%) !important;
}

[data-bs-theme="dark"] .content-image-wrapper img {
    border-color: var(--bg-white);
}

/* Widgets & Sholat Section */
[data-bs-theme="dark"] section.z-3 .card {
    background: rgba(30, 41, 59, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(10px);
}

[data-bs-theme="dark"] .prayer-card {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

[data-bs-theme="dark"] .prayer-card.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
}

[data-bs-theme="dark"] .border-end-lg {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Agenda specific */
[data-bs-theme="dark"] .agenda-item {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .agenda-item:hover {
    border-color: rgba(16, 185, 129, 0.3) !important;
}

/* Visi & Misi section */
[data-bs-theme="dark"] #visi-misi {
    background: linear-gradient(135deg, #090d16 0%, #1e293b 100%) !important;
}

[data-bs-theme="dark"] #visi-misi .card {
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

/* WhatsApp float styles */
[data-bs-theme="dark"] .wa-menu {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .wa-link {
    color: var(--text-dark);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .wa-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .wa-link small {
    color: var(--text-muted);
}

/* Table styles inside contents */
[data-bs-theme="dark"] .content-body table {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .content-body table th,
[data-bs-theme="dark"] .content-body table td {
    border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .content-body table tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

[data-bs-theme="dark"] .content-body table tr:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

/* SweetAlert overrides in dark mode */
[data-bs-theme="dark"] .swal2-popup {
    background-color: var(--bg-white) !important;
    color: var(--text-dark) !important;
}

[data-bs-theme="dark"] .swal2-title,
[data-bs-theme="dark"] .swal2-content,
[data-bs-theme="dark"] .swal2-html-container {
    color: var(--text-dark) !important;
}

/* Floating Theme Toggle Style */
.theme-toggle-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    width: 65px;
    height: 65px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--primary);
}

.theme-toggle-float:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.theme-toggle-float i {
    font-size: 24px;
    transition: transform 0.4s ease;
}

[data-bs-theme="dark"] .theme-toggle-float {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
    color: #ffd700;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}


