/* Tema Sekolah - SMK Negeri 3 Purworejo
   Warna utama mengikuti pengaturan "Warna Tema" di panel admin (--primary).
   Aksen emas dipakai hemat untuk garis, penanda aktif, dan lencana. */

:root {
    --secondary: var(--primary-soft, #eef2fb);
    --accent: #a37b0f;
    --gold: #c9a227;
    --gold-soft: #f3d98b;
    --text-dark: #1a2233;
    --text-muted: #4a5568;
    --bg-body: #f3f5f9;
    --card-bg: #ffffff;
    --border-light: #dde2ea;
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 10px;
    --shadow-sm: 0 1px 2px rgba(20, 33, 61, 0.06);
    --shadow-md: 0 2px 8px rgba(20, 33, 61, 0.07);
    --shadow-lg: 0 6px 18px rgba(20, 33, 61, 0.09);
    --font-heading: 'Lora', Georgia, 'Times New Roman', serif;
}

/* ---------- Dasar & tipografi ---------- */

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

html body h1,
html body h2,
html body .section-title,
html body .custom-section-header h2,
html body .layanan-header h2,
html body .nav-brand-text,
html body .nav-sheet-brand span {
    font-family: var(--font-heading) !important;
    letter-spacing: 0;
}

html body h1,
html body h2 {
    font-weight: 700;
}

html body a:focus-visible,
html body button:focus-visible,
html body input:focus-visible,
html body select:focus-visible,
html body textarea:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

/* ---------- Topbar & navbar ---------- */

html body .topbar {
    background: var(--primary-dark) !important;
    border-bottom: 0;
    font-size: 0.78rem;
}

html body .topbar-social a:hover,
html body .topbar-contact a:hover {
    color: var(--gold-soft);
}

html body .navbar {
    background: #ffffff !important;
    border-bottom: 1px solid var(--border-light) !important;
    box-shadow: 0 1px 0 rgba(20, 33, 61, 0.03);
}

html body .nav-brand-text {
    color: var(--primary) !important;
    font-weight: 700;
}

html body .nav-menu-desktop > a,
html body .nav-dropdown > a {
    color: var(--text-dark);
    font-weight: 600;
}

html body .nav-menu-desktop > a:hover,
html body .nav-dropdown:hover > a,
html body .nav-menu-desktop > a.active,
html body .nav-dropdown > a.active {
    color: var(--primary) !important;
}

html body .nav-menu-desktop > a.active::after,
html body .nav-dropdown > a.active::after {
    background: var(--gold) !important;
    height: 3px;
    border-radius: 0;
}

html body .nav-dropdown-menu {
    border: 1px solid var(--border-light);
    border-top: 3px solid var(--gold);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg);
}

html body .nav-dropdown-menu a:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

html body .nav-btn-login,
html body .nav-menu-desktop > a.nav-btn-login {
    background: var(--primary) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: none !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
}

html body .nav-btn-login:hover,
html body .nav-menu-desktop > a.nav-btn-login:hover {
    background: var(--primary-dark) !important;
    filter: none !important;
    transform: none !important;
    box-shadow: none !important;
}

html body .nav-sheet-login-btn {
    border-radius: var(--radius-sm) !important;
}

html body .css-ticker-wrapper {
    background: var(--primary-dark) !important;
    border-bottom: 2px solid var(--gold);
}

html body .breadcrumb-area {
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
}

html body .breadcrumb-area a {
    color: var(--primary);
}

html body .breadcrumb-area a:hover {
    color: var(--accent);
}

/* ---------- Bagian & kartu ---------- */

html body .section-main-box,
html body .section-gradient-box,
html body .layanan-wrapper-card {
    background: #ffffff !important;
    border: 1px solid var(--border-light) !important;
    border-top: 3px solid var(--primary) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-sm) !important;
}

html body .custom-section-header {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

html body .custom-section-header h2,
html body .layanan-header h2,
html body .section-title {
    color: var(--primary) !important;
    font-weight: 700 !important;
}

html body .header-icon-box,
html body .section-icon-badge {
    background: var(--primary-soft) !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary-line) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: none !important;
}

