/* ================================================================
   SMP DARUL QALAM — FRONTEND CSS
   Bootstrap 5 + Custom Premium Design
   Tema: Hijau Pesantren Islami
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@700;800&display=swap');

:root {
    --primary: #1a7a4a;
    --primary-dark: #145f3a;
    --primary-light: #e8f5ee;
    --primary-gradient: linear-gradient(135deg, #1a7a4a, #2ecc71);
    --gold: #d4af37;
    --gold-light: #f5efc7;
    --text-dark: #1a2332;
    --text-secondary: #6c757d;
    --border: #e9ecef;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.14);
    --transition: all 0.3s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; color: var(--text-dark); overflow-x: hidden; }
img { max-width: 100%; }

/* ===== TOPBAR ===== */
.topbar-public {
    background: var(--primary-dark);
    color: #fff;
    padding: 7px 0;
    font-size: 12.5px;
}
.topbar-contact { display: flex; gap: 16px; opacity: 0.85; }
.topbar-contact span { display: flex; align-items: center; gap: 4px; }
.topbar-social a {
    color: rgba(255,255,255,0.7);
    margin-left: 10px;
    font-size: 14px;
    transition: var(--transition);
    text-decoration: none;
}
.topbar-social a:hover { color: #fff; }

/* ===== NAVBAR ===== */
.main-navbar {
    background: #fff !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 0;
}
.navbar-logo-icon {
    width: 45px; height: 45px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff;
    box-shadow: 0 4px 12px rgba(26,122,74,0.35);
    flex-shrink: 0;
}
.navbar-brand-name { display: block; font-size: 15px; font-weight: 800; color: var(--text-dark); line-height: 1.2; }
.navbar-brand-sub  { display: block; font-size: 11px; color: var(--text-secondary); }

.main-navbar .nav-link {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark) !important;
    padding: 20px 14px;
    position: relative;
    transition: color 0.2s;
}
.main-navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 14px; right: 14px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 3px 3px 0 0;
    transform: scaleX(0);
    transition: transform 0.2s;
}
.main-navbar .nav-link:hover, .main-navbar .nav-link.active { color: var(--primary) !important; }
.main-navbar .nav-link:hover::after, .main-navbar .nav-link.active::after { transform: scaleX(1); }

.nav-spmb {
    background: var(--primary-gradient);
    color: #fff !important;
    border-radius: var(--radius-sm);
    margin: 10px 0 10px 8px;
    padding: 10px 18px !important;
    font-weight: 700 !important;
}
.nav-spmb:hover { background: linear-gradient(135deg, #145f3a, #27ae60); color: #fff !important; transform: translateY(-1px); }
.nav-spmb::after { display: none !important; }

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    border-radius: var(--radius-sm);
    overflow: hidden;
    animation: fadeIn 0.15s ease;
}
.dropdown-item { font-size: 13.5px; padding: 10px 16px; transition: var(--transition); }
.dropdown-item:hover { background: var(--primary-light); color: var(--primary); }
.dropdown-item i { color: var(--primary); }

/* ===== HERO SECTION ===== */
.hero {
    min-height: 90vh;
    background: linear-gradient(135deg, #0d2b1a 0%, #1a4a2e 50%, #1a7a4a 100%);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(46,204,113,0.1), transparent 70%);
    top: -300px; right: -200px;
    border-radius: 50%;
    animation: pulse 6s ease-in-out infinite;
}
.hero::after {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(212,175,55,0.08), transparent 70%);
    bottom: -200px; left: -100px;
    border-radius: 50%;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.1; }
    50% { transform: scale(1.1); opacity: 0.15; }
}
.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #4ade80;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}
.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 20px;
}
.hero-title span { color: #4ade80; }
.hero-desc { color: rgba(255,255,255,0.75); font-size: 17px; line-height: 1.7; max-width: 540px; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-hero-primary {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(26,122,74,0.4);
}
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(26,122,74,0.5); color: #fff; }
.btn-hero-secondary {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 13px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}
.btn-hero-secondary:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* Stats in hero */
.hero-stats { display: flex; gap: 32px; margin-top: 48px; flex-wrap: wrap; }
.hero-stat { color: #fff; }
.hero-stat-num { font-size: 36px; font-weight: 800; line-height: 1; color: #4ade80; }
.hero-stat-label { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 4px; }

/* Hero image side */
.hero-image-side { position: relative; }
.hero-school-card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 24px;
    padding: 32px;
    color: #fff;
    max-width: 380px;
    margin: 0 auto;
}

/* ===== HERO BACKGROUND SLIDER (Slide Gambar di Belakang) ===== */
.hero-bg-slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}
.hero-bg-slider .carousel-inner,
.hero-bg-slider .carousel-item {
    height: 100%;
}
.hero-bg-slide-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    transform: scale(1.05);
    transition: transform 6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hero-bg-slider .carousel-item.active .hero-bg-slide-img {
    transform: scale(1);
}

/* Green Brand Overlay di atas background slide gambar */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13, 43, 26, 0.90) 0%, rgba(26, 74, 46, 0.84) 50%, rgba(26, 122, 74, 0.76) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
    pointer-events: none;
}

