/* ==============================================================================
   Kanomas Tasikmalaya - Article & Doa Portal Layout Stylesheet
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-navy: #0b161f;
  --secondary-navy: #14222e;
  --accent-orange: #ea580c;
  --accent-orange-hover: #c2410c;
  --accent-gold: #fed7aa;
  --accent-emerald: #16a34a;
  --bg-slate: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-slate);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

.font-serif-luxury {
  font-family: 'Playfair Display', Georgia, serif;
}

.font-arabic {
  font-family: 'Amiri', 'Traditional Arabic', 'Scheherazade New', serif;
  direction: rtl;
  text-align: right;
  line-height: 2.2;
}

/* Header & Navbar */
.kanomas-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.nav-link {
  font-weight: 700;
  font-size: 0.875rem;
  color: #334155;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-orange);
}

/* Breadcrumbs */
.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}
.breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb-item a:hover {
  color: var(--accent-orange);
}

/* Article Typography */
.article-content {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #334155;
}

.article-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #fed7aa;
}

.article-content h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-content p {
  margin-bottom: 1.35rem;
}

.article-content ul, .article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.6rem;
}

/* Hadith Quote Card */
.hadith-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border-left: 4px solid var(--accent-emerald);
  border-radius: 1rem;
  padding: 1.5rem;
  margin: 1.75rem 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.hadith-arabic {
  font-size: 1.4rem;
  font-family: 'Amiri', serif;
  color: #064e3b;
  line-height: 2.2;
  margin-bottom: 0.75rem;
  direction: rtl;
  text-align: right;
}

.hadith-translation {
  font-size: 0.9375rem;
  font-style: italic;
  color: #047857;
  line-height: 1.6;
}

.hadith-reference {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #065f46;
  background: rgba(16, 185, 129, 0.15);
  padding: 0.25rem 0.6rem;
  rounded: 0.5rem;
  border-radius: 0.375rem;
}

/* Callout Box */
.callout-box {
  background: #fff7ed;
  border-left: 4px solid var(--accent-orange);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  color: #9a3412;
}

/* Doa Card */
.doa-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.doa-card:hover {
  border-color: var(--accent-orange);
  box-shadow: 0 12px 24px -8px rgba(234, 88, 12, 0.15);
  transform: translateY(-2px);
}

.doa-arabic-text {
  font-family: 'Amiri', 'Traditional Arabic', serif;
  font-size: 1.5rem;
  color: #0f172a;
  line-height: 2.3;
  direction: rtl;
  text-align: right;
  margin: 1rem 0;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  border: 1px dashed #cbd5e1;
}