html body .news-card-slide,
html body .layanan-item-new {
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

html body .news-card-slide:hover,
html body .layanan-item-new:hover {
    transform: none !important;
    border-color: var(--primary) !important;
    box-shadow: var(--shadow-md) !important;
}

html body .news-card-badge-pill {
    border-radius: 4px !important;
}

html body .btn-arrow-slider {
    border-radius: var(--radius-sm) !important;
    border: 1px solid var(--border-light) !important;
    box-shadow: none !important;
}

html body .btn-arrow-slider:hover {
    background: var(--primary) !important;
    color: #ffffff !important;
}

/* ---------- Tombol ---------- */

html body .btn-primary,
html body .btn-outline,
html body .btn-selengkapnya,
html body .btn-detail-sarana,
html body a.btn-detail-sarana {
    border-radius: var(--radius-sm) !important;
    box-shadow: none !important;
    font-weight: 700;
}

html body .btn-primary,
html body .btn-selengkapnya {
    background: var(--primary) !important;
    color: #ffffff !important;
    border: 1px solid var(--primary) !important;
}

html body .btn-primary:hover,
html body .btn-selengkapnya:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    filter: none !important;
    transform: none !important;
}

html body .btn-outline,
html body .btn-detail-sarana,
html body a.btn-detail-sarana {
    background: #ffffff !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
}

html body .btn-outline:hover,
html body .btn-detail-sarana:hover,
html body a.btn-detail-sarana:hover {
    background: var(--primary) !important;
    color: #ffffff !important;
    transform: none !important;
}

/* ---------- Banner halaman: satu gaya untuk semua ---------- */

html body .news-banner,
html body .profile-banner,
html body .contact-banner,
html body .gallery-banner,
html body .program-banner,
html body .guru-banner,
html body .mading-banner,
html body .download-hero-banner,
html body .student-banner-card,
html body .tefa-hero-banner,
html body .bkk-hero-banner,
html body .status-hero-banner,
html body .skl-hero-banner,
html body .tka-hero-banner,
html body .tracer-hero-banner,
html body .agenda-hero-banner,
html body .spmb-hero,
html body .kp-hero,
html body .pokja-hero {
    background-color: var(--primary-dark) !important;
    background-image: var(--banner-art, none), linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    background-repeat: no-repeat !important;
    background-position: right center, center !important;
    background-size: auto 100%, cover !important;
    border: 0 !important;
    border-bottom: 4px solid var(--gold) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-md) !important;
    color: #ffffff !important;
}

html body .news-banner h1,
html body .profile-banner h1,
html body .contact-banner h1,
html body .gallery-banner h1,
html body .program-banner h1,
html body .guru-banner h1,
html body .mading-banner h1,
html body .download-hero-banner h1,
html body .tefa-hero-banner h1,
html body .bkk-hero-banner h1,
html body .status-hero-banner h1,
html body .skl-hero-banner h1,
html body .tka-hero-banner h1,
html body .tracer-hero-banner h1,
html body .agenda-hero-banner h1,
html body .spmb-hero h1,
html body .kp-hero h1,
html body .pokja-hero h1,
html body .student-banner-title {
    color: #ffffff !important;
    font-family: var(--font-heading) !important;
}

html body .news-banner p,
html body .profile-banner p,
html body .contact-banner p,
html body .gallery-banner p,
html body .program-banner p,
html body .guru-banner p,
html body .mading-banner p,
html body .download-hero-banner p,
html body .tefa-hero-banner p,
html body .bkk-hero-banner p,
html body .status-hero-banner p,
html body .skl-hero-banner p,
html body .tka-hero-banner p,
html body .tracer-hero-banner p,
html body .agenda-hero-banner p,
html body .spmb-hero p,
html body .kp-hero p,
html body .pokja-hero p,
html body .student-banner-desc {
    color: rgba(255, 255, 255, 0.86) !important;
}

html body .news-banner .badge,
html body .profile-banner .badge,
html body .contact-banner .badge,
html body .gallery-banner .badge,
html body .program-banner .badge,
html body .guru-banner .badge {
    background: rgba(201, 162, 39, 0.2) !important;
    color: var(--gold-soft) !important;
    border: 1px solid rgba(243, 217, 139, 0.45) !important;
    border-radius: 4px !important;
    letter-spacing: 0.06em;
}

/* ---------- Formulir ---------- */

html body input[type="text"],
html body input[type="email"],
html body input[type="tel"],
html body input[type="number"],
html body input[type="password"],
html body input[type="date"],
html body input[type="search"],
html body select,
html body textarea {
    border-radius: var(--radius-sm);
}

html body input:focus,
html body select:focus,
html body textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 30, 58, 138), 0.18) !important;
}

/* ---------- Footer ---------- */

html body .site-footer {
    background: var(--primary-dark) !important;
    border-top: 4px solid var(--gold) !important;
    color: #d9e2f5;
}

