/* ======================================== */
/* CSS PROFILE SEKOLAH DASAR - BIRU PUTIH  */
/* Desain Modern, Responsif, dan Bersih     */
/* ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-blue: #0a4d8c;
    --secondary-blue: #1e6eb5;
    --accent-blue: #3498db;
    --light-blue: #eef5fc;
    --pure-white: #ffffff;
    --soft-white: #f8fafd;
    --text-dark: #2c3e50;
    --text-light: #5a6a7a;
    --border-light: #d9e6f2;
    --shadow: 0 10px 30px rgba(10, 77, 140, 0.08);
    --shadow-hover: 0 15px 40px rgba(10, 77, 140, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--soft-white);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ========== CONTAINER UTAMA ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2rem;
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 60px;
    height: 4px;
    background: var(--accent-blue);
    border-radius: 4px;
}

section {
    padding: 4rem 0;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* ========== LINE CLAMP ========== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== TYPOGRAPHY ========== */
.text-justify {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

p {
    text-align: left;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.stat-card p {
    text-align: center !important;
}

footer p {
    text-align: left !important;
}

@media (max-width: 768px) {
    .text-justify {
        text-align: left;
        hyphens: none;
    }
}

/* ========== VISITOR COUNTER ========== */
.visitor-counter {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 50px;
    padding: 10px 20px;
    color: white;
    z-index: 9999;
    box-shadow: var(--shadow-hover);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    cursor: default;
}

.visitor-counter:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.visitor-stats {
    display: flex;
    gap: 20px;
    align-items: center;
}

.visitor-item {
    text-align: center;
    display: flex;
    align-items: center;
    gap: 8px;
}

.visitor-item i {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

.visitor-item .count {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
}

.visitor-item .label {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-left: 4px;
}

.separator {
    width: 1px;
    height: 25px;
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .visitor-counter {
        bottom: 10px;
        right: 10px;
        padding: 8px 15px;
    }
    .visitor-stats {
        gap: 12px;
    }
    .visitor-item i {
        font-size: 1rem;
    }
    .visitor-item .count {
        font-size: 1rem;
    }
    .visitor-item .label {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .visitor-counter {
        bottom: 70px;
        right: 10px;
        padding: 6px 12px;
    }
    .visitor-stats {
        gap: 8px;
    }
    .separator {
        height: 20px;
    }
}

/* ========== SAMBUTAN KEPALA SEKOLAH ========== */
.sambutan-kepala {
    background: linear-gradient(135deg, var(--light-blue), var(--pure-white));
    border-radius: 40px;
    margin: 2rem auto;
    padding: 2.5rem;
    max-width: 1200px;
    border: 1px solid var(--border-light);
}

.sambutan-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex-direction: row;
}

.sambutan-foto {
    flex: 0 0 200px;
}

.sambutan-foto img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--accent-blue);
    box-shadow: 0 15px 30px rgba(10, 77, 140, 0.2);
}

.sambutan-teks {
    flex: 1;
}

.sambutan-teks h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.sambutan-teks p {
    color: var(--text-light);
    margin-bottom: 1.8rem;
    font-size: 0.95rem;
    text-align: justify;
}

.sambutan-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.nama-kepsek {
    line-height: 1.4;
}

.nama-kepsek strong {
    font-size: 1.3rem;
    color: var(--primary-blue);
}

.btn-sambutan {
    background: var(--primary-blue);
    color: var(--pure-white);
    padding: 0.8rem 2rem;
    border-radius: 40px;
    font-weight: 500;
    border: 2px solid var(--primary-blue);
    transition: all 0.3s ease;
}

.btn-sambutan:hover {
    background: transparent;
    color: var(--primary-blue);
}

/* ========== PROFIL SINGKAT (SEJARAH) ========== */
.profil-singkat {
    padding: 2rem 0;
}

.profil-card {
    display: flex;
    align-items: center;
    gap: 4rem;
    background: var(--pure-white);
    border-radius: 30px;
    padding: 3rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    max-width: 1200px;
    margin: 0 auto;
}

.profil-teks {
    flex: 1;
}

.profil-teks h2 {
    margin-top: 0;
    font-size: 2rem;
}

.profil-teks p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: justify;
}

.btn {
    display: inline-block;
    background: var(--accent-blue);
    color: var(--pure-white);
    padding: 0.8rem 2rem;
    border-radius: 40px;
    font-weight: 500;
    border: 2px solid var(--accent-blue);
}

.btn:hover {
    background: transparent;
    color: var(--accent-blue);
}

.profil-foto {
    flex: 0 0 350px;
    height: 250px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 30px rgba(10, 77, 140, 0.15);
}

.profil-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== PROGRAM UNGGULAN ========== */
.pengumuman {
    background: var(--pure-white);
    border-radius: 30px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin: 2rem auto;
    max-width: 1200px;
}

.pengumuman:hover {
    box-shadow: var(--shadow-hover);
}

