/* ==========================================================================
   DESIGN SYSTEM & CUSTOM VARIABLES
   ========================================================================== */
:root {
    /* Colors - Deep Emerald and Glowing Lime Theme */
    --bg-primary: #020a07;
    --bg-secondary: #041610;
    --bg-darker: #010604;
    
    --primary: #0b412e;
    --primary-light: #125e43;
    --primary-dark: #062b1e;
    
    --accent: #b5e61d; /* Lime/Yellow-Green from Ref Image 1 */
    --accent-hover: #c6ff00;
    --accent-glow: rgba(181, 230, 29, 0.4);
    
    --gold: #dfb72c;
    --gold-glow: rgba(223, 183, 44, 0.3);
    
    --text-primary: #ffffff;
    --text-secondary: #9cbcae;
    --text-muted: #628375;
    
    /* Layout Constants */
    --navbar-height: 80px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    
    /* Glassmorphism Defaults */
    --glass-bg: rgba(6, 26, 18, 0.45);
    --glass-border: rgba(181, 230, 29, 0.12);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: blur(12px);
    
    /* Font Families */
    --font-sans: 'Outfit', sans-serif;
    --font-arabic: 'Amiri', serif;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-primary);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   TYPOGRAPHY & GLOBAL STYLES
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 100px 0;
}

.bg-darker {
    background-color: var(--bg-darker);
}

.text-accent {
    color: var(--accent);
}

.text-gradient {
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header {
    margin-bottom: 60px;
}

.section-subtitle {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.section-separator {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), transparent);
    margin: 0 auto 20px;
    border-radius: 2px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}



.glass-panel:hover {
    border-color: rgba(181, 230, 29, 0.3);
    box-shadow: 0 12px 40px 0 rgba(181, 230, 29, 0.08);
    transform: translateY(-5px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    gap: 10px;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 6px 20px rgba(181, 230, 29, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--accent);
}

.btn-outline:hover {
    background-color: var(--accent);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* Galeri Horizontal Carousel Styles */
.galeri-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 48px;
}

.galeri-carousel-container {
    overflow: hidden;
    flex: 1;
    padding: 8px 0;
}

.galeri-carousel-track {
    display: flex;
    gap: 24px;
    transition: transform 0.6s ease-in-out;
}

.galeri-item {
    flex: 0 0 calc((100% - 72px) / 4); /* 4 items with 3 gaps of 24px */
    position: relative;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    aspect-ratio: 1;
    border-radius: 16px; /* Rounded corners */
    background-color: #041610; /* Match the theme background */
    transition: transform 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
}

.galeri-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--accent-glow);
    z-index: 1;
}

.galeri-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px; /* Rounded corners for the image */
    transition: transform 0.5s ease-in-out;
}

.galeri-item:hover .galeri-thumbnail {
    transform: scale(1.15); /* Zoom in on hover without breaking grid */
}

.galeri-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.galeri-item:hover .galeri-overlay {
    opacity: 1;
}

.galeri-overlay i {
    font-size: 2rem;
    color: var(--accent);
    transition: transform 0.4s ease-in-out;
}

.galeri-item:hover .galeri-overlay i {
    transform: scale(1.2);
}

.galeri-carousel-btn {
    background-color: var(--accent);
    color: var(--bg-primary);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.4s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.galeri-carousel-btn:hover {
    background-color: var(--accent-hover);
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -60px;
    right: 0;
    background-color: var(--accent);
    color: var(--bg-primary);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background-color: var(--accent-hover);
    transform: scale(1.1);
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--accent);
    color: var(--bg-primary);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.lightbox-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px var(--accent-glow);
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

/* Responsive Galeri */
@media (max-width: 1024px) {
    .galeri-item {
        flex: 0 0 calc((100% - 48px) / 3); /* 3 items with 2 gaps of 24px */
    }
}

@media (max-width: 768px) {
    .galeri-item {
        flex: 0 0 calc((100% - 24px) / 2); /* 2 items with 1 gap of 24px */
    }

    .galeri-carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        top: -50px;
    }
}

