/*
Theme Name: Momotombo Soundsystem
Theme URI: https://momotombosoundsystem.com
Author: Gustavo Lanzas
Author URI: https://momotombosoundsystem.com
Description: Custom block theme for Momotombo Soundsystem — Nicaraguan-Caribbean soundsystem collective, Portland OR.
Version: 0.1.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mmtb-theme
*/

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;700&family=Open+Sans:wght@400;600;700&family=Staatliches&display=swap');

html {
  background-image: url('src/images/page-background.jpg');
  background-attachment: scroll;
  background-size: 100% auto;
  background-position: top center;
  background-repeat: repeat-y;
}

/* Fixed header — target actual rendered wrapper */
header.wp-block-template-part {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 99998 !important;
  background-color: #2e1b0f !important;
  border-top: 4px solid #1c9131 !important;
  border-bottom: 4px solid #9f2813 !important;
}

body.admin-bar header.wp-block-template-part {
  top: 32px !important;
}

/* Inner flex container — constrain width, center, clear bg */
header.wp-block-template-part .wp-block-group {
  font-size: 16px !important;
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
  align-items: center !important;
  background-color: transparent !important;
  flex-wrap: nowrap !important;
}

/* Nav links */
header.wp-block-template-part .wp-block-navigation,
header.wp-block-template-part .wp-block-navigation-item,
header.wp-block-template-part .wp-block-navigation-item__content {
  font-size: 0.85rem !important;
  font-family: 'Oswald', sans-serif !important;
  color: #ebb64c !important;
}

header.wp-block-template-part .wp-block-navigation {
  margin-left: 2em !important;
}

header.wp-block-template-part .wp-block-navigation-item__content:hover {
  color: #ede3bf !important;
}

/* Book Us button */
header.wp-block-template-part .wp-block-button__link {
  font-size: 0.85rem !important;
  padding: 0.4em 0.8em !important;
  font-family: 'Oswald', sans-serif !important;
  transition: background-color 0.15s ease, color 0.15s ease !important;
}

header.wp-block-template-part .wp-block-button__link:hover {
  background-color: #ede3bf !important;
  color: #2e1b0f !important;
}

/* Footer font */
footer.wp-block-template-part,
footer.wp-block-template-part p,
footer.wp-block-template-part .wp-block-site-title,
footer.wp-block-template-part .wp-block-site-title a {
  font-family: 'Oswald', sans-serif !important;
}

/* Push content below fixed header */
#momotombo-home {
  padding-top: 60px;
}

.wp-site-blocks {
  padding-top: 0;
}

/* Interior pages — clear fixed header + side gutters */
body:not(.home) main.wp-block-group {
  padding-top: 80px !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

body.admin-bar:not(.home) main.wp-block-group {
  padding-top: 112px !important;
}

/* Interior page body font */
.wp-block-post-content,
.wp-block-post-content p,
.wp-block-post-content li,
.wp-block-post-content blockquote {
  font-family: 'Open Sans', sans-serif !important;
}

/* Interior page links */
.wp-block-post-content a {
  color: #e01a00 !important;
  text-decoration: underline !important;
}

.wp-block-post-content a:visited {
  color: #9f2813 !important;
}

.wp-block-post-content a:hover {
  color: #ff3318 !important;
}

/* Post navigation links (Previous / Next) */
.wp-block-post-navigation-link a,
.wp-block-post-navigation-link {
  font-family: 'Oswald', sans-serif !important;
  font-size: 2rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #e01a00 !important;
  text-decoration: none !important;
}

.wp-block-post-navigation-link a:visited {
  color: #9f2813 !important;
}

.wp-block-post-navigation-link a:hover {
  color: #ff3318 !important;
  text-decoration: underline !important;
}

/* Force post title font and color — override Site Editor DB */
.wp-block-post-title,
h1.wp-block-post-title,
h2.wp-block-post-title,
.wp-block-post-title a,
h1.wp-block-post-title a,
h2.wp-block-post-title a {
  font-family: 'Staatliches', sans-serif !important;
  font-weight: 400 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  color: #9f2813 !important;
  text-decoration: none !important;
}

/* Single post title — full size */
body.single .wp-block-post-title,
body.single h1.wp-block-post-title {
  font-size: clamp(3rem, 6vw, 5rem) !important;
  line-height: 0.95 !important;
  margin-top: 0.05em !important;
  margin-bottom: 0.4rem !important;
}

/* Single post meta + title — scale down on narrow viewports */
@media (max-width: 600px) {
  body.single .mmtb-post-meta .wp-block-post-date,
  body.single .mmtb-post-meta .wp-block-post-terms {
    font-size: 1.3rem !important;
  }

  body.single .mmtb-post-meta span[style*="border-radius"] {
    width: 10px !important;
    height: 10px !important;
  }

  body.single .wp-block-post-title,
  body.single h1.wp-block-post-title {
    margin-bottom: 0.2rem !important;
  }

  body.single .mmtb-post-tags-row {
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
  }

  body.single .mmtb-post-tags .wp-block-post-terms {
    font-size: 1.5rem !important;
  }

  body:not(.home) main.wp-block-group {
    padding-top: 60px !important;
  }

  body.admin-bar:not(.home) main.wp-block-group {
    padding-top: 92px !important;
  }
}

/* Page title — same size as single */
body.page .wp-block-post-title,
body.page h1.wp-block-post-title {
  font-size: clamp(3rem, 6vw, 5rem) !important;
  line-height: 0.85 !important;
  margin-top: 0.05em !important;
  margin-bottom: 1.5rem !important;
}

/* Archive / index card title — card size */
body.archive .wp-block-post-title,
body.archive h2.wp-block-post-title,
body.blog .wp-block-post-title,
body.blog h2.wp-block-post-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem) !important;
  line-height: 0.9 !important;
  margin-top: 0.05em !important;
  margin-bottom: 0.3rem !important;
}

