/*
Theme Name:         MTs Nurun Najah - Elementor
Theme URI:          #
Description:        Theme MTs Nurun Najah Kepuk dengan header & footer custom, kompatibel dengan Elementor Free.
Version:            2.0.0
Author:             Admin
Text Domain:        mtsnn-elementor
Requires PHP:       7.4
Requires at least:  6.0
*/

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: #f9fafb;
    color: #1f2937;
    line-height: 1.6;
}
@media (max-width: 768px) { body { padding-bottom: 64px; } }

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    --orange:       #ea580c;
    --orange-light: #f97316;
    --orange-dark:  #c2410c;
    --green:        #16a34a;
    --green-dark:   #15803d;
    --dark:         #111827;
    --gray-800:     #1f2937;
    --gray-700:     #374151;
    --gray-500:     #6b7280;
    --gray-400:     #9ca3af;
    --gray-300:     #d1d5db;
    --gray-100:     #f3f4f6;
    --max-w:        1280px;
}

/* ============================================================
   NAVBAR / HEADER
   ============================================================ */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 999;
    background: transparent;
    border-top: 3px solid var(--orange);
    transition: all 0.35s ease;
}

/* Navbar on subpages and scrolled state */
body:not(.home) #navbar,
#navbar.scrolled {
    background: rgba(17, 24, 39, 0.96) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

#navbar .nav-item {
    color: rgba(255,255,255,0.95);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}
#navbar .nav-item:hover { color: var(--orange, #ea580c) !important; background: rgba(255,255,255,0.15); }
#navbar .nav-item.nav-active { color: var(--orange, #ea580c) !important; font-weight: 700; }
#navbar.scrolled .nav-item { color: #ffffff !important; text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
#navbar.scrolled .nav-item:hover { color: var(--orange, #ea580c) !important; background: rgba(255,255,255,0.12); }
#navbar.scrolled .nav-item.nav-active { color: var(--orange, #ea580c) !important; }
#navbar .nav-logo-text { color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.6); }
#navbar .nav-sub-text  { color: rgba(255,255,255,0.8); text-shadow: 0 1px 3px rgba(0,0,0,0.5); }

/* Header inner layout */
.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 64px;
}
@media (min-width: 1024px) { .nav-inner { min-height: 80px; } }

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}
.nav-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 10px;
    transition: transform 0.2s;
}
.nav-logo:hover img { transform: scale(1.05); }
@media (min-width: 1024px) { .nav-logo img { width: 48px; height: 48px; } }
.nav-logo-text  { font-weight: 700; font-size: 14px; line-height: 1.2; display: block; white-space: nowrap; }
.nav-sub-text   { font-size: 11px; display: block; white-space: nowrap; }
@media (min-width: 1024px) { .nav-logo-text { font-size: 16px; } }

/* Desktop nav */
.nav-desktop-menu {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
    justify-content: flex-end;
    margin-right: 8px;
}
@media (min-width: 1024px) { .nav-desktop-menu { display: flex; } }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    border: 1px solid #f3f4f6;
    min-width: 200px;
    padding: 4px 0;
    z-index: 1000;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    color: #374151;
    text-decoration: none;
    transition: all 0.15s;
}
.nav-dropdown-menu a:first-child { border-radius: 12px 12px 0 0; }
.nav-dropdown-menu a:last-child  { border-radius: 0 0 12px 12px; }
.nav-dropdown-menu a:hover { background: #fff7ed; color: var(--orange); }

/* PMBM Button */
.btn-pmbm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--orange) !important;
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: none;
    margin-left: 4px;
    white-space: nowrap;
}
.btn-pmbm:hover { opacity: 0.9; transform: scale(1.03); }

