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

:root {
    /* Color Palette */
    --emerald-dark: #0f3d2e;
    --emerald-primary: #1b5e4a;
    --emerald-light: #2c8a6f;
    --emerald-soft: #eaf5f2;
    
    --gold-primary: #d4af37;
    --gold-glow: rgba(212, 175, 55, 0.15);
    --gold-gradient: linear-gradient(135deg, #f3e098 0%, #d4af37 50%, #aa8410 100%);
    --emerald-gradient: linear-gradient(135deg, #1b5e4a 0%, #0f3d2e 100%);
    
    --bg-primary: #faf8f5;
    --bg-secondary: #ffffff;
    --text-primary: #2d3e38;
    --text-secondary: #657570;
    --border-color: rgba(27, 94, 74, 0.08);
    --card-shadow: 0 10px 30px -5px rgba(27, 94, 74, 0.06);
    --card-shadow-hover: 0 20px 40px -5px rgba(27, 94, 74, 0.12);
}

[data-theme="dark"] {
    --bg-primary: #0b1a15;
    --bg-secondary: #112620;
    --text-primary: #f0f7f5;
    --text-secondary: #a3b8b1;
    --border-color: rgba(212, 175, 55, 0.1);
    --card-shadow: 0 10px 35px -10px rgba(0, 0, 0, 0.5);
    --card-shadow-hover: 0 20px 50px -10px rgba(212, 175, 55, 0.08);
    --emerald-soft: #16332a;
}

/* Base Styles */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0f3d2e;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content {
    text-align: center;
}

.islamic-star-loader {
    width: 60px;
    height: 60px;
    background: var(--gold-primary);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: rotateStar 2s infinite linear, scaleStar 2s infinite ease-in-out alternate;
}

@keyframes rotateStar {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes scaleStar {
    0% { transform: scale(0.8); }
    100% { transform: scale(1.2); }
}

/* Theme Toggle button */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--emerald-gradient);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(27, 94, 74, 0.3);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid var(--gold-primary);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 15px 30px rgba(27, 94, 74, 0.4);
}

/* Header & Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

[data-theme="dark"] .navbar {
    background-color: rgba(17, 38, 32, 0.85);
}

.navbar-brand img {
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.15));
}

/* Premium Gold Glow background style */
.gold-glow-bg {
    position: relative;
}

.gold-glow-bg::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, var(--gold-glow) 0%, rgba(255,255,255,0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 160px 0 100px 0;
    background: linear-gradient(185deg, var(--emerald-dark) 0%, #061f17 100%);
    color: white;
    text-align: center;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--bg-primary);
    clip-path: ellipse(60% 80% at 50% 100%);
    transition: background-color 0.4s ease;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background-image: radial-gradient(var(--gold-primary) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.hero-subtitle {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold-primary);
    margin-bottom: 20px;
    display: inline-block;
    padding: 6px 16px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 50px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #f1e4c3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.3));
}

.hero-desc {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px auto;
    color: rgba(255, 255, 255, 0.85);
}

/* Button Customizations */
.btn {
    border-radius: 50px;
    font-weight: 600;
    padding: 14px 30px;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.btn-gold {
    background: var(--gold-gradient);
    color: #0f3d2e !important;
    border: none;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.btn-outline-gold {
    border: 2px solid var(--gold-primary);
    color: var(--gold-primary);
    background: transparent;
}

.btn-outline-gold:hover {
    background: var(--gold-gradient);
    color: #0f3d2e !important;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

/* Cards & Components */
.section-title-container {
    text-align: center;
    margin-bottom: 50px;
}

.section-subtitle {
    color: var(--gold-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
}

.section-title {
    font-size: 2.25rem;
    color: var(--emerald-dark);
    margin-top: 10px;
    position: relative;
    display: inline-block;
}

[data-theme="dark"] .section-title {
    color: #ffffff;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--gold-gradient);
    margin: 15px auto 0 auto;
    border-radius: 10px;
}

/* Video Section wrapper */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.15);
    border: 4px solid var(--bg-secondary);
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Tentang Program Card */
.tentang-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    border-radius: 24px;
    padding: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tentang-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--gold-gradient);
}

/* Amalan Section Cards */
.amalan-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 35px 30px;
    height: 100%;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.amalan-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(212, 175, 55, 0.25);
}

.amalan-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, var(--gold-glow) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.amalan-card:hover::after {
    opacity: 1;
}

.amalan-icon-container {
    width: 60px;
    height: 60px;
    background-color: var(--emerald-soft);
    color: var(--emerald-primary);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    border: 1px solid rgba(27, 94, 74, 0.05);
}

[data-theme="dark"] .amalan-icon-container {
    color: var(--gold-primary);
}

.amalan-card:hover .amalan-icon-container {
    background: var(--emerald-gradient);
    color: var(--gold-primary);
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(27, 94, 74, 0.15);
}

/* Group & WhatsApp Cards */
.cta-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    height: 100%;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    position: relative;
}

.cta-card.featured {
    border: 2px solid var(--gold-primary);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.1);
}

.cta-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

/* Testimonials redesign (grid of elegant quotes) */
.testi-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px 30px 30px 30px;
    height: 100%;
    box-shadow: var(--card-shadow);
    position: relative;
    transition: all 0.3s ease;
}

.testi-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.testi-card::before {
    content: '“';
    position: absolute;
    top: 15px;
    left: 25px;
    font-size: 5rem;
    font-family: 'Playfair Display', serif;
    color: var(--gold-glow);
    line-height: 1;
}

.testi-text {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.testi-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testi-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold-primary);
}

.testi-name {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.testi-batch {
    font-size: 0.8rem;
    color: var(--gold-primary);
    font-weight: 600;
}

/* Stats Cards */
.stat-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold-primary);
}

.stat-val {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--emerald-primary);
    background: var(--emerald-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .stat-val {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Footer Section */
footer {
    background: linear-gradient(180deg, #0e1e19 0%, #06100c 100%) !important;
    border-top: 3px solid var(--gold-primary) !important;
}

footer a.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    color: var(--gold-primary);
    font-size: 1.25rem;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid rgba(212, 175, 55, 0.15);
}

footer a.social-link:hover {
    background: var(--gold-gradient);
    color: #0f3d2e !important;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* Scrollbar adjustment */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--emerald-primary);
    border-radius: 10px;
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--emerald-light);
}

/* Mobile Responsiveness Improvements */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-desc {
        font-size: 1.1rem;
    }
    .tentang-card {
        padding: 30px;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-section {
        padding: 120px 0 80px 0;
    }
    .btn {
        width: 100%;
    }
    .testi-card {
        padding: 30px 20px 20px 20px;
    }
}
