/*
Theme Name: Tema SD Telkom Makassar
Theme URI: https://sdtelkom-mks.sch.id/
Author: Anang Hamzah
Author URI: https://github.com/ananghamzah
Description: Tema WordPress kustom untuk SD Telkom Makassar. Desain ringan, bersih, dan modern dengan fitur navigasi sticky header, layout berita yang responsif, fitur bagikan dan elementor friendly.
Version: 3.0
License: GNU General Public License v2 or later
Text Domain: sdtelkom-theme
*/


/* --- 1. DASAR & TYPOGRAPHY --- */
body {
    font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
    margin: 0;
    color: #333;
    background: #fff;
    overflow-x: hidden;
    /* Mencegah scroll horizontal */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* library */
.text-grey {
    color: rgb(160, 160, 160);
}

.text-red {
    color: #ee2d24;
}

/* Warna menu saat aktif atau sedang dibuka */
/*nav ul li.current-menu-item>a,*/
/*nav ul li.current-menu-ancestor>a,*/
/*nav ul li.current_page_item>a {*/
/*    color: #ee2d24 !important;*/
/*}*/

/* Warna menu saat aktif di versi Mobile */
/*nav#site-navigation ul li.current-menu-item>a {*/
/*    color: #ee2d24 !important;*/
/*}*/

/* Container Utama Arsip */
.archive-container {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Judul Kategori/Arsip */
.archive-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.archive-title {
    font-size: 28px;
    color: #333;
    text-transform: capitalize;
}

.archive-title span {
    color: #ee2d24;
    /* Memberi warna merah pada nama kategori */
}

/* Pengaturan Grid Berita */
.berita-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    /* Responsif otomatis */
    gap: 30px;
}

/* Styling Kartu Berita */
.kartu-berita {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.kartu-berita:hover {
    transform: translateY(-10px);
    /* Efek melayang saat di-hover */
}

.kartu-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    /* Agar gambar tidak gepeng */
}

.kartu-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.kartu-content .date {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.kartu-content h2 {
    font-size: 20px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.kartu-content h2 a {
    text-decoration: none;
    color: #222;
    transition: color 0.3s;
}

.kartu-content h2 a:hover {
    color: #ee2d24;
}

.kartu-content p {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Tombol Selengkapnya */
.read-more {
    margin-top: auto;
    color: #ee2d24;
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
}

/* Pagination (Nomor Halaman) */
.pagination {
    margin-top: 50px;
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination a,
.pagination span {
    padding: 8px 16px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}

.pagination .current {
    background: #ee2d24;
    color: #fff;
    border-color: #ee2d24;
}

/* single.php  */
/* Layout Dua Kolom */
.row-flex {
    display: flex;
    gap: 40px;
    margin-top: 30px;
}

.content-area {
    flex: 3;
}

/* Kolom berita lebih lebar */
.sidebar-area {
    flex: 1;
    border-left: 1px solid #eee;
    padding-left: 30px;
}

/* Styling Sidebar Widget */
.sidebar-widget h3 {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
}

.share-links,
.cat-list {
    list-style: none;
    padding: 0;
}

.share-links li,
.cat-list li {
    border-bottom: 1px solid #f5f5f5;
    padding: 15px 0;
}

.share-links li a,
.cat-list li a {
    display: flex;
    justify-content: space-between;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: 0.3s;
}

.share-links li a:hover {
    color: #ee2d24;
    padding-left: 5px;
}

.share-links li a i {
    margin-right: 3px;
    /* Jarak icon ke tulisan */
    width: 20px;
    text-align: center;
}

/* Warna khusus saat hover */
.share-links li:nth-child(1) a:hover {
    color: #25D366;
}

/* WhatsApp Green */
.share-links li:nth-child(2) a:hover {
    color: #1877F2;
}

/* Facebook Blue */
.share-links li:nth-child(3) a:hover {
    color: #000000;
}

/* X Black */
.share-links li:nth-child(4) a:hover {
    color: #ee2d24;
}

/* Copy Red */

.fa-arrow-up-right-from-square,
.fa-copy {
    font-size: 12px;
    color: #ccc;
}

/* Breadcrumb style */
.breadcrumb {
    font-size: 16px;
    color: #808080;
    margin-bottom: 15px;
}

.breadcrumb a {
    color: #ee2d24;
    text-decoration: none;
}

/* style 404  */
.container-404 {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 150px;
    padding-bottom: 50vh;
    line-height: 0;
}

.container-404 .page-content h2 {
    color: rgb(214, 0, 0);
    font-size: 6rem;
}

/* --- 2. NAVIGASI DESKTOP (Default) --- */
nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

nav ul li {
    position: relative;
}

nav ul li a {
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: block;
    padding: 10px 0;
    transition: 0.3s;
}

/* Sub-menu Desktop */
nav ul li ul.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 200px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    display: none;
    padding: 10px 0;
    border-radius: 4px;
    z-index: 999;
}

nav ul li:hover>ul.sub-menu {
    display: block;
    animation: fadeIn 0.3s ease;
}

nav ul li ul.sub-menu li a {
    color: #333 !important;
    padding: 10px 20px;
}

/* --- PERBAIKAN IKON DROPDOWN GLOBAL --- */
nav ul li.menu-item-has-children>a {
    display: flex;
    /* Menggunakan flex agar teks dan panah sejajar */
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    /* Jarak antara teks dan panah */
}

nav ul li.menu-item-has-children>a::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    /* Warna otomatis ikut teks */
    transition: transform 0.3s ease;
    /* Hapus position: absolute jika sebelumnya ada */
    position: static !important;
    margin: 0;
}

/* Rotasi saat Hover di Desktop */
@media (min-width: 769px) {

    nav#site-navigation ul li.menu-item-has-children>a {
        display: flex !important;
        width: 100% !important;
        /* WAJIB lebar penuh */
        justify-content: space-between !important;
        box-sizing: border-box !important;
    }

    nav ul li.menu-item-has-children:hover>a::after {
        transform: rotate(180deg);
    }

    /* Container Utama Sub-Menu */
    nav#site-navigation ul li ul.sub-menu {
        background-color: #ffffff;
        min-width: 220px;
        /* Sedikit lebih lebar agar lega */
        box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
        /* Shadow lembut agar terlihat melayang */
        border-radius: 4px;
        /* Sudut sedikit tumpul agar modern */
        padding: 5px 0;
        /* Ruang di atas dan bawah list */
        border: 1px solid #f0f0f0;
    }

    /* Pembatas (Border) antar tiap Sub-Menu */
    nav#site-navigation ul li ul.sub-menu li {
        border-bottom: 1px solid #f5f5f5;
        /* Garis abu-abu sangat tipis */
    }

    /* Hilangkan border di item terakhir */
    nav#site-navigation ul li ul.sub-menu li:last-child {
        border-bottom: none;
    }

    /* Gaya Link Sub-Menu */
    nav#site-navigation ul li ul.sub-menu li a {
        padding: 12px 20px !important;
        display: block;
        color: #333333;
        font-size: 14px;
        transition: all 0.3s ease;
        /* Transisi halus untuk hover */
        background-color: transparent;
    }

    /* Efek Hover Modern */
    nav#site-navigation ul li ul.sub-menu li a:hover {
        background-color: #f8f9fa;
        /* Warna abu-abu pucat saat hover */
        color: #0073aa;
        /* Ubah warna teks (opsional, sesuaikan tema kamu) */
        padding-left: 25px !important;
        /* Efek bergeser sedikit ke kanan */
    }
}

