/* ==========================================================================
   Pages — Banda Musicale G. Puccini
   Content-area styles for internal pages (pages, posts, archives, events).
   Uses same CSS custom properties as homepage (--red, --yellow, --shadow).

   BREAKPOINTS
   ── Desktop + Tablet landscape : >= 64em
   ── Tablet portrait            : 48em – 63.99em
   ── Mobile                     : < 48em

   UNITS — rem / em / % / vw / vh / clamp — zero px
   ========================================================================== */

/* ── Content Wrapper ── */
.bn-site-content {
  max-width: 77.5rem;
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
}

/* ── Main wrapper for non-homepage pages ── */
.bn-site-main {
  padding-top: 0;
  padding-bottom: 3.75rem;
}

/* Remove parent theme noise on event single */
.single-mbs_event .bn-site-main {
  padding: 0 0 3.75rem;
}

.single-mbs_event .site-content-contain,
.single-mbs_event .content-area,
.single-mbs_event #content {
  padding: 0;
  margin: 0;
  max-width: none;
}

/* ==========================================================================
   PAGE — Hero & Body
   ========================================================================== */

.bn-page-hero-solid,
.bn-post-hero-solid,
.bn-archive-hero-solid {
  background: linear-gradient(135deg, var(--red), #5a1515);
  color: #fff;
  padding: 5rem 2.5rem;
  border-radius: 0 0 1.375rem 1.375rem;
  text-align: center;
  margin-bottom: 3.125rem;
}

.bn-page-title,
.bn-post-title,
.bn-archive-title {
  font-family: Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  color: #fff;
}

.bn-archive-description {
  font-size: 1.1rem;
  opacity: .9;
  margin-top: .75rem;
}

/* Hero with image */
.bn-page-hero-image,
.bn-post-hero-image {
  position: relative;
  border-radius: 0 0 1.375rem 1.375rem;
  overflow: hidden;
  margin-bottom: 3.125rem;
}

.bn-page-hero-image img,
.bn-post-hero-image img {
  width: 100%;
  height: clamp(15rem, 30vw, 25rem);
  object-fit: cover;
  display: block;
}

.bn-page-hero-overlay,
.bn-post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 30%, rgba(0, 0, 0, .7));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3.125rem 2.5rem;
}

.bn-post-meta {
  display: flex;
  gap: 1rem;
  margin-top: .75rem;
  font-size: .875rem;
  opacity: .85;
  color: #fff;
}

.bn-post-cats {
  background: rgba(255, 255, 255, .15);
  padding: .125rem .75rem;
  border-radius: 3.125rem;
}

/* ── Page Body (the_content) ── */
.bn-page-body,
.bn-post-body {
  max-width: 50rem;
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #333;
}

.bn-page-body h2,
.bn-post-body h2 {
  font-family: Georgia, serif;
  color: var(--red);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 3.125rem 0 1.25rem;
  padding-bottom: .75rem;
  border-bottom: .125rem solid var(--yellow);
}

.bn-page-body h3,
.bn-post-body h3 {
  font-family: Georgia, serif;
  color: var(--red);
  font-size: 1.3rem;
  margin: 2.1875rem 0 .875rem;
}

.bn-page-body p,
.bn-post-body p {
  margin-bottom: 1.3rem;
}

.bn-page-body a,
.bn-post-body a {
  color: var(--red);
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-underline-offset: .1875rem;
  transition: all .3s;
}

.bn-page-body a:hover,
.bn-post-body a:hover {
  color: #5a1515;
}

.bn-page-body img,
.bn-post-body img {
  border-radius: .875rem;
  box-shadow: 0 .5rem 1.875rem var(--shadow);
  margin: 1.5rem 0;
}

.bn-page-body blockquote,
.bn-post-body blockquote {
  border-left: .25rem solid var(--yellow);
  margin: 1.875rem 0;
  padding: 1.25rem 1.5rem;
  background: #faf6ed;
  border-radius: 0 .875rem .875rem 0;
  font-style: italic;
  color: #555;
}

