/* ============================================
   FaradibaDigital
   Modern Editorial Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ---- CSS Variables ---- */
:root {
  --red: #C1121F;
  --red-dark: #9B111E;
  --red-light: #FF4D5A;
  --ink: #1A1A2E;
  --ink-soft: #2D2D44;
  --gray-900: #1C1C1E;
  --gray-700: #3A3A3C;
  --gray-500: #636366;
  --gray-300: #C7C7CC;
  --gray-100: #F2F2F7;
  --gray-50: #F8F8FA;
  --white: #FFFFFF;
  --gold: #C9A84C;
  --teal: #1D7A8C;
  --green: #2D6A4F;
  --blue: #1A4A7A;
  --purple: #5A0E8C;
  --orange: #E07835;

  --nav-height: 64px;
  --bottom-nav-height: 68px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-ui: 'DM Sans', sans-serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-ui);
  background: var(--gray-50);
  color: var(--ink);
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-nav-height) + 16px);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-ui); }

/* ============================================
   TOP NAVIGATION
   ============================================ */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--red);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: white;
  font-family: var(--font-display);
  letter-spacing: -1px;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: white;
  letter-spacing: -0.5px;
}

.nav-logo-text span { color: var(--red-light); }

.nav-search {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 6px 14px;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.2s;
  max-width: 240px;
  flex: 1;
  margin: 0 16px;
}

.nav-search:focus-within {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.35);
}

.nav-search input {
  background: none;
  border: none;
  color: white;
  font-size: 0.875rem;
  width: 100%;
  outline: none;
  font-family: var(--font-ui);
}

.nav-search input::placeholder { color: rgba(255,255,255,0.5); }
.nav-search svg { flex-shrink: 0; opacity: 0.6; }

.nav-date {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  flex-shrink: 0;
  text-align: right;
  line-height: 1.3;
  display: none;
}

@media (min-width: 480px) { .nav-date { display: block; } }

/* Category Scroll Bar */
.category-bar {
  background: white;
  border-bottom: 1px solid var(--gray-100);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-bar::-webkit-scrollbar { display: none; }

.category-bar-inner {
  display: flex;
  padding: 0 16px;
  gap: 4px;
  min-width: max-content;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-500);
  white-space: nowrap;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  background: none;
}

.cat-pill:hover { color: var(--ink); border-bottom-color: var(--gray-300); }
.cat-pill.active { color: var(--red); border-bottom-color: var(--red); font-weight: 600; }

/* ============================================
   MAIN CONTENT LAYOUT
   ============================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ============================================
   HERO / FEATURED NEWS
   ============================================ */
.hero-section {
  padding: 20px 0 0;
}

.hero-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  aspect-ratio: 16/9;
  max-height: 420px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
  transition: opacity 0.3s, transform 0.4s;
}

.hero-card:hover .hero-img { opacity: 0.65; transform: scale(1.02); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10,10,20,0.92) 0%,
    rgba(10,10,20,0.4) 60%,
    transparent 100%
  );
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
}

.hero-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--red);
  color: white;
  margin-bottom: 10px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: 700;
  color: white;
  line-height: 1.25;
  margin-bottom: 10px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
}

.hero-meta span { display: flex; align-items: center; gap: 4px; }

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 16px;
  gap: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 22px;
  background: var(--red);
  border-radius: 2px;
  flex-shrink: 0;
}

.see-all {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--red);
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}

.see-all:hover { background: rgba(193,18,31,0.08); }

/* ============================================
   NEWS GRID - TRENDING
   ============================================ */
.news-grid-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 640px) {
  .news-grid-main { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .news-grid-main { grid-template-columns: repeat(3, 1fr); }
}

/* Card Style */
.news-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-img-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--gray-100);
  flex-shrink: 0;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

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

.card-cat-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: white;
}

.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.news-card:hover .card-title { color: var(--red); }

.card-excerpt {
  font-family: var(--font-body);
  font-size: 0.83rem;
  color: var(--gray-500);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.73rem;
  color: var(--gray-500);
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
}

.card-meta-left { display: flex; align-items: center; gap: 4px; }
.card-meta-right { display: flex; align-items: center; gap: 4px; }

