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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

:root {
    --bg-color: #fdfdfd;
    --text-color: #333;
    --main-color: #0d6efd; /* Warna biru TIEC */
    --white-color: #fdfdfd;
    --shadow-color: rgba(0, 0, 0, .2);
}

*::selection {
    background: var(--main-color);
    color: var(--bg-color);
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

section {
    min-height: 100vh;
    padding: 10rem 7% 2rem;
}

.heading {
    font-size: 4.5rem;
    text-align: center;
    margin-bottom: 4rem;
}

.heading span {
    color: var(--main-color);
}

.btn {
    display: inline-block;
    padding: 1.2rem 2.8rem;
    background: var(--main-color);
    border-radius: .8rem;
    font-size: 1.6rem;
    color: var(--white-color);
    font-weight: 600;
    transition: .3s;
    border: 2px solid var(--main-color);
}

.btn:hover {
    background: transparent;
    color: var(--main-color);
}


/* HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 7%;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: .5s;
}

.header.sticky {
    background: var(--bg-color);
    box-shadow: 0 .1rem 1rem var(--shadow-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* Jarak antara logo dan teks */
    font-weight: 600;
}

.logo img {
    width: 50px; /* Sedikit sesuaikan ukuran logo */
    height: auto;
}

.logo .logo-text-wrapper {
    display: flex;
    flex-direction: column; /* Membuat teks berada di atas dan bawah */
}

.logo .logo-text {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1; /* Merapatkan baris */
    color: #004a99;
    transition: color 0.3s;
}

/* Warna teks saat header transparan */
.header:not(.sticky) .logo .logo-text {
    color: var(--main-color);
}

.logo .logo-text-red {
    color: #dc3545;
}

/* GAYA UNTUK SUBTEKS BARU */
.logo .logo-subtext {
    font-size: 1.1rem; /* Ukuran font lebih kecil */
    font-weight: 400;
    color: var(--white-color);
    line-height: 1;
    transition: color 0.3s;
}
.header.sticky .logo .logo-subtext {
    color: var(--text-color);
}

.navbar a {
    font-size: 1.7rem;
    color: var(--white-color);
    font-weight: 500;
    margin: 0 1.5rem;
    transition: .3s;
}

.header.sticky .navbar a {
    color: var(--text-color);
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--white-color);
    display: none;
}
.header.sticky #menu-icon {
    color: var(--text-color);
}


/* HOME SECTION (PERBAIKAN DI SINI) */
.home {
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center; /* Menengahkan secara horizontal */
    align-items: center;   /* Menengahkan secara vertikal */
    position: relative;
    padding: 0 7%; /* Hapus padding atas & bawah agar pas */
}
.home::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
}
.home-content {
    max-width: 80rem; /* Sedikit lebih lebar */
    position: relative;
    z-index: 1;
    color: var(--white-color);
    text-align: center; /* Pastikan teks di dalamnya juga center */
}
.home-content h3 { font-size: 3.2rem; font-weight: 700; }
.home-content h1 { font-size: 5.6rem; font-weight: 700; line-height: 1.3; }
.home-content p { font-size: 1.6rem; margin: 2rem 0 4rem; }



/* BERITA, FOTO, VIDEO CONTAINER */
.news-container, .photos-container, .videos-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}
.news-box, .photo-box, .video-box {
    border-radius: 1.5rem;
    box-shadow: 0 4px 10px var(--shadow-color);
    overflow: hidden;
    transition: transform .3s ease;
    background: var(--bg-color);
}
.news-box:hover, .photo-box:hover, .video-box:hover {
    transform: translateY(-5px);
}
.news-box img, .photo-box img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}
.news-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 150px;
}
.news-content h4 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    min-height: 4.5em;
}
.photo-box {
    position: relative;
    display: flex;
}
.photo-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.1), var(--main-color));
    color: var(--white-color);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 2rem;
    opacity: 0;
    transition: .5s ease;
}
.photo-box:hover .photo-layer {
    opacity: 1;
}
.photo-layer h4 { font-size: 2rem; }
.video-box iframe {
    width: 100%;
    height: 250px;
    display: block;
}
.video-content { padding: 2rem; }
.video-content h4 { font-size: 1.8rem; }