.bn-page-body ul,
.bn-page-body ol,
.bn-post-body ul,
.bn-post-body ol {
  margin: 0 0 1.3rem 1.5rem;
}

.bn-page-body li,
.bn-post-body li {
  margin-bottom: .5rem;
}

/* WordPress blocks */
.bn-page-body .wp-block-table table,
.bn-post-body .wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  border-radius: .625rem;
  overflow: hidden;
  box-shadow: 0 .125rem .75rem rgba(0, 0, 0, .06);
}

.bn-page-body .wp-block-table th,
.bn-post-body .wp-block-table th {
  background: var(--red);
  color: #fff;
  padding: .875rem 1rem;
  text-align: left;
  font-weight: 600;
}

.bn-page-body .wp-block-table td,
.bn-post-body .wp-block-table td {
  padding: .75rem 1rem;
  border-bottom: .0625rem solid #eee;
}

.bn-page-body .wp-block-table tr:nth-child(even) td,
.bn-post-body .wp-block-table tr:nth-child(even) td {
  background: #faf7f2;
}

.bn-page-body .wp-block-gallery,
.bn-post-body .wp-block-gallery {
  margin: 1.875rem 0;
}

.bn-page-body .wp-block-gallery .wp-block-image img,
.bn-post-body .wp-block-gallery .wp-block-image img {
  border-radius: .625rem;
}

/* WordPress columns */
.bn-page-body .wp-block-columns,
.bn-post-body .wp-block-columns {
  margin: 1.875rem 0;
}

/* WordPress buttons */
.bn-page-body .wp-block-button__link,
.bn-post-body .wp-block-button__link {
  background: var(--red) !important;
  color: #fff !important;
  border-radius: 3.125rem !important;
  padding: .875rem 2rem !important;
  font-weight: 700;
  transition: all .3s;
}

.bn-page-body .wp-block-button__link:hover,
.bn-post-body .wp-block-button__link:hover {
  filter: brightness(.85);
  transform: scale(1.04);
}

/* ==========================================================================
   POST — Footer & Navigation
   ========================================================================== */

.bn-post-footer {
  max-width: 50rem;
  margin: 3.125rem auto 0;
  padding-top: 1.875rem;
  border-top: .0625rem solid #eee;
}

.bn-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.875rem;
}

.bn-post-tags a {
  display: inline-block;
  background: #f0ebe0;
  color: var(--red);
  padding: .25rem .875rem;
  border-radius: 3.125rem;
  font-size: .8125rem;
  font-weight: 600;
  transition: all .3s;
}

.bn-post-tags a:hover {
  background: var(--red);
  color: #fff;
}

.bn-post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
}

.bn-post-nav-prev a,
.bn-post-nav-next a {
  color: var(--red);
  font-weight: 600;
  transition: color .3s;
}

.bn-post-nav-prev a:hover,
.bn-post-nav-next a:hover {
  color: #5a1515;
}

/* ==========================================================================
   ARCHIVE — Posts Grid
   ========================================================================== */

.bn-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21.25rem), 1fr));
  gap: 1.875rem;
  margin-bottom: 3.125rem;
}

.bn-post-card {
  background: #fff;
  border-radius: 1.125rem;
  overflow: hidden;
  box-shadow: 0 .25rem 1.25rem var(--shadow);
  transition: all .4s cubic-bezier(.34, 1.56, .64, 1);
}

.bn-post-card:hover {
  transform: translateY(-.375rem);
  box-shadow: 0 1rem 2.5rem var(--shadow);
}

.bn-post-card-image {
  display: block;
  overflow: hidden;
  height: clamp(10rem, 18vw, 13.75rem);
}

.bn-post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s;
}

.bn-post-card:hover .bn-post-card-image img {
  transform: scale(1.08);
}

.bn-post-card-body { padding: 1.5rem; }