/* ============================================
   HORIZONTAL SCROLL NEWS (Latest)
   ============================================ */
.news-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.news-scroll::-webkit-scrollbar { display: none; }

.news-scroll-card {
  flex: 0 0 200px;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
}

.news-scroll-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.scroll-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.scroll-card-body { padding: 10px; }

.scroll-card-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.scroll-card-time {
  font-size: 0.7rem;
  color: var(--gray-500);
}

/* ============================================
   LIST NEWS (Berita Terbaru)
   ============================================ */
.news-list { display: flex; flex-direction: column; gap: 10px; }

.news-list-item {
  display: flex;
  gap: 12px;
  background: white;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  padding: 12px;
  align-items: flex-start;
}

.news-list-item:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }

.list-item-img {
  flex: 0 0 90px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
}

.list-item-body { flex: 1; min-width: 0; }

.list-item-cat {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.list-item-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  transition: color 0.2s;
}

.news-list-item:hover .list-item-title { color: var(--red); }

.list-item-meta {
  font-size: 0.7rem;
  color: var(--gray-500);
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ============================================
   TICKER / BREAKING NEWS
   ============================================ */
.ticker-bar {
  background: var(--red);
  color: white;
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 36px;
  margin: 16px 0 0;
}

.ticker-label {
  flex-shrink: 0;
  background: var(--red-dark);
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  gap: 6px;
}

.ticker-dot {
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.ticker-content {
  overflow: hidden;
  flex: 1;
}

.ticker-scroll {
  display: flex;
  animation: tickerMove 30s linear infinite;
  white-space: nowrap;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  padding: 0 20px;
  font-size: 0.8rem;
  font-weight: 500;
  gap: 8px;
}

.ticker-item::after {
  content: '●';
  font-size: 0.5rem;
  opacity: 0.6;
  margin-left: 20px;
}

@keyframes tickerMove {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================
   BOTTOM NAVIGATION
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: white;
  border-top: 1px solid var(--gray-100);
  height: var(--bottom-nav-height);
  display: flex;
  align-items: stretch;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  color: var(--gray-500);
  font-size: 0.68rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
  text-decoration: none;
  cursor: pointer;
}

.nav-item svg {
  transition: transform 0.2s;
}

.nav-item:hover { color: var(--ink); }
.nav-item:hover svg { transform: translateY(-1px); }

.nav-item.active { color: var(--red); }

.nav-item.active .nav-icon-wrap {
  background: rgba(193,18,31,0.1);
  border-radius: 12px;
  padding: 4px 12px;
  margin-bottom: -2px;
}

.nav-icon-wrap {
  padding: 4px 12px;
  border-radius: 12px;
}

.nav-item span { line-height: 1; }

/* ============================================
   DETAIL PAGE
   ============================================ */
.detail-header {
  padding: 20px 0 0;
}

.detail-hero-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.detail-cat-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: white;
  margin: 16px 0 10px;
}

.detail-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  font-weight: 900;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 14px;
}

.detail-summary {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  font-style: italic;
  color: var(--gray-700);
  line-height: 1.6;
  border-left: 3px solid var(--red);
  padding-left: 16px;
  margin-bottom: 20px;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 24px;
  font-size: 0.8rem;
  color: var(--gray-500);
  flex-wrap: wrap;
}

.detail-meta-item { display: flex; align-items: center; gap: 5px; }
.detail-author { font-weight: 600; color: var(--ink); }

.detail-content {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--gray-700);
}

.detail-content p { margin-bottom: 20px; }
.detail-content h2 { font-family: var(--font-display); font-size: 1.4rem; margin: 24px 0 12px; color: var(--ink); }
.detail-content blockquote {
  border-left: 4px solid var(--red);
  padding: 12px 20px;
  margin: 20px 0;
  background: var(--gray-50);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--gray-700);
}

/* Share Actions */
.share-actions {
  display: flex;
  gap: 10px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
  border: 1.5px solid var(--gray-300);
  color: var(--gray-700);
  cursor: pointer;
}

.share-btn:hover { background: var(--gray-100); border-color: var(--gray-500); }
.share-btn.like-btn { border-color: var(--red); color: var(--red); }
.share-btn.like-btn:hover { background: rgba(193,18,31,0.08); }
.share-btn.liked { background: var(--red); color: white; border-color: var(--red); }

