/*
Theme Name: PDM Sukabumi Press
Theme URI: https://pdmkotasukabumi.or.id/
Author: Andigital.id
Author URI: https://andigital.id/
Description: Tema berita dan profil organisasi untuk Pimpinan Daerah Muhammadiyah Kota Sukabumi. Desain header gradasi, menu bertingkat, slider berita, halaman profil, galeri, dan sidebar iklan.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: pdm-sukabumi-press
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: news, blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

:root {
  --pdm-blue: #23679a;
  --pdm-blue-dark: #17527e;
  --pdm-green: #10946b;
  --pdm-green-dark: #087a58;
  --pdm-cyan: #1596cf;
  --pdm-ink: #20252b;
  --pdm-muted: #68717b;
  --pdm-line: #e7eaed;
  --pdm-soft: #f5f7f8;
  --pdm-white: #ffffff;
  --pdm-shadow: 0 12px 35px rgba(24, 48, 70, .12);
  --pdm-radius: 12px;
  --pdm-container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--pdm-ink);
  background: #fff;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--pdm-blue); text-decoration: none; }
a:hover, a:focus { color: var(--pdm-green-dark); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  top: 6px; left: 6px; width: auto; height: auto;
  padding: 12px 16px; clip: auto !important;
  background: #fff; color: #111; z-index: 100000;
  box-shadow: var(--pdm-shadow);
}

.pdm-container { width: min(calc(100% - 40px), var(--pdm-container)); margin-inline: auto; }
.site-main { min-height: 50vh; }

/* Header besar seperti portal PDM */
.site-brand-panel {
  min-height: 250px;
  color: #fff;
  background: linear-gradient(112deg, var(--pdm-blue) 0%, #24738d 46%, var(--pdm-green) 100%);
  display: flex;
  align-items: center;
  border-top: 4px solid rgba(255,255,255,.92);
}
.brand-grid {
  display: grid;
  grid-template-columns: 1fr 1.45fr .9fr;
  gap: 28px;
  align-items: center;
}
.brand-address { font-size: 16px; line-height: 1.45; }
.brand-address strong { display: block; font-size: 17px; }
.brand-address p { margin: 0; }
.brand-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-width: 0;
}
.brand-logo-wrap { flex: 0 0 auto; }
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { max-height: 125px; max-width: min(100%, 610px); width: auto; }
.brand-logo-wrap.has-wordmark { width: min(100%, 610px); text-align: center; }
.brand-default-logo {
  width: 105px; height: 105px; border: 3px solid rgba(255,255,255,.9);
  border-radius: 50%; display: grid; place-items: center;
  font-size: 56px; font-family: Georgia, serif; line-height: 1;
  box-shadow: inset 0 0 0 8px rgba(255,255,255,.08);
}
.brand-title { min-width: 0; }
.brand-title .eyebrow { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: .04em; }
.brand-title .site-title { margin: 0; font-size: clamp(31px, 3.2vw, 48px); line-height: 1.05; letter-spacing: .025em; font-weight: 800; }
.brand-title .city { margin: 3px 0 0; font-size: 22px; font-weight: 700; letter-spacing: .05em; }
.brand-domain { text-align: right; }
.brand-domain .domain-main { display: block; font-size: 31px; line-height: 1; font-weight: 800; }
.brand-domain .domain-sub { display: inline-block; margin-top: 7px; padding: 1px 7px; background: rgba(255,255,255,.93); color: var(--pdm-green-dark); font-size: 25px; line-height: 1.1; font-weight: 800; }
.brand-domain .tagline { display: block; margin-top: 5px; font-family: Georgia, serif; font-size: 13px; }