.bn-post-card-date {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .0625em;
  color: var(--red);
  font-weight: 600;
}

.bn-post-card-title {
  font-family: Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.3;
  margin: .5rem 0 .75rem;
}

.bn-post-card-title a {
  color: #222;
  transition: color .3s;
}

.bn-post-card-title a:hover { color: var(--red); }

.bn-post-card-excerpt {
  font-size: .875rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.bn-post-card-link {
  color: var(--red);
  font-weight: 700;
  font-size: .875rem;
  transition: color .3s;
}

.bn-post-card-link:hover { color: #5a1515; }

/* ── Pagination ── */
.bn-pagination { text-align: center; margin: 2.5rem 0; }

.bn-pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: .5rem;
}

.bn-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.625rem;
  height: 2.625rem;
  border-radius: 50%;
  font-weight: 600;
  font-size: .9375rem;
  color: #333;
  background: #fff;
  box-shadow: 0 .125rem .5rem rgba(0, 0, 0, .08);
  transition: all .3s;
}

.bn-pagination .page-numbers:hover,
.bn-pagination .page-numbers.current {
  background: var(--red);
  color: #fff;
}

/* ── No posts ── */
.bn-no-posts {
  text-align: center;
  padding: 5rem 1.25rem;
  color: #888;
  font-size: 1.125rem;
}

/* ==========================================================================
   404
   ========================================================================== */

.bn-404 {
  text-align: center;
  padding: 6.25rem 1.25rem;
}

.bn-404-icon {
  font-size: 5rem;
  margin-bottom: 1.25rem;
}

.bn-404-title {
  font-family: Georgia, serif;
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 700;
  color: var(--red);
  line-height: 1;
  margin-bottom: 1rem;
}

.bn-404-text {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 2.5rem;
}

/* ==========================================================================
   MODAL (internal pages — shared with footer.php)
   ========================================================================== */

.bn-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity .3s;
}

.bn-modal.show { opacity: 1; }

.bn-modal-content {
  background: #fff;
  width: 100%;
  max-width: 27.5rem;
  border-radius: 1.5rem;
  overflow: hidden;
  margin: 1.25rem;
  transform: scale(.75);
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
}

.bn-modal.show .bn-modal-content { transform: scale(1); }

.bn-modal-header {
  background: var(--red);
  color: #fff;
  padding: 1.625rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.4375rem;
  font-weight: 700;
}

.bn-modal-header button {
  font-size: 2.375rem;
  line-height: 1;
  color: #fff;
}

.bn-modal-body { padding: 2rem; }

/* ── Form (shared) ── */
.bn-form-group { margin-bottom: 1.375rem; }

.bn-form-group label {
  display: block;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .0625em;
  margin-bottom: .5rem;
  font-weight: 600;
  color: #555;
}

.bn-form-group input,
.bn-form-group select,
.bn-form-group textarea {
  width: 100%;
  padding: 1.125rem;
  border: .125rem solid #ddd;
  border-radius: 1rem;
  font-size: 1rem;
  transition: border .3s;
  font-family: inherit;
}

.bn-form-group input:focus,
.bn-form-group select:focus,
.bn-form-group textarea:focus {
  outline: none;
  border-color: var(--red);
}

.bn-submit-btn {
  background: var(--red);
  color: #fff;
  padding: 1.25rem;
  border-radius: 1rem;
  font-weight: 700;
  font-size: 1.0625rem;
  width: 100%;
  transition: all .3s;
}

.bn-submit-btn:hover { filter: brightness(.85); }

/* ==========================================================================
   EVENT SINGLE & ARCHIVE (override plugin styles)
   ========================================================================== */

/* ── Single: wide layout, no box ── */
.mbs-event-single {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Map hero — full width, same style as archive map */
.mbs-event-single .mbs-event-map-hero {
  width: 100%;
  height: clamp(15rem, 30vw, 25rem);
  overflow: hidden;
  border-bottom: .1875rem solid var(--yellow);
}

.mbs-event-single #mbs-event-single-map {
  width: 100%;
  height: 100%;
}

