/* ============================================================
   FRONTEND MODERN DESIGN SYSTEM
   MA AL-FADLLIYAH
   ============================================================ */

/* 1. GLOBAL & SHARED STYLES */
:root {
    --primary-blue: var(--theme-primary);
    --secondary-blue: var(--theme-mint);
    --dark-blue: var(--theme-ink);
    --slate-blue: #344054;
    --text-main: var(--theme-ink);
    --text-muted: var(--theme-muted);
    --bg-light: var(--theme-soft);
    --border-light: var(--theme-border);
    --accent-coral: var(--theme-coral);
    --accent-yellow: var(--theme-yellow);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
}

/* Common Font Loading Placeholder (in case Google Fonts takes time) */
.font-inter { font-family: 'Inter', sans-serif; }

/* Animasi Fade In Up */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header / Hero Section (Shared across Profil, Fasilitas, etc) */
.section-header {
    background:
        linear-gradient(135deg, rgba(16, 24, 40, 0.96) 0%, rgba(15, 118, 110, 0.92) 58%, rgba(255, 107, 107, 0.86) 130%),
        url("../img/header-bg.jpg") center/cover no-repeat;
    padding: 70px 0;
    color: white;
    border-bottom: 0;
}

/* Breadcrumb Styling */
.breadcrumb-item + .breadcrumb-item::before {
    content: "/" !important;
    color: rgba(255, 255, 255, 0.5) !important;
}
.breadcrumb-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
}
.breadcrumb-link:hover {
    color: #fff;
}

/* Common Card Styling */
.card-content {
    border: none;
    border-radius: var(--theme-radius);
    background: #ffffff;
    box-shadow: var(--theme-shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-content.hover-effect:hover {
    transform: translateY(-4px);
    box-shadow: var(--theme-shadow-md);
}

/* Common Content Typography */
.content-text {
    line-height: 1.8;
    font-size: 1rem;
    color: var(--text-muted);
    text-align: justify;
}
.content-text p {
    margin-bottom: 1.5rem;
}

/* Banner Image Frame (Shared for Sejarah, Visi Misi, Struktur) */
.banner-frame {
    border-radius: var(--theme-radius);
    overflow: hidden;
    box-shadow: var(--theme-shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 30px;
    background: #fff;
}
.banner-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Helper Utilities */
.letter-spacing-1 { letter-spacing: 0; }
.object-fit-cover { object-fit: cover; }

/* 2. SAMBUTAN SPECIFIC */
.img-frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    background: #fff;
    max-width: 240px;
    margin: 0 auto;
}
.img-kepala {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.img-frame:hover .img-kepala {
    transform: scale(1.05);
}

/* 3. VISI MISI SPECIFIC */
.icon-shape {
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-blue);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.visi-box {
    background: #f8fafc;
    border-left: 4px solid var(--primary-blue);
    padding: 20px 25px;
    border-radius: 0 12px 12px 0;
}
.visi-text {
    font-size: 1.15rem;
    font-weight: 500;
    color: #334155;
    line-height: 1.6;
    font-style: italic;
}
.misi-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-light);
}
.misi-item:last-child { border-bottom: none; }
.misi-number {
    min-width: 30px;
    height: 30px;
    background: var(--primary-blue);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.misi-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-top: 2px;
}

/* 4. GURU & STAF SPECIFIC */
.gs-card {
    background: #fff;
    border-radius: var(--theme-radius);
    overflow: hidden;
    box-shadow: var(--theme-shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--theme-border);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.gs-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--theme-shadow-md);
    border-color: rgba(58, 134, 255, 0.42);
}
.photo-frame {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: var(--theme-soft);
    width: 100%;
}
.photo-frame.square { aspect-ratio: 1/1; height: auto; }
.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s ease;
}
.gs-card:hover .photo-frame img { transform: scale(1.08); }
.role-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: rgba(16, 24, 40, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    text-align: center;
    z-index: 2;
}
.gs-info {
    padding: 14px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}
.gs-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--theme-ink);
    margin-bottom: 4px;
    line-height: 1.3;
}
.gs-nip {
    font-size: 0.75rem;
    color: var(--theme-muted);
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--theme-border);
}


/* 5. DATA SISWA SPECIFIC */
.nav-siswa { border: none; gap: 8px; margin-bottom: 25px; }
.nav-siswa .nav-link {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    background: #fff;
    transition: all 0.3s ease;
}
.nav-siswa .nav-link.active {
    background: var(--primary-blue) !important;
    color: #fff !important;
    border-color: var(--primary-blue) !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}