/* Comments */
.comments-section { margin: 32px 0; }

.comments-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--ink);
}

.comment-form {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--gray-50);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(193,18,31,0.1);
  background: white;
}

.form-textarea { resize: vertical; min-height: 90px; }

.submit-btn {
  background: var(--red);
  color: white;
  padding: 10px 24px;
  border-radius: 24px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.submit-btn:hover { background: var(--red-dark); transform: translateY(-1px); }
.submit-btn:active { transform: translateY(0); }

.comment-item {
  background: white;
  border-radius: var(--radius-sm);
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  border-left: 3px solid var(--gray-100);
}

.comment-author { font-size: 0.85rem; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.comment-time { font-size: 0.72rem; color: var(--gray-500); margin-bottom: 8px; }
.comment-text { font-family: var(--font-body); font-size: 0.9rem; color: var(--gray-700); line-height: 1.5; }

/* ============================================
   SEARCH PAGE
   ============================================ */
.search-hero {
  background: var(--ink);
  padding: 40px 20px 50px;
  text-align: center;
}

.search-hero-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  color: white;
  margin-bottom: 20px;
}

.search-form {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  background: white;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.search-input {
  flex: 1;
  padding: 14px 20px;
  border: none;
  font-size: 1rem;
  font-family: var(--font-ui);
  outline: none;
  color: var(--ink);
}

.search-submit {
  background: var(--red);
  color: white;
  padding: 14px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-ui);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-submit:hover { background: var(--red-dark); }

.search-results-count {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin: 20px 0 12px;
  font-style: italic;
}

/* ============================================
   KATEGORI PAGE
   ============================================ */
.kategori-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}

@media (min-width: 480px) { .kategori-grid { grid-template-columns: repeat(3, 1fr); } }

.kategori-card {
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  color: white;
  box-shadow: var(--shadow);
}

.kategori-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.kategori-icon { font-size: 1.8rem; margin-bottom: 8px; }

.kategori-name { font-weight: 700; font-size: 0.9rem; }
.kategori-count { font-size: 0.75rem; opacity: 0.8; margin-top: 2px; }

/* ============================================
   PROFILE PAGE
   ============================================ */
.profile-hero {
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%);
  padding: 40px 20px 60px;
  text-align: center;
  position: relative;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 14px;
  border: 3px solid rgba(255,255,255,0.2);
}

.profile-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}

.profile-role { font-size: 0.85rem; color: rgba(255,255,255,0.6); }

.profile-stats {
  display: flex;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin: -30px 20px 20px;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 16px 8px;
  border-right: 1px solid var(--gray-100);
}

.stat-item:last-child { border-right: none; }
.stat-value { font-size: 1.3rem; font-weight: 700; color: var(--red); margin-bottom: 2px; }
.stat-label { font-size: 0.7rem; color: var(--gray-500); }

.menu-list { margin: 0 0 20px; }

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: white;
  border-bottom: 1px solid var(--gray-50);
  cursor: pointer;
  transition: background 0.15s;
}

.menu-item:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.menu-item:last-child { border-radius: 0 0 var(--radius) var(--radius); border-bottom: none; }
.menu-item:hover { background: var(--gray-50); }

.menu-item-left { display: flex; align-items: center; gap: 12px; }
.menu-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.menu-label { font-size: 0.9rem; font-weight: 500; color: var(--ink); }
.menu-chevron { color: var(--gray-300); }

/* ============================================
   ALERTS & NOTICES
   ============================================ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-success { background: #d4edda; color: #155724; }
.alert-error { background: #f8d7da; color: #721c24; }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}

.empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-title { font-size: 1.1rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.empty-text { font-size: 0.875rem; }

/* ============================================
   BACK BUTTON
   ============================================ */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: color 0.2s;
}

.back-btn:hover { color: var(--red); }

/* ============================================
   LOADING SKELETON
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-red { color: var(--red); }
.text-muted { color: var(--gray-500); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.pb-20 { padding-bottom: 20px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .container { padding: 0 24px; }

  /* Desktop top nav with menu */
  .nav-date { display: block; }
}

@media (max-width: 480px) {
  .hero-content { padding: 16px; }
  .section-title { font-size: 1.1rem; }
}