/* -- STYLE BARU UNTUK INFO VIEWS -- */
.news-content .news-meta {
    font-size: 1.3rem;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    border-top: 1px solid #f0f0f0;
    padding-top: 1rem;
}
.news-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.photo-layer .views {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 1.3rem;
    background: rgba(0,0,0,0.4);
    padding: 3px 8px;
    border-radius: 5px;
}

/* =================================
   GAYA UNTUK HALAMAN PROFIL KAMI
   ================================= */

/* Seksi Fasilitas */
.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}
.services-box {
    position: relative;
    border-radius: 1.5rem;
    box-shadow: 0 4px 10px var(--shadow-color);
    overflow: hidden;
}
.services-box img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.services-box:hover img {
    transform: scale(1.1);
}
.services-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(13, 110, 253, 0.8), transparent);
    color: var(--white-color);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.services-box:hover .services-layer {
    opacity: 1;
}
.services-layer h4 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.services-layer p {
    font-size: 1.4rem;
}

/* Seksi Tentor */
.portfolio-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
}
.portfolio-box {
    position: relative;
    border-radius: 1.5rem;
    box-shadow: 0 4px 10px var(--shadow-color);
    overflow: hidden;
}
.portfolio-box img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.portfolio-box:hover img {
    transform: scale(1.1);
}
.portfolio-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.1), var(--main-color));
    color: var(--white-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.portfolio-box:hover .portfolio-layer {
    opacity: 1;
}
.portfolio-layer h4 {
    font-size: 2rem;
}
.portfolio-layer p, .portfolio-layer small {
    font-size: 1.4rem;
    margin: 0.3rem 0 1rem;
}

/* SISA CSS */
.about { display: flex; justify-content: center; align-items: center; gap: 4rem; }
/* =================================
   TESTIMONIAL SLIDER
   ================================= */
.testimonial-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.testimonial-wrapper {
    max-width: 90rem;
    width: 100%;
    position: relative;
}

.testimonial-box {
    padding: 5rem 7rem; /* Padding diperbesar untuk memberi spasi antar ulasan */
    border-radius: 2rem;
    background: var(--bg-color);
    box-shadow: 0 .5rem 1.5rem var(--shadow-color);
    border-top: .8rem solid var(--main-color);
    border-bottom: .8rem solid var(--main-color);
    overflow: hidden;
}

/* Tata letak untuk setiap slide testimoni */
.testimonial-slide {
    display: flex !important; /* Menggunakan flexbox agar foto dan teks bisa bersebelahan */
    align-items: flex-start; /* Konten rata atas */
    gap: 3rem; /* Jarak antara foto dan blok teks */
    text-align: left; /* Teks menjadi rata kiri */
}

.testimonial-slide img {
    width: 12rem; /* Ukuran foto disesuaikan */
    height: 12rem;
    object-fit: cover;
    border-radius: 50%;
    border: .5rem solid var(--bg-color);
    outline: .5rem solid var(--main-color);
    margin-top: 1rem;
    flex-shrink: 0; /* Mencegah foto menyusut */
}

.testimonial-slide h3 {
    font-size: 2.2rem;
    margin: 0 0 0.5rem;
    text-align: left;
}

/* Gaya untuk jabatan/sekolah */
.testimonial-slide small {
    font-size: 1.4rem;
    color: #6c757d;
    display: block;
    margin-bottom: 1.5rem;
}

.testimonial-slide p {
    font-size: 1.5rem;
    text-align: left;
    margin: 0;
    line-height: 1.7; /* Menambah jarak antar baris agar mudah dibaca */
}

/* Tombol navigasi slider */
.testimonial-box .swiper-button-next,
.testimonial-box .swiper-button-prev {
    color: var(--main-color);
}
.photo-box img {
    width: 100%;
    max-width: 100%; /* Tambahkan atau pastikan ada */
    height: auto;      /* Tambahkan */
    object-fit: cover;
}
.modal { display: none; position: fixed; z-index: 1001; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0, 0, 0, 0.7); }
.modal-content { background-color: var(--bg-color); margin: 10% auto; padding: 3rem 4rem; border-radius: 1.5rem; width: 90%; max-width: 700px; box-shadow: 0 5px 15px rgba(0,0,0,0.5); position: relative; }
.modal .close { position: absolute; top: 1.5rem; right: 2.5rem; color: #aaa; font-size: 3.5rem; font-weight: bold; cursor: pointer; }
.modal-content h3 { font-size: 2.8rem; }
.modal-content p { font-size: 1.6rem; line-height: 1.8; }

.footer { background-color: #0b061f; color: var(--white-color); padding: 6rem 7% 2rem; }
.footer-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 4rem; }
.footer-about .footer-logo { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.footer-about .footer-logo img { width: 5rem; }
.footer-about .footer-logo span { color: var(--white-color); font-size: 2.4rem; font-weight: 700; }
.footer-about p { font-size: 1.4rem; line-height: 1.7; margin-bottom: 2rem; color: #adb5bd; }
.footer-social a { display: inline-flex; justify-content: center; align-items: center; width: 4rem; height: 4rem; background: rgba(255, 255, 255, 0.05); color: var(--white-color); border-radius: 50%; font-size: 2rem; margin-right: 1rem; transition: background-color 0.3s; }
.footer-social a:hover { background-color: var(--main-color); }
.footer-links h3, .footer-contact h3 { font-size: 2rem; color: var(--white-color); margin-bottom: 2.5rem; position: relative; }
.footer-links h3::before, .footer-contact h3::before { content: ''; position: absolute; left: 0; bottom: -8px; width: 40px; height: 3px; background-color: var(--main-color); }
.footer-links ul, .footer-contact ul { list-style: none; padding: 0; }
.footer-links li a, .footer-contact li { display: flex; align-items: center; gap: 1rem; color: #adb5bd; font-size: 1.5rem; margin-bottom: 1.5rem; transition: color 0.3s, padding-left 0.3s; }
.footer-links li a:hover { color: var(--main-color); padding-left: 5px; }
.footer-copyright { text-align: center; padding-top: 3rem; margin-top: 4rem; border-top: 1px solid #374151; font-size: 1.4rem; color: #adb5bd; }
.footer-copyright a { color: var(--main-color); font-weight: 600; transition: color 0.3s; }
.footer-copyright a:hover { color: var(--white-color); }
.footer-iconTop { text-align: right; margin-top: -2rem; }
.footer-iconTop a { display: inline-flex; justify-content: center; align-items: center; padding: .8rem; background: var(--main-color); border-radius: .8rem; transition: .5s ease; }
.footer-iconTop a i { font-size: 2.4rem; color: #0b061f; }

/* =================================
   RESPONSIVE BREAKPOINTS (UPGRADED)
   ================================= */

/* -- Untuk Tablet (Layar hingga 991px) -- */
@media (max-width: 991px) {
    html {
        font-size: 60%; 
    }
    .header {
        padding: 2rem 3%; 
    }
    section {
        padding: 10rem 3% 2rem;
    }
    .news-container, .photos-container, .videos-container, .pengelola-container, .services-container, .portfolio-container, .brosur-container {
        grid-template-columns: repeat(2, 1fr); /* Semua grid menjadi 2 kolom */
    }
    .contact-container {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* -- Untuk HP (Layar hingga 768px) -- */
@media (max-width: 768px) {
    #menu-icon {
        display: block;
    }
    .navbar {
        position: absolute;
        top: 100%;
        left: -100%; 
        width: 100%;
        padding: 1rem 3%;
        background: var(--bg-color);
        box-shadow: 0 .5rem 1rem var(--shadow-color);
        transition: .25s ease;
    }
    .navbar.active {
        left: 0;
    }
    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
        color: var(--text-color);
        text-align: center;
    }
    .home-content h1 {
        font-size: 5rem;
    }
    .home-content h3 {
        font-size: 2.6rem;
    }
    .about {
        flex-direction: column-reverse;
        text-align: center;
    }
}

/* -- Untuk HP Layar Kecil (Hingga 576px) -- */
@media (max-width: 576px) {
    html {
        font-size: 55%;
    }
    .home-content h1 {
        font-size: 4.2rem;
    }
    .heading {
        font-size: 3.8rem;
    }
    .news-container, .photos-container, .videos-container, .pengelola-container, .services-container, .portfolio-container, .brosur-container {
        grid-template-columns: 1fr; /* Semua grid menjadi 1 kolom */
    }
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-links h3::before, .footer-contact h3::before {
        left: 50%;
        transform: translateX(-50%);
    }
    .footer-about .footer-logo, .footer-social {
        justify-content: center;
    }
}
