/* =========================================================
   JONDISHAPOUR — RESPONSIVE FINAL
   Device targets:
   Large desktop >= 1440
   Laptop 1024–1439
   Tablet 768–1023
   Mobile <= 767
   Small mobile <= 480
   ========================================================= */
html,body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
*,*::before,*::after {
  box-sizing: border-box;
}
img,video,iframe,svg {
  max-width: 100%;
  height: auto;
}
button,input,select,textarea {
  font: inherit;
  max-width: 100%;
}
main,section,article,div,nav,aside {
  min-width: 0;
}
/* Keep page content readable on very wide displays */
@media (min-width:1440px) {
  .header-inner,.quick-grid,.feature-row,.news-grid,.gallery-shell,
  .shop-grid,.sessions-grid,.awards-main,.history-main,.library-main,
  .films-main,.nw-main,.archive-content,.yb-main>.yb-gallery,
  .research-main,.ex-showcase-main,.order-main,.about-intro,.about-story,
  .about-stats,.about-message {
    max-width: 1440px;
    margin-inline: auto;
  }
  .gallery-shell {
    grid-template-columns: minmax(320px,420px) minmax(0,1fr)!important;
  }
  #home>.gallery #galleryStageImage {
    height: 520px!important;
  }
}
/* ================= HOME ================= */
@media (min-width:1024px) and (max-width:1439px) {
  .header-inner {
    padding-inline: 24px!important;
  }
  .main-nav {
    gap: clamp(10px,1.3vw,18px)!important;
  }
  .hero-copy {
    max-width: 680px!important;
  }
  .quick-grid {
    gap: 14px!important;
  }
  .feature-row {
    gap: 16px!important;
  }
  .news-grid {
    gap: 16px!important;
  }
  #home>.gallery .gallery-shell {
    grid-template-columns: minmax(290px,360px) minmax(0,1fr)!important;
    gap: 28px!important;
  }
  #home>.gallery #galleryStageImage {
    height: clamp(380px,36vw,480px)!important;
  }
}
@media (min-width:768px) and (max-width:1023px) {
  .header-inner {
    padding-inline: 20px!important;
  }
  .main-nav {
    gap: 12px!important;
    font-size: 12px!important;
  }
  .brand img {
    max-height: 52px!important;
    width: auto!important;
  }
  .hero {
    min-height: 620px!important;
  }
  .hero-copy {
    padding-inline: 6vw!important;
    max-width: 640px!important;
  }
  .hero h1 {
    font-size: clamp(44px,6vw,64px)!important;
  }
  .quick-grid {
    grid-template-columns: repeat(2,minmax(0,1fr))!important;
    gap: 16px!important;
    padding-inline: 4vw!important;
  }
  .feature-row {
    grid-template-columns: repeat(2,minmax(0,1fr))!important;
    gap: 16px!important;
    padding-inline: 4vw!important;
  }
  .feature-row>.feature-card:last-child {
    grid-column: 1/-1;
    max-width: 520px;
    margin-inline: auto;
    width: 100%;
  }
  .news-grid {
    grid-template-columns: repeat(2,minmax(0,1fr))!important;
    gap: 16px!important;
    padding-inline: 4vw!important;
  }
  .registered {
    grid-template-columns: 1fr 1fr!important;
  }
  .registered-copy {
    padding: 42px 5vw!important;
  }
  #home>.gallery {
    padding: 38px 4vw 44px!important;
  }
  #home>.gallery .gallery-shell {
    grid-template-columns: 1fr!important;
    gap: 24px!important;
  }
  #home>.gallery .gallery-copy {
    align-items: center!important;
    text-align: center!important;
  }
  #home>.gallery .gallery-copy p {
    max-width: 620px!important;
    margin-inline: auto!important;
  }
  #home>.gallery .gallery-controls {
    justify-content: center!important;
  }
  #home>.gallery #galleryStageImage {
    height: clamp(360px,58vw,520px)!important;
  }
}
@media (max-width:767px) {
  body {
    font-size: 14px;
  }
  .site-header,.header-inner {
    max-width: 100%!important;
  }
  .header-inner {
    padding-inline: 14px!important;
  }
  .brand img {
    width: auto!important;
    max-height: 44px!important;
  }
  .menu-btn {
    display: flex!important;
  }
  .main-nav {
    max-width: calc(100vw - 28px)!important;
  }
  .hero {
    height: auto!important;
    min-height: 560px!important;
  }
  .hero-copy {
    width: 100%!important;
    max-width: none!important;
    padding: 90px 18px 54px!important;
  }
  .hero h1 {
    font-size: clamp(36px,11vw,54px)!important;
    line-height: 1.17!important;
  }
  .hero-text {
    max-width: 100%!important;
    font-size: 13px!important;
    line-height: 2!important;
  }
  .hero-actions {
    display: flex!important;
    flex-wrap: wrap!important;
    gap: 10px!important;
  }
  .quick-grid,.feature-row,.news-grid {
    grid-template-columns: 1fr!important;
    padding-inline: 14px!important;
    gap: 14px!important;
  }
  .quick-card,.feature-card,.news-grid article {
    width: 100%!important;
    max-width: none!important;
  }
  .registered {
    grid-template-columns: 1fr!important;
  }
  .registered-image {
    min-height: 250px!important;
  }
  .registered-copy {
    padding: 36px 18px 42px!important;
  }
  .registered-copy h2 {
    font-size: 30px!important;
  }
  .registered-copy h3 {
    font-size: 24px!important;
  }
  #home>.gallery {
    padding: 30px 14px 36px!important;
  }
  #home>.gallery::before {
    left: 14px!important;
    width: 100px!important;
  }
  #home>.gallery .gallery-shell {
    grid-template-columns: 1fr!important;
    gap: 18px!important;
  }
  #home>.gallery .gallery-copy {
    align-items: center!important;
    text-align: center!important;
  }
  #home>.gallery .gallery-copy h2 {
    font-size: clamp(30px,9vw,40px)!important;
  }
  #home>.gallery .gallery-copy p {
    max-width: none!important;
    margin-bottom: 20px!important;
    font-size: 12px!important;
    line-height: 1.95!important;
  }
  #home>.gallery .gallery-controls {
    width: 100%!important;
    display: grid!important;
    grid-template-columns: 1fr auto 1fr!important;
    gap: 8px!important;
    padding: 8px!important;
  }
  #home>.gallery .gallery-nav {
    min-width: 0!important;
    width: 100%!important;
    justify-content: center!important;
    padding-inline: 10px!important;
  }
  #home>.gallery .gallery-nav-label {
    font-size: 12px!important;
  }
  #home>.gallery .gallery-controls strong {
    min-width: 70px!important;
    padding-inline: 4px!important;
  }
  #home>.gallery .gallery-stage {
    min-height: 0!important;
    border-radius: 16px!important;
  }
  #home>.gallery #galleryStageImage {
    height: clamp(260px,72vw,390px)!important;
    object-fit: cover!important;
  }
  #home>.gallery .gallery-zoom-hint {
    left: 10px!important;
    right: 10px!important;
    bottom: 10px!important;
    justify-content: center!important;
    font-size: 11px!important;
  }
  .gallery-lightbox {
    padding: 12px!important;
    grid-template-columns: 1fr!important;
    gap: 8px!important;
  }
  .gallery-lightbox img {
    max-width: 94vw!important;
    max-height: 78vh!important;
    width: auto!important;
    height: auto!important;
    object-fit: contain!important;
  }
}
/* ================= INTERNAL HEROES ================= */
@media (min-width:1024px) {
  .about-hero,.ex-showcase-hero,.awards-hero,.history-hero,.library-hero,
  .research-hero,.films-hero,.nw-hero,.news-hero,.order-hero,
  .sessions-hero,.shop-hero,.yb-hero {
    height: 300px!important;
    grid-template-columns: 45% 55%!important;
  }
}
@media (min-width:768px) and (max-width:1023px) {
  .about-hero,.ex-showcase-hero,.awards-hero,.history-hero,.library-hero,
  .research-hero,.films-hero,.nw-hero,.news-hero,.order-hero,
  .sessions-hero,.shop-hero,.yb-hero {
    height: auto!important;
    grid-template-columns: 1fr!important;
  }
  .about-hero-copy,.ex-showcase-hero-copy,.awards-hero-copy,.history-hero-copy,.library-hero-copy,
  .research-hero-copy,.films-hero-copy,.nw-hero-copy,.news-hero-copy,.order-hero-copy,
  .sessions-hero-copy,.shop-hero-copy,.yb-hero-copy {
    padding: 34px 6vw!important;
    min-height: 220px!important;
  }
  .about-hero-visual,.ex-showcase-hero-visual,.awards-hero-visual,.history-hero-visual,.library-hero-visual,
  .research-hero-visual,.films-hero-visual,.nw-hero-visual,.news-hero-visual,.order-hero-visual,
  .sessions-hero-visual,.shop-hero-visual,.yb-hero-visual {
    height: 240px!important;
  }
}
@media (max-width:767px) {
  .about-hero,.ex-showcase-hero,.awards-hero,.history-hero,.library-hero,
  .research-hero,.films-hero,.nw-hero,.news-hero,.order-hero,
  .sessions-hero,.shop-hero,.yb-hero {
    height: auto!important;
    grid-template-columns: 1fr!important;
    overflow: hidden!important;
  }
  .about-hero-copy,.ex-showcase-hero-copy,.awards-hero-copy,.history-hero-copy,.library-hero-copy,
  .research-hero-copy,.films-hero-copy,.nw-hero-copy,.news-hero-copy,.order-hero-copy,
  .sessions-hero-copy,.shop-hero-copy,.yb-hero-copy {
    padding: 28px 18px!important;
    min-height: 190px!important;
    align-items: flex-start!important;
    text-align: right!important;
  }
  .about-hero h1,.ex-showcase-hero h1,.awards-hero h1,.history-hero h1,.library-hero h1,
  .research-hero h1,.films-hero h1,.nw-hero h1,.news-hero h1,.order-hero h1,
  .sessions-hero h1,.shop-hero h1,.yb-hero h1 {
    font-size: clamp(31px,9vw,40px)!important;
    line-height: 1.2!important;
  }
  .about-hero-visual,.ex-showcase-hero-visual,.awards-hero-visual,.history-hero-visual,.library-hero-visual,
  .research-hero-visual,.films-hero-visual,.nw-hero-visual,.news-hero-visual,.order-hero-visual,
  .sessions-hero-visual,.shop-hero-visual,.yb-hero-visual {
    height: 210px!important;
    min-height: 210px!important;
  }
}
/* ================= PAGE GRIDS ================= */
@media (min-width:1440px) {
  .shop-grid,.sessions-grid,.films-grid,.nw-grid,.archive-grid {
    grid-template-columns: repeat(4,minmax(0,1fr))!important;
  }
  .yb-gallery {
    grid-template-columns: repeat(5,minmax(0,1fr))!important;
  }
}
@media (min-width:1024px) and (max-width:1439px) {
  .shop-grid,.sessions-grid,.films-grid,.nw-grid,.archive-grid {
    grid-template-columns: repeat(3,minmax(0,1fr))!important;
  }
  .yb-gallery {
    grid-template-columns: repeat(4,minmax(0,1fr))!important;
  }
  .awards-grid,.history-gallery,.ex-showcase-grid {
    grid-template-columns: repeat(3,minmax(0,1fr))!important;
  }
}
@media (min-width:768px) and (max-width:1023px) {
  .shop-grid,.sessions-grid,.films-grid,.nw-grid,.archive-grid,.awards-grid,.history-gallery,
  .ex-showcase-grid,.library-grid,.yb-gallery {
    grid-template-columns: repeat(2,minmax(0,1fr))!important;
    gap: 16px!important;
  }
  .research-list {
    grid-template-columns: 1fr!important;
  }
  .nw-care-grid {
    grid-template-columns: repeat(2,minmax(0,1fr))!important;
  }
  .research-meta-grid {
    grid-template-columns: repeat(2,minmax(0,1fr))!important;
  }
}
@media (max-width:767px) {
  .shop-grid,.sessions-grid,.films-grid,.nw-grid,.archive-grid,.awards-grid,.history-gallery,
  .ex-showcase-grid,.library-grid,.yb-gallery,.research-list,.nw-care-grid,.research-meta-grid,
  .mission-grid {
    grid-template-columns: 1fr!important;
    gap: 14px!important;
  }
  .shop-grid,.sessions-grid,.films-grid,.nw-grid,.archive-grid,.awards-grid,.history-gallery,
  .ex-showcase-grid,.library-grid,.yb-gallery,.research-list {
    padding-inline: 14px!important;
  }
  .shop-card,.session-card,.film-card,.nw-card,.news-card,.award-card,.history-card,
  .ex-showcase-card,.library-card,.yb-card,.research-card {
    width: 100%!important;
    max-width: none!important;
    min-width: 0!important;
  }
}
/* ================= ABOUT ================= */
@media (min-width:768px) and (max-width:1023px) {
  .about-intro {
    grid-template-columns: 1fr!important;
    gap: 30px!important;
    padding: 52px 5vw!important;
  }
  .about-photo-card img {
    height: 360px!important;
  }
  .about-stats {
    grid-template-columns: repeat(2,minmax(0,1fr))!important;
  }
  .mission-grid {
    grid-template-columns: repeat(2,minmax(0,1fr))!important;
  }
  .about-story {
    grid-template-columns: 1fr!important;
    gap: 30px!important;
  }
  .about-cta {
    flex-direction: column!important;
    align-items: flex-start!important;
  }
}
@media (max-width:767px) {
  .about-intro {
    grid-template-columns: 1fr!important;
    gap: 24px!important;
    padding: 40px 14px!important;
  }
  .about-photo-card img {
    height: 260px!important;
  }
  .about-stats {
    grid-template-columns: repeat(2,minmax(0,1fr))!important;
    padding: 0 14px!important;
    gap: 10px!important;
  }
  .about-stats article {
    padding: 18px 8px!important;
  }
  .about-mission {
    padding: 48px 14px!important;
  }
  .about-story {
    grid-template-columns: 1fr!important;
    gap: 26px!important;
    padding: 48px 14px!important;
  }
  .about-message {
    margin: 0 14px 46px!important;
    padding: 26px 20px!important;
    grid-template-columns: 1fr!important;
  }
  .about-cta {
    padding: 32px 14px!important;
    flex-direction: column!important;
    align-items: flex-start!important;
  }
  .about-cta-actions {
    width: 100%!important;
  }
  .about-cta-actions a {
    flex: 1 1 140px!important;
    text-align: center!important;
  }
}
/* ================= FORMS / FILTERS / PAGINATION ================= */
@media (max-width:1023px) {
  .filters,.filter-row,.library-toolbar,.archive-toolbar,.films-filter,.shop-toolbar {
    flex-wrap: wrap!important;
    gap: 10px!important;
  }
}
@media (max-width:767px) {
  input,select,textarea {
    width: 100%!important;
  }
  .order-fields,.order-fields-2,.order-form-grid {
    grid-template-columns: 1fr!important;
  }
  .pagination,.yb-pagination,.awards-pagination,.sessions-pagination,.nw-pagination,.library-pagination {
    max-width: 100%!important;
    overflow-x: auto!important;
    padding-inline: 4px!important;
  }
}
/* ================= FOOTER SAFETY — preserve existing design ================= */
@media (min-width:768px) and (max-width:1023px) {
  .footer-shell {
    grid-template-columns: repeat(2,minmax(0,1fr))!important;
    gap: 16px!important;
    padding: 28px 20px 24px!important;
  }
}
@media (max-width:767px) {
  .footer-shell {
    grid-template-columns: 1fr!important;
    padding: 22px 14px 18px!important;
    gap: 12px!important;
  }
  .footer-panel {
    min-height: 0!important;
  }
  .newsletter form {
    width: 100%!important;
  }
  .footer-bottom-new {
    padding: 14px!important;
    flex-direction: column!important;
    text-align: center!important;
    gap: 7px!important;
  }
}
/* ================= MODALS / LIGHTBOX ================= */
@media (max-width:767px) {
  .yb-lightbox,.film-modal,.ex-gallery-modal,.gallery-lightbox {
    padding: 10px!important;
  }
  .yb-lightbox-dialog,.film-modal-dialog,.ex-gallery-dialog {
    max-width: 96vw!important;
    max-height: 90vh!important;
  }
  .yb-lightbox-dialog img,.film-modal-dialog img,.ex-gallery-dialog img {
    max-width: 94vw!important;
    max-height: 84vh!important;
    object-fit: contain!important;
  }
}
/* ================= SMALL PHONES ================= */
@media (max-width:480px) {
  .header-inner {
    padding-inline: 10px!important;
  }
  .hero-copy {
    padding-inline: 14px!important;
  }
  .quick-grid,.feature-row,.news-grid {
    padding-inline: 10px!important;
  }
  #home>.gallery {
    padding-inline: 10px!important;
  }
  #home>.gallery .gallery-controls {
    grid-template-columns: 1fr 64px 1fr!important;
  }
  #home>.gallery .gallery-nav {
    padding-inline: 8px!important;
    gap: 5px!important;
  }
  #home>.gallery .gallery-nav-icon {
    display: none!important;
  }
  #home>.gallery #galleryStageImage {
    height: 68vw!important;
    min-height: 230px!important;
  }
  .about-stats {
    grid-template-columns: 1fr!important;
    padding-inline: 10px!important;
  }
  .footer-shell {
    padding-inline: 10px!important;
  }
}
/* =========================================================
   LARGE / ULTRAWIDE DESKTOP REFINEMENT
   Keep homepage proportions stable on 1600px+ displays.
   ========================================================= */