/* Hamburger */
.nav-hamburger {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
#menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
    color: #fff;
}
#menu-btn:hover { background: rgba(255,255,255,0.15); }
@media (min-width: 1024px) { #menu-btn { display: none; } }

/* Mobile menu */
#mobile-menu {
    display: none;
    background: #111827;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
#mobile-menu.is-open { display: block; }
.mobile-menu-inner { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #f3f4f6;
    text-decoration: none;
    transition: all 0.15s;
}
.mobile-nav-link:hover, .mobile-nav-link.active {
    background: rgba(234,88,12,0.2);
    color: #fdba74;
}
.mobile-nav-link.active { border-left: 4px solid var(--orange); font-weight: 700; }
.mobile-nav-link svg { width: 16px; height: 16px; transition: transform 0.2s; }
/* Mobile submenu */
.mobile-submenu { display: none; padding: 4px 0 4px 20px; }
.mobile-submenu.open { display: block; }
.mobile-submenu a {
    display: block;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.15s;
}
.mobile-submenu a:hover { background: rgba(234,88,12,0.15); color: #fdba74; }
/* Mobile bottom nav */
.mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    background: #111827;
    border-top: 1px solid rgba(255,255,255,0.1);
    z-index: 998;
    padding: 6px 8px 8px;
    justify-content: space-around;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.3);
}
.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}
.mobile-bottom-nav a.active,
.mobile-bottom-nav a:hover {
    color: var(--orange);
}
.mobile-bottom-nav svg {
    width: 20px;
    height: 20px;
}
@media (min-width: 768px) { .mobile-bottom-nav { display: none; } }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
#main-content { min-height: 60vh; padding-top: 0; }
/* Push content below fixed navbar */
.page-content-wrap { padding-top: 80px; }

/* ============================================================
   HERO SECTION (Strict 16:9 Responsive on ALL Screens)
   ============================================================ */
.hero-section {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden;
}
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none;
}
.hero-slide.active { opacity: 1; z-index: 10; pointer-events: auto; }
.hero-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.75), rgba(0,0,0,0.3), transparent);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.hero-text { max-width: 520px; }
.hero-badge {
    display: inline-block;
    background: rgba(234,88,12,0.3);
    border: 1px solid rgba(249,115,22,0.5);
    color: #fdba74;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}
.hero-title {
    font-size: clamp(1.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 16px;
}
.hero-title .accent-green { color: #4ade80; }
.hero-title .accent-orange { color: #fdba74; }
.hero-btn {
    display: inline-block;
    background: var(--orange);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 28px;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(234,88,12,0.4);
    transition: all 0.2s;
    position: relative;
    z-index: 5;
}
.hero-btn:hover { background: var(--orange-dark); transform: scale(1.03); }
/* Slider controls */
.hero-prev, .hero-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.hero-prev { left: 12px; }
.hero-next { right: 12px; }
.hero-prev:hover, .hero-next:hover { background: rgba(255,255,255,0.4); }
@media (min-width: 640px) { .hero-prev { left: 20px; } .hero-next { right: 20px; } .hero-prev, .hero-next { width: 48px; height: 48px; } }
.hero-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: flex;
    gap: 8px;
}
.hero-dot {
    width: 10px; height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}
.hero-dot.active { background: var(--orange); width: 24px; }

/* ============================================================
   GLASS CARD
   ============================================================ */
.glass {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 12px;
}

/* ============================================================
   SECTION UTILITIES
   ============================================================ */
.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--orange), var(--green));
    border-radius: 2px;
    margin: 12px auto 0;
}
.section-title.text-left::after { margin-left: 0; }
.badge-orange {
    background: #fed7aa; color: var(--orange);
    font-size: 11px; font-weight: 700;
    padding: 2px 12px; border-radius: 999px;
    text-transform: uppercase; letter-spacing: 0.05em;
    display: inline-block; margin-bottom: 8px;
}
.badge-green {
    background: #bbf7d0; color: var(--green-dark);
    font-size: 11px; font-weight: 700;
    padding: 2px 12px; border-radius: 999px;
    text-transform: uppercase; letter-spacing: 0.05em;
    display: inline-block; margin-bottom: 8px;
}
.card-hover { transition: transform 0.3s, box-shadow 0.3s; }
.card-hover:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.12); }

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
    background: #111827;
    color: #d1d5db;
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 48px 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}
@media (min-width: 640px) { .footer-inner { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding: 64px 1rem; } }

