/* =============================================================================
   nav.css — Barcelona main navigation (desktop dropdowns + mobile off-canvas)
   ============================================================================= */

header {
  position: relative;
}

/* ── DESKTOP NAV ── */
.main-nav {
  margin-left: auto;
  display: none;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2px;
}

.nav-link {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-link .caret {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform 0.15s;
}

.nav-item:hover .nav-link,
.nav-item:focus-within .nav-link {
  background: #f7f1de;
  color: #C9A84C;
}

.nav-item:hover .nav-link .caret,
.nav-item:focus-within .nav-link .caret {
  transform: rotate(225deg);
  margin-top: 3px;
}

/* Dropdown panel — full-width bar spanning the whole window */
.dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  background: #f3f0ea;
  box-shadow: 0 16px 30px rgba(0,0,0,0.08);
  padding: 28px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  z-index: 200;
}

.nav-item:hover .dropdown-panel,
.nav-item:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: center;
}

.dropdown-col {
  display: flex;
  flex-direction: column;
  flex: 0 0 260px;
  padding: 0 24px;
}

.dropdown-col:not(:first-child) {
  position: relative;
}

.dropdown-col:not(:first-child)::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7.5%;
  height: 85%;
  width: 1px;
  background: #e0ded8;
}

.dropdown-col a {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #222;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.dropdown-col a:hover {
  background: #f7f1de;
  color: #C9A84C;
}

/* ── MOBILE NAV TOGGLE (hamburger) ── */
.nav-toggle {
  margin-left: auto;
  width: 38px;
  height: 38px;
  border: none;
  background: none;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #222;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── MOBILE OFF-CANVAS MENU ── */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  z-index: 998;
}

.mobile-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(85%, 360px);
  background: #f3f0ea;
  box-shadow: -6px 0 24px rgba(0,0,0,0.12);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 999;
  overflow-y: auto;
}

.mobile-menu.is-open {
  transform: translateX(0);
}

body.bcn-menu-open {
  overflow: hidden;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
}

.mobile-menu-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #222;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.mobile-menu-close {
  border: none;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: #888;
  cursor: pointer;
  padding: 4px 8px;
}

.mobile-nav-list {
  list-style: none;
  padding: 0 8px 24px;
}

.mobile-nav-list > li > a {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #222;
  text-decoration: none;
  padding: 14px 12px;
  border-radius: 10px;
}

.mobile-nav-list > li > a:active,
.mobile-nav-list > li > a:hover {
  background: #f7f1de;
  color: #C9A84C;
}

.mobile-accordion .accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #222;
  background: none;
  border: none;
  cursor: pointer;
  padding: 14px 12px;
  border-radius: 10px;
  text-align: left;
}

.mobile-accordion .accordion-toggle:hover {
  background: #f7f1de;
  color: #C9A84C;
}

.mobile-accordion .chevron {
  width: 9px;
  height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.mobile-accordion.is-open .chevron {
  transform: rotate(225deg);
}

.mobile-accordion .accordion-panel {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  padding-left: 12px;
}

.mobile-accordion.is-open .accordion-panel {
  max-height: 2000px;
}

.mobile-accordion .accordion-panel a {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #555;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
}

.mobile-accordion .accordion-panel a:active,
.mobile-accordion .accordion-panel a:hover {
  background: #f7f1de;
  color: #C9A84C;
}

.more-links-list {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.more-links.is-open .more-links-list {
  max-height: 2000px;
}

.more-toggle {
  display: block;
  width: 100%;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #C9A84C;
  background: none;
  border: none;
  cursor: pointer;
  padding: 11px 12px;
  border-radius: 8px;
}

.more-toggle:hover {
  background: #f7f1de;
}

/* ── MONTHS GRID (mobile only) ── */
.mobile-accordion--months .accordion-panel {
  display: grid;
  grid-template-columns: repeat(3, 104px);
  padding-left: 0;
  position: relative;
}

/* Two continuous dividers — both at integer px positions (104px and 208px)
   so they land on the same fractional pixel offset and render identically */
.mobile-accordion--months .accordion-panel::before,
.mobile-accordion--months .accordion-panel::after {
  content: '';
  position: absolute;
  top: 7.5%;
  height: 85%;
  width: 1px;
  background: #e0ded8;
}

.mobile-accordion--months .accordion-panel::before {
  left: 104px;
}

.mobile-accordion--months .accordion-panel::after {
  left: 208px;
}

.mobile-accordion--months .accordion-panel li {
  list-style: none;
}

.mobile-accordion--months .accordion-panel a {
  text-align: left;
  padding: 10px 12px;
}

/* ── DESKTOP BREAKPOINT ── */
@media (min-width: 1024px) {
  .main-nav { display: block; }
  .nav-toggle { display: none; }
  .mobile-menu,
  .mobile-menu-overlay { display: none; }
  .nav-link .caret { display: none; }
}
