/*
Theme Name: SMP Tema Cepat
Theme URI: https://localhost/smp-tema
Author: Web Admin
Author URI: https://localhost
Description: Tema premium, sangat ngebut, dan responsif. Cocok untuk website Sekolah Menengah Pertama (SMP). Fokus pada gambar, video, dan performa tinggi tanpa bloat.
Version: 1.0.0
Requires at least: 5.0
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: smptema
Tags: blue, white, light, responsive-layout, clean, modern, school, fast, post-formats
*/

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

:root {
    --primary: #2c51a0;
    /* Biru vibran */
    --primary-hover: #1d4ed8;
    --accent: #88c8d271;
    /* Emas oranye */
    --bg-main: #d5d59b00;
    --header-bg: rgba(45, 92, 63, 0.463);
    /* Warna khusus untuk bagian header/menu atas */
    --title-color: #42329c;
    /* Warna untuk tulisan judul SMP Al Huda di header */
    --text-main: #000001;
    --text-muted: #64748b;
    --border: #15542a00;
    --dark: #0f172a;
    /* Warna dark untuk footer */
    --radius: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.7;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
    padding: 0 0 4rem 0;
    /* padding atas dihapus karena hero section */
}

/* -------------- HEADER (Merapikan menu desktop & hamburger fix) -------------- */
.site-header {
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    /* Glassmorphism effect */
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.50rem;
}

.site-branding img.custom-logo {
    max-height: 60px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

.site-branding-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-description {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.site-contact-info {
    font-size: 0.55rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-weight: 500;
}

.site-branding .site-title {
    margin: 0;
    line-height: 1.2;
}

.site-branding .site-title a {
    font-size: 20px;
    font-weight: 700;
    color: var(--title-color);
    letter-spacing: -0.5px;
}

.menu-toggle {
    display: none !important;
}

/* Sembunyikan default selalu di desktop */
.main-navigation {
    display: block;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    /* Izinkan wrap agar tdk tumpah */
    justify-content: flex-end;
    align-items: center;
    column-gap: 1.25rem;
    row-gap: 0.5rem;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 0.5rem 0;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
}

.main-navigation a:hover {
    color: var(--primary);
}

/* Dropdown */
.main-navigation ul li {
    position: relative;
}

.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 50%;
    background-color: var(--card-bg);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(10px);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    z-index: 200;
}

.main-navigation li:hover>ul,
.main-navigation li.dropdown-open>ul {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.main-navigation ul ul a {
    padding: 0.6rem 1.5rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.main-navigation ul ul li:last-child>a {
    border-bottom: none;
}

.main-navigation ul ul ul {
    top: 0;
    left: 100%;
}

/* Indikator Panah Dropdown */
.main-navigation .menu-item-has-children>a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-navigation .menu-item-has-children>a::after {
    content: "▼";
    font-size: 0.6em;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.main-navigation .menu-item-has-children:hover>a::after,
.main-navigation .menu-item-has-children.dropdown-open>a::after {
    transform: rotate(180deg);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 8rem 0;
    background: linear-gradient(rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.4)), url('https://smpalhudakotakediri.sch.id/wp-content/uploads/2026/04/Foto-GTK-SMP-Al-Huda.jpg-scaled.jpeg?q=80&w=1470&auto=format&fit=crop') center/cover;
    color: white;
    text-align: center;
    margin-top: -1px;
    /* seamless dengan header transparan */
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #e2e8f0;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background-color: white;
    color: var(--dark);
    transform: translateY(-3px);
}

/* Quick Features */
.quick-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: -3rem;
    /* Memotong overlay hero */
    position: relative;
    z-index: 10;
}

.feature-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.648);
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    /* Membuat gambar berbentuk bundar membulat sempurna */
    box-shadow: var(--shadow);
    border: 3px solid var(--primary);
    transition: var(--transition);
}

.feature-card:hover .feature-icon img {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.feature-card p {
    color: var(--text-muted);
}

/* Headmaster Section */
.headmaster-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 6rem 0;
}

.headmaster-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.headmaster-content p {
    font-size: 1.125rem;
    font-style: italic;
    color: var(--text-muted);
    border-left: 4px solid var(--accent);
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.headmaster-name {
    font-weight: 600;
    font-style: normal !important;
    color: var(--primary) !important;
    border: none !important;
    padding: 0 !important;
}

.headmaster-image {
    position: relative;
}

.headmaster-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 4px solid var(--primary);
    border-radius: var(--radius);
    z-index: -1;
}