.doa-latin {
  font-size: 0.875rem;
  color: #ea580c;
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.doa-meaning {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Copy Button */
.btn-copy-doa {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4rem 0.85rem;
  border-radius: 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-doa:hover {
  background: #ea580c;
  color: #ffffff;
  border-color: #ea580c;
}

/* Toast Notification */
#toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  z-index: 99999;
  display: none;
  align-items: center;
  gap: 0.5rem;
  border-left: 4px solid var(--accent-emerald);
}

/* Filter Buttons */
.category-pill {
  padding: 0.5rem 1.15rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 700;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.category-pill:hover, .category-pill.active {
  background: var(--accent-orange);
  color: #ffffff;
  border-color: var(--accent-orange);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
}

/* ==============================================================================
   High-Contrast Dark Hero & Solid Backgrounds (Prevents White-on-White Glitches)
   ============================================================================== */
.bg-gradient-to-b,
section.bg-gradient-to-b {
  background: linear-gradient(180deg, #0b161f 0%, #14222e 50%, #0b161f 100%) !important;
  color: #ffffff !important;
  position: relative;
}

section.bg-gradient-to-b h1,
.article-hero h1 {
  color: #ffffff !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65) !important;
  line-height: 1.25 !important;
}

section.bg-gradient-to-b p {
  color: #e2e8f0 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) !important;
}

/* Fix Search Input: Prevent Magnifying Glass Icon Overlapping Placeholder Text */
.pl-12,
#search-article,
#search-doa {
  padding-left: 3.25rem !important;
  box-sizing: border-box !important;
}

/* Sidebar CTA Card Dark Contrast */
.bg-\[\#14222e\],
.sidebar-cta-card,
.bg-gradient-to-br,
aside .bg-gradient-to-br {
  background: linear-gradient(135deg, #14222e 0%, #0b161f 100%) !important;
  color: #ffffff !important;
}

.bg-\[\#14222e\] h3,
.sidebar-cta-card h3,
aside .bg-gradient-to-br h3 {
  color: #ffffff !important;
}

.bg-\[\#14222e\] p,
.sidebar-cta-card p,
aside .bg-gradient-to-br p {
  color: #cbd5e1 !important;
}

/* Color & Utility Fallbacks for Article Portal */
.bg-\[\#16a34a\] { background-color: #16a34a !important; }
.hover\:bg-\[\#15803d\]:hover { background-color: #15803d !important; }
.bg-\[\#ea580c\] { background-color: #ea580c !important; }
.text-\[\#ea580c\] { color: #ea580c !important; }
.text-\[\#fed7aa\] { color: #fed7aa !important; }
.border-orange-500\/20 { border-color: rgba(249, 115, 22, 0.25) !important; }
.border-white\/15 { border-color: rgba(255, 255, 255, 0.15) !important; }
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.10) !important; }
.bg-white\/95 { background-color: rgba(255, 255, 255, 0.95) !important; }

/* Responsive tweaks */
@media (max-width: 640px) {
  .article-content {
    font-size: 0.98rem;
  }
  .doa-arabic-text {
    font-size: 1.3rem;
    line-height: 2;
  }
  section.bg-gradient-to-b h1 {
    font-size: 1.65rem !important;
    word-break: break-word !important;
  }
}

/* ==============================================================================
   Mobile Header & Breadcrumb No-Overlap Optimization
   ============================================================================== */
@media (max-width: 640px) {
  .kanomas-header .max-w-7xl {
    height: 4.25rem !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  .kanomas-header a.text-decoration-none {
    max-width: calc(100% - 115px) !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
  }
  .kanomas-header a.text-decoration-none > div {
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .kanomas-header a.text-decoration-none span.block {
    font-size: 0.85rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .kanomas-header a.text-decoration-none span.uppercase {
    font-size: 8px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .kanomas-header .rounded-xl {
    padding: 0.5rem 0.75rem !important;
    font-size: 11px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
}

/* Scrollbar Removal Utility for Category Pills & Breadcrumbs */
.no-scrollbar,
#category-filters,
nav.overflow-x-auto {
  -webkit-overflow-scrolling: touch !important;
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}
.no-scrollbar::-webkit-scrollbar,
#category-filters::-webkit-scrollbar,
nav.overflow-x-auto::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* ==============================================================================
   Article Card Enhancement (Clean Elevation, Clickable Surface, No Overflow)
   ============================================================================== */
.article-card {
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
}

.article-card.hidden {
  display: none !important;
}

.article-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.12) !important;
  border-color: var(--accent-orange) !important;
}

.article-card .card-main-link {
  position: absolute;
  inset: 0;
  z-index: 5;
  text-indent: -9999px;
  overflow: hidden;
}

.article-card a:not(.card-main-link) {
  position: relative;
  z-index: 10;
}

/* Proportional Marketing 4.0 Thumbnail for Article Cards */
.article-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-top-left-radius: 1.5rem;
  border-top-right-radius: 1.5rem;
  background-color: #0f172a;
}

.article-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.article-card-thumb .thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.55) 100%);
  pointer-events: none;
}

/* Featured Media in Article Detail Pages */
.article-featured-media {
  margin: 2rem 0 2.25rem 0;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.article-featured-media img {
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: cover;
  display: block;
}

.article-featured-media figcaption {
  padding: 0.75rem 1.25rem;
  background-color: #f8fafc;
  font-size: 0.75rem;
  color: #64748b;
  font-style: italic;
  text-align: center;
  border-top: 1px solid #f1f5f9;
  line-height: 1.5;
}