@media (max-width: 480px) {
    .galeri-item {
        flex: 0 0 100%; /* 1 item */
    }
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ==========================================================================
   CUSTOM CURSOR & BACKGROUND BLOBS
   ========================================================================== */
.custom-cursor {
    width: 24px;
    height: 24px;
    background: transparent;
    border: 2px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
    transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
}

.custom-cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
}

/* Custom Cursor Hover State */
.custom-cursor.hovered {
    width: 40px;
    height: 40px;
    background-color: rgba(181, 230, 29, 0.15);
    border-color: var(--accent-hover);
}

@media (max-width: 1024px) {
    .custom-cursor, .custom-cursor-dot {
        display: none; /* Disable custom cursor on touch devices */
    }
}

/* Background Glow Blobs (Ref Image 1 & 2 vibe) */
.glow-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    z-index: -2;
    pointer-events: none;
    animation: blobFloat 20s infinite alternate;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: var(--accent);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: var(--primary-light);
    bottom: 10%;
    right: -200px;
    animation-delay: 2s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: var(--gold);
    top: 40%;
    left: 20%;
    animation-delay: 4s;
    opacity: 0.08;
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(50px, -50px) scale(1.1);
    }
    100% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

/* ==========================================================================
   NAVIGATION HEADER
   ========================================================================== */
.navbar-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    background-color: rgba(2, 10, 7, 0.7);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(181, 230, 29, 0.05);
    z-index: 1000;
    transition: all 0.4s ease;
}

.navbar-header.scrolled {
    height: 70px;
    background-color: rgba(2, 10, 7, 0.9);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--border-radius-sm);
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--bg-primary);
    box-shadow: 0 0 15px rgba(181, 230, 29, 0.2);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1.1;
    color: var(--text-primary);
}

.brand-sub {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--accent);
}

.nav-menu ul {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    padding-top: calc(var(--navbar-height) + 40px);
    padding-bottom: 60px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(181, 230, 29, 0.08);
    border: 1px solid rgba(181, 230, 29, 0.2);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
    backdrop-filter: var(--glass-blur);
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
}

.hero-desc {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 540px;
}

.hero-taglines {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
    width: 100%;
    max-width: 500px;
}

.tagline-item {
    display: flex;
    align-items: center;
    gap: 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px 20px;
    border-radius: var(--border-radius-md);
    transition: all 0.3s ease;
}

.tagline-item:hover {
    background: rgba(181, 230, 29, 0.03);
    border-color: rgba(181, 230, 29, 0.15);
    transform: translateX(5px);
}

.tagline-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(181, 230, 29, 0.1);
    border: 1px solid rgba(181, 230, 29, 0.2);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.tagline-text h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.tagline-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.hero-actions {
    display: flex;
    gap: 16px;
}

/* ==========================================================================
   3D AL-QURAN OPENING ANIMATION (Hero Right)
   ========================================================================== */
.hero-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 500px;
}

.quran-wrapper {
    position: relative;
    width: 320px;
    height: 400px;
    perspective: 1500px;
}

/* Pedestal/Base beneath the floating Quran */
.quran-pedestal {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 24px;
    background: radial-gradient(ellipse at center, rgba(11, 65, 46, 0.6) 0%, rgba(2, 10, 7, 0) 70%);
    z-index: 1;
}

.pedestal-glow {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 40px;
    background: radial-gradient(ellipse at center, rgba(181, 230, 29, 0.3) 0%, rgba(181, 230, 29, 0) 75%);
    filter: blur(10px);
}

.pedestal-ring {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%) rotateX(80deg);
    width: 160px;
    height: 160px;
    border: 2px solid rgba(181, 230, 29, 0.2);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(181, 230, 29, 0.1), inset 0 0 20px rgba(181, 230, 29, 0.1);
    animation: ringSpin 10s infinite linear;
}

@keyframes ringSpin {
    0% { transform: translateX(-50%) rotateX(80deg) rotateZ(0deg); }
    100% { transform: translateX(-50%) rotateX(80deg) rotateZ(360deg); }
}

