/* Portal: gaya khusus kelompok halaman "home" (beranda, berita & event, FAQ). Kit bersama ada di ../portal.css. */

/* ------------------------------------------------------------ beranda */

.ph-home {
  /* jarak hero ke header 34px seperti desain */
  padding-top: 34px;
}

.ph-hero.is-plain {
  grid-template-columns: minmax(0, 1fr);
}

.ph-hero .sp-hero-body {
  padding: 44px;
}

.ph-hero-eyebrow {
  color: #dae0e5;
}

.ph-hero h1 {
  font-size: 43px;
  letter-spacing: -0.2px;
}

.ph-hero p {
  font-size: 17px;
  color: #d2dae2;
  margin-bottom: 52px;
}

.ph-hero .sp-btn-lg {
  min-width: 192px;
}

.ph-hero-btn {
  min-width: 204px !important;
  border-color: #82909b;
}

.ph-cards {
  margin-top: 32px;
}

.ph-cards .sp-link-card {
  min-height: 142px;
}

.ph-link-card-text {
  display: block;
  min-width: 0;
}

.ph-link-card-text h3 {
  color: var(--sp-text);
}

/* berita / event terbaru */
.ph-news {
  margin-top: 42px;
}

.ph-news-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ph-news-col .sp-section-title {
  margin-bottom: 22px;
}

.ph-news-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 22px 23px 22px;
  min-height: 171px;
}

.ph-news-items {
  flex: 1;
}

.ph-news-item {
  display: block;
  color: var(--sp-text);
  padding-bottom: 16px;
}

.ph-news-item + .ph-news-item {
  padding-top: 16px;
  border-top: 1px solid var(--sp-line);
}

.ph-news-item:hover .ph-news-title {
  color: var(--sp-primary);
}

.ph-meta {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 12px;
  color: var(--sp-muted);
  margin-bottom: 18px;
}

.ph-meta .sp-badge {
  color: var(--sp-muted);
  padding: 7px 11px;
}

.ph-news-title {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--sp-text);
}

.ph-news-empty {
  margin: 0 0 16px;
  color: var(--sp-muted);
}

.ph-news-more {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-top: 4px;
}

.ph-news-more i,
.ph-shortcut-link i {
  font-size: 17px;
  color: var(--sp-primary);
}

/* bagian beranda */
.ph-section {
  margin-top: 40px;
}

.ph-section[hidden] {
  display: none;
}

.ph-section-head {
  margin-bottom: 22px;
}

.ph-section-head h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--sp-text);
  margin: 0 0 8px;
}

.ph-section-head p {
  margin: 0;
  color: var(--sp-muted);
}

/* pintasan lebar */
.ph-banners {
  display: grid;
  gap: 16px;
}

.ph-banner {
  display: grid;
  grid-template-columns: 193px minmax(0, 1fr) auto;
  align-items: center;
  gap: 25px;
  padding: 20px 31px 20px 20px;
}

.ph-banner-media {
  width: 193px;
  height: 115px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--sp-surface-2);
  align-self: start;
}

.ph-banner-media img,
.ph-shortcut img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ph-banner-body {
  align-self: start;
  padding-top: 12px;
  min-width: 0;
}

.ph-eyebrow {
  color: var(--sp-text-2);
  font-size: 11px;
  margin-bottom: 14px;
}

.ph-banner-title {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  color: var(--sp-text);
}

.ph-banner-btn {
  height: 42px;
}

/* aduan masyarakat */
.ph-aduan {
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.ph-aduan.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.ph-aduan-side[hidden] {
  display: none;
}

.ph-aduan-side .sp-card-header {
  padding: 22px 24px 8px;
}

.ph-aduan-side .sp-card-body {
  padding: 12px 24px 28px;
}

.ph-shortcut-list {
  display: grid;
  gap: 24px;
}

.ph-shortcut + .ph-shortcut {
  border-top: 1px solid var(--sp-line);
  padding-top: 24px;
}

.ph-shortcut img {
  height: 157px;
  border-radius: 6px;
  background: var(--sp-surface-2);
}

.ph-shortcut h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  margin: 18px 0 20px;
  color: var(--sp-text);
}

