/*
Theme Name: BBHAR Child Theme
Theme URI: https://bbhar.pdiperjuanganjabar.or.id
Description: Child theme GeneratePress — BBHAR DPD PDI Perjuangan Jawa Barat. Fully custom, dark red theme.
Author: Tim Dev BBHAR
Author URI: https://bbhar.pdiperjuanganjabar.or.id
Template: generatepress
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bbhar
*/

/* =============================================
   DAFTAR ISI
   =============================================
   1.  CSS Variables
   2.  Base & GP Override
   3.  Scrollbar
   4.  Animasi (@keyframes)
   5.  Scroll Reveal
   6.  Navigasi
   7.  Mobile Menu
   8.  Hero
   9.  Card
   10. FAQ Accordion
   11. Lightbox & Modal
   12. Toast
   13. Form (Dark Theme)
   14. Counter & Stat
   15. Utilitas
   16. Responsive
   17. Print
   ============================================= */


/* ---------------------------------------------
   1. CSS VARIABLES
   --------------------------------------------- */
:root {
    --bg-primary:    #1A0505;
    --bg-secondary:  #200606;
    --bg-deep:       #0F0303;
    --bg-card:       rgba(127, 29, 29, 0.25);
    --bg-card-alt:   rgba(15, 3, 3, 0.5);
    --border-subtle: rgba(153, 27, 27, 0.15);
    --border-medium: rgba(153, 27, 27, 0.3);
    --text-primary:  #FFFFFF;
    --text-secondary:rgba(255, 255, 255, 0.5);
    --text-muted:    rgba(255, 255, 255, 0.25);
    --accent-gold:   #FACC15;
    --accent-red:    #DC2626;
    --glow-red:      rgba(185, 28, 28, 0.15);
    --glow-red-soft: rgba(185, 28, 28, 0.05);
}


/* ---------------------------------------------
   2. BASE & GENERATEPRESS OVERRIDE
   --------------------------------------------- */
body {
    background-color: var(--bg-primary) !important;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    text-decoration: none !important;
    transition: color 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Hilangkan garis fokus bawaan browser */
:focus {
    outline: none;
}
:focus-visible {
    outline: 2px solid var(--accent-red);
    outline-offset: 2px;
}

/* Hilangkan margin-top WP admin bar */
html { margin-top: 0 !important; }
#wpadminbar { position: fixed !important; }

/* Hilangkan pseudo-element fokus mouse GP */
body:not(.using-mouse)::before { display: none !important; }

/* Selection color */
::selection {
    background: rgba(220, 38, 38, 0.4);
    color: #FFFFFF;
}
::-moz-selection {
    background: rgba(220, 38, 38, 0.4);
    color: #FFFFFF;
}

/* Smooth scroll */
html { scroll-behavior: smooth; }


/* ---------------------------------------------
   3. SCROLLBAR
   --------------------------------------------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
    background: #7F1D1D;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #991B1B; }

* {
    scrollbar-width: thin;
    scrollbar-color: #7F1D1D var(--bg-primary);
}


/* ---------------------------------------------
   4. ANIMASI (@keyframes)
   --------------------------------------------- */
@keyframes pulseSlow {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 0.8; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}


/* ---------------------------------------------
   5. SCROLL REVEAL
   --------------------------------------------- */
.reveal,
.reveal-left,
.reveal-right,
.reveal-scale {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal        { transform: translateY(40px); }
.reveal-left   { transform: translateX(-40px); }
.reveal-right  { transform: translateX(40px); }
.reveal-scale  { transform: scale(0.9); }

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible,
.reveal-scale.visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}


/* ---------------------------------------------
   6. NAVIGASI
   --------------------------------------------- */
#bbharNav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: all 0.5s ease;
}

#bbharNav.scrolled {
    background: rgba(26, 5, 5, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Link navigasi */
#bbharNav a.nav-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}
#bbharNav a.nav-link:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
}


/* ---------------------------------------------
   7. MOBILE MENU
   --------------------------------------------- */
#bbharMobileOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
#bbharMobileOverlay.open {
    opacity: 1;
    visibility: visible;
}

#bbharMobileMenu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20rem;
    max-width: 85vw;
    background: #450A0A;
    z-index: 50;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    border-left: 1px solid rgba(153, 27, 27, 0.3);
}
#bbharMobileMenu.open {
    transform: translateX(0);
}

#bbharMobileMenu a.mobile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
}
#bbharMobileMenu a.mobile-link:hover {
    color: #FFFFFF;
    background: rgba(127, 29, 29, 0.4);
}


/* ---------------------------------------------
   8. HERO
   --------------------------------------------- */
.hero-gradient {
    background: linear-gradient(
        135deg,
        #450A0A 0%,
        #7F1D1D 30%,
        #991B1B 50%,
        #B91C1C 70%,
        #7F1D1D 100%
    );
}

.hero-pattern {
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(250,204,21,0.06) 0%, transparent 40%),
        radial-gradient(circle at 60% 80%, rgba(255,255,255,0.03) 0%, transparent 50%);
}

