/*
Theme Name: WAFAPRO
Theme URI: https://wafapro.com
Author: WAFAPRO Media
Author URI: https://wafapro.com
Description: Tema Portal Berita Modern & Responsif WAFAPRO. Dilengkapi sistem iklan terlengkap (Leaderboard, In-Feed, Sidebar 300x250 & 300x600, Before/Middle/After Article, Sticky Bottom Banner, Side Skin Ads), breaking news ticker, hero slider, modul berita multi-kategori, custom post counts, spotlight slider, sticky sidebar, dan Ajax Load More.
Version: 2.3.0
Requires at least: 5.8
Tested up to: 6.9
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: wafapro
Tags: news, magazine, grid-layout, two-columns, custom-menu, custom-logo, featured-images, translation-ready, ad-management, sticky-sidebar
*/

/* =====================================================
   CRITICAL HEADER & FOOTER LAYOUT (WAFAPRO V2.3.0)
===================================================== */

/* STRICT DESKTOP / MOBILE ISOLATION */
@media (min-width: 992px) {
  .mobile-only-el,
  .detik-mobile-header,
  .detik-mobile-cats,
  .detik-mobile-search,
  .detik-mobile-footer,
  .detik-indeks-btn-wrap,
  .detik-drawer-overlay,
  .detik-mobile-drawer,
  #wafa-detik-drawer,
  #wafa-detik-overlay,
  #wafa-detik-search-drawer,
  .mobile-header-bar,
  .mobile-category-bar,
  .mobile-search-drawer,
  #wafa-mobile-search-drawer,
  .mobile-menu-toggle {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
  }

  .desktop-only-el,
  .desktop-header-wrap,
  .desktop-nav-bar,
  .site-footer-modern {
    display: block !important;
    visibility: visible !important;
  }
}

@media (max-width: 991px) {
  .desktop-only-el,
  .desktop-header-wrap,
  .desktop-nav-bar,
  .site-footer-modern {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
  }

  .mobile-only-el,
  .detik-mobile-header {
    display: flex !important;
    visibility: visible !important;
  }

  .detik-mobile-cats,
  .detik-indeks-btn-wrap,
  .detik-mobile-footer {
    display: block !important;
    visibility: visible !important;
  }

  /* Search Drawer: HIDDEN by default on page load! */
  .detik-mobile-search,
  #wafa-detik-search-drawer {
    display: none !important;
  }
  .detik-mobile-search.open,
  #wafa-detik-search-drawer.open {
    display: block !important;
    visibility: visible !important;
  }

  /* Overlay: HIDDEN by default on page load! */
  .detik-drawer-overlay,
  #wafa-detik-overlay {
    display: none !important;
  }
  .detik-drawer-overlay.open,
  #wafa-detik-overlay.open {
    display: block !important;
    visibility: visible !important;
  }

  /* Slide Drawer: FIXED OFFCANVAS, 100% HIDDEN OFF-SCREEN BY DEFAULT */
  .detik-mobile-drawer,
  #wafa-detik-drawer {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 86vw !important;
    max-width: 360px !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: #ffffff !important;
    z-index: 999999 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    transform: translateX(-110%) !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.3s !important;
    box-shadow: none !important;
    margin: 0 !important;
  }
  .detik-mobile-drawer.open,
  #wafa-detik-drawer.open {
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    box-shadow: 6px 0 30px rgba(0, 0, 0, 0.25) !important;
  }
}

/* =====================================================
   DESKTOP TOP BAR (>= 992px)
===================================================== */
.desktop-header-wrap {
  width: 100%;
  background: #ffffff;
  padding: 16px 0;
  border-bottom: 1px solid #f1f5f9;
}

.desktop-header-wrap .header-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 30px !important;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.desktop-header-wrap .site-branding {
  display: flex !important;
  flex-direction: column !important;
  flex-shrink: 0 !important;
}

.desktop-header-wrap .brand-logo-text {
  font-size: 32px !important;
  font-weight: 900 !important;
  letter-spacing: -0.5px !important;
  line-height: 1.1 !important;
  color: #111111 !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
}

.desktop-header-wrap .brand-logo-text .logo-red {
  color: #a6192e !important;
}

.desktop-header-wrap .brand-tagline {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  margin-top: 3px !important;
}

.desktop-header-wrap .header-search {
  flex: 1 !important;
  max-width: 520px !important;
  margin: 0 auto !important;
}

.desktop-header-wrap .search-pill-form {
  position: relative !important;
  width: 100% !important;
}

.desktop-header-wrap .search-pill-input {
  width: 100% !important;
  height: 44px !important;
  background: #f1f3f4 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 9999px !important;
  padding: 0 46px 0 22px !important;
  font-size: 14px !important;
  color: #1f2937 !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
}

.desktop-header-wrap .search-pill-input:focus {
  background: #ffffff !important;
  border-color: #a6192e !important;
  box-shadow: 0 0 0 3px rgba(166, 25, 46, 0.12) !important;
}