/* Smooth page transitions */
.page-fade {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   FARADIBA DIGITAL — MOBILE RESPONSIVE (FULL)
   ============================================ */

/* --- Hamburger Button (visible on mobile) --- */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  cursor: pointer;
  flex-shrink: 0;
  border: none;
  transition: background 0.2s;
}
.nav-hamburger:hover { background: rgba(255,255,255,0.2); }
.nav-hamburger span {
  display: block;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Mobile Drawer Menu --- */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 999;
}
.mobile-drawer.open { display: block; }

.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
}

.mobile-drawer-panel {
  position: absolute;
  top: 0; right: 0;
  width: min(80vw, 300px);
  height: 100%;
  background: white;
  box-shadow: -4px 0 24px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
}
.mobile-drawer.open .mobile-drawer-panel { transform: translateX(0); }

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--ink);
  color: white;
  flex-shrink: 0;
}
.mobile-drawer-header strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: -0.3px;
}
.mobile-drawer-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: white;
  cursor: pointer; border: none;
  transition: background 0.2s;
}
.mobile-drawer-close:hover { background: rgba(255,255,255,0.25); }

.mobile-drawer-nav {
  flex: 1;
  padding: 12px 0;
}
.mobile-drawer-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s, color 0.15s;
}
.mobile-drawer-nav a:hover { background: #f7f7f8; color: var(--red); }
.mobile-drawer-nav a.active { color: var(--red); background: #fff5f5; }

.mobile-drawer-search {
  padding: 14px 20px;
  border-top: 1px solid var(--gray-100);
  flex-shrink: 0;
}
.mobile-drawer-search form {
  display: flex;
  gap: 8px;
}
.mobile-drawer-search input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: var(--font-ui);
  outline: none;
  transition: border-color 0.2s;
}
.mobile-drawer-search input:focus { border-color: var(--red); }
.mobile-drawer-search button {
  padding: 10px 14px;
  background: var(--red);
  color: white;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.mobile-drawer-socials {
  padding: 16px 20px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.mobile-drawer-socials a {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-500);
  transition: background 0.2s, color 0.2s;
}
.mobile-drawer-socials a:hover { background: var(--red); color: white; }

/* --- Tablet 640px breakpoint --- */
@media (min-width: 640px) {
  .hero-card { aspect-ratio: 16/7; }
  .article-detail-layout { grid-template-columns: 1fr 300px; }
}

/* --- Desktop 768px+ --- */
@media (min-width: 768px) {
  .nav-hamburger { display: none; }
  .nav-search { max-width: 300px; }
  .hero-card { max-height: 480px; }
}

/* --- Mobile <640px: tighten layout --- */
@media (max-width: 639px) {
  :root { --nav-height: 54px; }

  .top-nav { padding: 0 14px; }

  /* Shrink search bar on small screens */
  .nav-search { max-width: 140px; margin: 0 8px; }

  /* Hero tighter */
  .hero-section { padding: 12px 0 0; }
  .hero-card { aspect-ratio: 4/3; max-height: 300px; border-radius: 10px; }
  .hero-title { font-size: 1.15rem !important; }
  .hero-content { padding: 14px 14px 18px; }

  /* News cards single column */
  .news-grid-main { grid-template-columns: 1fr; }

  /* Section headers */
  .section-title { font-size: 1rem; }

  /* Container padding */
  .container { padding: 0 12px; }

  /* Ticker text smaller */
  .ticker-item { font-size: 0.8rem; }

  /* Kategori bar scroll without gaps */
  .category-bar-inner { gap: 6px; padding: 0 12px; }
  .cat-pill { font-size: 0.78rem; padding: 6px 12px; }

  /* Cards layout: side-by-side on very narrow screens */
  .news-card-h { flex-direction: row; }
  .news-card-h .news-card-img-wrap { width: 110px; flex-shrink: 0; height: auto; aspect-ratio: 1; }

  /* Sidebar stacks below content */
  .article-detail-layout { grid-template-columns: 1fr; }

  /* Footer columns stack */
  .footer-grid { grid-template-columns: 1fr !important; gap: 24px !important; }

  /* Bottom nav bigger tap targets */
  .nav-item { gap: 3px; }
  .nav-icon-wrap { width: 30px; height: 30px; }
}

/* --- Very small phones <380px --- */
@media (max-width: 379px) {
  .nav-search { display: none; }
  .nav-logo-text { font-size: 1.1rem; }
  .hero-title { font-size: 1rem !important; }
}

/* --- Touch/tap optimizations --- */
@media (hover: none) {
  .news-card:hover { transform: none; box-shadow: var(--shadow); }
  .news-card:active { transform: scale(0.98); }
  .cat-pill:active { opacity: 0.7; }
  a:active { opacity: 0.75; }
}

/* --- Scrollable reading view on mobile --- */
@media (max-width: 767px) {
  .article-content { font-size: 1rem; line-height: 1.8; }
  .article-content h2 { font-size: 1.2rem; }
  .article-content h3 { font-size: 1.05rem; }
  .article-content img { border-radius: 10px; }
}

/* Hide desktop social icons on mobile (they appear in drawer) */
@media (max-width: 639px) {
  #navSocials { display: none !important; }
}

/* ============================================
   PERBAIKAN MOBILE & HEADER — PATCH v2
   ============================================ */

/* === HEADER IMPROVEMENTS === */
.top-nav {
  gap: 8px;
}

/* Logo area — never collapse */
.nav-logo {
  min-width: 0;
  flex-shrink: 1;
}
.nav-logo-text {
  font-size: 1.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

/* Category bar scrollable with hidden scrollbar */
.category-bar {
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.category-bar-inner {
  scroll-snap-align: start;
}

/* Ticker — smoother on mobile */
.ticker-bar {
  overflow: hidden;
}

/* === BOTTOM NAV === */
.bottom-nav {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.95);
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* === ARTICLE READING === */
@media (max-width: 767px) {
  .article-content {
    font-size: 1.0rem;
    line-height: 1.85;
    word-break: break-word;
  }
  .article-content img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    border-radius: 10px;
  }
  .article-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .article-content pre, .article-content code {
    overflow-x: auto;
    max-width: 100%;
    font-size: 0.85rem;
  }
  .article-content blockquote {
    margin: 16px 0;
    padding: 12px 16px;
  }
}

/* === CARD FIXES MOBILE === */
@media (max-width: 639px) {
  /* Prevent overflow on cards */
  .news-card {
    width: 100%;
  }
  .news-card-title {
    font-size: 0.95rem;
    line-height: 1.4;
  }
  /* Search form full width */
  .nav-search {
    flex: 1;
    max-width: none;
    min-width: 0;
  }
  /* Page wrapper article no padding bleed */
  main, .page-content {
    overflow-x: hidden;
  }
  /* Hero caption smaller */
  .hero-meta {
    font-size: 0.72rem;
    flex-wrap: wrap;
    gap: 6px;
  }
  /* Tags on hero wrap nicely */
  .cat-chip {
    font-size: 0.65rem;
    padding: 3px 8px;
  }
}

/* === HEADER — desktop wider search === */
@media (min-width: 768px) {
  .top-nav {
    padding: 0 28px;
    gap: 16px;
  }
  .nav-search {
    max-width: 340px;
    flex: 1;
  }
  .nav-logo-text {
    font-size: 1.45rem;
    max-width: none;
  }
  /* Show date & social */
  .nav-date { display: flex; flex-direction: column; align-items: flex-end; }
}

/* === FULL PAGE SCROLL FIX === */
html {
  scroll-padding-top: calc(var(--nav-height) + 40px);
}

/* === IMAGE UPLOAD ZONE in admin (if viewed on mobile) === */
#drop-zone {
  touch-action: manipulation;
}

/* Hamburger visible only on mobile */
.nav-hamburger {
  display: none !important;
}
@media (max-width: 767px) {
  .nav-hamburger {
    display: flex !important;
  }
  /* On mobile: hide social icons in topnav (shown in drawer) */
  #navSocials { display: none !important; }
  /* Shrink logo text on mobile */
  .nav-logo-text { font-size: 1.1rem !important; }
  .nav-search { max-width: 140px !important; margin: 0 6px !important; }
}
@media (max-width: 379px) {
  .nav-search { display: none !important; }
}
