/* ============================================================
   KPM FST - PUBLIC STYLESHEET (REVISI FINAL RESPONSIVE)
   Base on Tiec ID Design System
   ============================================================ */

@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: #136C40; /* Hijau Khas UIN FST */
    --main-color-hover: #0f5432;
    --white-color: #fdfdfd;
    --shadow-color: rgba(0, 0, 0, .06);
}

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

html {
    font-size: 62.5%; /* 1rem = 10px */
    overflow-x: hidden;
}

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

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

/* --- REUSABLE COMPONENTS --- */
.heading {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #1e293b;
}

.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.5rem;
    color: var(--white-color);
    font-weight: 600;
    transition: .3s ease;
    border: 2px solid var(--main-color);
    cursor: pointer;
}

.btn:hover {
    background: transparent;
    color: var(--main-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(19, 108, 64, 0.2);
}

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

.header.sticky {
    background: #0b061f; /* Disamakan agar transisi kokoh */
    box-shadow: 0 .1rem 1rem rgba(0,0,0,0.2);
    padding: 1.5rem 7%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.logo img {
    width: 35px;
    height: auto;
}

.logo .logo-text-wrapper {
    display: flex;
    flex-direction: column;
}

.logo .logo-text {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--white-color);
    transition: .3s;
}

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

.logo .logo-subtext {
    font-size: 1rem;
    font-weight: 400;
    color: #cbd5e1;
    line-height: 1.5;
    transition: .3s;
}

.navbar {
    display: flex;
    align-items: center;
}

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

.navbar a:hover,
.navbar a.active {
    color: #00914d !important;
}

#menu-icon {
    font-size: 3.2rem;
    color: var(--white-color);
    display: none;
    cursor: pointer;
    transition: .3s;
}

/* --- HOME SECTION --- */
.home {
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* REVISI UTAMA: Mengubah gradasi agar jauh lebih terang & responsif (Poin Banner Terlalu Gelap) */
.home::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25));
}

.home-content {
    width: 100%;
    max-width: 85rem;
    position: relative;
    z-index: 1;
    color: var(--white-color);
    text-align: center;
    padding: 0 2rem;
}

.home-content h3 { font-size: 2.6rem; font-weight: 500; letter-spacing: 0.5px; }
.home-content h1 { font-size: 5.2rem; font-weight: 800; line-height: 1.2; margin: 1.5rem 0; letter-spacing: -1px; }
.home-content p { font-size: 1.7rem; margin: 2rem 0 4rem; opacity: 0.9; line-height: 1.6; }

/* --- GRID CONTAINERS (Optimasi Safe Breakpoint) --- */
.news-container, .services-container, .portfolio-container, .grid-media, .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

/* --- CARDS (News Box) --- */
.news-box, .card-box, .gallery-card {
    border-radius: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: .4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: var(--white-color);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.news-box:hover, .card-box:hover, .gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.news-box img, .card-box img, .gallery-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}

.news-content, .card-info-body, .gallery-content {
    padding: 2.5rem 2rem;
}

.news-content h4, .card-info-body h4, .gallery-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #1e293b;
    font-weight: 700;
    line-height: 1.4;
}

.news-meta, .card-footer-meta {
    font-size: 1.25rem;
    color: #64748b;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid #f1f5f9;
}

/* --- SERVICES (Layanan Digital) --- */
.services-box {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    aspect-ratio: 4/3;
    border: 1px solid #e2e8f0;
}

.services-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .5s ease;
}

.services-box:hover img { transform: scale(1.06); }

.services-layer {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(19, 108, 64, 0.92), rgba(0,0,0,0.3));
    color: var(--white-color);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem;
    opacity: 0;
    transition: .4s ease;
}

.services-box:hover .services-layer { opacity: 1; }

/* --- PORTFOLIO (Galeri & Personel) --- */
.portfolio-box {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    height: 340px;
    border: 1px solid #e2e8f0;
}

.portfolio-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-layer {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(19, 108, 64, 0.95), rgba(0,0,0,0.2));
    color: var(--white-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    opacity: 0;
    transition: .4s ease;
}

.portfolio-box:hover .portfolio-layer { opacity: 1; }

/* ============================================================
   FOOTER SECTION - REFINED VERSION
   ============================================================ */
.footer {
    background-color: #090514;
    color: var(--white-color);
    padding: 7rem 7% 3rem;
    position: relative;
    border-top: 1px solid rgba(255,255,255,0.03);
}

.footer-container {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 5rem;
}

