/* Public portal only: fluid, device-responsive layout. */
.public-viewer-body, .public-viewer-body * {box-sizing:border-box}
.public-viewer-body {max-width:100%;overflow-x:hidden}
.public-viewer-body .portal-main,
.public-viewer-body .portal-header,
.public-viewer-body .portal-video-section,
.public-viewer-body .portal-video-grid,
.public-viewer-body .portal-video-card {min-width:0;max-width:100%}
.public-viewer-body .portal-video-grid {display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr))!important;gap:18px!important}
.public-viewer-body .portal-video-card {width:100%!important;min-width:0!important;overflow:hidden!important}
.public-viewer-body .portal-video-card video {display:block!important;width:100%!important;max-width:100%!important;height:auto!important;aspect-ratio:16/9!important;min-height:0!important;max-height:none!important;object-fit:contain!important;background:#101820!important}
.public-viewer-body .portal-video-card>div {min-width:0;overflow-wrap:anywhere}
.public-viewer-body img {max-width:100%;height:auto}
.public-viewer-body .portal-video-section {overflow:hidden}
@media(max-width:767px){
 .public-viewer-body .portal-video-grid {grid-template-columns:minmax(0,1fr)!important;gap:14px!important}
 .public-viewer-body .portal-video-section {padding-inline:clamp(12px,4vw,20px)!important}
 .public-viewer-body .portal-video-card video {aspect-ratio:16/9!important}
 .public-viewer-body .portal-heading h2 {font-size:clamp(1.5rem,6vw,2.1rem)!important;line-height:1.18!important}
 .public-viewer-body .portal-heading p {font-size:clamp(.9rem,3.8vw,1rem)!important}
 .public-viewer-body .portal-header {gap:10px!important;flex-wrap:wrap!important;padding-inline:12px!important}
 .public-viewer-body .portal-brand {min-width:0!important;max-width:100%!important}
 .public-viewer-body .portal-brand strong {font-size:clamp(1rem,5vw,1.55rem)!important}
 .public-viewer-body .portal-login {white-space:nowrap!important}
}
@media(min-width:768px) and (max-width:1100px){
 .public-viewer-body .portal-video-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* Desktop / tablet / phone video sizing — targeted correction */
.public-viewer-body .portal-video-section {
  width: min(100%, 1200px) !important;
  max-width: calc(100vw - 24px) !important;
  margin-inline: auto !important;
  min-width: 0 !important;
}
.public-viewer-body .portal-video-grid {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)) !important;
  align-items: start !important;
}
.public-viewer-body .portal-video-card {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
.public-viewer-body .portal-video-card video {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
  max-height: min(70vh, 680px) !important;
  min-height: 0 !important;
  object-fit: contain !important;
}
@media (min-width: 1200px) {
  .public-viewer-body .portal-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 767px) {
  .public-viewer-body .portal-video-section { max-width: calc(100vw - 16px) !important; }
  .public-viewer-body .portal-video-grid {grid-template-columns: minmax(0,1fr) !important;}
  .public-viewer-body .portal-video-card video {max-height: none !important;}
}


/* Desktop/laptop: show the entire featured poster with its caption BELOW it.
   Mobile rules remain unchanged. */
@media (min-width: 769px) {
  .featured-carousel:has(.featured-image-slide) {
    height: clamp(520px, 65vw, 960px);
    max-width: 100%;
    overflow: hidden;
  }
  .featured-carousel .featured-slide.featured-image-slide {
    padding: 0 !important;
    display: block;
    background: #f3f6f8;
  }
  .featured-carousel .featured-image-slide .featured-banner-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: calc(100% - 136px);
    object-fit: contain !important;
    object-position: center center;
    background: #f3f6f8;
  }
  .featured-carousel .featured-image-slide .featured-image-caption {
    position: absolute;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    height: 136px;
    box-sizing: border-box;
    border-radius: 0;
    padding: 14px clamp(70px, 7vw, 110px) 36px;
    background: #073f35;
    box-shadow: none;
    overflow-y: auto;
    backdrop-filter: none;
  }
  .featured-carousel .featured-image-slide .featured-image-caption strong {
    font-size: clamp(17px, 1.7vw, 23px);
  }
  .featured-carousel .featured-image-slide .featured-image-caption p {
    margin: 4px 0;
    font-size: 13px;
  }
  .featured-carousel .featured-image-slide .featured-image-link {
    bottom: 136px;
  }
  .featured-carousel .featured-arrow { top: 42%; }
  .featured-carousel .featured-dots { bottom: 10px; }
}

/* 2026-10-16 desktop slideshow: image is fully visible at native proportions.
   Keep mobile carousel untouched. */
@media (min-width: 769px) {
  .public-viewer-body, .portal-main { max-width: 100%; }
  .featured-carousel:has(.featured-image-slide) {
    height: calc(min(68vh, 56.25vw) + 118px) !important;
    width: 100%; max-width: 100%; min-width: 0;
  }
  .featured-carousel .featured-slide.featured-image-slide {
    width: 100%; min-width: 0;
  }
  .featured-carousel .featured-image-slide .featured-banner-image {
    width: 100%; height: calc(100% - 118px);
    object-fit: contain !important; object-position: center;
  }
  .featured-carousel .featured-image-slide .featured-image-caption {
    height: 118px; padding-top: 12px; padding-bottom: 26px;
  }
  .featured-carousel .featured-image-slide .featured-image-link { bottom: 118px; }
  .featured-carousel .featured-arrow { top: calc((100% - 118px) / 2); }
  .portal-directory .public-official-card { min-height: 145px; }
  .portal-directory .public-official-card img,
  .portal-directory .public-official-card .public-official-avatar {
    width: 108px; height: 108px; min-width: 108px; flex: 0 0 108px;
    object-position: center 18%;
  }
  .portal-directory .public-official-card.public-vice-mayor-card {
    grid-column: span 2; min-height: 190px; background: #f4f9f6 !important;
    border-color: #bad9cb; gap: 22px; padding: 20px !important;
  }
  .portal-directory .public-vice-mayor-card img,
  .portal-directory .public-vice-mayor-card .public-official-avatar {
    width: 155px; height: 155px; min-width: 155px; flex: 0 0 155px;
  }
  .portal-directory .public-vice-mayor-card b { font-size: 17px; }
  .portal-personnel .public-vice-mayor-staff-card img { width: 125px; height: 125px; flex: 0 0 125px; object-position: center 18%; }
}
@media (min-width: 769px) and (max-width: 1000px) {
  .portal-directory .public-official-card.public-vice-mayor-card { grid-column: span 1; }
}