.ph-shortcut-link {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.ph-ulas .sp-card-header {
  padding: 24px 28px 8px;
}

.ph-ulas-title {
  font-size: 16px;
  gap: 6px;
}

.ph-ulas-title span {
  color: var(--sp-primary);
  font-size: 20px;
}

.ph-ulas .sp-card-body {
  padding: 8px 28px 28px;
}

.ph-ulas iframe {
  display: block;
  width: 100%;
  height: 640px;
  border: 0;
}

/* video */
.ph-video {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ph-video-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 644 / 253;
  padding: 10px;
  border: 0;
  background: #e8ecef;
  cursor: pointer;
}

.ph-video-media img {
  height: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.ph-video-media.is-playing {
  padding: 0;
  cursor: default;
  background: #000;
}

.ph-video-media iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.ph-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--sp-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(23, 33, 47, 0.25);
  transition: transform 0.15s ease;
}

.ph-play::before {
  content: '';
  margin-left: 4px;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}

.ph-video-media:hover .ph-play {
  transform: translate(-50%, -50%) scale(1.06);
}

.ph-video-media:focus-visible {
  outline: 2px solid var(--sp-primary);
  outline-offset: -2px;
}

.ph-video-body {
  padding: 22px 24px 40px;
}

.ph-video-body h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin: 14px 0 0;
  color: var(--sp-text);
}

.ph-video-body .sp-badge {
  color: var(--sp-muted);
  padding: 6px 11px;
}

/* ------------------------------------------------------------ berita & event */

.ph-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 15px 16px 16px;
}

.ph-pills {
  gap: 12px;
}

.ph-pills .sp-pill {
  /* .nav (Bootstrap) dipertahankan untuk selector lama; samakan tampilannya */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  color: var(--sp-text-2);
}

.ph-pills .sp-pill.active {
  color: var(--sp-primary);
}

.ph-search {
  position: relative;
  flex: 0 1 371px;
  min-width: 0;
}

.ph-search input[type='search'] {
  width: 100%;
  height: 42px;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius-sm);
  background: var(--sp-surface);
  padding: 0 14px 0 42px;
  font-size: 13px;
  color: var(--sp-text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ph-search input[type='search']::placeholder {
  color: var(--sp-muted);
}

.ph-search input[type='search']:focus {
  border-color: var(--sp-primary);
  box-shadow: 0 0 0 3px rgba(185, 35, 53, 0.12);
}

.ph-search-btn {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
}

.ph-search-btn i {
  font-size: 18px;
  color: var(--sp-muted);
}

.ph-search-btn:hover i {
  color: var(--sp-primary);
}

.ph-berita .ph-news {
  margin-top: 42px;
}

.ph-list-title {
  margin-bottom: 22px;
}

.ph-info-card {
  padding: 8px 24px;
}

.ph-info-list > li {
  padding: 0;
}

.ph-info-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 24px;
  width: 100%;
  padding: 22px 0 24px;
  color: var(--sp-text);
}

.ph-info-row:hover .ph-info-title {
  color: var(--sp-primary);
}

.ph-info-badge {
  justify-self: start;
  color: var(--sp-muted);
  padding: 7px 11px;
}

.ph-info-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}

.ph-info-date {
  font-size: 12px;
  color: var(--sp-muted);
  white-space: nowrap;
}

.ph-info-arrow {
  font-size: 15px;
  color: var(--sp-muted);
}

.ph-result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.ph-result-head .ph-list-title {
  margin: 0;
}

.ph-result-count {
  font-size: 13px;
  color: var(--sp-muted);
}

.ph-search-result .sp-section-title {
  overflow-wrap: anywhere;
}

/* detail */
.ph-article {
  margin-top: 28px;
  padding: 28px 32px 36px;
}

.ph-back {
  font-size: 13px;
  margin-bottom: 24px;
}

.ph-back i {
  color: var(--sp-primary);
  font-size: 16px;
}

.ph-article-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--sp-text);
  margin: 0 0 24px;
  max-width: 900px;
}

.ph-article-image {
  margin: 0 0 28px;
  border-radius: var(--sp-radius);
  overflow: hidden;
  background: var(--sp-surface-2);
  max-width: 900px;
}

.ph-article-image img {
  display: block;
  width: 100%;
  height: auto;
}

.ph-article-content {
  max-width: 900px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--sp-text-2);
  overflow-wrap: anywhere;
}

.ph-article-content img,
.ph-article-content iframe,
.ph-article-content video {
  max-width: 100%;
  height: auto;
}

.ph-article-content table {
  max-width: 100%;
  display: block;
  overflow-x: auto;
}

.ph-article-content a {
  color: var(--sp-primary);
  text-decoration: underline;
}

.ph-article-content p:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------ faq */

.ph-faq-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.ph-faq-card {
  padding: 8px 28px;
  min-height: 228px;
}

.ph-faq-item + .ph-faq-item {
  border-top: 1px solid var(--sp-line);
}

.ph-faq-question {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 22px 0;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 19px;
  font-weight: 700;
  color: var(--sp-text);
  cursor: pointer;
}

.ph-faq-question span {
  flex: 1;
  min-width: 0;
}

.ph-faq-icon {
  font-size: 22px;
  color: var(--sp-primary) !important;
}

.ph-faq-chevron {
  font-size: 15px;
  color: var(--sp-muted);
  transition: transform 0.2s ease;
}