/* 3D Container & Book Elements */
.quran-container {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    z-index: 3;
    animation: quranFloat 6s infinite ease-in-out;
}

@keyframes quranFloat {
    0% { transform: translateY(0) rotateX(25deg) rotateY(-10deg); }
    50% { transform: translateY(-15px) rotateX(20deg) rotateY(-5deg); }
    100% { transform: translateY(0) rotateX(25deg) rotateY(-10deg); }
}

.quran-3d {
    width: 220px;
    height: 300px;
    position: absolute;
    top: 50px;
    left: 50px;
    transform-style: preserve-3d;
    transform-origin: center center;
    transition: transform 1.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* All components hinged at left-edge center (50% of the book width) */
.quran-cover, .quran-page, .quran-page-base {
    position: absolute;
    top: 0;
    left: 50%;
    width: 100%;
    height: 100%;
    transform-origin: left center;
    transition: transform 1.8s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 1.8s ease;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Covers (Front and Back) */
.quran-cover {
    border-radius: 4px 10px 10px 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #05261b 0%, #03150f 100%);
    border: 1px solid rgba(223, 183, 44, 0.2);
}

.quran-cover.back {
    transform: translateZ(-12px) rotateY(0deg);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.7);
}

.quran-cover.front {
    transform: translateZ(0px) rotateY(0deg);
    z-index: 10;
}

/* Front Cover Graphic Design */
.cover-front-outer {
    padding: 12px;
    height: 100%;
    width: 100%;
    border-radius: inherit;
}

.cover-border {
    border: 3px double var(--gold);
    height: 100%;
    width: 100%;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    position: relative;
}

.cover-center-ornament {
    width: 70px;
    height: 70px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: var(--gold);
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 0 10px var(--gold-glow);
}

.cover-center-ornament::before {
    content: '';
    position: absolute;
    width: 82%;
    height: 82%;
    border: 1px dashed var(--gold);
    border-radius: 50%;
}

.cover-title {
    font-family: var(--font-arabic);
    color: var(--gold);
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 0.5px;
}

/* Quran Pages Base Thickness */
.quran-page-base {
    background-color: #f7f3e3;
    border-right: 2px solid #dfd8bb;
    box-shadow: inset 5px 0 15px rgba(0,0,0,0.1);
}

.quran-page-base.left {
    transform: translateZ(-8px) rotateY(0deg);
    width: 98%;
}

.quran-page-base.right {
    transform: translateZ(-4px) rotateY(0deg);
    width: 99%;
}

/* Inside Quran Pages content layers */
.quran-page {
    background-color: #fbf9f1;
    border-radius: 2px 8px 8px 2px;
    overflow: hidden;
}

.quran-page.left-page {
    transform: translateZ(-2px) rotateY(0deg);
    z-index: 5;
}

.quran-page.right-page {
    transform: translateZ(-1px) rotateY(0deg);
    z-index: 6;
}

.quran-page .page-content {
    padding: 20px;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(223, 183, 44, 0.15);
    margin: 2px;
    border-radius: inherit;
    position: relative;
}

/* Beautiful Arabesque Frames inside pages */
.arabic-frame {
    border: 1px solid #c8a24c;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, #ffffff 0%, #fbfaf5 100%);
    box-shadow: inset 0 0 10px rgba(200, 162, 76, 0.1);
}

.arabic-text {
    font-family: var(--font-arabic);
    color: #3a2e1d;
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.arabic-verse {
    font-family: var(--font-arabic);
    color: #8c1d1d;
    font-size: 1.5rem;
    line-height: 1.4;
    margin-bottom: 12px;
    font-weight: bold;
}

.verse-translation {
    font-size: 0.65rem;
    color: #6d5b46;
    line-height: 1.3;
    font-style: italic;
}

.arabic-text-header {
    font-family: var(--font-arabic);
    color: #c8a24c;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.decorative-ornament {
    color: #c8a24c;
    font-size: 1rem;
    margin-bottom: 15px;
}

.arabic-verse-large {
    font-family: var(--font-arabic);
    font-size: 2.1rem;
    color: #1b5338;
    margin-bottom: 8px;
    font-weight: bold;
}

.verse-sub {
    font-size: 0.65rem;
    font-weight: 600;
    color: #7b6d5b;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Magic Glowing Rays */
.quran-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.8s ease;
}

.ray {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 2px;
    background: radial-gradient(circle, rgba(181, 230, 29, 0.6) 0%, rgba(223, 183, 44, 0.4) 30%, rgba(2, 10, 7, 0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.ray-1 { width: 400px; height: 400px; }
.ray-2 { width: 500px; height: 500px; filter: blur(5px); }
.ray-3 { width: 300px; height: 300px; filter: blur(2px); }

/* ==========================================================================
   3D QURAN OPEN STATE
   ========================================================================== */
.quran-3d.open {
    /* lay book flat facing user */
    transform: rotateX(32deg) rotateY(0deg) translate3d(-110px, 0px, 10px);
}

/* Front cover swing left */
.quran-3d.open .quran-cover.front {
    transform: translateZ(5px) rotateY(-172deg);
    box-shadow: -15px 15px 30px rgba(0, 0, 0, 0.5);
}

/* Left content page swing left */
.quran-3d.open .quran-page.left-page {
    transform: translateZ(3px) rotateY(-162deg);
    box-shadow: -10px 10px 20px rgba(0, 0, 0, 0.3);
}

/* Base papers thickness split */
.quran-3d.open .quran-page-base.left {
    transform: translateZ(-4px) rotateY(-168deg);
}

/* Right content page swing right (slightly open angle) */
.quran-3d.open .quran-page.right-page {
    transform: translateZ(1px) rotateY(-12deg);
    box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.3);
}

.quran-3d.open .quran-page-base.right {
    transform: translateZ(-4px) rotateY(-6deg);
}

/* Back cover swing right */
.quran-3d.open .quran-cover.back {
    transform: translateZ(-10px) rotateY(0deg);
}

/* Reveal light rays on open */
.quran-3d.open ~ .quran-rays {
    opacity: 1;
}

.visual-interactive-tip {
    margin-top: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px 16px;
    border-radius: 20px;
    pointer-events: none;
    z-index: 5;
}

.animate-float {
    animation: floatArrow 1.5s infinite alternate;
}

@keyframes floatArrow {
    0% { transform: translateY(0); }
    100% { transform: translateY(-4px); }
}

/* ==========================================================================
   PROFIL (VISI & MISI) SECTION
   ========================================================================== */
.profil-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 32px;
    align-items: stretch;
}

.visi-card {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(181, 230, 29, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 24px;
    border: 1px solid rgba(181, 230, 29, 0.2);
}

.visi-text {
    font-size: 1.5rem;
    line-height: 1.5;
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
    z-index: 2;
}

.quote-bg {
    position: absolute;
    bottom: -30px;
    right: 20px;
    font-size: 12rem;
    font-weight: 800;
    color: rgba(181, 230, 29, 0.03);
    line-height: 1;
    font-family: Georgia, serif;
    pointer-events: none;
}

.misi-card {
    padding: 50px 40px;
}

.misi-list {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.misi-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.misi-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.misi-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 1px solid rgba(181, 230, 29, 0.2);
}

.misi-item p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==========================================================================
   PROGRAM UNGGULAN SECTION
   ========================================================================== */
.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.program-card {
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
}

.program-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--border-radius-sm);
    background: rgba(181, 230, 29, 0.08);
    border: 1px solid rgba(181, 230, 29, 0.15);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.program-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.program-sub {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 16px;
}

.program-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.program-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 12px;
}

.program-card:hover .program-icon {
    background: var(--accent);
    color: var(--bg-primary);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: scale(1.05);
}

.program-glow {
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(181, 230, 29, 0.06) 0%, rgba(2, 10, 7, 0) 70%);
    top: -50px;
    right: -50px;
    pointer-events: none;
    transition: all 0.5s ease;
}

.program-card:hover .program-glow {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(181, 230, 29, 0.12) 0%, rgba(2, 10, 7, 0) 70%);
}