/* --- 3. MOBILE MENU --- */

/* Sembunyikan hamburger secara default di desktop */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 10001;
    padding: 10px;
    background: none;
    border: none;
}

.menu-toggle span {
    border-radius: 20px !important;
    width: 23px !important;
    height: 3px !important;
    /* background-color: #3d3d3d; */
    display: block;
    transition: 0.3s;
}

/* --- 2. FOOTER SECTION (FORCE) --- */
.site-footer-wrapper {
    border-top: none !important;
    background-color: #ffffff !important;
    padding: 0 5% 50px !important;
    position: relative !important;
    display: block !important;
    clear: both !important;
}

.footer-container-boxed {
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
}

/* LOGO NOTCH */
.footer-logo-section {
    position: absolute;
    top: -1px;
    left: 0;
    z-index: 30;
}

.logo-white-box {
    background-color: #ffffff !important;
    padding: 25px 50px 40px 40px !important;
    border-radius: 0 0 60px 0 !important;
    display: inline-block;
    line-height: 0;
}

.main-brand-logo {
    height: 55px;
    width: auto;
}

/* KOTAK HITAM UTAMA */
.footer-black-card {
    background-color: #1a1a1a !important;
    border-radius: 30px 60px 30px 30px !important;
    padding: 60px 50px 50px !important;
    position: relative;
    overflow: hidden;
    display: block !important;
}

