/*
Theme Name: RumiNews Theme
Theme URI: https://ruminews.id
Author: RumiNews Dev Team
Author URI: https://ruminews.id
Description: Custom responsive WordPress theme for portal berita RumiNews.
Version: 1.2.2
Requires at least: 6.0
Tested up to: 6.5
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: ruminews-theme
Tags: news, blog, mobile-first, tailwindcss, responsive
*/

/* ==========================================================================
   1. RESET & DASAR TAMPILAN
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  background-color: #ECEFF3;
  font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1E1E1E;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   2. PENGAMANAN UKURAN SVG (Mencegah SVG Melebar Raksasa di WordPress / Elementor)
   ========================================================================== */
svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  max-width: 100%;
}

#rumi-app-shell svg {
  max-width: 32px !important;
  max-height: 32px !important;
}

.rumi-hero-nav-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 0, 0.42) !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: none !important;
  cursor: pointer !important;
  z-index: 20 !important;
  transition: all 0.2s ease !important;
}

.rumi-hero-nav-btn:hover {
  background: rgba(0, 0, 0, 0.72) !important;
}

.rumi-hero-nav-btn svg {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  display: block !important;
}

svg.w-3\.5, svg.w-3_5, svg[width="14"] {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
}

svg.w-4, svg[width="16"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
}

svg.w-5, svg[width="18"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
}

svg.w-6, svg[width="24"] {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
}

svg.w-7, svg[width="28"] {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
}

svg.w-8, svg[width="32"] {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
}

/* ==========================================================================
   2B. SUPPRESSION MUTLAK HEADER & FOOTER ELEMENTOR / HFE / ASTRA
   Memastikan template eksternal tidak menimpa header adat RumiNews
   ========================================================================== */