.tab-content-siswa { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.siswa-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid var(--border-light);
    text-align: center;
}
.siswa-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: var(--primary-blue);
}
.siswa-info { padding: 10px 8px 15px; }
.siswa-name { font-size: 0.85rem; font-weight: 700; color: var(--dark-blue); margin-bottom: 4px; line-height: 1.2; }
.siswa-kelas {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.1);
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    margin-bottom: 5px;
}
.siswa-nis { font-size: 0.65rem; color: #94a3b8; }

/* 6. SEJARAH SPECIFIC */
.timeline-strip {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}
.ts-item { display: flex; align-items: center; gap: 12px; }
.ts-icon {
    width: 35px;
    height: 35px;
    background: var(--primary-blue);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.ts-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0;
    font-weight: 600;
}
.ts-value { font-size: 0.95rem; font-weight: 700; color: var(--dark-blue); }

/* 7. PRESTASI & FASILITAS SPECIFIC */
.prestasi-frame, .fasilitas-img-wrapper {
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    background: #fff;
}

/* 8. PENGUMUMAN SPECIFIC */
.card-announcement {
    border: none;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    overflow: hidden;
}
.card-announcement:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}
.badge-date {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 8px 16px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.announcement-icon-wrapper {
    width: 45px;
    height: 45px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-read-more {
    font-weight: 700;
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}
.btn-read-more:hover {
    gap: 12px;
    color: var(--dark-blue);
}

/* Sidebar Styles (for Detail Page) */
.sidebar-card {
    border: none;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    padding: 20px;
}
.latest-announcement-item {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}
.latest-announcement-item:last-child { border-bottom: none; }
.latest-announcement-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
    display: block;
    margin-bottom: 4px;
}
.latest-announcement-title:hover { color: var(--primary-blue); }
.latest-announcement-date { font-size: 0.75rem; color: #94a3b8; }

/* 9. BERITA SPECIFIC */
.card-news {
    border: none;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: all 0.3s ease;
}
.card-news:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}
.news-img-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}
.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.card-news:hover .news-img {
    transform: scale(1.1);
}
.badge-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-blue);
    color: #fff;
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}
.news-meta {
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 12px;
}
.news-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-blue);
    line-height: 1.4;
    margin: 12px 0;
}
.news-title a {
    color: inherit;
    text-decoration: none;
}
.news-title a:hover {
    color: var(--primary-blue);
}

/* 10. RESPONSIVE ADJUSTMENTS */
@media (max-width: 768px) {
    .section-header { padding: 40px 0; }
    .display-5 { font-size: 2rem; }
    .content-text { font-size: 1rem; text-align: left; }
    .photo-frame { height: 180px; }
    .gs-name { font-size: 0.85rem; }
    .gs-nip { font-size: 0.7rem; margin-top: 4px; padding-top: 4px; }
    .role-badge { font-size: 0.6rem; padding: 4px 6px; bottom: 8px; left: 8px; right: 8px; }
    .siswa-name { font-size: 0.8rem; }
}

/* 11. THEME HARMONIZATION */
.tracking-wider {
    letter-spacing: 0;
}

.icon-box,
.icon-shape,
.announcement-icon-wrapper,
.ts-icon,
.misi-number {
    box-shadow: 0 8px 20px rgba(58, 134, 255, 0.16);
}

.icon-shape,
.announcement-icon-wrapper {
    background: rgba(58, 134, 255, 0.1);
    color: var(--primary-blue);
    border-radius: var(--theme-radius);
}

.visi-box,
.timeline-strip {
    background: #fff;
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--accent-coral);
    border-radius: var(--theme-radius);
    box-shadow: var(--theme-shadow-sm);
}

.misi-number,
.ts-icon,
.badge-category {
    background: var(--primary-blue);
}

.siswa-kelas,
.badge-date {
    color: var(--primary-blue);
    background: rgba(58, 134, 255, 0.1);
}

.role-badge {
    background: rgba(16, 24, 40, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.gs-card,
.siswa-card,
.card-announcement,
.card-news,
.sidebar-card {
    border-radius: var(--theme-radius);
    box-shadow: var(--theme-shadow-sm);
}

.photo-frame,
.news-img-wrapper {
    background: var(--theme-soft);
}

.news-title,
.latest-announcement-title,
.gs-name,
.ts-value,
.visi-text {
    color: var(--theme-ink);
}

.nav-siswa .nav-link {
    border-radius: var(--theme-radius) !important;
    color: var(--theme-muted);
    border-color: var(--theme-border) !important;
}

.nav-siswa .nav-link.active {
    background: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
    box-shadow: 0 8px 20px rgba(58, 134, 255, 0.18);
}

.page-item.active .page-link {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.page-link {
    color: var(--primary-blue);
    border-color: var(--theme-border);
}

.hover-opacity-100:hover {
    opacity: 1 !important;
}

.card-gallery {
    cursor: pointer;
    border: 1px solid var(--theme-border) !important;
    border-radius: var(--theme-radius) !important;
    box-shadow: var(--theme-shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card-gallery:hover {
    border-color: rgba(58, 134, 255, 0.42) !important;
    box-shadow: var(--theme-shadow-md) !important;
    transform: translateY(-4px);
}

.gallery-img-wrapper,
.gallery-video-wrapper,
.ekskul-img-wrapper,
.prestasi-img-wrapper {
    overflow: hidden;
    background: var(--theme-soft);
}

.gallery-img-wrapper img {
    transition: transform 0.45s ease;
}

.card-gallery:hover .gallery-img-wrapper img {
    transform: scale(1.06);
}

.page-kontak .btn-social {
    width: 45px;
    height: 45px;
}

.page-ppdb {
    background: var(--theme-soft) !important;
}

.page-ppdb section {
    scroll-margin-top: calc(var(--navbar-height, 65px) + var(--ppdb-nav-height, 55px) + 20px);
}

.ppdb-nav {
    top: var(--navbar-height, 65px) !important;
    z-index: 1019;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
}

.ppdb-nav .nav {
    white-space: nowrap;
}

.ppdb-nav .nav-link {
    color: var(--theme-ink) !important;
    border-radius: var(--theme-radius);
}

.ppdb-nav .nav-link.active,
.ppdb-nav .nav-link:hover {
    color: var(--primary-blue) !important;
    background: rgba(58, 134, 255, 0.1);
}

.border-dashed {
    border-style: dashed !important;
    border-width: 2px !important;
}

.content-area {
    line-height: 1.8;
    font-size: 1.05rem;
}

.content-area ul,
.content-area ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-area li {
    margin-bottom: 0.5rem;
}

.content-area p {
    margin-bottom: 1rem;
}

.floating-img {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
    100% { transform: translateY(0); }
}

/* 8. KONTAK PAGE SPECIFIC */
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
}
.contact-social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}
.contact-social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