/* Garis Horizontal Atas */
.footer-top-divider {
    width: 70%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2) !important;
    position: absolute;
    top: 55px;
    right: 0;
    z-index: 5;
}

.footer-content-layout {
    display: flex;
    justify-content: flex-start;
    text-align: left;
    margin-top: 60px;
}

/* Garis Vertikal Pemisah */
.footer-info-column {
    flex: 1.5;
    padding-right: 40px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-nav-column {
    flex: 1;
    padding: 0 40px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-news-column {
    flex: 1.2;
    padding-left: 40px;
}

/* TYPOGRAPHY FOOTER */
.school-address {
    margin: 25px 0;
    font-size: 14px;
    line-height: 1.6;
}

.school-address a {
    text-decoration: none;
    color: #ffffff;
}

.social-links-wrap {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.social-links-wrap a {
    width: 40px;
    height: 40px;
    border: 1px solid rgb(255, 255, 255);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    text-decoration: none;
    transition: 0.3s;
}

.social-links-wrap a:hover {
    background-color: #ee2d24;
    border-color: #ee2d24;
}

.footer-copyright-inline p {
    color: #ffffff !important;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* MENU FOOTER */
.vertical-footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vertical-footer-menu li {
    margin-bottom: 12px;
}

.vertical-footer-menu li a {
    color: #ffffff !important;
    font-weight: bold;
    text-decoration: none;
    font-size: 15px;
}

/* NEWS BOX */
.news-scroll-container {
    background-color: #222;
    border-radius: 15px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.footer-news-item {
    border-bottom: 1px solid #333;
    padding: 10px 0;
}

.footer-news-item:last-child {
    border-bottom: none;
}

.news-date {
    color: #888;
    font-size: 11px;
    display: block;
}

.news-title {
    color: #fff !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

/* SCROLL TO TOP */
.pure-round-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #ee2d24;
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
    z-index: 9999;
}

/* --- 3. RESPONSIVE --- */
@media (max-width: 768px) {
    .footer-top-divider {
        display: none;
    }

    .footer-content-layout {
        flex-direction: column;
    }

    .footer-black-card {
        padding: 60px 25px 25px !important;
    }

    .footer-info-column,
    .footer-nav-column {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0 0 30px 0;
        margin-bottom: 30px;
    }

    .footer-news-column {
        padding-left: 0;
    }

    .footer-copyright-inline p {
        font-size: 13px;
    }
}

@media (max-width: 768px) {

    .archive-title {
        font-size: 20px;
    }

    .row-flex {
        flex-direction: column;
        /* Ini yang bikin sidebar pindah ke bawah berita */
        gap: 20px;
    }

    .sidebar-area {
        flex: none;
        /* Batalkan ukuran kolom desktop */
        width: 100%;
        /* Biar lebarnya penuh layar HP */
        border-left: none;
        /* Hapus garis samping karena sudah di bawah */
        border-top: 1px solid #eee;
        /* Opsional: beri garis pembatas di atas sidebar */
        padding-left: 0;
        /* Hapus padding kiri agar tidak menjorok */
        padding-top: 20px;
        /* Beri jarak atas */
    }

    .content-area {
        flex: none;
        /* Batalkan ukuran kolom desktop */
        width: 100%;
    }

    /* Menargetkan setiap item di dalam sub-menu */
    nav#site-navigation ul li ul.sub-menu li {
        border-bottom: 1px solid #e0e0e0;
        /* Warna abu-abu terang */
        width: 100% !important;
    }

    /* Menghilangkan border pada item terakhir agar tidak double dengan border bawah */
    nav#site-navigation ul li ul.sub-menu li:last-child {
        border-bottom: none;
    }

    /* Opsional: Memberi sedikit ruang lebih lega untuk teks sub-menu */
    nav#site-navigation ul li ul.sub-menu li a {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
        font-size: 14px;
        /* Biasanya sub-menu sedikit lebih kecil dari menu utama */
        color: #555555;
        /* Abu-abu gelap agar beda dengan menu utama */
    }

    /* 1. Paksa elemen li dan a untuk mengambil lebar penuh layar */
    nav#site-navigation ul li {
        width: 100% !important;
        display: block !important;
        float: none !important;
        /* Terkadang float bawaan tema merusak flex */
    }

    nav#site-navigation ul li.menu-item-has-children>a {
        display: flex !important;
        width: 100% !important;
        /* WAJIB lebar penuh */
        justify-content: space-between !important;
        /* Teks kiri, panah kanan */
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box !important;
    }

    /* 2. Reset margin pada panah agar tidak terganggu kode lama */
    nav#site-navigation ul li.menu-item-has-children>a::after {
        margin: 0 !important;
        flex-shrink: 0 !important;
    }

    /* 1. Sembunyikan sub-menu secara paksa jika TIDAK ada class .buka */
    nav#site-navigation ul li ul.sub-menu {
        display: none !important;
        /* Paksa sembunyi */
        visibility: hidden;
        position: static;
        width: 100%;
    }

    /* 2. Tampilkan HANYA jika li memiliki class .buka */
    nav#site-navigation ul li.menu-item-has-children.buka>ul.sub-menu {
        display: block !important;
        /* Paksa muncul */
        visibility: visible;
        background: #f0f0f0;
        /* Warna beda sedikit agar terlihat hirarkinya */
    }

    /* Sembunyikan Navigasi Desktop asli agar tidak tabrakan */
    nav#site-navigation {
        display: none;
        /* Wajib sembunyi dulu */
        width: 100%;
        background: #ffffff;
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 9999;
    }

    /* Pastikan Container memberikan ruang untuk Hamburger di kanan */
    .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Tampilkan Hamburger di Mobile */
    .menu-toggle {
        display: flex !important;
    }

    /* Tampilkan Menu saat class .tampil aktif */
    nav#site-navigation.tampil {
        display: block !important;
    }

    /* Atur List Menu jadi Vertikal */
    nav#site-navigation ul {
        flex-direction: column !important;
        gap: 0 !important;
        padding: 0;
        margin: 0;
    }

    nav#site-navigation ul li {
        width: 100%;
    }

    nav#site-navigation ul li a {
        color: #333 !important;
        /* Teks gelap di background putih */
        padding: 15px 20px !important;
        display: block;
        border-bottom: 1px solid #eee;
    }

    /* Animasi ke X saat menu terbuka */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Rotasi di mobile saat diklik (menggunakan class 'buka') */
    nav#site-navigation ul li.menu-item-has-children.buka>a::after {
        transform: rotate(180deg);
    }

    /* Pastikan sub-menu muncul saat class 'buka' ada */
    nav#site-navigation ul li.menu-item-has-children.buka>ul.sub-menu {
        display: block !important;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}