/* Body content under map */
.mbs-event-single .mbs-event-body {
  max-width: 56.25rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header — clean, no gradient */
.mbs-event-single .mbs-event-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: .0625rem solid #eee;
  margin-bottom: 2rem;
}

.mbs-event-single .mbs-event-header h1 {
  color: var(--red);
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: 0 0 1rem;
}

.mbs-event-single .mbs-event-header h1::after {
  content: '';
  display: block;
  width: 3.125rem;
  height: .1875rem;
  background: var(--yellow);
  margin-top: .75rem;
  border-radius: .125rem;
}

.mbs-event-single .mbs-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.mbs-event-single .mbs-event-meta span {
  display: inline-flex;
  align-items: center;
  gap: .3125rem;
  background: #f5f5f5;
  color: #444;
  padding: .375rem 1rem;
  border-radius: 3.125rem;
  font-size: .8125rem;
  font-weight: 500;
}

.mbs-event-single .mbs-event-meta .mbs-event-datetime::before { content: '📅 '; }
.mbs-event-single .mbs-event-meta .mbs-event-address::before  { content: '📍 '; }
.mbs-event-single .mbs-event-meta .mbs-event-type::before     { content: '🎺 '; }

/* Featured image */
.mbs-event-single .mbs-event-featured-image {
  margin-bottom: 2rem;
  border-radius: .75rem;
  overflow: hidden;
}

.mbs-event-single .mbs-event-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Description */
.mbs-event-single .mbs-event-description {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #333;
  margin-bottom: 2.5rem;
}

/* Gallery */
.mbs-event-single .mbs-event-gallery {
  margin-bottom: 3.75rem;
}

.mbs-event-single .mbs-event-gallery h3 {
  font-family: Georgia, serif;
  color: var(--red);
  margin-bottom: 1rem;
}

.mbs-event-single .mbs-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr));
  gap: .625rem;
}

.mbs-event-single .mbs-gallery-item {
  border-radius: .625rem;
  overflow: hidden;
  aspect-ratio: 1;
}

.mbs-event-single .mbs-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.mbs-event-single .mbs-gallery-item:hover img {
  transform: scale(1.08);
}

/* ── Archive ── */
.mbs-events-archive {
  max-width: 75rem;
  margin: 2.5rem auto 0;
}

.mbs-events-archive .mbs-events-header h1 {
  font-family: Georgia, serif;
  color: var(--red);
  text-align: center;
  margin-bottom: 2.5rem;
}

.mbs-events-archive .mbs-events-map-container {
  border-radius: 1.125rem;
  overflow: hidden;
  box-shadow: 0 .5rem 1.875rem var(--shadow);
  margin-bottom: 2.5rem;
  border: .125rem solid var(--yellow);
}

.mbs-events-archive .mbs-event-item {
  display: flex;
  background: #fff;
  border-radius: 1.125rem;
  overflow: hidden;
  box-shadow: 0 .25rem 1.25rem rgba(0, 0, 0, .06);
  transition: all .4s;
  margin-bottom: 1.25rem;
}

.mbs-events-archive .mbs-event-item:hover {
  transform: translateY(-.25rem);
  box-shadow: 0 .75rem 2.1875rem var(--shadow);
}

.mbs-events-archive .mbs-event-image {
  flex: 0 0 clamp(10rem, 18vw, 13.75rem);
  overflow: hidden;
}

.mbs-events-archive .mbs-event-image img {
  width: 100%;
  height: 100%;
  min-height: 11.25rem;
  object-fit: cover;
  transition: transform .5s;
}

.mbs-events-archive .mbs-event-item:hover .mbs-event-image img {
  transform: scale(1.05);
}

