/* --- VARIABLES (Warna Sekolah) --- */
:root {
    --primary: #EF3340;     /* Merah SMK */
    --secondary: #FFCE00;   /* Kuning Emas */
    --dark: #1A1A1A;        /* Hitam Text */
    --gray: #F4F6F8;        /* Abu background */
    --white: #FFFFFF;
    --text-body: #2D3436;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* --- RESET & GLOBAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-body);
    line-height: 1.6;
    background-color: var(--white);
}
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 900;
    transition: 0.3s;
    opacity: 0; /* Sembunyi dulu */
    pointer-events: none; /* Agar tidak bisa diklik saat sembunyi */
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--secondary);
    color: var(--dark);
    transform: translateY(-5px);
}
section {
    scroll-margin-top: 100px; /* Sesuaikan dengan tinggi Header kamu */
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--dark);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding { padding: 80px 0; }
.bg-light { background-color: var(--gray); }
.text-center { text-align: center; }

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 600;
    transition: 0.3s;
    font-family: 'Montserrat', sans-serif;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}
.btn-primary:hover { background-color: #d1202d; }

.btn-secondary {
    background-color: var(--secondary);
    color: var(--dark);
}
.btn-secondary:hover { background-color: #e6b800; }

.text-link {
    color: var(--primary);
    font-weight: 700;
    margin-top: 10px;
    display: inline-block;
}

/* --- HEADER --- */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 50px; }
.logo-text h1 { font-size: 1.2rem; margin: 0; line-height: 1; }
.logo-text span { font-size: 0.8rem; color: #666; }

.nav-links { display: flex; gap: 30px; }
.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
    transition: 0.3s;
}
.nav-links a:hover { color: var(--primary); }

.desktop-cta { display: block; }
.mobile-cta { display: none; }
.hamburger { display: none; cursor: pointer; }
.bar {
    width: 25px; height: 3px; background-color: var(--dark); margin: 5px 0; transition: 0.3s;
}

/* --- HERO SECTION --- */
.hero {
    background-image: url('assets/images/bg.jpg'); /* Ganti URL gambar ini */
    background-size: cover;
    background-position: center;
    height: 90vh; /* Full screen height minus header */
    display: flex;
    align-items: center;
    position: relative;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;

}

.hero-overlay img{
    width: 1920px;
    height: 900px;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-content h1 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 20px;
}

.hero-content .highlight { color: var(--secondary); }
.hero-content p { font-size: 1.1rem; margin-bottom: 30px; color: #f0f0f0; }
.hero-buttons { display: flex; gap: 15px; }

/* --- SAMBUTAN KEPALA SEKOLAH --- */
#sambutan-kepsek {
    background-color: var(--white);
    overflow: hidden; /* Mencegah elemen keluar container */
    position: relative;
}

.kepsek-wrapper {
    display: flex;
    align-items: center;
    gap: 60px;
}

/* Styling Foto */
.kepsek-image {
    flex: 1;
    position: relative;
}

.image-frame {
    position: relative;
    z-index: 1;
}

.image-frame img {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 20px 20px 0px var(--gray); /* Efek bayangan kotak */
    display: block;
}

/* Badge Dekorasi di Foto */
.kepsek-badge {
    position: absolute;
    bottom: 30px;
    left: -20px;
    background: var(--white);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
    border-left: 4px solid var(--secondary);
}

.badge-icon { font-size: 2rem; }
.badge-text strong { display: block; color: var(--dark); font-size: 1rem; }
.badge-text span { font-size: 0.85rem; color: #666; }

/* Styling Teks */
.kepsek-content {
    flex: 1.2; /* Memberi ruang lebih besar untuk teks */
    padding: 10%;
    border-radius: 5%;
    
}

.quote-box {
    background: #fff8e1; /* Latar belakang kuning sangat muda */
    border-left: 4px solid var(--secondary);
    padding: 15px 20px;
    margin-bottom: 20px;
    font-style: italic;
    color: #555;
    font-weight: 600;
}

.kepsek-content p {
    margin-bottom: 15px;
    text-align: justify;
    color: #444;
}

.kepsek-signature {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.kepsek-signature h3 {
    margin: 5px 0 0 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
}

/* RESPONSIVE UNTUK SAMBUTAN */
@media (max-width: 900px) {
    .kepsek-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .kepsek-image {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .image-frame img {
        box-shadow: 10px 10px 0px var(--gray);
        max-width: 100%;
    }

    .kepsek-badge {
        left: 50%;
        transform: translateX(-50%);
        bottom: -20px;
        width: 80%;
        justify-content: center;
    }
    
    .kepsek-content p { text-align: center; }
    .quote-box { text-align: center; }
    .kepsek-signature { text-align: center; }
}

/* --- ABOUT SECTION --- */
.about-container {
    
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}
.section-subtitle {
    color: var(--primary);
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.section-title { font-size: 2.2rem; margin-bottom: 20px; }

/* --- JURUSAN SECTION --- */
.section-header { max-width: 600px; margin: 0 auto 50px auto; }
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}
.card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: 0.3s;
    border-top: 4px solid transparent;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary);
}
.card-icon {
    width: 60px; height: 60px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}
.card h3 { font-size: 1.2rem; margin-bottom: 10px; }

/* --- FOOTER --- */
footer {
    background: #111;
    color: #ccc;
    padding-top: 60px;
}
.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #333;
}
.footer-col h3 { color: var(--white); margin-bottom: 20px; font-size: 1.2rem; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a:hover { color: var(--secondary); }
.footer-bottom { text-align: center; padding: 20px 0; font-size: 0.9rem; }
/* --- HAMBURGER MENU STYLING --- */
.hamburger {
    display: none;
    cursor: pointer;
    padding: 5px; /* Menambah area sentuh */
    z-index: 1100; /* Pastikan di atas menu */
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out; /* Penting untuk animasi halus */
    background-color: var(--dark);
}

/* --- ANIMASI SAAT AKTIF (JADI TANDA X) --- */

/* Garis Tengah Menghilang */
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

/* Garis Atas Miring 45 Derajat */
.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

/* Garis Bawah Miring -45 Derajat */
.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- RESPONSIVE (MOBILE) --- */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 80px;
        right: -100%;
        background: var(--white);
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding: 20px;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        transition: 0.3s;
    }
    section {
        scroll-margin-top: 80px;
    }
    .hamburger {
        display: block; /* Munculkan tombol di HP */
    }
    .nav-links {
        position: fixed; /* Ganti absolute jadi fixed agar menu ikut scroll */
        top: 0; /* Mulai dari paling atas */
        right: -100%;
        height: 100vh; /* Full tinggi layar */
        background: var(--white);
        flex-direction: column;
        width: 70%; /* Lebar menu 70% layar */
        text-align: left; /* Teks rata kiri */
        padding: 80px 30px; /* Padding atas lebih besar agar tidak tertutup tombol X */
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0; /* Geser menu masuk ke layar */
    }
    
    .nav-links li {
        margin-bottom: 25px; /* Jarak antar menu lebih lega */
        display: block;
    }
    
    .nav-links a {
        font-size: 1.1rem; /* Font lebih besar di HP */
    }
}
    .desktop-cta { display: none; }
    .mobile-cta { display: block; margin-top: 10px; }
    
    .hero-content h1 { font-size: 2rem; }
    .about-container { grid-template-columns: 1fr;  }
    .footer-container { grid-template-columns: 1fr; text-align: center; }