@media (min-width:1600px) {
  #home > .registered,
  #home > .feature-row,
  #home > .news > .section-head,
  #home > .news > .news-grid,
  #home > .quick > .quick-grid,
  #home > .gallery .gallery-shell {
    width: min(1440px, calc(100vw - 96px)) !important;
    max-width: 1440px !important;
    margin-inline: auto !important;
  }
  #home > .registered {
    height: 360px !important;
    grid-template-columns: minmax(0, 52%) minmax(0, 48%) !important;
    padding: 20px !important;
    border-radius: 0 !important;
  }
  #home > .registered .registered-image {
    min-width: 0 !important;
    width: 100% !important;
    height: 320px !important;
    align-self: center !important;
    background-size: cover !important;
    background-position: center center !important;
  }
  #home > .registered .registered-copy {
    min-width: 0 !important;
    padding: 28px 54px 28px 40px !important;
  }
  #home > .registered .registered-copy h2 {
    font-size: clamp(32px, 2vw, 40px) !important;
  }
  #home > .registered .registered-copy h3 {
    font-size: clamp(24px, 1.45vw, 30px) !important;
    line-height: 1.55 !important;
  }
  #home > .registered .registered-copy p {
    max-width: 610px !important;
    font-size: 13px !important;
    line-height: 2 !important;
  }
  #home > .feature-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
    padding: 14px 18px !important;
  }
  #home > .feature-row .feature-card {
    min-height: 390px !important;
  }
  #home > .feature-row .feature-card > img {
    height: 300px !important;
    min-height: 300px !important;
  }
  #home > .feature-row .feature-card > div {
    min-height: 86px !important;
  }
  #home > .news {
    padding-inline: 0 !important;
  }
  #home > .gallery {
    padding-inline: 0 !important;
  }
  #home > .gallery .gallery-shell {
    grid-template-columns: 400px minmax(0, 1fr) !important;
    gap: 40px !important;
  }
  #home > .gallery #galleryStageImage {
    height: 500px !important;
  }
}
@media (min-width:2000px) {
  #home > .registered,
  #home > .feature-row,
  #home > .news > .section-head,
  #home > .news > .news-grid,
  #home > .quick > .quick-grid,
  #home > .gallery .gallery-shell {
    max-width: 1480px !important;
    width: 1480px !important;
  }
}
/* Museum font harmonization, applied after page-specific styles. */
:root {
  --font-title: "Doran", Tahoma, "Segoe UI", Arial, sans-serif;
  --font-body: "Samir", Tahoma, "Segoe UI", Arial, sans-serif;
}
html, body, button, input, textarea, select {
  font-family: var(--font-body);
}
h1, h2 {
  font-family: var(--font-title);
}
h3, h4, h5, h6, p, li, label {
  font-family: var(--font-body);
}

/* Museum news category cards: five linked categories, original design language */
.home-page .news-grid.museum-news-categories { grid-template-columns:repeat(5,minmax(0,1fr)); }
.home-page .museum-news-categories .news-category-card { display:block; min-width:0; }
.home-page .museum-news-categories .news-category-link { display:grid; grid-template-columns:95px minmax(0,1fr); gap:10px; align-items:center; width:100%; height:100%; color:inherit; text-decoration:none; }
.home-page .museum-news-categories .news-category-link h3 { margin:0 0 7px; }
.home-page .museum-news-categories .news-category-link:focus-visible { outline:2px solid #c47b20; outline-offset:3px; }
@media (max-width:1200px) { .home-page .news-grid.museum-news-categories { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:800px) { .home-page .news-grid.museum-news-categories { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:520px) { .home-page .news-grid.museum-news-categories { grid-template-columns:1fr; } }