.image-placeholder {
    background: var(--border);
    width: 100%;
    aspect-ratio: 4/5;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Recent News / Post Grid */
.recent-news {
    padding: 4rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin: 0;
    color: var(--dark);
}

.view-all {
    font-weight: 600;
    color: var(--primary);
}

.view-all:hover {
    transform: translateX(5px);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.article-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border);
}

.article-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-lg);
}

.entry-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: var(--border);
    overflow: hidden;
}

.entry-media img,
.entry-media iframe,
.entry-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .entry-media img {
    transform: scale(1.05);
}

.entry-content-box {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.entry-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.entry-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--primary);
}

.entry-summary {
    font-size: 1rem;
    color: var(--text-muted);
    flex: 1;
}

/* -------------- SINGLE POSTS -------------- */
.single-content {
    background: var(--card-bg);
    padding: 3.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin-top: 4rem;
}

.single-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    line-height: 1.2;
}

.single-media {
    margin-bottom: 3rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.entry-body h2 {
    margin: 2.5rem 0 1.25rem;
    font-size: 2rem;
    color: var(--dark);
}

.entry-body p {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    color: #334155;
}

/* -------------- FOOTER -------------- */
.site-footer {
    background-color: var(--dark);
    color: #e2e8f0;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
    letter-spacing: 0.5px;
}

.site-info {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    color: #94a3b8;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0;
    transition: var(--transition);
}

.social-links a svg {
    width: 14px;
    height: 14px;
}

.social-links a:hover {
    color: white;
    transform: translateY(-3px);
}

/* -------------- RESPONSIVENESS -------------- */
@media (max-width: 992px) {
    .headmaster-section {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .headmaster-content p {
        border-left: none;
        padding-left: 0;
    }

    .hero-title {
        font-size: 2.75rem;
    }
}

@media (max-width: 768px) {

    /* Header Mobile Override */
    .header-inner {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 1rem;
    }

    .site-branding {
        flex: 1;
        z-index: 1001;
        position: relative;
    }

    .site-branding img.custom-logo {
        max-height: 110px !important;
    }

    .site-branding-text {
        margin-top: -20px;
    }

    .site-branding .site-title a {
        font-size: 14px;
        line-height: 1.1;
    }

    .site-contact-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
        font-size: 8px;
        margin-top: 0.35rem;
    }

    .site-description {
        font-size: 0.75rem;
    }

    .menu-toggle {
        display: flex !important;
        /* Timpa hide desktop */
        align-items: center;
        background: transparent;
        border: none;
        color: var(--dark);
        cursor: pointer;
        padding: 0.5rem;
        z-index: 1002;
        position: relative;
    }

    /* Side Drawer Menu */
    .main-navigation {
        width: 50%;
        max-width: 320px;
        display: block !important;
        position: fixed;
        top: 0;
        right: 0;
        transform: translateX(110%);
        height: 100vh;
        background: var(--header-bg);
        box-shadow: -5px 0 25px rgba(67, 174, 46, 0.619);
        padding: 5rem 1.5rem 2rem 1.5rem;
        z-index: 1000;
        overflow-y: auto;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .main-navigation.toggled {
        transform: translateX(0);
        animation: none;
    }

    /* Mobile Menu Items Reset */
    .main-navigation ul {
        flex-direction: column;
        width: 100%;
        text-align: left;
        gap: 0;
        align-items: flex-start;
    }

    .main-navigation a {
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--border);
        font-size: 1.05rem;
        display: block;
        width: 100%;
    }

    /* Mobile Dropdown Accordion */
    .main-navigation ul ul {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none !important;
        display: none;
        /* Sembunyikan secara default */
        padding-left: 1rem;
        background: transparent;
        border-left: 2px solid var(--primary);
        margin-left: 0.5rem;
        margin-top: 0;
        min-width: 100%;
    }

    .main-navigation li.dropdown-open>ul {
        display: block;
        transform: none;
        /* Munculkan saat parent diklik dan netralkan transform desktop */
    }

    .main-navigation ul ul a {
        padding: 0.6rem 0;
        font-size: 0.95rem;
        border-bottom: 1px dashed var(--border);
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-section {
        padding: 5rem 0;
        background-size: cover, contain !important;
        background-repeat: no-repeat, no-repeat !important;
        background-position: center, center !important;
        background-color: var(--dark) !important;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        padding: 0 1rem;
    }

    .quick-features,
    .post-grid {
        margin-top: 2rem;
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .single-content {
        padding: 1.5rem;
    }

    .single-content h1 {
        font-size: 2rem;
    }

    .entry-meta {
        font-size: 8px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}