html body .site-footer a:hover {
    color: var(--gold-soft);
}

/* ---------- Tombol kembali ke atas & navigasi bawah mobile ---------- */

html body #backTopBtn {
    background: var(--primary) !important;
    border: 2px solid #ffffff !important;
    box-shadow: var(--shadow-md);
}

html body #backTopBtn:hover {
    filter: none !important;
    background: var(--primary-dark) !important;
    transform: none;
}

html body .fe-bottom-nav {
    border: 1px solid var(--border-light);
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(20, 33, 61, 0.16);
}

/* ---------- Dock navigasi mobile & banner aplikasi ---------- */

html body .fe-dock-link i,
html body .fe-dock-link i.fa-house,
html body .fe-dock-link i.fa-shop,
html body .fe-dock-link i.fa-briefcase,
html body .fe-dock-link i.fa-chart-pie {
    color: var(--primary);
}

html body .fe-dock-link.active {
    color: var(--primary);
}

html body .fe-dock-link.active::after {
    background: var(--gold);
}

html body .fe-dock-center-btn {
    background: var(--gold) !important;
    border-color: #ffffff;
    box-shadow: 0 4px 12px rgba(20, 33, 61, 0.25);
    animation: none;
    color: var(--primary-dark) !important;
}

html body .fe-dock-center-btn i,
html body .fe-dock-center-label {
    color: var(--primary-dark);
}

html body .apk-floating-banner {
    border: 1px solid rgba(243, 217, 139, 0.55);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

/* ---------- Notifikasi push (lonceng, ajakan, toast) ---------- */

html body .push-bell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    background: transparent;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

html body .push-bell:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--gold-soft);
}

html body .push-bell[data-state="on"] {
    background: rgba(201, 162, 39, 0.22);
    border-color: var(--gold-soft);
    color: var(--gold-soft);
}

html body .push-bell[data-state="blocked"] {
    opacity: 0.65;
}

html body .push-fab {
    display: none;
    position: fixed;
    left: 14px;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    z-index: 900;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: var(--primary);
    color: #ffffff;
    font-size: 1rem;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
}

html body .push-fab[data-state="on"] {
    background: var(--gold);
    color: var(--primary-dark);
}

html body .push-prompt {
    position: fixed;
    right: 24px;
    bottom: 84px;
    z-index: 1000;
    display: flex;
    gap: 14px;
    width: min(400px, calc(100vw - 48px));
    padding: 16px 18px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(20, 33, 61, 0.2);
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

html body .push-prompt.show {
    opacity: 1;
    transform: translateY(0);
}

html body .push-prompt-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

html body .push-prompt-body strong {
    display: block;
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 0.98rem;
    margin-bottom: 3px;
}

html body .push-prompt-body p {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

html body .push-prompt-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

html body .push-btn {
    padding: 8px 16px;
    min-height: 38px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--primary);
}

html body .push-btn-primary {
    background: var(--primary);
    color: #ffffff;
}

html body .push-btn-primary:hover {
    background: var(--primary-dark);
}

html body .push-btn-ghost {
    background: #ffffff;
    color: var(--primary);
    border-color: var(--border-light);
}

html body .push-btn-ghost:hover {
    border-color: var(--primary);
}

html body .push-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 1100;
    max-width: min(440px, calc(100vw - 32px));
    padding: 12px 18px;
    background: var(--primary-dark);
    color: #ffffff;
    border-left: 4px solid var(--gold);
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    line-height: 1.45;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translate(-50%, 12px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

html body .push-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---------- Responsif ---------- */

@media (max-width: 768px) {
    html body .push-fab {
            display: inline-flex;
        }

    html body .push-prompt {
            left: 12px;
            right: 12px;
            width: auto;
            bottom: calc(142px + env(safe-area-inset-bottom, 0px));
        }

    html body .push-toast {
            bottom: calc(92px + env(safe-area-inset-bottom, 0px));
        }

    html body .news-banner,
    html body .profile-banner,
    html body .contact-banner,
    html body .gallery-banner,
    html body .program-banner,
    html body .guru-banner {
            border-radius: var(--radius) !important;
        }

    html body h1 {
            overflow-wrap: anywhere;
        }
}

@media (max-width: 480px) {
    html body .push-prompt {
            padding: 14px;
        }

    html body .push-prompt-icon {
            display: none;
        }
}

@media (prefers-reduced-motion: reduce) {
    html body .push-prompt,
    html body .push-toast {
            transition: none;
        }
}