.program-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.program-card {
    background: var(--light-blue);
    border-radius: 20px;
    padding: 1.8rem 1.2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.program-card:hover {
    background: var(--pure-white);
    border-color: var(--accent-blue);
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(52, 152, 219, 0.15);
}

.program-icon {
    width: 70px;
    height: 70px;
    background: var(--pure-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 20px rgba(10, 77, 140, 0.1);
    border: 2px solid var(--accent-blue);
}

.program-icon i {
    font-size: 2.2rem;
    color: var(--primary-blue);
}

.program-text h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--primary-blue);
}

.program-text p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

/* ========== STATISTIK SEKOLAH ========== */
.statistik-sekolah {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 40px;
    margin: 2rem auto;
    max-width: 1200px;
}

.statistik-wrapper {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    padding: 3rem;
}

.statistik-wrapper h2 {
    color: var(--pure-white);
    text-align: center;
    display: block;
}

.statistik-wrapper h2::after {
    background: var(--pure-white);
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
}

.statistik-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    background: var(--pure-white);
    border-radius: 30px;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .icon-circle {
    width: 70px;
    height: 70px;
    background: var(--light-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    border: 3px solid var(--accent-blue);
}

.stat-card .icon-circle i {
    font-size: 2rem;
    color: var(--primary-blue);
}

.stat-card h3 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1;
    text-align: center !important;
}

.stat-card small {
    font-size: 0.7rem;
    color: var(--text-light);
    display: block;
    margin-top: 5px;
}

/* ========== BERITA SECTION ========== */
.berita-section {
    padding: 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.berita-section h2 {
    text-align: center;
    display: block;
}

.berita-section h2::after {
    left: 50%;
    transform: translateX(-50%);
}

.berita-grid-horizontal {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.card-berita {
    background: var(--pure-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.card-berita:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card-berita img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-berita .card-body {
    padding: 1.5rem;
}

.card-berita h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
}

.card-berita small {
    display: block;
    color: var(--accent-blue);
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
}

.card-berita small i {
    margin-right: 0.3rem;
}

.card-berita p {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.card-berita a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    font-weight: 500;
    font-size: 0.85rem;
}

.card-berita a i {
    transition: transform 0.3s ease;
}

.card-berita a:hover i {
    transform: translateX(5px);
}

.lihat-semua {
    text-align: center;
    margin-top: 2rem;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    border-radius: 40px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: var(--pure-white);
}

.btn-outline:hover i {
    transform: translateX(5px);
}

/* ========== GALERI PREVIEW ========== */
.galeri-preview {
    background: var(--light-blue);
    border-radius: 40px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
}

.galeri-card {
    background: var(--pure-white);
    border-radius: 30px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.galeri-card h2 {
    text-align: center;
    display: block;
}

.galeri-card h2::after {
    left: 50%;
    transform: translateX(-50%);
}

.galeri-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.galeri-item {
    background: var(--light-blue);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.galeri-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.galeri-item img,
.galeri-item video {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.galeri-item h3 {
    font-size: 1rem;
    padding: 1rem 1rem 0.5rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
}

.galeri-item p {
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 0 1rem 1.2rem;
    margin: 0;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1024px) {
    .berita-grid-horizontal,
    .galeri-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profil-card {
        flex-direction: column;
        text-align: center;
    }
    
    .profil-foto {
        flex: 0 0 auto;
        width: 100%;
        max-width: 400px;
    }
    
    .statistik-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sambutan-kepala,
    .pengumuman,
    .statistik-sekolah,
    .galeri-preview,
    .berita-section {
        max-width: calc(100% - 40px);
        margin-left: auto;
        margin-right: auto;
    }
    
    .profil-card {
        max-width: calc(100% - 40px);
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 1.6rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .program-grid {
        grid-template-columns: 1fr;
    }
    
    .berita-grid-horizontal,
    .galeri-grid {
        grid-template-columns: 1fr;
    }
    
    /* SAMBUTAN JADI VERTIKAL DI MOBILE */
    .sambutan-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .sambutan-footer {
        flex-direction: column;
        justify-content: center;
    }
    
    .sambutan-teks p {
        text-align: center;
    }
    
    .sambutan-foto {
        flex: 0 0 auto;
    }
    
    .sambutan-foto img {
        width: 150px;
        height: 150px;
    }
    
    .sambutan-kepala,
    .pengumuman,
    .galeri-card,
    .profil-card {
        padding: 1.8rem;
    }
    
    .statistik-wrapper {
        padding: 2rem 1.5rem;
    }
    
    .statistik-grid {
        grid-template-columns: 1fr;
    }
    
    .profil-card {
        max-width: calc(100% - 30px);
    }
}

/* ========== ANIMASI ========== */
.pengumuman, 
.sambutan-kepala, 
.profil-singkat, 
.statistik-sekolah, 
.berita-section,
.galeri-preview {
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}