header.elementor-location-header,
div.elementor-location-header,
.elementor-1222,
.ehf-header,
.ehf-footer,
.ast-hfb-header,
#ast-desktop-header,
#ast-mobile-header,
.ast-main-header-wrap,
footer.elementor-location-footer,
.ast-footer-builder,
.elementor-theme-builder-content-area {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* ==========================================================================
   3. WARNA KHAS RUMINEWS
   ========================================================================== */
:root {
  --rumi-orange: #EA9010;
  --rumi-gold: #D98209;
  --rumi-light-blue: #E6F4F9;
  --rumi-ad-bg: #E5DDD3;
  --rumi-diksi-orange: #E07A3C;
  --rumi-opini-cyan: #80E8E6;
  --rumi-navy: #1E2246;
}

.text-rumi-orange      { color: #EA9010 !important; }
.bg-rumi-orange        { background-color: #EA9010 !important; }
.border-rumi-orange    { border-color: #EA9010 !important; }
.text-rumi-title-gold  { color: #D98209 !important; }
.bg-rumi-ad-bg         { background-color: #E5DDD3 !important; }
.bg-rumi-diksi-orange  { background-color: #E07A3C !important; }
.bg-rumi-opini-cyan    { background-color: #80E8E6 !important; }
.bg-rumi-light-blue    { background-color: #E6F4F9 !important; }
.bg-rumi-navy          { background-color: #1E2246 !important; }

/* ==========================================================================
   4. HEADER & ORNAMEN ADAT STANDALONE STYLING (RESPONSIF MOBILE, TABLET, DESKTOP)
   ========================================================================== */
.rumi-custom-logo-pill {
  height: 44px;
  max-height: 52px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

@media (min-width: 480px) {
  .rumi-custom-logo-pill {
    height: 52px;
    max-height: 60px;
  }
}

@media (min-width: 768px) {
  .rumi-custom-logo-pill {
    height: 64px;
    max-height: 70px;
  }
}

@media (min-width: 1024px) {
  .rumi-custom-logo-pill {
    height: 76px;
    max-height: 84px;
  }
}

.rumi-custom-illustration {
  height: 72px;
  max-height: 80px;
  width: auto;
  object-fit: contain;
  object-position: bottom;
  flex-shrink: 0;
  user-select: none;
}

@media (min-width: 480px) {
  .rumi-custom-illustration {
    height: 84px;
    max-height: 90px;
  }
}

@media (min-width: 768px) {
  .rumi-custom-illustration {
    height: 94px;
    max-height: 100px;
  }
}

@media (min-width: 1024px) {
  .rumi-custom-illustration {
    height: 110px;
    max-height: 118px;
  }
}

.rumi-custom-ornament-bg {
  background-repeat: repeat-x;
  background-position: left center;
  background-size: auto 100%;
}

/* 4B. THUMBNAIL BERITA TERBARU (ANTI-TERPOTONG & CRISP) */
.rumi-thumb-wrap {
  width: 114px;
  height: 76px;
  min-width: 114px;
  overflow: hidden;
  border-radius: 10px;
  background-color: #f3f4f6;
  flex-shrink: 0;
  display: block;
}

@media (min-width: 480px) {
  .rumi-thumb-wrap {
    width: 122px;
    height: 82px;
    min-width: 122px;
  }
}

@media (min-width: 768px) {
  .rumi-thumb-wrap {
    width: 120px;
    height: 80px;
    min-width: 120px;
  }
}

.rumi-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.35s ease;
}

.rumi-tap-card:hover .rumi-thumb-img {
  transform: scale(1.05);
}

/* ==========================================================================
   4C. TIPOGRAFI JUDUL & KUTIPAN BERITA (STANDALONE TANPA KETERGANTUNGAN CDN)
   Memastikan Judul dan Kutipan Berita SELALU TAMPIL di Desktop, Tablet, & HP
   ========================================================================== */
.rumi-news-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  position: relative;
  text-decoration: none;
}

.rumi-news-content {
  flex: 1 1 0% !important;
  min-width: 0 !important;
}

.rumi-news-title {
  font-family: 'Inter', 'Poppins', sans-serif !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  line-height: 1.38 !important;
  color: #1a1a1a !important;
  margin: 0 0 4px 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

@media (min-width: 640px) {
  .rumi-news-title {
    font-size: 15.5px !important;
    -webkit-line-clamp: 2 !important;
  }
}

.rumi-news-title a {
  color: #1a1a1a !important;
  text-decoration: none !important;
}

.rumi-news-title a:hover {
  color: #EA9010 !important;
}

.rumi-news-excerpt {
  font-family: 'Inter', sans-serif !important;
  font-size: 12.5px !important;
  line-height: 1.45 !important;
  color: #555555 !important;
  margin: 0 0 4px 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

@media (min-width: 640px) {
  .rumi-news-excerpt {
    font-size: 13px !important;
  }
}

/* Judul & Kutipan Hero Slider */
.rumi-hero-title {
  font-family: 'Inter', 'Poppins', sans-serif !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: #ffffff !important;
  margin: 6px 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

@media (min-width: 768px) {
  .rumi-hero-title {
    font-size: 22px !important;
  }
}

.rumi-hero-title a {
  color: #ffffff !important;
  text-decoration: none !important;
}

.rumi-hero-excerpt {
  font-family: 'Inter', sans-serif !important;
  font-size: 12.5px !important;
  line-height: 1.42 !important;
  color: rgba(255, 255, 255, 0.9) !important;
  margin: 0 0 10px 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

@media (min-width: 768px) {
  .rumi-hero-excerpt {
    font-size: 14px !important;
  }
}

/* Judul & Kutipan Kategori Hero */
.rumi-cat-hero-title {
  font-family: 'Inter', 'Poppins', sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: #D98209 !important;
  margin: 8px 0 4px 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

@media (min-width: 768px) {
  .rumi-cat-hero-title {
    font-size: 17.5px !important;
  }
}

.rumi-cat-hero-title a {
  color: #D98209 !important;
  text-decoration: none !important;
}

.rumi-cat-hero-excerpt {
  font-family: 'Inter', sans-serif !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  color: #4b4b4b !important;
  margin: 0 0 10px 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* ==========================================================================
   4D. LINK DI DALAM TEKS ARTIKEL (ORANYE #EA9010)
   Setiap teks yang disematkan link otomatis berwarna oranye dengan underline khas
   ========================================================================== */
.prose a,
.entry-content a,
article .prose p a,
article p a,
.rumi-article-content a,
.rumi-content a,
.post-content a {
  color: #EA9010 !important;
  text-decoration: underline !important;
  text-decoration-color: #EA9010 !important;
  text-decoration-thickness: 1.5px !important;
  text-underline-offset: 3px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

.prose a:hover,
.entry-content a:hover,
article .prose p a:hover,
article p a:hover,
.rumi-article-content a:hover,
.rumi-content a:hover,
.post-content a:hover {
  color: #c97708 !important;
  text-decoration-color: #c97708 !important;
  opacity: 0.9 !important;
}

/* ==========================================================================
   4E. KUTIPAN / BLOCKQUOTE ARTIKEL (ZOOM & STANDOUT)
   Membuat kalimat/paragraf kutipan diperbesar (zoom) dan menonjol
   ========================================================================== */
.prose blockquote,
.entry-content blockquote,
article blockquote,
blockquote.wp-block-quote,
.wp-block-pullquote blockquote,
blockquote {
  position: relative !important;
  margin: 28px 0 !important;
  padding: 18px 20px 18px 24px !important;
  background: #FFFDF9 !important;
  border-left: 5px solid #EA9010 !important;
  border-radius: 0 14px 14px 0 !important;
  box-shadow: 0 4px 16px -2px rgba(234, 144, 16, 0.1), 0 2px 6px -1px rgba(0, 0, 0, 0.04) !important;
}

/* Ukuran Font Kutipan di-ZOOM Lebih Besar dan Menonjol */
.prose blockquote p,
.entry-content blockquote p,
article blockquote p,
blockquote.wp-block-quote p,
.wp-block-pullquote blockquote p,
blockquote p {
  font-family: 'Poppins', 'Inter', sans-serif !important;
  font-size: 19px !important;
  font-weight: 500 !important;
  font-style: italic !important;
  line-height: 1.62 !important;
  color: #1a1a1a !important;
  margin-bottom: 0 !important;
}

@media (min-width: 768px) {
  .prose blockquote,
  .entry-content blockquote,
  article blockquote,
  blockquote.wp-block-quote,
  .wp-block-pullquote blockquote,
  blockquote {
    padding: 22px 28px 22px 32px !important;
    margin: 36px 0 !important;
  }
  .prose blockquote p,
  .entry-content blockquote p,
  article blockquote p,
  blockquote.wp-block-quote p,
  .wp-block-pullquote blockquote p,
  blockquote p {
    font-size: 21.5px !important;
    line-height: 1.65 !important;
  }
}

/* Watermark Tanda Kutip Cantik di Latar Belakang */
.prose blockquote::before,
.entry-content blockquote::before,
article blockquote::before,
blockquote.wp-block-quote::before {
  content: '“' !important;
  position: absolute !important;
  top: -8px !important;
  right: 16px !important;
  font-family: Georgia, serif !important;
  font-size: 68px !important;
  line-height: 1 !important;
  color: #EA9010 !important;
  opacity: 0.16 !important;
  pointer-events: none !important;
}

.prose blockquote cite,
.entry-content blockquote cite,
article blockquote cite,
blockquote.wp-block-quote cite {
  display: block !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  font-style: normal !important;
  color: #EA9010 !important;
  margin-top: 10px !important;
}

/* ==========================================================================
   5. INTERACTIVE UX ANIMATIONS (SLIDE, SCROLL, CLICK)
   ========================================================================== */
.rumi-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.rumi-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.rumi-tap-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.2s ease,
              box-shadow 0.25s ease;
  cursor: pointer;
}

.rumi-tap-card:hover {
  transform: translateY(-2px);
}

.rumi-tap-card:active {
  transform: scale(0.975);
}

.rumi-ripple-wave {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  pointer-events: none;
  background: radial-gradient(circle, rgba(234, 144, 16, 0.32) 0%, rgba(234, 144, 16, 0.08) 70%, transparent 100%);
  animation: rumiRippleAnim 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 30;
}

@keyframes rumiRippleAnim {
  to {
    transform: scale(3.5);
    opacity: 0;
  }
}

.rumi-slider-track {
  display: flex;
  transition: transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}

.rumi-slider-track.is-dragging {
  transition: none;
  cursor: grabbing;
}

#rumi-menu-toggle.is-active .line-1 {
  transform: translateY(8px) rotate(45deg);
}
#rumi-menu-toggle.is-active .line-2 {
  opacity: 0;
  transform: translateX(-8px);
}
#rumi-menu-toggle.is-active .line-3 {
  transform: translateY(-8px) rotate(-45deg);
}
#rumi-menu-toggle line {
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

#rumi-mobile-drawer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.38s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.28s ease;
}
#rumi-mobile-drawer.is-open {
  max-height: 480px;
  opacity: 1;
}

@keyframes rumiSectionHighlight {
  0% { background-color: rgba(234, 144, 16, 0); }
  30% { background-color: rgba(234, 144, 16, 0.14); }
  100% { background-color: rgba(234, 144, 16, 0); }
}

.rumi-flash-highlight {
  animation: rumiSectionHighlight 1.2s ease-out;
}

/* Custom scrollbar styling */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