.footer-about .footer-logo {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.footer-about .footer-logo img {
    width: 42px;
    height: auto;
    flex-shrink: 0;
}

.footer-about .footer-logo .logo-text-container {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.footer-about .footer-logo span {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white-color);
    letter-spacing: 0.5px;
}

.footer-about .footer-logo .sub-text {
    font-size: 1rem;
    color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase;
}

.footer-about p {
    font-size: 1.35rem;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    text-align: justify;
}

.footer-social {
    display: flex;
    gap: 1.2rem;
}

.footer-social a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 3.8rem;
    height: 3.8rem;
    background: rgba(255, 255, 255, 0.03);
    color: var(--white-color);
    border-radius: 50%;
    font-size: 1.6rem;
    transition: .3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-social a:hover {
    background: var(--main-color);
    transform: translateY(-4px);
    border-color: var(--main-color);
    box-shadow: 0 5px 15px rgba(19, 108, 64, 0.3);
}

.footer-links h3, 
.footer-contact h3 {
    font-size: 1.7rem;
    margin-bottom: 2.5rem;
    position: relative;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.footer-links h3::after,
.footer-contact h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 30px;
    height: 3px;
    background: var(--main-color);
}

.footer-links ul {
    list-style: none;
}

.footer-links li a {
    color: #94a3b8;
    font-size: 1.35rem;
    display: block;
    margin-bottom: 1.2rem;
    transition: .3s ease;
}

.footer-links li a:hover {
    color: var(--main-color);
    padding-left: 6px;
}

.footer-contact ul {
    list-style: none;
}

.footer-contact li {
    display: flex;
    gap: 1.2rem;
    font-size: 1.35rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.footer-contact li i {
    color: var(--main-color);
    font-size: 1.6rem;
    flex-shrink: 0;
    margin-top: 3px;
}

.footer-copyright {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2.5rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 1.3rem;
    color: #64748b;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-copyright strong {
    color: #cbd5e1;
}

/* ============================================================
   8. MEDIA QUERIES (INTELLIGENT RESPONSIVE SETUP)
   ============================================================ */

@media (max-width: 991px) {
    html { font-size: 55%; } /* Menyesuaikan rem basis skala tablet */
    .header { padding: 2rem 4%; background: #0b061f !important; }
    section { padding: 9rem 4% 4rem; }
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
    .footer-about { grid-column: 1 / -1; }
    
    .news-container, .services-container, .portfolio-container, .grid-media, .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    #menu-icon { display: block; }
    
    .navbar {
        position: absolute;
        top: 100%; left: -100%;
        width: 100%;
        padding: 1.5rem 4%;
        background: #0b061f; /* REVISI: Mengubah latar belakang mobile menu agar solid & kontras */
        box-shadow: 0 .5rem 1rem rgba(0,0,0,0.2);
        display: block;
        transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
        border-top: 1px solid rgba(255,255,255,0.05);
    }
    
    .navbar.active { left: 0; }
    
    .navbar a {
        display: block;
        font-size: 1.8rem;
        margin: 2.5rem 0;
        color: #fff !important; /* REVISI: Teks putih agar kontras di atas warna gelap */
        text-align: left;
        padding-left: 1rem;
    }
    
    .navbar a.active, .navbar a:hover {
        color: #10b981 !important;
        font-weight: 700;
    }

    /* REVISI BANNER RESPONSIVE HP: Menjaga kecerahan seimbang di perangkat mobile */
    .home::before { background: linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)); }
    .home-content h1 { font-size: 3.4rem; }
    .home-content h3 { font-size: 2.0rem; }
    
    .news-container, .services-container, .portfolio-container, .grid-media, .gallery-grid {
        grid-template-columns: 1fr !important; /* Paksa satu kolom penuh di handphone */
        gap: 20px !important;
    }

    @media (hover: none) {
        .services-layer, .portfolio-layer {
            opacity: 1;
            background: linear-gradient(to top, rgba(19, 108, 64, 0.95), rgba(0,0,0,0.4));
        }
    }

    /* Penyelarasan Footer ke Tengah di HP */
    .footer { padding: 5rem 4% 3rem; text-align: center; }
    .footer-container { grid-template-columns: 1fr; gap: 4rem; }
    .footer-links h3::after, .footer-contact h3::after { left: 50%; transform: translateX(-50%); }
    .footer-about .footer-logo, .footer-social, .footer-contact li { justify-content: center; }
    .footer-copyright { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    html { font-size: 50%; } /* Menyusutkan ukuran fonts di HP kecil */
    .home-content h1 { font-size: 2.8rem; }
    .home-content p { font-size: 1.4rem; }
    .heading { font-size: 2.8rem; }
}