.footer-brand-logo {
    display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.footer-logo-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--orange), var(--green));
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.footer-logo-icon span { color: #fff; font-weight: 800; font-size: 13px; }
.footer-brand-name { font-weight: 700; color: #fff; font-size: 15px; }
.footer-brand-loc  { font-size: 12px; color: var(--gray-400); }
.footer-desc { font-size: 13px; color: var(--gray-400); line-height: 1.7; margin-bottom: 14px; }
.footer-socials { display: flex; gap: 8px; }
.footer-social-btn {
    width: 36px; height: 36px;
    background: #1f2937;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.2s;
}
.footer-social-btn:hover.fb  { background: #1d4ed8; color: #fff; }
.footer-social-btn:hover.ig  { background: #be185d; color: #fff; }
.footer-social-btn:hover.wa  { background: #15803d; color: #fff; }
.footer-social-btn svg { width: 16px; height: 16px; }

.footer-col h4 {
    font-weight: 600; color: #fff;
    margin-bottom: 14px; font-size: 14px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
    color: var(--gray-400); font-size: 13px;
    text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: #fb923c; }
.footer-contact-item {
    display: flex; align-items: flex-start; gap: 8px;
    margin-bottom: 10px; font-size: 13px; color: var(--gray-400);
}
.footer-contact-item svg { width: 16px; height: 16px; color: #fb923c; flex-shrink: 0; margin-top: 2px; }
.footer-contact-item a { color: var(--gray-400); text-decoration: none; }
.footer-contact-item a:hover { color: #fb923c; }
.footer-bottom {
    border-top: 1px solid #1f2937;
}
.footer-bottom-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 14px 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
}
@media (min-width: 640px) {
    .footer-bottom-inner { flex-direction: row; justify-content: space-between; }
}
.footer-bottom-inner a { color: #9ca3af; text-decoration: none; }
.footer-bottom-inner a:hover { color: #fb923c; }

/* ============================================================
   ELEMENTOR COMPATIBILITY
   ============================================================ */
.elementor-page #main-content { padding: 0; }
.elementor-section-full_width { width: 100%; }

/* ============================================================
   WORDPRESS NAV MENU IN DESKTOP (style override)
   ============================================================ */
#primary-menu { display: flex !important; list-style: none; margin: 0; padding: 0; gap: 4px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
#primary-menu li { position: relative; list-style: none; }
#primary-menu > li > a { color: rgba(255,255,255,0.9) !important; text-shadow: 0 2px 4px rgba(0,0,0,0.5) !important; text-decoration: none; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; transition: all 0.2s; display: block; white-space: nowrap; }
#primary-menu > li > a:hover { color: #fff !important; background: rgba(255,255,255,0.15); }
#primary-menu > li.current-menu-item > a { color: #fdba74 !important; font-weight: 700; }
.scrolled #primary-menu > li > a { color: #fff !important; text-shadow: 0 1px 3px rgba(0,0,0,0.4) !important; }
.scrolled #primary-menu > li > a:hover { color: var(--orange) !important; background: rgba(255,255,255,0.12); }
.scrolled #primary-menu > li.current-menu-item > a { color: var(--orange) !important; background: rgba(234,88,12,0.15); }
#primary-menu .sub-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.12); border: 1px solid #f3f4f6; min-width: 200px; padding: 4px 0; z-index: 1000; list-style: none; }
#primary-menu li:hover > .sub-menu { display: block; }
#primary-menu .sub-menu li a { display: block; padding: 10px 16px; font-size: 13px; color: #374151 !important; text-decoration: none; transition: all 0.15s; background: none !important; text-shadow: none !important; white-space: nowrap; }
#primary-menu .sub-menu li:first-child a { border-radius: 12px 12px 0 0; }
#primary-menu .sub-menu li:last-child a  { border-radius: 0 0 12px 12px; }
#primary-menu .sub-menu li a:hover { background: #fff7ed !important; color: var(--orange) !important; }

/* ============================================================
   SCROLL ANIMATE
   ============================================================ */
.scroll-animate { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.scroll-animate.visible { opacity: 1; transform: translateY(0); }
