/* ========================================
   YAYASAN FAHMUL QURAN - MODERN CSS
   Clean, Professional, & Responsive
   ======================================== */

/* ========================================
   1. ROOT VARIABLES
   ======================================== */
:root {
    /* Color Palette - Islamic Green Theme */
    --primary-color: #065f46;
    --primary-light: #047857;
    --primary-dark: #064e3b;
    --accent-gold: #d4af37;
    --accent-light: #e5c158;
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    
    /* Typography */
    --font-primary: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Spacing - DIPERBAIKI */
    --section-padding: 80px;
    --container-max-width: 1200px;
    --content-max-width: 900px;
    
    /* Effects */
    --transition-base: all 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
}

/* ========================================
   2. BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--gray-900);
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* CONTAINER GLOBAL - DIPERBAIKI */
section {
    padding: var(--section-padding) 0;
}

section .container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ========================================
   3. TYPOGRAPHY
   ======================================== */
.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: var(--font-weight-bold);
    color: var(--gray-900);
    margin-bottom: 1rem;
    position: relative;
}

.section-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* ========================================
   4. NAVIGATION BAR
   ======================================== */
.navbar {
    padding: 1rem 0;
    transition: var(--transition-base);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    max-width: var(--container-max-width);
}

.navbar-brand {
    font-weight: var(--font-weight-bold);
    color: var(--primary-color) !important;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    color: var(--gray-700);
    font-weight: var(--font-weight-medium);
    padding: 0.5rem 1rem;
    transition: var(--transition-base);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition-base);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 60%;
}

.navbar .btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: var(--font-weight-semibold);
    transition: var(--transition-base);
}

.navbar .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   5. HERO SECTION - DENGAN CONTAINER
   ======================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
    
    /* Background Image */
    background-image: url('https://fahmalquran.or.id/hero.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: var(--primary-color);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg, 
        rgba(6, 95, 70, 0.75) 0%, 
        rgba(4, 120, 87, 0.70) 50%,
        rgba(6, 95, 70, 0.75) 100%
    );
    z-index: 1;
}

/* HERO CONTENT - DENGAN CONTAINER */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
}

.highlight-text {
    color: var(--accent-gold);
    display: block;
    margin-top: 0.5rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: var(--accent-gold);
    color: var(--gray-900);
    font-weight: 600;
    font-size: 1.05rem;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition-base);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.hero-btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
    color: var(--gray-900);
}

.hero-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: transparent;
    color: white;
    font-weight: 600;
    font-size: 1.05rem;
    border: 2px solid white;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition-base);
}

.hero-btn-secondary:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

/* ========================================
   6. STATS SECTION - DENGAN CONTAINER
   ======================================== */
.stats-section {
    background: var(--primary-color);
    padding: 60px 0;
    margin-top: -1px;
}

.stats-section .container {
    max-width: var(--container-max-width);
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    color: white;
    transition: var(--transition-base);
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ========================================
   7. ABOUT SECTION - DENGAN CONTAINER
   ======================================== */
.about-section {
    background: var(--gray-50);
}

.about-section .container {
    max-width: var(--container-max-width);
}

.about-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    height: 100%;
    transition: var(--transition-base);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.about-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.about-icon i {
    font-size: 1.75rem;
    color: white;
}

.about-card h3 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.about-card p {
    color: var(--gray-600);
    line-height: 1.7;
    margin: 0;
}

/* ========================================
   8. UNITS SECTION - DENGAN CONTAINER
   ======================================== */
.units-section {
    background: white;
}

.units-section .container {
    max-width: var(--container-max-width);
}

.unit-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    height: 100%;
}

.unit-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.unit-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--gray-100);
}

.unit-body {
    padding: 1.5rem;
}

.unit-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 1rem;
}

.unit-card h3 {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.unit-card p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.unit-btn {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    transition: var(--transition-base);
}

.unit-btn:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

/* ========================================
   9. NEWS SECTION - DENGAN CONTAINER
   ======================================== */
.news-section {
    background: var(--gray-50);
}

.news-section .container {
    max-width: var(--container-max-width);
}

.news-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--gray-100);
}

.news-body {
    padding: 1.5rem;
}

.news-date {
    display: flex;
    align-items: center;
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.news-date i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.news-card h3 {
    font-size: 1.15rem;
    font-weight: var(--font-weight-bold);
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.news-excerpt {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.news-link {
    color: var(--primary-color);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    transition: var(--transition-base);
}

.news-link:hover {
    color: var(--primary-dark);
}

/* ========================================
   10. FOOTER - DENGAN CONTAINER
   ======================================== */
footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 3rem 0 1.5rem;
}

footer .container {
    max-width: var(--container-max-width);
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: white;
    margin-bottom: 1rem;
}

.footer-desc {
    color: var(--gray-300);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: var(--font-weight-bold);
    color: white;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray-300);
    text-decoration: none;
    transition: var(--transition-base);
}

.footer-links a:hover {
    color: var(--accent-gold);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: center;
    color: var(--gray-400);
}

/* ========================================
   11. RESPONSIVE DESIGN
   ======================================== */

/* Tablet */
@media (max-width: 991px) {
    :root {
        --section-padding: 60px;
        --container-max-width: 100%;
    }
    
    .hero-section {
        background-attachment: scroll;
        min-height: 90vh;
    }
    
    .hero-content {
        padding: 2rem 1.5rem;
    }
    
    section .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 767px) {
    :root {
        --section-padding: 50px;
    }
    
    .hero-section {
        min-height: 100vh;
        padding: 4rem 0;
    }
    
    .hero-content {
        padding: 1.5rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-btn-primary,
    .hero-btn-secondary {
        width: 100%;
        max-width: 300px;
    }
    
    section .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* Mobile Small */
@media (max-width: 575px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-btn-primary,
    .hero-btn-secondary {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}
/* ========================================
   8. UNITS SECTION - DIPERBAIKI
   ======================================== */
.units-section,
#programs {
    background: white;
}

.units-section .container,
#programs .container {
    max-width: var(--container-max-width);
}

/* Unit Card */
.unit-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    height: 100%;
    border: none;
}

.unit-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* Unit Icon Wrapper - STYLING UNTUK BACKGROUND IMAGE */
.unit-icon-wrapper {
    width: 100%;
    height: 180px; /* Tinggi gambar */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* Hover effect untuk gambar */
.unit-card:hover .unit-icon-wrapper {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Card Body */
.unit-card .card-body {
    padding: 1.5rem;
}

/* Card Title */
.unit-card .card-title {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

/* Card Text */
.unit-card .card-text {
    color: var(--gray-600);
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Badge */
.unit-card .badge {
    background: var(--primary-color) !important;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: var(--font-weight-semibold);
}

/* Fallback jika gambar tidak load */
.unit-icon-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.unit-icon-wrapper:empty::before {
    opacity: 0.1;
}