/* ==========================================================================
   KEGIATAN UNGGULAN SECTION
   ========================================================================== */
.kegiatan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.kegiatan-item {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.kegiatan-img-placeholder {
    height: 180px;
    background: linear-gradient(135deg, rgba(11, 65, 46, 0.3) 0%, rgba(2, 10, 7, 0.6) 100%);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(181, 230, 29, 0.3);
    transition: all 0.4s ease;
    position: relative;
}

.kegiatan-img-placeholder::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(181, 230, 29, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.kegiatan-item:hover .kegiatan-img-placeholder {
    color: var(--accent);
}

.kegiatan-item:hover .kegiatan-img-placeholder::after {
    opacity: 1;
}

.kegiatan-content {
    padding: 30px;
}

.kegiatan-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.kegiatan-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==========================================================================
   EKSTRAKURIKULER SECTION
   ========================================================================== */
.ekstra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.ekstra-card {
    padding: 36px 28px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ekstra-icon-box {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(181, 230, 29, 0.05);
    border: 1px solid rgba(181, 230, 29, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.ekstra-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.ekstra-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.ekstra-card:hover .ekstra-icon-box {
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    color: var(--bg-primary);
    box-shadow: 0 0 20px rgba(181, 230, 29, 0.3);
    transform: scale(1.1) rotate(5deg);
}

/* ==========================================================================
   KONTAK & PENDAFTARAN SECTION
   ========================================================================== */
.kontak-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.kontak-info {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.kontak-info h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
}

.kontak-intro {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.info-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-detail-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.detail-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    background: rgba(181, 230, 29, 0.1);
    border: 1px solid rgba(181, 230, 29, 0.2);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.detail-text h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.detail-text p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.kontak-socials {
    margin-top: auto;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.kontak-socials h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a {
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.social-icons a:hover {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(181, 230, 29, 0.3);
}

.kontak-form {
    padding: 50px 40px;
}

.kontak-form h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
}

.kontak-form-intro {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    padding: 14px 18px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(181, 230, 29, 0.03);
    box-shadow: 0 0 15px rgba(181, 230, 29, 0.15);
}

.btn-whatsapp {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 700;
    gap: 10px;
    box-shadow: 0 0 30px rgba(181, 230, 29, 0.3);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
    background-color: var(--bg-darker);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding: 80px 0 30px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-brand .logo-icon {
    margin-bottom: 16px;
}

.footer-brand h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 320px;
}

.footer-links h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-legal {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-legal .credit {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================== */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-taglines {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .profil-grid {
        grid-template-columns: 1fr;
    }
    
    .kontak-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 70px 0;
    }

    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.3rem;
    }

    /* Mobile Navigation Drawer */
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--bg-secondary);
        border-left: 1px solid var(--glass-border);
        padding: 100px 40px 40px;
        transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .nav-menu.open {
        right: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 24px;
    }

    .nav-link {
        font-size: 1.15rem;
    }

    .nav-cta {
        display: none; /* Hide in navbar on mobile */
    }

    /* Hamburger Active Animation */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
        background-color: var(--accent);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
        background-color: var(--accent);
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    /* Adapt 3D book size for mobile screens */
    .hero-visual {
        height: 380px;
    }
    .quran-wrapper {
        width: 250px;
        height: 320px;
    }
    .quran-3d {
        width: 170px;
        height: 230px;
        top: 40px;
        left: 40px;
    }
    
    .quran-3d.open {
        transform: rotateX(32deg) rotateY(0deg) translate3d(-85px, 0px, 10px);
    }
    
    .cover-title {
        font-size: 1.6rem;
    }
    .cover-center-ornament {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .arabic-verse-large {
        font-size: 1.6rem;
    }
    .arabic-verse {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
    .arabic-text, .arabic-text-header {
        font-size: 0.9rem;
    }
    
    .quran-rays {
        transform: translate(-50%, -50%) scale(0.7);
    }
}