/* Indikator slide belakang */
.hero-bg-indicators {
    position: absolute;
    bottom: 24px;
    right: 36px;
    display: flex;
    gap: 8px;
    z-index: 10;
    pointer-events: auto;
}
.hero-bg-indicators button {
    width: 8px;
    height: 8px;
    border-radius: 100px;
    background: rgba(255,255,255,0.3);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.3s, width 0.3s;
}
.hero-bg-indicators button.active {
    background: #4ade80;
    width: 24px;
}

/* ===== SECTIONS ===== */
.section { padding: 80px 0; }
.section-alt { background: #f8fafb; }
.section-title { font-family: 'Playfair Display', serif; font-size: clamp(28px, 4vw, 40px); font-weight: 800; color: var(--text-dark); margin-bottom: 8px; }
.section-subtitle { color: var(--text-secondary); font-size: 16px; margin-bottom: 48px; }
.section-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* ===== MODULE CARDS ===== */
.module-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.04);
    text-align: center;
    text-decoration: none;
    display: block;
}
.module-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); text-decoration: none; }
.module-card-icon {
    width: 72px; height: 72px;
    border-radius: 20px;
    background: var(--primary-gradient);
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; color: #fff;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(26,122,74,0.3);
}
.module-card-title { font-size: 16px; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.module-card-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* ===== NEWS CARDS ===== */
.news-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.news-card-img { width: 100%; height: 200px; object-fit: cover; }
.news-card-img-placeholder {
    width: 100%; height: 200px;
    background: linear-gradient(135deg, var(--primary-light), #c8e6d6);
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; color: var(--primary); opacity: 0.5;
}
.news-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.news-card-cat {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
    background: var(--primary);
}
.news-card-title { font-size: 15px; font-weight: 700; color: var(--text-dark); margin-bottom: 10px; line-height: 1.5; flex: 1; }
.news-card-title a { color: inherit; text-decoration: none; }
.news-card-title a:hover { color: var(--primary); }
.news-card-meta { font-size: 12px; color: var(--text-secondary); display: flex; gap: 12px; align-items: center; }

/* ===== TEACHER CARDS ===== */
.teacher-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}
.teacher-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.teacher-photo {
    width: 90px; height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-light);
    margin: 0 auto 12px;
    display: block;
}
.teacher-avatar {
    width: 90px; height: 90px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; color: #fff;
    margin: 0 auto 12px;
    font-weight: 700;
}

/* ===== FACILITY GALLERY ===== */
.facility-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    transition: var(--transition);
    display: block;
    text-decoration: none;
}
.facility-card:hover { transform: scale(1.02); box-shadow: var(--shadow-hover); }
.facility-card img { width: 100%; height: 220px; object-fit: cover; }
.facility-card-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px 16px 16px;
    color: #fff;
}
.facility-card-name { font-size: 15px; font-weight: 700; }
.facility-card-cat { font-size: 12px; opacity: 0.75; }

