/*
 Theme Name:   Adinda Daycare News Portal
 Theme URI:    https://adindadaycare.sch.id/
 Description:  Child theme Kadence bergaya Portal Berita Pendidikan modern (kompatibel Mobile & PC) dengan section Berita Terupdate otomatis untuk artikel terbaru.
 Author:       Dr. Erni Furwanti / Hermes AI
 Template:     kadence
 Version:      1.0.5
 Text Domain:  adindadaycare-news
*/

:root {
  --dm-primary: #0f4c3a;
  --dm-primary-dark: #093528;
  --dm-primary-light: #ecfdf5;
  --dm-accent: #d97706;
  --dm-accent-soft: #fef3c7;
  --dm-bg: #f8fafc;
  --dm-surface: #ffffff;
  --dm-text: #0f172a;
  --dm-muted: #475569;
  --dm-border: #e2e8f0;
  --dm-radius: 12px;
}

body {
  background-color: var(--dm-bg);
  color: var(--dm-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Fix Kadence Transparent Header Overlap & Wrapping */
#masthead,
.site-header,
.site-header-wrap,
.kadence-sticky-header,
.site-header-row-container-inner {
  position: relative !important;
  top: auto !important;
  background: #ffffff !important;
  color: var(--dm-text) !important;
  z-index: 50 !important;
}
#masthead {
  border-bottom: 1px solid var(--dm-border) !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
}
.site-header .site-title,
.site-header .site-title a {
  font-size: 1rem !important;
  line-height: 1.25 !important;
  color: var(--dm-primary) !important;
  font-weight: 800 !important;
}
.site-header .main-navigation .menu > li > a {
  font-size: 0.85rem !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  white-space: nowrap !important;
}

/* Portal Container */
.dm-portal-container {
  position: relative;
  z-index: 1;
  clear: both;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* Breaking / Terupdate Ticker */
.dm-ticker-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--dm-surface);
  border: 1px solid var(--dm-border);
  border-left: 4px solid var(--dm-accent);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 22px;
  overflow: hidden;
}

.dm-ticker-badge {
  background: #dc2626;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.dm-ticker-list {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.dm-ticker-list::-webkit-scrollbar { display: none; }

.dm-ticker-list a {
  color: var(--dm-text);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}
.dm-ticker-list a:hover {
  color: var(--dm-primary);
  text-decoration: underline;
}

/* Section Header */
.dm-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--dm-border);
  padding-bottom: 8px;
  margin: 30px 0 18px;
}

.dm-section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dm-primary);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.dm-section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 64px;
  height: 3px;
  background: var(--dm-accent);
}

.dm-section-more {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dm-primary);
  text-decoration: none;
}
.dm-section-more:hover {
  text-decoration: underline;
}

/* Hero Berita Terupdate Grid (PC: 2 cols, Mobile: stacked with #1 on top) */
.dm-hero-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.dm-hero-main {
  position: relative;
  background: var(--dm-surface);
  border: 1px solid var(--dm-border);
  border-radius: var(--dm-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.dm-hero-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e2e8f0;
}
.dm-hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.dm-hero-main:hover .dm-hero-thumb img {
  transform: scale(1.03);
}

.dm-badge-live {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--dm-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 5px 11px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.dm-hero-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dm-cat-pill {
  display: inline-block;
  align-self: flex-start;
  background: var(--dm-primary-light);
  color: var(--dm-primary);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 10px;
  border-radius: 6px;
  text-decoration: none;
}

.dm-hero-title {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
}
.dm-hero-title a {
  color: var(--dm-text);
  text-decoration: none;
}
.dm-hero-title a:hover {
  color: var(--dm-primary);
}

.dm-hero-excerpt {
  color: var(--dm-muted);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.6;
}

.dm-meta-line {
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

/* Side List of Latest News */
.dm-hero-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dm-side-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  background: var(--dm-surface);
  border: 1px solid var(--dm-border);
  border-radius: 10px;
  padding: 10px;
  align-items: center;
  transition: box-shadow 0.2s ease;
}
.dm-side-card:hover {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.dm-side-thumb {
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  overflow: hidden;
  background: #e2e8f0;
}
.dm-side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dm-side-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 4px 0 6px;
}
.dm-side-info h3 a {
  color: var(--dm-text);
  text-decoration: none;
}
.dm-side-info h3 a:hover {
  color: var(--dm-primary);
}

/* Cards Grid (3 Columns Desktop, 1 Column Mobile) */
.dm-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.dm-card {
  background: var(--dm-surface);
  border: 1px solid var(--dm-border);
  border-radius: var(--dm-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dm-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
}

.dm-card-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e2e8f0;
}
.dm-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dm-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.dm-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.38;
  margin: 0;
}
.dm-card-title a {
  color: var(--dm-text);
  text-decoration: none;
}
.dm-card-title a:hover {
  color: var(--dm-primary);
}

.dm-card-excerpt {
  font-size: 0.88rem;
  color: var(--dm-muted);
  margin: 0;
  line-height: 1.55;
}

/* Single Post Portal Layout */
.dm-single-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 28px;
  align-items: start;
}