.desktop-header-wrap .search-pill-btn {
  position: absolute !important;
  right: 8px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: none !important;
  border: none !important;
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  color: #5f6368 !important;
  border-radius: 50% !important;
  padding: 0 !important;
}

.desktop-header-wrap .search-pill-btn:hover {
  color: #a6192e !important;
}

.desktop-header-wrap .header-desktop-actions {
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
}

.desktop-header-wrap .desktop-dark-btn {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  border: 1.5px solid #d1d5db !important;
  background: #ffffff !important;
  color: #4b5563 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  padding: 0 !important;
  transition: all 0.2s ease !important;
}

.desktop-header-wrap .desktop-dark-btn:hover {
  border-color: #9ca3af !important;
  color: #111827 !important;
  background: #f9fafb !important;
}

/* =====================================================
   CRIMSON PRIMARY NAVIGATION BAR (DESKTOP)
===================================================== */
.primary-nav-bar {
  background-color: #a6192e !important;
  width: 100% !important;
  position: sticky;
  top: 0;
  z-index: 100;
}

.primary-nav-bar .container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.primary-nav-bar .nav-bar-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.primary-menu-list {
  display: flex !important;
  align-items: center !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 2px !important;
}

.primary-menu-list > li {
  position: relative !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.primary-menu-list > li > a {
  display: block !important;
  padding: 13px 16px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  text-decoration: none !important;
  transition: background-color 0.2s ease !important;
}

.primary-menu-list > li > a:hover,
.primary-menu-list > li.current-menu-item > a {
  background-color: rgba(0, 0, 0, 0.18) !important;
  color: #ffffff !important;
}

/* =====================================================
   MODERN FOOTER (DESKTOP 4-COLUMNS & RESPONSIVE MOBILE)
===================================================== */
.site-footer-modern {
  width: 100% !important;
  margin-top: 40px !important;
  font-family: inherit !important;
  clear: both !important;
}

/* UPPER SECTION */
.footer-top-modern {
  background: #f0f4fc !important;
  padding: 48px 0 42px !important;
  border-top: 1px solid #e2e8f0 !important;
}

.footer-modern-container {
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
}

.footer-grid-modern {
  display: grid !important;
  grid-template-columns: 2.3fr 1fr 1fr 1.15fr !important;
  gap: 36px !important;
  align-items: start !important;
}

/* KOLOM 1: ABOUT */
.footer-col-about {
  display: flex !important;
  flex-direction: column !important;
  text-align: left !important;
}

.footer-brand-wrap .brand-logo-text {
  font-size: 26px !important;
  font-weight: 900 !important;
  color: #0284c7 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1.1 !important;
}

.footer-brand-wrap .brand-logo-text .logo-red {
  color: #ef4444 !important;
}

.footer-tagline-text {
  font-size: 11.5px !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  color: #64748b !important;
  font-weight: 700 !important;
  margin-top: 4px !important;
  margin-bottom: 12px !important;
}

.footer-desc-text {
  font-size: 13.5px !important;
  line-height: 1.65 !important;
  color: #475569 !important;
  margin: 0 0 16px 0 !important;
  max-width: 440px !important;
}

.footer-contacts-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin-bottom: 20px !important;
}

.footer-contact-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  text-decoration: none !important;
  transition: color 0.2s !important;
}

.footer-contact-item svg {
  color: #1e293b !important;
  flex-shrink: 0 !important;
}

.footer-contact-item:hover {
  color: #a6192e !important;
}

.footer-apps-block {
  margin-top: 4px !important;
}

.footer-apps-title {
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 0 10px 0 !important;
}

.footer-app-badges {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.app-badge-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  background: #000000 !important;
  color: #ffffff !important;
  padding: 7px 14px !important;
  border-radius: 8px !important;
  border: 1px solid #111827 !important;
  text-decoration: none !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}

.app-badge-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25) !important;
}

.app-badge-labels {
  text-align: left !important;
}

.app-badge-labels small {
  display: block !important;
  font-size: 8.5px !important;
  text-transform: uppercase !important;
  line-height: 1 !important;
  opacity: 0.8 !important;
  color: #ffffff !important;
  font-weight: 500 !important;
}

.app-badge-labels strong {
  display: block !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: #ffffff !important;
}

/* KOLOM 2, 3, 4: TITLES & ACCENTS */
.footer-col-title {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 0 6px 0 !important;
}

.footer-title-accent {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin-bottom: 16px !important;
}

.footer-title-accent .bar-long {
  display: inline-block !important;
  width: 28px !important;
  height: 3px !important;
  background: #16a34a !important;
  border-radius: 2px !important;
}

.footer-title-accent .bar-dot {
  display: inline-block !important;
  width: 10px !important;
  height: 3px !important;
  background: #16a34a !important;
  border-radius: 2px !important;
}

.footer-links-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.footer-links-list li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.footer-links-list li::before {
  display: none !important;
  content: none !important;
}