.ph-faq-question:not(.collapsed) {
  border-bottom: 1px solid var(--sp-line);
}

.ph-faq-question.collapsed .ph-faq-chevron {
  transform: rotate(-90deg);
}

.ph-faq-question:focus-visible {
  outline: 2px solid var(--sp-primary);
  outline-offset: 2px;
}

.ph-faq-answer {
  padding: 22px 0 36px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--sp-text-2);
}

.ph-faq-answer p:last-child {
  margin-bottom: 0;
}

.ph-contact {
  padding: 26px 24px 40px;
}

.ph-contact-icon {
  font-size: 24px;
  color: var(--sp-primary) !important;
}

.ph-contact h2 {
  font-size: 19px;
  font-weight: 700;
  margin: 18px 0 14px;
  color: var(--sp-text);
}

.ph-contact-phone {
  display: block;
  font-size: 17px;
  color: var(--sp-text);
  margin-bottom: 18px;
}

.ph-contact-phone:hover {
  color: var(--sp-primary);
}

.ph-contact p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--sp-text-2);
}

/* ------------------------------------------------------------ responsif */

@media (max-width: 991.98px) {
  .ph-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .ph-aduan,
  .ph-faq-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  /* di layar sempit pintasan sudah tampil sebagai banner di atas */
  .ph-aduan-side {
    display: none;
  }

  .ph-hero h1 {
    font-size: 32px;
  }

  .ph-hero .sp-hero-body {
    padding: 32px 28px;
  }

  .ph-hero p {
    margin-bottom: 32px;
  }
}

@media (max-width: 767.98px) {
  .ph-home {
    padding-top: 20px;
  }

  .ph-hero .sp-hero-body {
    padding: 28px 22px;
  }

  .ph-hero h1 {
    font-size: 28px;
  }

  .ph-hero p {
    font-size: 15px;
  }

  .ph-hero .sp-hero-actions .sp-btn {
    width: 100%;
    min-width: 0 !important;
  }

  .ph-hero .sp-hero-media {
    min-height: 200px;
  }

  .ph-cards {
    margin-top: 24px;
    gap: 16px;
  }

  .ph-cards .sp-link-card {
    min-height: 0;
  }

  .ph-news {
    margin-top: 32px;
    gap: 28px;
  }

  .ph-news-card {
    min-height: 0;
    padding: 20px;
  }

  .ph-news-title {
    font-size: 16px;
  }

  .ph-meta {
    gap: 14px;
    margin-bottom: 12px;
  }

  .ph-section {
    margin-top: 32px;
  }

  .ph-section-head h2 {
    font-size: 21px;
  }

  .ph-banner {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
  }

  .ph-banner-media {
    width: 100%;
    height: 160px;
  }

  .ph-banner-body {
    padding-top: 0;
  }

  .ph-banner-title {
    font-size: 18px;
  }

  .ph-banner-btn {
    width: 100%;
  }

  .ph-ulas .sp-card-header {
    padding: 18px 16px 6px;
  }

  .ph-ulas .sp-card-body {
    padding: 6px 8px 12px;
  }

  .ph-ulas iframe {
    height: 900px;
  }

  .ph-video-media {
    aspect-ratio: 16 / 9;
    padding: 0;
  }

  .ph-video-media img {
    width: 100%;
    border-radius: 0;
  }

  .ph-video-body {
    padding: 18px 20px 24px;
  }

  .ph-video-body h3 {
    font-size: 16px;
  }

  .ph-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }

  .ph-pills {
    gap: 6px;
    flex-wrap: nowrap;
  }

  .ph-pills .sp-pill {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
  }

  .ph-search {
    flex-basis: auto;
  }

  .ph-berita .ph-news {
    margin-top: 28px;
  }

  .ph-info-card {
    padding: 4px 16px;
  }

  .ph-info-row {
    grid-template-columns: auto minmax(0, 1fr) 20px;
    grid-template-areas:
      'badge meta arrow'
      'title title arrow';
    gap: 10px 12px;
    padding: 16px 0;
  }

  .ph-info-badge {
    grid-area: badge;
  }

  .ph-info-title {
    grid-area: title;
    font-size: 15px;
  }

  .ph-info-date {
    grid-area: meta;
  }

  .ph-info-arrow {
    grid-area: arrow;
  }

  .ph-article {
    margin-top: 20px;
    padding: 20px;
  }

  .ph-article-title {
    font-size: 22px;
  }

  .ph-faq-card {
    padding: 4px 20px;
    min-height: 0;
  }

  .ph-faq-question {
    font-size: 16px;
    padding: 18px 0;
  }

  .ph-faq-answer {
    font-size: 15px;
    padding: 16px 0 24px;
  }

  .ph-contact {
    padding: 22px 20px 26px;
  }
}