/* Post meta links (date, category, tags outside content) */
.wp-block-post-date a,
.wp-block-post-terms a {
  color: #e01a00 !important;
  text-decoration: none !important;
}

.wp-block-post-date a:visited,
.wp-block-post-terms a:visited {
  color: #9f2813 !important;
}

.wp-block-post-date a:hover,
.wp-block-post-terms a:hover {
  text-decoration: underline !important;
}

/* Single post tags — color cycling */
.mmtb-post-tags-row.is-layout-flex {
  align-items: flex-start !important;
}
.mmtb-post-tags-inner {
  max-width: 80% !important;
}
.mmtb-post-tags a {
  text-decoration: none !important;
}
.mmtb-post-tags a:nth-child(3n+1) { color: #9f2813 !important; }
.mmtb-post-tags a:nth-child(3n+2) { color: #ebb64c !important; }
.mmtb-post-tags a:nth-child(3n+3) { color: #1c9131 !important; }
.mmtb-post-tags a:hover {
  text-decoration: underline !important;
}

/* Archive card flex alignment — scoped to main only, leaves footer untouched */
main .is-layout-flex {
  align-items: flex-start;
}

/* Meta row inside archive card and single post meta stays center-aligned */
.mmtb-archive-card .is-layout-flex,
.mmtb-post-meta.is-layout-flex {
  align-items: center !important;
}

/* Separator default color */
.mmtb-sep-bar { background: #9f2813; }
.mmtb-sep-star { color: #9f2813; }

/* Cycle separator colors by post position */
.wp-block-post-template .wp-block-post:nth-child(3n+2) .mmtb-sep-bar { background: #ebb64c; }
.wp-block-post-template .wp-block-post:nth-child(3n+2) .mmtb-sep-star { color: #ebb64c; }
.wp-block-post-template .wp-block-post:nth-child(3n+3) .mmtb-sep-bar { background: #1c9131; }
.wp-block-post-template .wp-block-post:nth-child(3n+3) .mmtb-sep-star { color: #1c9131; }

/* Archive / blogroll */
.wp-block-post-featured-image:empty {
  display: none !important;
}
.wp-block-post-excerpt__more-link {
  font-family: 'Oswald', sans-serif !important;
  font-size: 0.9rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #9f2813 !important;
  text-decoration: none !important;
}
.wp-block-post-excerpt__more-link:hover {
  text-decoration: underline !important;
}

.wp-block-query-title {
  font-family: 'Staatliches', sans-serif !important;
  font-weight: 400 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  font-size: clamp(1.5rem, 3vw, 2.5rem) !important;
  color: rgba(27,16,9,0.45) !important;
  margin-bottom: 2rem !important;
}

/* ── Pagination — large circular buttons ─────────────────────────── */
.wp-block-query-pagination {
  font-family: 'Oswald', sans-serif !important;
  font-size: 1.8rem !important;
  justify-content: center !important;
  gap: 0.5rem !important;
}

.wp-block-query-pagination-numbers {
  display: flex !important;
  gap: 0.5rem !important;
}

.wp-block-query-pagination a,
.wp-block-query-pagination-numbers a,
.wp-block-query-pagination-numbers .current {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 3rem !important;
  height: 3rem !important;
  border-radius: 50% !important;
  border: 2px solid #9f2813 !important;
  color: #9f2813 !important;
  text-decoration: none !important;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
}

.wp-block-query-pagination a:hover,
.wp-block-query-pagination-numbers a:hover {
  background-color: #1b1009 !important;
  border-color: #1b1009 !important;
  color: #ede3bf !important;
  text-decoration: none !important;
}

.wp-block-query-pagination-numbers .current {
  background-color: #9f2813 !important;
  color: #ede3bf !important;
  font-weight: 400 !important;
}

/* ── Responsive Navigation ───────────────────────────────────────── */
/* Force hamburger menu at 1024px instead of default ~600px */
@media (max-width: 1024px) {
  /* Hide desktop nav, show hamburger */
  .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none !important;
  }
  .wp-block-navigation__responsive-container-open {
    display: flex !important;
  }

  /* Hide player mount on mobile */
  #mmtb-player-mount {
    display: none !important;
  }

  /* Hide desktop Book Us button on mobile */
  header.wp-block-template-part .wp-block-buttons {
    display: none !important;
  }
}

@media (min-width: 1025px) {
  /* Hide hamburger on desktop */
  .wp-block-navigation__responsive-container-open {
    display: none !important;
  }
  .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: flex !important;
  }
}

/* Hamburger icon — sunflower gold */
.wp-block-navigation__responsive-container-open {
  color: #ebb64c !important;
  background: transparent !important;
  border: none !important;
  padding: 0.5rem !important;
  cursor: pointer !important;
}

.wp-block-navigation__responsive-container-open svg {
  width: 28px !important;
  height: 28px !important;
  fill: #ebb64c !important;
}

.wp-block-navigation__responsive-container-open:hover {
  color: #ede3bf !important;
}

.wp-block-navigation__responsive-container-open:hover svg {
  fill: #ede3bf !important;
}

/* Overlay panel styling */
.wp-block-navigation__responsive-container.is-menu-open {
  background-color: #2e1b0f !important;
  padding: 2rem !important;
}

/* Close button — sunflower gold */
.wp-block-navigation__responsive-container-close {
  color: #ebb64c !important;
  background: transparent !important;
  border: none !important;
  padding: 0.5rem !important;
  position: absolute !important;
  top: 1rem !important;
  right: 1rem !important;
}

.wp-block-navigation__responsive-container-close svg {
  width: 28px !important;
  height: 28px !important;
  fill: #ebb64c !important;
}

.wp-block-navigation__responsive-container-close:hover svg {
  fill: #ede3bf !important;
}

/* Mobile menu links */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  font-family: 'Oswald', sans-serif !important;
  font-size: 1.5rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #ebb64c !important;
  padding: 0.75rem 0 !important;
  display: block !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover {
  color: #ede3bf !important;
}

/* Mobile menu layout — vertical stack */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 0.5rem !important;
  padding-top: 3rem !important;
}

/* Book Me nav link — hide on desktop, show as button in mobile overlay */
/* WP Site Editor doesn't reliably render custom classes on nav items, so target by :last-child */
.wp-block-navigation__container > .wp-block-navigation-item:last-child {
  display: none !important;
}

@media (max-width: 1024px) {
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:last-child {
    display: block !important;
    margin-top: 1.5rem !important;
    width: 100% !important;
  }

  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:last-child .wp-block-navigation-item__content {
    display: block !important;
    background-color: #ebb64c !important;
    color: #1b1009 !important;
    text-align: center !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 700 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:last-child .wp-block-navigation-item__content:hover {
    background-color: #ede3bf !important;
    color: #1b1009 !important;
  }
}

/* ── Form elements ───────────────────────────────────────────────── */
.wp-block-post-content label {
  display: block;
  font-family: 'Oswald', sans-serif !important;
  font-size: 1.1rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #1b1009 !important;
  margin-bottom: 0.35rem !important;
}

.wp-block-post-content input[type="text"],
.wp-block-post-content input[type="email"],
.wp-block-post-content input[type="tel"],
.wp-block-post-content input[type="url"],
.wp-block-post-content input[type="date"],
.wp-block-post-content input[type="number"],
.wp-block-post-content input[type="search"],
.wp-block-post-content select,
.wp-block-post-content textarea {
  display: block !important;
  width: 100% !important;
  max-width: 680px !important;
  font-family: 'Open Sans', sans-serif !important;
  font-size: 1rem !important;
  color: #1b1009 !important;
  background: rgba(255,255,255,0.55) !important;
  border: 2px solid #1b1009 !important;
  border-radius: 0 !important;
  padding: 0.6em 0.75em !important;
  margin-bottom: 1.5rem !important;
  box-sizing: border-box !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  outline: none !important;
  transition: border-color 0.15s ease, background 0.15s ease !important;
}

.wp-block-post-content select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231b1009' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.85em center !important;
  padding-right: 2.5em !important;
}

.wp-block-post-content input:focus,
.wp-block-post-content select:focus,
.wp-block-post-content textarea:focus {
  border-color: #9f2813 !important;
  background: rgba(255,255,255,0.8) !important;
}

.wp-block-post-content textarea {
  min-height: 160px !important;
  resize: vertical !important;
}

.wp-block-post-content input[type="submit"],
.wp-block-post-content button[type="submit"] {
  font-family: 'Oswald', sans-serif !important;
  font-size: 1.1rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  color: #1b1009 !important;
  background: #ebb64c !important;
  border: 2px solid #1b1009 !important;
  border-radius: 0 !important;
  padding: 0.55em 1.5em !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition: background 0.15s ease, color 0.15s ease !important;
  margin-top: 0.5rem !important;
}

.wp-block-post-content input[type="submit"]:hover,
.wp-block-post-content button[type="submit"]:hover {
  background: #1b1009 !important;
  color: #ebb64c !important;
}

/* ── Contact Form 7 layout ───────────────────────────────────────── */
.wpcf7-form {
  max-width: 100%;
  width: 100%;
}

.mmtb-form-row {
  display: grid;
  gap: 0 2rem;
  margin-bottom: 0;
}

.mmtb-form-row--2 { grid-template-columns: 1fr 1fr; }
.mmtb-form-row--3 { grid-template-columns: 1fr 1fr 1fr; }

.mmtb-form-field {
  display: flex;
  flex-direction: column;
}

/* CF7 wraps fields in <p> tags — normalize them */
.wpcf7-form .mmtb-form-field p,
.wpcf7-form p {
  margin: 0 !important;
  padding: 0 !important;
}

/* CF7 inserts a <br> between label and input — collapse it */
.wpcf7-form br {
  display: none !important;
}

.wpcf7-form .mmtb-form-field label,
.wpcf7-form label {
  display: block;
  font-family: 'Oswald', sans-serif !important;
  font-size: 1.3rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #1b1009 !important;
  margin-bottom: 0.2rem !important;
  margin-top: 0 !important;
  line-height: 1.2 !important;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="date"],
.wpcf7-form input[type="number"],
.wpcf7-form select,
.wpcf7-form textarea {
  display: block !important;
  width: 100% !important;
  font-family: 'Open Sans', sans-serif !important;
  font-size: 1rem !important;
  color: #1b1009 !important;
  background: rgba(255,255,255,0.55) !important;
  border: 2px solid #1b1009 !important;
  border-radius: 0 !important;
  padding: 0.6em 0.75em !important;
  margin-bottom: 1.5rem !important;
  box-sizing: border-box !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  outline: none !important;
  transition: border-color 0.15s ease, background 0.15s ease !important;
}

.wpcf7-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231b1009' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.85em center !important;
  padding-right: 2.5em !important;
}

.wpcf7-form input:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
  border-color: #9f2813 !important;
  background: rgba(255,255,255,0.8) !important;
}

.wpcf7-form textarea {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 200px !important;
  resize: vertical !important;
}

.wpcf7-form input[type="submit"] {
  font-family: 'Oswald', sans-serif !important;
  font-size: 1.1rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  color: #1b1009 !important;
  background: #ebb64c !important;
  border: 2px solid #1b1009 !important;
  border-radius: 0 !important;
  padding: 0.55em 1.5em !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition: background 0.15s ease, color 0.15s ease !important;
  margin-top: 0.5rem !important;
}

.wpcf7-form input[type="submit"]:hover {
  background: #1b1009 !important;
  color: #ebb64c !important;
}

.wpcf7-form input[type="date"] {
  line-height: 1 !important;
  height: auto !important;
}

/* CF7 span wrappers — make them fill the label */
.wpcf7-form span.wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

/* CF7 validation error */
.wpcf7-form .wpcf7-not-valid-tip {
  font-family: 'Open Sans', sans-serif !important;
  font-size: 0.85rem !important;
  color: #9f2813 !important;
  margin-top: -1rem !important;
  margin-bottom: 0.75rem !important;
}

.wpcf7-form .wpcf7-response-output {
  font-family: 'Open Sans', sans-serif !important;
  font-size: 1rem !important;
  border: 2px solid #9f2813 !important;
  padding: 0.75em 1em !important;
  margin-top: 1rem !important;
  color: #1b1009 !important;
}

@media (max-width: 680px) {
  .mmtb-form-row--2,
  .mmtb-form-row--3 {
    grid-template-columns: 1fr;
  }
}
