/*
Theme Name: Panduan Surgavip Editorial Run 7ryNrwUU
Theme URI: https://surgaviplogin.asia/
Author: Panduan Surgavip Indonesia
Description: Tema editorial mandiri bergaya grid tipografis untuk Panduan Surgavip Indonesia.
Version: 1.0.0
Text Domain: panduan-surgavip-run7ryn
*/

:root {
  --ink: #151515;
  --paper: #f6f6f3;
  --surface: #ffffff;
  --reverse: #111111;
  --muted: #5c5c58;
  --line: #1e1e1e;
  --accent: #2458c6;
  --accent-dark: #173e92;
  --info: #e8eef9;
  --warm: #fff0c9;
  --focus: #2458c6;
  --wide: 1240px;
  --reading: 760px;
  --gutter: clamp(1rem, 4vw, 4rem);
  --section-space: clamp(3rem, 7vw, 6.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans", "Segoe UI", Arial, sans-serif;
  font-size: clamp(1rem, .35vw + .94rem, 1.125rem);
  line-height: 1.74;
  overflow-wrap: anywhere;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-dark); text-decoration-thickness: .1em; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.skip-link {
  position: fixed;
  inset: .75rem auto auto .75rem;
  z-index: 1000;
  transform: translateY(-180%);
  background: #fff;
  color: #111;
  border: 3px solid #111;
  padding: .75rem 1rem;
}
.skip-link:focus { transform: translateY(0); }

.site-header { background: var(--reverse); color: #fff; border-bottom: 4px solid var(--accent); }
.header-inner {
  width: min(var(--wide), calc(100% - 2 * var(--gutter)));
  min-height: 70px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(210px, 290px) 1fr;
  align-items: center;
  gap: 1.5rem;
}
.site-branding { padding: .6rem 0; }
.site-branding a { display: inline-flex; min-height: 48px; align-items: center; }
.custom-logo { width: min(100%, 286px); max-height: 54px; object-fit: contain; object-position: left center; }
.brand-fallback { color: #fff; font-weight: 800; text-decoration: none; line-height: 1.15; }
.menu-toggle { display: none; min-width: 48px; min-height: 48px; border: 2px solid #fff; background: #111; color: #fff; font: inherit; font-weight: 700; }
.primary-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; justify-content: flex-end; align-items: stretch; }
.primary-nav li { border-left: 1px solid #3c3c3c; }
.primary-nav a { color: #fff; display: flex; align-items: center; min-height: 70px; padding: .65rem .62rem; font-size: .77rem; font-weight: 700; line-height: 1.25; text-align: center; text-decoration: none; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { background: #fff; color: #111; text-decoration: underline; }

.site-main { min-height: 60vh; }
.entry-content { width: min(var(--wide), calc(100% - 2 * var(--gutter))); margin: 0 auto; padding: clamp(2.5rem, 6vw, 5rem) 0 var(--section-space); }
.entry-content > :not(h1):not(h2):not(h3):not(figure):not(table):not(.table-wrap):not(.faq-section):not(.editorial-cta-grid):not(.wide-block) { max-width: var(--reading); }
.entry-content > h1 { max-width: 1100px; margin: 0 0 clamp(2rem, 4vw, 3.5rem); font-size: clamp(2.35rem, 6.7vw, 5.5rem); line-height: .98; letter-spacing: -.045em; text-wrap: balance; }
.entry-content > h1::before { content: "PANDUAN / 01"; display: block; margin-bottom: 1rem; color: var(--accent); font-size: .78rem; letter-spacing: .16em; line-height: 1.2; }
.entry-content h2 { max-width: 1050px; margin: var(--section-space) 0 1.35rem; padding-top: 1.3rem; border-top: 4px solid var(--line); font-size: clamp(1.8rem, 3.4vw, 3rem); line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
.entry-content h2::before { counter-increment: section; content: counter(section, decimal-leading-zero) " / "; color: var(--accent); font-size: .55em; vertical-align: .28em; }
.entry-content { counter-reset: section; }
.entry-content h3 { max-width: var(--reading); margin: 2.4rem 0 1rem; font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.2; }
.entry-content p, .entry-content ul, .entry-content ol { margin-top: 0; margin-bottom: 1.3rem; }
.entry-content > p:first-of-type { font-size: clamp(1.14rem, 1.3vw, 1.35rem); line-height: 1.58; font-weight: 600; }
.entry-content strong { font-weight: 750; }
.entry-content blockquote { max-width: 900px; margin: 2.5rem 0; border: solid var(--line); border-width: 2px 0; padding: 1.5rem 0; font-size: 1.2em; }

.editorial-figure { width: min(1100px, 100%); margin: clamp(2rem, 5vw, 4rem) 0; border: 3px solid var(--line); background: #fff; }
.editorial-figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.editorial-figure.hero-figure img { aspect-ratio: 16 / 9; }
.editorial-figure.mobile-figure { width: min(720px, 100%); }
.editorial-figure.mobile-figure img { aspect-ratio: 4 / 5; object-position: center; }
.editorial-figure figcaption { border-top: 2px solid var(--line); padding: .85rem 1rem; color: var(--muted); background: #fff; font-size: .9rem; }

.entry-content table { display: block; width: min(1100px, 100%); max-width: 100%; margin: 2rem 0; border-collapse: collapse; overflow-x: auto; background: #fff; }
.entry-content th, .entry-content td { min-width: 150px; border: 1px solid var(--line); padding: .85rem; text-align: left; vertical-align: top; }
.entry-content th { background: var(--reverse); color: #fff; font-size: .92rem; }
.entry-content tr:nth-child(even) td { background: #ecece8; }
.entry-content code { background: #e8e8e3; padding: .12em .3em; border: 1px solid #aaa; }

.editorial-cta-grid { width: min(1100px, 100%); display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 3rem 0; border: solid var(--line); border-width: 2px 0 0 2px; }
.editorial-cta-grid a { min-height: 96px; display: flex; align-items: center; padding: 1rem; border: solid var(--line); border-width: 0 2px 2px 0; background: #fff; color: #111; font-weight: 750; }
.editorial-cta-grid a:hover { background: var(--accent); color: #fff; }

.faq-section { width: min(980px, 100%); margin: var(--section-space) 0 0; border-top: 5px solid var(--line); }
.faq-section > h2 { margin-top: 0; border-top: 0; }
.faq-section details { border-bottom: 2px solid var(--line); background: #fff; }
.faq-section summary { min-height: 60px; padding: 1rem 3rem 1rem 1rem; cursor: pointer; font-weight: 750; list-style-position: outside; }
.faq-answer { padding: 0 1rem 1.25rem; max-width: var(--reading); }

.site-footer { background: var(--reverse); color: #fafaf7; border-top: 5px solid var(--accent); }
.footer-inner { width: min(var(--wide), calc(100% - 2 * var(--gutter))); margin: 0 auto; padding: 3rem 0; display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; }
.footer-name { margin: 0 0 .75rem; font-size: 1.25rem; font-weight: 800; }
.footer-statement { max-width: 680px; color: #d7d7d2; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border: solid #535353; border-width: 1px 0 0 1px; }
.footer-menu li { border: solid #535353; border-width: 0 1px 1px 0; }
.footer-menu a { min-height: 48px; display: flex; align-items: center; padding: .7rem; color: #fff; font-size: .9rem; }
.footer-email { color: #fff; }

@media (max-width: 1120px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .menu-toggle { display: inline-flex; justify-content: center; align-items: center; }
  .primary-nav {
    position: fixed;
    inset: 70px 0 auto 0;
    z-index: 100;
    background: #111;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    transform: translateY(-130%);
    visibility: hidden;
    pointer-events: none;
    transition:
      transform .18s ease,
      visibility 0s linear .18s;
  }
  .primary-nav.is-open {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }
  .primary-nav .menu { display: block; }
  .primary-nav li { border-left: 0; border-top: 1px solid #444; }
  .primary-nav a { min-height: 52px; justify-content: flex-start; padding: .75rem var(--gutter); text-align: left; font-size: 1rem; }
  .editorial-cta-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  :root { --gutter: 1rem; --section-space: 3.2rem; }
  .entry-content { padding-top: 2.2rem; }
  .entry-content > h1 { font-size: clamp(2.2rem, 11.5vw, 3.6rem); letter-spacing: -.035em; }
  .entry-content h2 { font-size: clamp(1.7rem, 8vw, 2.35rem); }
  .editorial-figure { margin-inline: 0; }
  .editorial-figure.hero-figure img, .editorial-figure img { aspect-ratio: 5 / 4; }
  .editorial-figure.mobile-figure img { aspect-ratio: 4 / 5; }
  .editorial-cta-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-menu { grid-template-columns: 1fr; }
  .entry-content th, .entry-content td { min-width: 170px; padding: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