.footer-links-list li a {
  color: #334155 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  display: block !important;
  transition: color 0.18s !important;
}

.footer-links-list li a:hover {
  color: #a6192e !important;
}

/* KOLOM 4: KATEGORI DENGAN BADGE MERAH */
.footer-cat-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.footer-cat-list li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.footer-cat-list li::before {
  display: none !important;
  content: none !important;
}

.footer-cat-list li a {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  color: #334155 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: color 0.18s !important;
}

.footer-cat-list li a:hover {
  color: #a6192e !important;
}

.cat-count-badge {
  background: #dc2626 !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 2px 8px !important;
  border-radius: 4px !important;
  line-height: 1.3 !important;
  display: inline-block !important;
}

/* LOWER SECTION (WHITE BACKGROUND) */
.footer-bottom-modern {
  background: #ffffff !important;
  padding: 22px 0 24px !important;
  border-top: 1px solid #e2e8f0 !important;
}

.footer-bottom-container {
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
}

.footer-bottom-flex {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
}

.footer-bottom-left {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  text-align: left !important;
}

.footer-policy-row {
  display: flex !important;
  align-items: center !important;
  gap: 20px !important;
  flex-wrap: wrap !important;
}

.footer-policy-row a {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  text-decoration: none !important;
  transition: color 0.18s !important;
}

.footer-policy-row a:hover {
  color: #a6192e !important;
}

.footer-copyright-row p {
  font-size: 13.5px !important;
  color: #475569 !important;
  margin: 0 !important;
}

.footer-bottom-right {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

.footer-social-circles {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.footer-soc-circle {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  text-decoration: none !important;
  transition: transform 0.2s !important;
}

.footer-soc-circle:hover {
  transform: scale(1.12) !important;
}

.soc-fb {
  background-color: #3b5998 !important;
}

.soc-x {
  background-color: #000000 !important;
}

.soc-yt {
  background-color: #cd201f !important;
}

.footer-scroll-to-top-btn {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  border: 2.2px solid #16a34a !important;
  background: #ffffff !important;
  color: #16a34a !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  transition: all 0.25s ease !important;
}

.footer-scroll-to-top-btn:hover {
  background: #16a34a !important;
  color: #ffffff !important;
}

.footer-scroll-to-top-btn:hover svg {
  stroke: #ffffff !important;
}

/* RESPONSIVE MOBILE FOOTER (< 992px) */
@media (max-width: 991px) {
  .footer-grid-modern {
    display: flex !important;
    flex-direction: column !important;
    gap: 28px !important;
    text-align: center !important;
  }

  .footer-col-about {
    align-items: center !important;
    text-align: center !important;
  }

  .footer-desc-text {
    max-width: 520px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .footer-contacts-list {
    align-items: center !important;
  }

  .footer-apps-block {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .footer-app-badges {
    justify-content: center !important;
  }

  .footer-col-custom,
  .footer-col-network,
  .footer-col-category {
    text-align: center !important;
    align-items: center !important;
  }

  .footer-title-accent {
    justify-content: center !important;
  }

  .footer-cat-list li a {
    max-width: 320px !important;
    margin: 0 auto !important;
  }

  .footer-bottom-flex {
    flex-direction: column !important;
    text-align: center !important;
    gap: 16px !important;
    align-items: center !important;
  }

  .footer-policy-row {
    justify-content: center !important;
  }

  .footer-bottom-right {
    flex-direction: column !important;
    gap: 12px !important;
  }
}

/* DARK MODE */
body.dark-mode .desktop-header-wrap {
  background: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-mode .desktop-header-wrap .brand-logo-text {
  color: #f8fafc !important;
}

body.dark-mode .desktop-header-wrap .brand-tagline {
  color: #94a3b8 !important;
}

body.dark-mode .desktop-header-wrap .search-pill-input {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .desktop-header-wrap .desktop-dark-btn {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #fbbf24 !important;
}

body.dark-mode .footer-top-modern {
  background-color: #0f172a !important;
  border-color: #334155 !important;
}

body.dark-mode .footer-desc-text,
body.dark-mode .footer-copyright-row p {
  color: #94a3b8 !important;
}

body.dark-mode .footer-contact-item,
body.dark-mode .footer-contact-item svg,
body.dark-mode .footer-links-list li a,
body.dark-mode .footer-cat-list li a {
  color: #cbd5e1 !important;
}

body.dark-mode .footer-links-list li a:hover,
body.dark-mode .footer-cat-list li a:hover {
  color: #38bdf8 !important;
}

body.dark-mode .footer-col-title,
body.dark-mode .footer-apps-title {
  color: #f8fafc !important;
}

body.dark-mode .footer-bottom-modern {
  background-color: #090d16 !important;
  border-color: #334155 !important;
}

body.dark-mode .footer-policy-row a {
  color: #e2e8f0 !important;
}

body.dark-mode .footer-scroll-to-top-btn {
  background-color: #1e293b !important;
  border-color: #22c55e !important;
  color: #22c55e !important;
}
