/* Beritanya Main Stylesheet — Portal Berita Beritanya */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
  background-color: #ffffff;
  color: var(--beritanya-ink, #2b2b2b);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.65;
}

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

a, button, input[type="submit"] {
  touch-action: manipulation;
}

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

.beritanya-container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Header & Navigation */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #eeeeee;
  position: relative;
  z-index: 40;
}

.inside-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 68px;
}

.site-wordmark {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--beritanya-nav, #232b3d);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-branding {
  flex-shrink: 0;
}

.site-branding img,
.site-branding .custom-logo,
.beritanya-default-logo {
  max-height: 36px;
  width: auto;
  height: auto;
  display: block;
}

.main-navigation {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.beritanya-nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.beritanya-nav-list a {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--beritanya-nav, #232b3d);
  white-space: nowrap;
  transition: color 0.15s ease;
}

.beritanya-nav-list a:hover,
.beritanya-nav-list .current-menu-item > a {
  color: var(--beritanya-accent, #e30613);
}

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

.beritanya-search-toggle,
.beritanya-menu-toggle {
  background: transparent;
  border: none;
  color: var(--beritanya-nav, #232b3d);
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.beritanya-menu-toggle {
  display: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--beritanya-accent, #e30613);
  outline-offset: 2px;
}

.beritanya-search-bar {
  background: #fafafa;
  border-top: 1px solid #eeeeee;
  padding: 14px 0;
}

.beritanya-search-bar .search-form {
  display: flex;
  gap: 10px;
  max-width: 560px;
}

.beritanya-search-bar input[type="search"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  font-size: 14px;
}

.beritanya-search-bar input[type="submit"] {
  background: var(--beritanya-accent, #e30613);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
}

/* Main 2-Column Layout */
.site-content {
  padding-top: 28px;
  padding-bottom: 48px;
}

.beritanya-layout-grid {
  display: grid;
  grid-template-columns: 1fr var(--beritanya-sidebar-width, 380px);
  gap: 40px;
  align-items: start;
}

/* Section Heading */
.beritanya-section-header {
  margin-bottom: 22px;
}

.beritanya-section-title {
  font-size: 19px;
  font-weight: 700;
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px dashed #cccccc;
  color: var(--beritanya-ink, #2b2b2b);
}

.beritanya-archive-header {
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 18px;
  margin-bottom: 26px;
}

.beritanya-archive-header .page-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

/* Clean Editorial Card Frame */
.beritanya-thumb-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background-color: #f1f5f9;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  margin-bottom: 14px;
}

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

.beritanya-featured-card:hover .beritanya-thumb-frame img,
.beritanya-list-card:hover .beritanya-thumb-frame img,
.beritanya-thumb-frame:hover img {
  transform: scale(1.025);
}

.beritanya-thumb-16x9 {
  aspect-ratio: 16 / 9;
}

@media (prefers-reduced-motion: reduce) {
  .beritanya-thumb-frame img {
    transition: none;
  }
}

/* Featured Top 2 Grid */
.beritanya-featured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  margin-bottom: 28px;
}

.beritanya-featured-card .entry-title {
  font-size: 21px;
  line-height: 1.35;
  font-weight: 600;
  margin: 6px 0 0;
  color: var(--beritanya-ink, #2b2b2b);
}

.beritanya-featured-card .entry-title a:hover {
  color: var(--beritanya-accent, #e30613);
}

/* Meta Line */
.beritanya-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--beritanya-muted, #8a8a8a);
}

.beritanya-cat-link {
  color: var(--beritanya-accent, #e30613);
  font-weight: 700;
}

.beritanya-meta-dot {
  color: #cccccc;
}

/* Stream List (Post 3+) */
.beritanya-stream-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.beritanya-list-card {
  display: grid;
  grid-template-columns: 192px 1fr;
  gap: 20px;
  border-top: 1px solid #eeeeee;
  padding-top: 18px;
  align-items: start;
}

.beritanya-thumb-list {
  width: 192px;
  aspect-ratio: 16 / 9;
  height: auto;
  margin-bottom: 0;
}

.beritanya-list-body .entry-title {
  font-size: 15.5px;
  line-height: 1.42;
  font-weight: 600;
  margin: 6px 0 0;
}

.beritanya-list-body .entry-title a:hover {
  color: var(--beritanya-accent, #e30613);
}

/* Sidebar */
.widget-area {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.widget-area .widget {
  margin: 0;
}

.widget-area .widget-title,
.widget-area .wp-block-heading {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  padding-bottom: 10px;
  border-bottom: 1px solid #eeeeee;
  margin: 0 0 10px;
}

.widget-area .widget ul:not(.beritanya-sidebar-list),
.widget-area .wp-block-latest-posts,
.widget-area .wp-block-categories-list,
.widget-area .wp-block-archives-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.widget-area .widget ul:not(.beritanya-sidebar-list) li,
.widget-area .wp-block-latest-posts li,
.widget-area .wp-block-categories-list li,
.widget-area .wp-block-archives-list li {
  padding: 10px 6px;
  border-bottom: 1px solid #eeeeee;
  font-size: 14px;
  line-height: 1.45;
}

.widget-area .widget ul:not(.beritanya-sidebar-list) li:last-child,
.widget-area .wp-block-latest-posts li:last-child {
  border-bottom: none;
}

.widget-area .widget ul:not(.beritanya-sidebar-list) a:hover {
  color: var(--beritanya-accent, #e30613);
}

.widget-area .widget:empty,
.widget-area .widget_block:has(> .wp-block-group > .wp-block-group__inner-container:empty),
.widget-area .widget_block:has(> .wp-block-group:empty) {
  display: none;
}

.widget-area .wp-block-search__label:not(.screen-reader-text) {
  display: block;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  padding-bottom: 10px;
  border-bottom: 1px solid #eeeeee;
  margin: 0 0 12px;
  color: var(--beritanya-ink, #2b2b2b);
}

.widget-area .wp-block-search__inside-wrapper,
.widget-area .widget_search .search-form {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.widget-area .widget_search .search-form label {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.widget-area .wp-block-search__input,
.widget-area .widget_search .search-field {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  font-size: 14px;
}

.widget-area .wp-block-search__button,
.widget-area .widget_search .search-submit {
  background: var(--beritanya-accent, #e30613);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 9px 14px;
  margin-left: 0;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

.beritanya-sidebar-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.beritanya-sidebar-item {
  padding: 14px 8px;
  margin: 0 -8px;
  border-bottom: 1px solid #eeeeee;
  border-radius: 8px;
  transition: background-color 0.15s ease;
}

.beritanya-sidebar-item:hover {
  background-color: var(--beritanya-sidebar-hover, #faf7f5);
}

.beritanya-sidebar-item:last-child {
  border-bottom: none;
}

.beritanya-sidebar-link {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.beritanya-sidebar-title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--beritanya-ink, #2b2b2b);
  flex: 1;
}

.beritanya-sidebar-item:hover .beritanya-sidebar-title {
  color: var(--beritanya-accent, #e30613);
}

.beritanya-sidebar-thumb {
  order: 2;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Single Article & Related */
.beritanya-breadcrumb {
  font-size: 12.5px;
  color: var(--beritanya-muted, #8a8a8a);
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.beritanya-breadcrumb a:hover {
  color: var(--beritanya-accent, #e30613);
}

.beritanya-single-article .entry-title {
  font-size: 26px;
  line-height: 1.3;
  margin: 10px 0 18px;
}

.beritanya-single-cover {
  margin: 0 0 22px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #f1f5f9;
}

.beritanya-single-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.beritanya-single-article .entry-content {
  font-size: 16px;
  line-height: 1.75;
}

.beritanya-single-article .entry-content h2,
.beritanya-single-article .entry-content h3 {
  margin-top: 26px;
  margin-bottom: 10px;
}

.beritanya-single-article .entry-content figure:not(.wp-block-table) {
  margin: 22px 0;
}

.beritanya-single-article .entry-content figure:not(.wp-block-table) img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  background: #f3f4f6;
}

.beritanya-single-article .entry-content figcaption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--beritanya-muted, #6b7280);
}

.beritanya-byline {
  font-size: 13px;
  color: var(--beritanya-muted, #8a8a8a);
  margin: -10px 0 18px;
}

.beritanya-toc {
  margin: 0 0 24px;
  padding: 16px 18px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.beritanya-toc-title {
  margin: 0 0 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--beritanya-nav, #232b3d);
}

.beritanya-toc-list {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.65;
}

.beritanya-toc-list a:hover {
  color: var(--beritanya-accent, #e30613);
  text-decoration: underline;
}

.beritanya-single-article .entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 14px;
}

.beritanya-single-article .entry-content th,
.beritanya-single-article .entry-content td {
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.beritanya-single-article .entry-content th {
  background: #f8fafc;
  font-weight: 700;
}

.beritanya-ad-slot {
  margin: 22px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.beritanya-ad-slot[hidden] {
  display: none !important;
}

.beritanya-ad-mid {
  min-height: 120px;
}

.beritanya-ad-sidebar {
  min-height: 250px;
  margin-top: 28px;
}

.beritanya-share-box {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.beritanya-share-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--beritanya-nav, #232b3d);
}

.beritanya-share-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.beritanya-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.beritanya-share-btn:hover {
  color: #ffffff;
  opacity: 0.92;
}

.beritanya-share-wa {
  background-color: #16a34a;
}

.beritanya-share-fb {
  background-color: #1877f2;
}

.beritanya-share-tw {
  background-color: #0f172a;
}

.beritanya-author-box {
  margin-top: 28px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.beritanya-author-avatar {
  border-radius: 9999px;
  flex-shrink: 0;
}

.beritanya-author-name {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--beritanya-nav, #232b3d);
}

.beritanya-author-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #4b5563;
}

.beritanya-related-box {
  margin-top: 36px;
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
}

.beritanya-related-box .widget-title {
  font-size: 19px;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 1px solid #eeeeee;
  margin: 0 0 18px;
}

.beritanya-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.beritanya-related-grid .entry-title {
  font-size: 15px;
}

/* Pagination */
.beritanya-pagination {
  margin-top: 32px;
}

.beritanya-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.beritanya-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 7px 13px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--beritanya-ink, #2b2b2b);
}

.beritanya-pagination .page-numbers.current {
  background: var(--beritanya-accent, #e30613);
  border-color: var(--beritanya-accent, #e30613);
  color: #ffffff;
}

.footer-brand .custom-logo-link,
.footer-brand .footer-wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-brand img,
.footer-brand .custom-logo,
.beritanya-footer-logo {
  max-height: 30px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Footer */
.site-footer {
  background: #f8fafc;
  border-top: 2px solid var(--beritanya-nav, #232b3d);
  padding: 28px 0 24px;
  text-align: center;
  margin-top: 20px;
  content-visibility: auto;
  contain-intrinsic-size: auto 260px;
}

.inside-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-editorial-summary {
  margin: 0;
  max-width: 580px;
  font-size: 13px;
  line-height: 1.55;
  color: #4b5563;
}

.footer-redaksi-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 10px;
  font-size: 12px;
  color: #6b7280;
}

.footer-redaksi-meta a:hover {
  color: var(--beritanya-accent, #e30613);
  text-decoration: underline;
}

.footer-navigation {
  width: 100%;
  max-width: 780px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.footer-links-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links-list a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 2px;
  font-size: 13.5px;
  font-weight: 600;
  color: #1f2937;
  transition: color 0.15s ease;
}

.footer-links-list a:hover {
  color: var(--beritanya-accent, #e30613);
}

.site-info {
  font-size: 12.5px;
  color: #6b7280;
}

/* Responsive Breakpoints */
@media (max-width: 960px) {
  .beritanya-layout-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .beritanya-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .beritanya-menu-toggle {
    display: inline-flex;
  }

  .main-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    padding: 8px 20px 16px;
  }

  .main-navigation.is-open {
    display: block;
  }

  .beritanya-nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .beritanya-nav-list li {
    width: 100%;
    border-bottom: 1px solid #eeeeee;
  }

  .beritanya-nav-list li:last-child {
    border-bottom: none;
  }

  .beritanya-nav-list a {
    display: block;
    padding: 12px 0;
    font-size: 15px;
  }

  .beritanya-featured-grid,
  .beritanya-related-grid {
    grid-template-columns: 1fr;
  }

  .beritanya-list-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .beritanya-thumb-list {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .beritanya-search-bar input[type="search"],
  .widget-area .wp-block-search__input,
  .widget-area .widget_search .search-field {
    font-size: 16px;
  }

  .beritanya-single-article .entry-title {
    font-size: 22px;
  }

  .beritanya-single-article .entry-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .footer-links-list {
    gap: 4px 14px;
  }

  .footer-links-list a {
    min-height: 44px;
    font-size: 13px;
  }
}