.text-gradient {
    background: linear-gradient(135deg, #FACC15, #F59E0B, #FBBF24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pulse-slow { animation: pulseSlow 3s ease-in-out infinite; }
.float      { animation: float 4s ease-in-out infinite; }

/* Wave divider di bawah hero */
.section-wave { position: relative; }
.section-wave::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 80px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80'%3E%3Cpath fill='%23200606' d='M0,40 C360,80 720,0 1080,40 C1260,60 1380,50 1440,40 L1440,80 L0,80 Z'/%3E%3C/svg%3E") no-repeat bottom;
    background-size: cover;
}


/* ---------------------------------------------
   9. CARD
   --------------------------------------------- */
.card-hover {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.glow-red {
    box-shadow:
        0 0 60px var(--glow-red),
        0 0 120px var(--glow-red-soft);
}


/* ---------------------------------------------
   10. FAQ ACCORDION
   --------------------------------------------- */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq-answer.open {
    max-height: 500px;
}

.faq-icon {
    transition: transform 0.3s ease;
}
.faq-icon.rotated {
    transform: rotate(45deg);
}

.faq-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    text-align: left;
    cursor: pointer;
    background: none;
    border: none;
    transition: background 0.2s ease;
}
.faq-btn:hover {
    background: rgba(127, 29, 29, 0.4);
}


/* ---------------------------------------------
   11. LIGHTBOX & MODAL
   --------------------------------------------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}


/* ---------------------------------------------
   12. TOAST
   --------------------------------------------- */
#bbharToast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 70;
    background: linear-gradient(to right, #B91C1C, #991B1B);
    color: #FFFFFF;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 24rem;
    border: 1px solid rgba(153, 27, 27, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
#bbharToast.show {
    transform: translateY(0);
    opacity: 1;
}


/* ---------------------------------------------
   13. FORM (DARK THEME)
   --------------------------------------------- */
.bbhar-form input,
.bbhar-form select,
.bbhar-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-medium) !important;
    color: #FCA5A5 !important;
    transition: all 0.2s ease;
}

.bbhar-form input::placeholder,
.bbhar-form textarea::placeholder {
    color: #7F1D1D !important;
    opacity: 1 !important;
}

.bbhar-form input:focus,
.bbhar-form select:focus,
.bbhar-form textarea:focus {
    border-color: var(--accent-red) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
    outline: none !important;
}

.bbhar-form select {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23FCA5A5' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    padding-right: 2.5rem !important;
}

.bbhar-form select option {
    background: var(--bg-secondary);
    color: #FCA5A5;
}

.bbhar-form input[type="checkbox"] {
    width: auto;
    accent-color: var(--accent-red);
}

.bbhar-form input[type="file"] {
    display: none;
}

/* Label form */
.bbhar-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

/* Upload area */
.bbhar-upload-area {
    border: 2px dashed rgba(153, 27, 27, 0.3);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.bbhar-upload-area:hover {
    border-color: rgba(153, 27, 27, 0.5);
}


/* ---------------------------------------------
   14. COUNTER & STAT
   --------------------------------------------- */
.counter {
    font-variant-numeric: tabular-nums;
}

.stat-divider {
    width: 1px;
    height: 60px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
}


/* ---------------------------------------------
   15. UTILITAS
   --------------------------------------------- */
.text-shadow-glow {
    text-shadow: 0 0 40px rgba(220, 38, 38, 0.3);
}

/* Container standar BBHAR */
.bbhar-container {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}
@media (min-width: 640px) {
    .bbhar-container { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
    .bbhar-container { padding-left: 2rem; padding-right: 2rem; }
}

/* Galeri hover overlay */
.galeri-item { position: relative; overflow: hidden; cursor: pointer; }
.galeri-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.galeri-item:hover img { transform: scale(1.05); }
.galeri-item .galeri-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}
.galeri-item:hover .galeri-overlay { opacity: 1; }

/* Berita card image zoom */
.berita-img-wrap { overflow: hidden; }
.berita-img-wrap img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.berita-img-wrap:hover img { transform: scale(1.05); }

/* Back to top */
#bbharBackTop {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 50;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem);
    cursor: pointer;
    border: 1px solid rgba(153, 27, 27, 0.3);
}
#bbharBackTop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* ---------------------------------------------
   16. RESPONSIVE
   --------------------------------------------- */

/* Kecil sekali */
@media (max-width: 374px) {
    .hero-title {
        font-size: 2.25rem !important;
        line-height: 1.15 !important;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 3rem !important;
    }
}

/* Lebar */
@media (min-width: 1440px) {
    .bbhar-container {
        max-width: 80rem;
    }
}


/* ---------------------------------------------
   17. PRINT
   --------------------------------------------- */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    #bbharNav,
    #bbharMobileMenu,
    #bbharMobileOverlay,
    .lightbox,
    #bbharBackTop,
    #bbharToast {
        display: none !important;
    }
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1 !important;
        transform: none !important;
    }
    .card-hover:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}