/* --- MODAL / POPUP STYLING --- */
.modal {
    display: none; /* Tersembunyi secara default */
    position: fixed; 
    z-index: 2000; /* Paling atas */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Bisa discroll jika konten panjang */
    background-color: rgba(0,0,0,0.6); /* Background gelap transparan */
    backdrop-filter: blur(5px); /* Efek blur di background belakang */
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto; /* Posisi tengah */
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    animation: slideIn 0.4s;
}

.modal-header {
    background-color: var(--primary);
    color: var(--white);
    padding: 20px 30px;
}

.modal-header h2 {
    color: var(--white);
    margin: 0;
    font-size: 1.5rem;
}

.close-btn {
    color: var(--white);
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover { color: var(--secondary); }

.modal-body { padding: 30px; }

.modal-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Grid layout untuk list pelajaran & karir */
.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.check-list li, .job-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
    font-size: 0.95rem;
}

/* Ikon centang custom menggunakan CSS */
.check-list li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.job-list li::before {
    content: '💼';
    position: absolute;
    left: 0;
}

.modal-footer {
    background-color: var(--gray);
    padding: 20px 30px;
    text-align: right;
    border-top: 1px solid #ddd;
}

/* ANIMATIONS */
@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes slideIn {
    from {transform: translateY(-50px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

/* RESPONSIVE MODAL */
@media (max-width: 768px) {
    .modal-content { margin: 10% auto; width: 95%; }
    .modal-grid { grid-template-columns: 1fr; gap: 10px; }
    .modal-header h2 { font-size: 1.2rem; padding-right: 30px; }
    .social-btn {margin-left: 10%;}
}

/* --- SOCIAL MEDIA ICONS --- */
.social-links {
    display: flex;
    gap: 15px; /* Jarak antar ikon */
    margin-top: 15px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1); /* Putih transparan */
    color: var(--white);
    border-radius: 50%; /* Membuat lingkaran bulat */
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Efek saat di-Hover (Kursor menempel) */
.social-btn:hover {
    transform: translateY(-5px); /* Ikon naik sedikit */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-color: transparent;
}

/* Warna Spesifik Brand saat Hover */
.ig:hover {
    background: #E1306C; /* Warna Instagram */
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); 
}

.fb:hover {
    background-color: #1877F2; /* Warna Facebook */
}

.yt:hover {
    background-color: #FF0000; /* Warna YouTube */
}

.tk:hover {
    background-color: #000000; /* Warna TikTok (Hitam) */
    border: 1px solid #333;
    text-shadow: 2px 2px 0px #FF0050, -2px -2px 0px #00F2EA; /* Efek glitch Tiktok */
}