.dm-single-article {
  background: var(--dm-surface);
  border: 1px solid var(--dm-border);
  border-radius: var(--dm-radius);
  padding: 32px 36px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.dm-breadcrumb {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 14px;
}
.dm-breadcrumb a {
  color: var(--dm-primary);
  text-decoration: none;
  font-weight: 600;
}

.dm-single-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 10px 0 14px;
  color: #0f172a;
}

.dm-single-featured {
  margin: 18px 0 24px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--dm-border);
}
.dm-single-featured img {
  width: 100%;
  height: auto;
  display: block;
}

.dm-single-content {
  font-size: 1.03rem;
  line-height: 1.8;
  color: #1e293b;
}
.dm-single-content h2 {
  font-size: 1.4rem;
  color: var(--dm-primary);
  margin: 30px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--dm-primary-light);
}
.dm-single-content h3 {
  font-size: 1.15rem;
  color: #0f172a;
  margin: 22px 0 10px;
}
.dm-single-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.dm-sidebar-box {
  background: var(--dm-surface);
  border: 1px solid var(--dm-border);
  border-radius: var(--dm-radius);
  padding: 18px;
  position: sticky;
  top: 20px;
}
.dm-sidebar-box h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--dm-primary);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--dm-accent);
}

.dm-sidebar-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--dm-border);
}
.dm-sidebar-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.dm-sidebar-item a {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--dm-text);
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 4px;
}
.dm-sidebar-item a:hover {
  color: var(--dm-primary);
}
.dm-sidebar-item span {
  font-size: 0.78rem;
  color: #64748b;
}

/* Responsive Mobile */
@media (max-width: 960px) {
  .dm-hero-grid {
    grid-template-columns: 1fr;
  }
  .dm-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dm-single-layout {
    grid-template-columns: 1fr;
  }
  .dm-sidebar-box {
    position: static;
  }
}

@media (max-width: 640px) {
  #mobile-header .site-title,
  .site-header .site-title {
    display: none !important;
  }
  #mobile-header .custom-logo-link img,
  .site-header .custom-logo-link img {
    max-height: 44px !important;
    width: auto !important;
  }
  .dm-portal-container {
    padding: 12px 12px 36px;
  }
  .dm-hero-title {
    font-size: 1.28rem;
  }
  .dm-hero-body {
    padding: 14px 16px 18px;
  }
  .dm-cards-grid {
    grid-template-columns: 1fr;
  }
  .dm-side-card {
    grid-template-columns: 96px 1fr;
  }
  .dm-single-article {
    padding: 20px 16px;
  }
  .dm-single-title {
    font-size: 1.48rem;
  }
  .dm-single-content [style*="display: grid"] {
    grid-template-columns: 1fr !important;
  }
}