.mbs-events-archive .mbs-event-content {
  padding: 1.5rem 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mbs-events-archive .mbs-event-content h2 {
  font-family: Georgia, serif;
  margin: 0 0 .375rem;
  font-size: 1.25rem;
}

.mbs-events-archive .mbs-event-content h2 a {
  color: #222;
  transition: color .3s;
}

.mbs-events-archive .mbs-event-content h2 a:hover {
  color: var(--red);
}

.mbs-events-archive .mbs-event-meta {
  font-size: .8125rem;
  color: #888;
}

/* ==========================================================================
   RESPONSIVE — Desktop + Tablet landscape (>= 64em)
   ========================================================================== */
@media (min-width: 64em) {
  .bn-posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   RESPONSIVE — Tablet portrait (48em – 63.99em)
   ========================================================================== */
@media (min-width: 48em) and (max-width: 63.99em) {
  .bn-page-hero-solid,
  .bn-post-hero-solid,
  .bn-archive-hero-solid {
    padding: 3.75rem 1.5rem;
  }

  .bn-page-hero-overlay,
  .bn-post-hero-overlay {
    padding: 2.5rem 1.5rem;
  }

  .bn-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mbs-event-single .mbs-event-map-hero {
    height: clamp(12rem, 28vw, 20rem);
  }

  .mbs-event-single .mbs-event-body {
    padding: 0 1.25rem;
  }

  .mbs-events-archive .mbs-event-image {
    flex: 0 0 clamp(8rem, 16vw, 12rem);
  }

  .bn-modal-body { padding: 1.5rem; }
}

/* ==========================================================================
   RESPONSIVE — Mobile (< 48em)
   ========================================================================== */
@media (max-width: 47.99em) {
  .bn-page-hero-solid,
  .bn-post-hero-solid,
  .bn-archive-hero-solid {
    padding: 3.125rem 1.25rem;
    border-radius: 0;
  }

  .bn-page-hero-image img,
  .bn-post-hero-image img {
    height: clamp(10rem, 40vw, 17.5rem);
  }

  .bn-page-hero-overlay,
  .bn-post-hero-overlay {
    padding: 1.875rem 1.25rem;
  }

  .bn-page-hero-image,
  .bn-post-hero-image {
    border-radius: 0;
    margin-bottom: 2rem;
  }

  .bn-posts-grid {
    grid-template-columns: 1fr;
  }

  .bn-page-body,
  .bn-post-body {
    font-size: 1rem;
  }

  .mbs-event-single .mbs-event-map-hero {
    height: clamp(10rem, 45vw, 17.5rem);
  }

  .mbs-event-single .mbs-event-header {
    padding: 1.5rem 0 1rem;
  }

  .mbs-event-single .mbs-event-body {
    padding: 0 1rem;
  }

  .mbs-event-single .mbs-event-description {
    font-size: 1rem;
  }

  .mbs-events-archive .mbs-event-item {
    flex-direction: column;
  }

  .mbs-events-archive .mbs-event-image {
    flex: none;
    height: clamp(8rem, 30vw, 12.5rem);
  }

  .mbs-events-archive .mbs-event-content {
    padding: 1.25rem;
  }

  .bn-modal-content {
    margin: .75rem;
    border-radius: 1rem;
  }

  .bn-modal-header {
    padding: 1.25rem 1.5rem;
    font-size: 1.2rem;
  }

  .bn-modal-body { padding: 1.25rem; }

  .bn-form-group input,
  .bn-form-group select,
  .bn-form-group textarea {
    padding: .875rem;
  }
}

/* ==========================================================================
   PRINT
   ========================================================================== */
@media print {
  .bn-topbar, .bn-header, .bn-footer, .bn-modal,
  .bn-hamburger, .bn-mobile-menu { display: none !important; }
  body { background: #fff; color: #000; }
  .bn-page-body, .bn-post-body { max-width: 100%; }
  .mbs-event-single .mbs-event-map-hero { display: none; }
}