/* ===== SPMB SECTION ===== */
.spmb-hero {
    background: var(--primary-gradient);
    border-radius: 24px;
    padding: 48px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.spmb-hero::before {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    right: -100px; top: -100px;
}

/* ===== ANNOUNCEMENT CARDS ===== */
.announcement-card {
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    margin-bottom: 12px;
    transition: var(--transition);
}
.announcement-card:hover { transform: translateX(4px); }
.announcement-card.pinned { border-left-color: var(--gold); }

/* ===== ACHIEVEMENT CARD ===== */
.achievement-card {
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}
.achievement-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.achievement-medal {
    width: 52px; height: 52px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.achievement-medal.gold   { background: #fff3cd; color: #856404; }
.achievement-medal.silver { background: #e9ecef; color: #6c757d; }
.achievement-medal.bronze { background: #fde8d8; color: #842029; }

/* ===== BREADCRUMB ===== */
.page-hero {
    background: linear-gradient(135deg, #0d2b1a, #1a7a4a);
    padding: 60px 0 40px;
    color: #fff;
}
.page-hero-title { font-family: 'Playfair Display', serif; font-size: 36px; font-weight: 800; margin-bottom: 8px; }
.page-hero .breadcrumb { --bs-breadcrumb-divider-color: rgba(255,255,255,0.5); --bs-breadcrumb-item-active-color: rgba(255,255,255,0.7); }
.page-hero .breadcrumb-item a { color: rgba(255,255,255,0.8); text-decoration: none; }

/* ===== FOOTER ===== */
.main-footer { background: #0d2b1a; color: rgba(255,255,255,0.75); }
.footer-top { padding: 64px 0 40px; }
.footer-logo-icon {
    width: 42px; height: 42px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff;
}
.footer-brand-name { font-size: 15px; font-weight: 800; color: #fff; }
.footer-brand-sub  { font-size: 11px; color: rgba(255,255,255,0.5); }
.footer-desc { font-size: 13.5px; line-height: 1.7; color: rgba(255,255,255,0.6); margin-top: 12px; }
.footer-heading { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 13.5px; transition: var(--transition); }
.footer-links a:hover { color: #4ade80; padding-left: 4px; }
.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li { display: flex; gap: 10px; margin-bottom: 10px; font-size: 13.5px; }
.footer-contact i { color: #4ade80; flex-shrink: 0; margin-top: 3px; }
.footer-social { display: flex; gap: 8px; margin-top: 16px; }
.social-btn {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.6);
    font-size: 16px;
    text-decoration: none;
    transition: var(--transition);
}
.social-btn:hover { background: var(--primary); color: #fff; }
.btn-spmb-footer {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}
.btn-spmb-footer:hover { transform: translateY(-1px); color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 16px 0;
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}
.footer-admin-link { color: rgba(255,255,255,0.3); text-decoration: none; font-size: 12px; transition: var(--transition); }
.footer-admin-link:hover { color: rgba(255,255,255,0.7); }

/* ===== ARTICLE DETAIL ===== */
.article-content { font-size: 16px; line-height: 1.9; color: #374151; }
.article-content h2, .article-content h3 { color: var(--text-dark); font-weight: 700; margin: 32px 0 16px; }
.article-content p { margin-bottom: 20px; }
.article-content img { border-radius: var(--radius-sm); box-shadow: var(--shadow); margin: 24px 0; }
.article-content blockquote {
    border-left: 4px solid var(--primary);
    margin: 24px 0;
    padding: 12px 20px;
    background: var(--primary-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--primary-dark);
    font-style: italic;
}

/* ===== BUTTONS ===== */
.btn-primary-custom {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    padding: 11px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(26,122,74,0.3);
}
.btn-primary-custom:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,122,74,0.4); color: #fff; }

/* ===== FILTER PILLS ===== */
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.filter-pill {
    padding: 7px 18px;
    border-radius: 100px;
    border: 2px solid var(--border);
    background: #fff;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}
.filter-pill:hover, .filter-pill.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

/* ===== QR CODE SECTION ===== */
.qr-status-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    text-align: center;
}
.qr-code-img {
    border: 8px solid var(--primary-light);
    border-radius: var(--radius-sm);
    padding: 8px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}
.float-animation { animation: float 4s ease-in-out infinite; }

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
    .hero { min-height: 80vh; padding: 60px 0; }
    .hero-stats { gap: 20px; }
    .section { padding: 56px 0; }
    .topbar-contact span:last-child { display: none; }
}