/* Navigasi */
.site-nav-wrap {
  position: sticky; top: 0; z-index: 999;
  background: #fff; border-bottom: 1px solid var(--pdm-line);
  box-shadow: 0 6px 20px rgba(18, 42, 61, .07);
}
.nav-inner { min-height: 58px; display: flex; align-items: stretch; justify-content: center; position: relative; }
.primary-navigation { display: flex; align-items: stretch; }
.primary-navigation ul { list-style: none; margin: 0; padding: 0; }
.primary-navigation > div > ul, .primary-navigation > ul { display: flex; align-items: stretch; }
.primary-navigation li { position: relative; }
.primary-navigation a {
  display: flex; align-items: center; gap: 4px;
  min-height: 58px; padding: 0 14px;
  color: #20262c; font-size: 14px; font-weight: 700;
  transition: .2s ease;
}
.primary-navigation > div > ul > li:hover > a,
.primary-navigation > div > ul > li.current-menu-item > a,
.primary-navigation > div > ul > li.current-menu-ancestor > a {
  color: #fff; background: var(--pdm-cyan);
}
.primary-navigation .menu-item-has-children > a::after { content: "⌄"; font-size: 12px; transform: translateY(-1px); }
.primary-navigation .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 245px;
  background: #fff; border-top: 3px solid var(--pdm-cyan);
  box-shadow: var(--pdm-shadow); opacity: 0; visibility: hidden;
  transform: translateY(8px); transition: .18s ease;
}
.primary-navigation li:hover > .sub-menu,
.primary-navigation li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.primary-navigation .sub-menu a { min-height: 42px; padding: 9px 16px; font-weight: 500; border-bottom: 1px solid #f0f1f2; }
.primary-navigation .sub-menu a:hover { color: var(--pdm-cyan); background: #f7fbfd; }
.primary-navigation .sub-menu .sub-menu { left: 100%; top: -3px; }
.nav-tools { display: flex; align-items: center; margin-left: 5px; }
.nav-icon {
  width: 38px; height: 58px; border: 0; background: transparent;
  display: grid; place-items: center; color: #24313b; font-size: 18px;
}
.nav-icon:hover { color: var(--pdm-cyan); }
.menu-toggle { display: none; border: 0; background: var(--pdm-cyan); color: #fff; padding: 0 18px; font-weight: 700; }

/* Search drawer */
.search-panel { display: none; padding: 16px 0; background: #f7f9fa; border-top: 1px solid var(--pdm-line); }
.search-panel.is-open { display: block; }
.search-form { display: flex; max-width: 720px; margin-inline: auto; }
.search-field { flex: 1; min-width: 0; border: 1px solid #ced5db; border-right: 0; border-radius: 7px 0 0 7px; padding: 12px 14px; }
.search-submit { border: 0; border-radius: 0 7px 7px 0; padding: 0 22px; background: var(--pdm-green); color: #fff; font-weight: 700; }

/* Hero slider */
.home-content { padding: 30px 0 60px; }
.hero-slider { position: relative; overflow: hidden; min-height: 455px; background: #17232c; box-shadow: var(--pdm-shadow); }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s ease; }
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.03) 20%, rgba(0,0,0,.82) 100%); }
.hero-fallback { position: absolute; inset: 0; background: linear-gradient(135deg, var(--pdm-blue), var(--pdm-green)); }
.hero-caption { position: absolute; z-index: 2; left: 11%; bottom: 65px; max-width: 78%; color: #fff; }
.hero-date { font-size: 13px; font-weight: 700; opacity: .88; }
.hero-title { margin: 8px 0 0; font-size: clamp(30px, 4.2vw, 52px); line-height: 1.09; font-weight: 800; text-shadow: 0 4px 20px rgba(0,0,0,.3); }
.hero-title a { color: inherit; }
.hero-dots { position: absolute; z-index: 3; left: 11%; bottom: 28px; display: flex; gap: 7px; }
.hero-dot { width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.45); }
.hero-dot.is-active { background: #fff; transform: scale(1.15); }

/* Sections */
.home-section { margin-top: 34px; padding: 24px; background: var(--pdm-blue); color: #fff; }
.home-section.alt { background: #fff; color: var(--pdm-ink); border: 1px solid var(--pdm-line); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.2); }
.alt .section-heading { border-color: var(--pdm-line); }
.section-title { margin: 0; font-size: 18px; font-weight: 800; }
.section-title::after { content: ""; display: block; width: 38px; height: 3px; margin-top: 8px; background: #fff; }
.alt .section-title::after { background: var(--pdm-cyan); }
.section-more { color: inherit; font-size: 13px; font-weight: 700; opacity: .85; }
.news-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px; }
.news-feature { position: relative; min-height: 365px; overflow: hidden; background: rgba(0,0,0,.15); }
.news-feature img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.news-feature::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg,transparent 35%,rgba(0,0,0,.88)); }
.news-feature-content { position: absolute; z-index: 2; left: 24px; right: 24px; bottom: 22px; }
.news-feature-content h3 { margin: 7px 0 0; font-size: 27px; line-height: 1.2; }
.news-feature-content a { color: #fff; }
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.news-card { display: grid; grid-template-columns: 105px 1fr; gap: 13px; min-width: 0; }
.news-card-thumb { height: 78px; overflow: hidden; background: rgba(255,255,255,.16); }
.alt .news-card-thumb { background: #e9eef1; }
.news-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card h4 { margin: 2px 0 0; font-size: 14px; line-height: 1.28; }
.news-card a { color: inherit; }
.post-meta { font-size: 11px; opacity: .78; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.article-card { border: 1px solid var(--pdm-line); background: #fff; overflow: hidden; box-shadow: 0 8px 22px rgba(25,45,60,.06); }
.article-card-thumb { height: 200px; background: linear-gradient(135deg,#dbe8ee,#e4f1e9); overflow: hidden; }
.article-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.article-card:hover img { transform: scale(1.035); }
.article-card-body { padding: 18px; }
.article-card h3 { margin: 7px 0 8px; font-size: 19px; line-height: 1.3; }
.article-card p { margin: 0; color: var(--pdm-muted); font-size: 14px; }
.category-pill { display: inline-block; padding: 3px 8px; border-radius: 999px; background: #e9f7f2; color: var(--pdm-green-dark); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }

/* Content pages */
.content-wrap { padding: 30px 0 70px; }
.breadcrumbs { margin: 0 0 15px; color: #7c858d; font-size: 12px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 315px; gap: 34px; align-items: start; }
.entry-header { margin-bottom: 24px; }
.entry-title { margin: 0; font-size: clamp(31px, 4vw, 46px); line-height: 1.15; }
.entry-meta { margin-top: 9px; color: var(--pdm-muted); font-size: 13px; }
.entry-content { font-size: 17px; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { margin-top: 1.7em; font-size: 29px; line-height: 1.25; }
.entry-content h3 { margin-top: 1.5em; font-size: 23px; line-height: 1.3; }
.entry-content blockquote { margin: 1.5em 0; padding: 16px 20px; border-left: 4px solid var(--pdm-green); background: #f4faf7; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.entry-content th, .entry-content td { border: 1px solid #dfe4e7; padding: 10px 12px; text-align: left; }
.entry-content th { background: #f3f6f7; }
.entry-content iframe { max-width: 100%; width: 100%; min-height: 420px; border: 0; }
.entry-thumbnail { margin-bottom: 24px; }
.entry-thumbnail img { width: 100%; max-height: 560px; object-fit: cover; }
.pdm-note { padding: 14px 16px; border-left: 4px solid #e0aa29; background: #fff8e3; color: #5a481c; }
.pdm-button { display: inline-block; padding: 11px 18px; border-radius: 7px; background: var(--pdm-green); color: #fff !important; font-weight: 800; }
.pdm-button:hover { background: var(--pdm-green-dark); }
.pdm-directory { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pdm-directory article { padding: 18px; border: 1px solid var(--pdm-line); border-radius: 9px; background: #fff; }
.pdm-directory h3 { margin: 0 0 7px; }

/* Sidebar */
.widget-area { min-width: 0; }
.widget { margin-bottom: 28px; }
.widget-title { margin: 0 0 13px; padding-bottom: 9px; border-bottom: 1px solid var(--pdm-line); font-size: 15px; }
.widget-title::after { content:""; display:block; width:36px; height:2px; margin-top:9px; background:var(--pdm-ink); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid #eef0f1; }
.ad-placeholder { min-height: 185px; display: grid; place-items: center; padding: 22px; text-align: center; background: #e3f49b; color: #376c12; font-size: 24px; font-weight: 800; line-height: 1.12; }
.ad-placeholder small { display: block; margin-top: 9px; font-size: 11px; font-weight: 500; }
.sidebar-post { display: grid; grid-template-columns: 92px 1fr; gap: 12px; margin-bottom: 14px; }
.sidebar-post img { width: 92px; height: 70px; object-fit: cover; }
.sidebar-post h4 { margin: 0; font-size: 13px; line-height: 1.3; }

/* Pagination */
.navigation.pagination { margin-top: 34px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 7px; }
.page-numbers { min-width: 38px; height: 38px; display: grid; place-items: center; padding: 0 10px; border: 1px solid var(--pdm-line); color: var(--pdm-ink); }
.page-numbers.current, .page-numbers:hover { background: var(--pdm-cyan); color: #fff; border-color: var(--pdm-cyan); }

/* Gallery shortcode */
.pdm-gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.pdm-gallery-item { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #e9eef1; }
.pdm-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.pdm-gallery-item:hover img { transform: scale(1.045); }
.pdm-gallery-caption { position: absolute; inset: auto 0 0; padding: 24px 11px 9px; color: #fff; font-size: 12px; background: linear-gradient(transparent,rgba(0,0,0,.72)); }

/* Footer */
.site-footer { color: rgba(255,255,255,.88); background: #173b4b; }
.footer-main { padding: 48px 0 36px; display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 38px; }
.footer-title { color: #fff; margin: 0 0 14px; font-size: 18px; }
.footer-main p { margin: 0 0 9px; }
.footer-menu { list-style: none; margin: 0; padding: 0; columns: 2; }
.footer-menu li { margin-bottom: 8px; }
.footer-menu a { color: rgba(255,255,255,.84); }
.social-links { display: flex; gap: 9px; flex-wrap: wrap; }
.social-links a { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: #fff; }
.footer-bottom { padding: 15px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; text-align: center; }

.whatsapp-float {
  position: fixed; z-index: 1000; right: 22px; bottom: 22px;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: #21c55d; color: #fff;
  font-size: 26px; box-shadow: 0 9px 25px rgba(0,0,0,.24);
}
.whatsapp-float:hover { color: #fff; transform: translateY(-2px); }

/* Comments */
.comments-area { margin-top: 45px; padding-top: 25px; border-top: 1px solid var(--pdm-line); }
.comment-list { padding-left: 20px; }
.comment-body { margin-bottom: 18px; padding: 16px; background: #f7f9fa; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; border: 1px solid #d5dce1; padding: 11px 12px;
}
.form-submit .submit { border: 0; padding: 11px 18px; background: var(--pdm-green); color: #fff; font-weight: 800; }

/* Responsive */
@media (max-width: 980px) {
  .brand-grid { grid-template-columns: 1fr 1.2fr; }
  .brand-domain { display: none; }
  .content-grid { grid-template-columns: 1fr; }
  .widget-area { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .news-layout { grid-template-columns: 1fr; }
  .cards-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 780px) {
  .site-brand-panel { min-height: auto; padding: 28px 0; }
  .brand-grid { grid-template-columns: 1fr; text-align: center; }
  .brand-address { order: 2; font-size: 14px; }
  .brand-center { order: 1; }
  .brand-title .eyebrow { font-size: 15px; }
  .brand-title .site-title { font-size: 30px; }
  .brand-title .city { font-size: 18px; }
  .brand-default-logo { width: 75px; height: 75px; font-size: 39px; }
  .custom-logo { max-height: 88px; max-width: 100%; }
  .nav-inner { justify-content: space-between; min-height: 52px; }
  .menu-toggle { display: block; min-height: 52px; }
  .primary-navigation { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; box-shadow: var(--pdm-shadow); max-height: 75vh; overflow: auto; }
  .primary-navigation.is-open { display: block; }
  .primary-navigation > div > ul, .primary-navigation > ul { display: block; }
  .primary-navigation a { min-height: 46px; border-bottom: 1px solid #eef0f1; }
  .primary-navigation > div > ul > li:hover > a, .primary-navigation > div > ul > li.current-menu-item > a, .primary-navigation > div > ul > li.current-menu-ancestor > a { color: var(--pdm-cyan); background: #f7fbfd; }
  .primary-navigation .sub-menu { position: static; min-width: 0; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; border-top: 0; padding-left: 15px; }
  .primary-navigation .menu-item-has-children.is-sub-open > .sub-menu { display: block; }
  .nav-tools { margin-left: auto; }
  .hero-slider { min-height: 390px; }
  .hero-caption { left: 7%; max-width: 86%; bottom: 60px; }
  .hero-dots { left: 7%; }
  .home-section { padding: 18px; }
  .news-grid { grid-template-columns: 1fr; }
  .widget-area { display: block; }
  .pdm-gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .pdm-directory { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .pdm-container { width: min(calc(100% - 24px), var(--pdm-container)); }
  .brand-center { flex-direction: column; gap: 8px; }
  .brand-address { padding-top: 12px; border-top: 1px solid rgba(255,255,255,.18); }
  .hero-slider { min-height: 335px; }
  .hero-title { font-size: 27px; }
  .news-feature { min-height: 310px; }
  .news-card { grid-template-columns: 90px 1fr; }
  .cards-3 { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; }
  .pdm-gallery-grid { grid-template-columns: 1fr; }
  .entry-content { font-size: 16px; }
  .entry-title { font-size: 32px; }
}
