/* ==========================================================================
   CAPELLA MALLORQUINA · ESTILS MESTRES MARFIL PATRIMONIAL
   ========================================================================== */

:root {
  --bg-marfil: #FAF8F5;
  --bg-white: #FFFFFF;
  --bg-warm-tint: #F3EFE6;
  --navy-deep: #0B1C33;
  --navy-royal: #16325C;
  --gold-primary: #B8860B;
  --gold-noble: #C5A059;
  --gold-border: rgba(184, 134, 11, 0.35);
  --gold-line: rgba(184, 134, 11, 0.25);
  --text-main: #1E293B;
  --text-muted: #475569;
  --border-subtle: rgba(11, 28, 51, 0.08);
  --font-serif-title: 'Cinzel', serif;
  --font-serif-body: 'Cormorant Garamond', Garamond, Georgia, serif;
  --font-sans: 'Montserrat', -apple-system, sans-serif;
  --fs-base: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  background-color: var(--bg-marfil);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

[id] {
  scroll-margin-top: 110px;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   HEADER EN UNA SOLA LÍNEA, ORDENAT I SOLEMNE (84PX)
   ========================================================================== */
header.site-header {
  background: #FFFFFF;
  border-bottom: 2px solid var(--gold-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(11, 28, 51, 0.05);
  height: 84px;
  display: flex;
  align-items: center;
}

.header-container {
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  white-space: nowrap;
}

.brand-group {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-logo-img {
  height: 52px;
  width: auto;
  display: block;
}

.brand-name {
  font-family: var(--font-serif-title);
  font-size: 23px;
  font-weight: 700;
  color: var(--navy-deep);
  letter-spacing: 0.5px;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
}

/* NAVEGACIÓ */
nav.site-navigation {
  display: flex;
  align-items: center;
  gap: 24px;
  white-space: nowrap;
}

.nav-item {
  position: relative;
}

.nav-link {
  text-decoration: none;
  color: var(--navy-deep);
  font-size: 16px;
  font-weight: 600;
  padding: 10px 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--gold-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold-primary);
}

/* DESPLEGABLES */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #FFFFFF;
  border: 1px solid var(--gold-border);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(11, 28, 51, 0.12);
  padding: 10px 0;
  min-width: 260px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 1100;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: var(--bg-warm-tint);
  color: var(--gold-primary);
}

/* SELECTOR D'IDIOMES */
.header-right-tools {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.lang-switcher {
  display: inline-flex;
  border: 1px solid var(--gold-border);
  border-radius: 6px;
  overflow: hidden;
  background: #FFFFFF;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--navy-deep);
  padding: 7px 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lang-btn.active {
  background: var(--navy-deep);
  color: #FFFFFF;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 2px solid var(--navy-deep);
  font-size: 20px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--navy-deep);
}

/* ==========================================================================
   HERO INTERIOR PER A PÀGINES SECUNDÀRIES
   ========================================================================== */
.inner-page-hero {
  position: relative;
  background: var(--navy-deep);
  color: #FFF;
  padding: 44px 0 40px;
  overflow: hidden;
  border-bottom: 3px solid var(--gold-primary);
}

.inner-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: saturate(90%);
}

.inner-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(11,28,51,0.5) 0%, rgba(11,28,51,0.92) 100%);
}

.inner-hero-content {
  position: relative;
  z-index: 2;
  max-width: 960px;
}

.breadcrumbs {
  font-size: 14px;
  color: var(--gold-noble);
  margin-bottom: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.breadcrumbs a {
  color: #CBD5E1;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: #FFF;
}

.inner-hero-title {
  font-family: var(--font-serif-title);
  font-size: 44px;
  font-weight: 700;
  color: #FFF;
  line-height: 1.2;
  margin-bottom: 14px;
}

.inner-hero-lead {
  font-size: 20px;
  color: #E2E8F0;
  line-height: 1.6;
}

/* ==========================================================================
   BOTONS I COMPONENTS ESTÈTICS
   ========================================================================== */
.btn-cultural-gold {
  background: var(--gold-noble);
  color: var(--navy-deep);
  padding: 14px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  border: none;
  cursor: pointer;
}

.btn-cultural-gold:hover {
  background: #D4AF37;
  transform: translateY(-2px);
}

.btn-cultural-ghost {
  background: transparent;
  color: var(--navy-deep);
  border: 2px solid var(--navy-deep);
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
}

.btn-cultural-ghost:hover {
  background: var(--navy-deep);
  color: #FFF;
  transform: translateY(-2px);
}

.sec-subheading {
  font-size: 14px;
  font-weight: 800;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
  display: block;
}

/* ==========================================================================
   PATROCINADORS
   ========================================================================== */
.sponsors-strip {
  padding: 44px 0;
  background: #FFF;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
}

.sponsors-label {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.sponsors-row {
  display: flex;
  justify-content: center;
  gap: 60px;
  align-items: center;
  flex-wrap: wrap;
}

.sponsors-row img {
  max-height: 55px;
  width: auto;
}

/* ==========================================================================
   PEU DE PÀGINA INSTITUCIONAL
   ========================================================================== */
footer.site-footer {
  background: var(--navy-deep);
  color: #FFF;
  padding: 60px 0 30px;
  border-top: 3px solid var(--gold-primary);
}

.footer-columns {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 40px;
}

.footer-columns h4 {
  font-family: var(--font-serif-title);
  font-size: 21px;
  color: var(--gold-noble);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.footer-columns p {
  color: #CBD5E1;
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 12px;
}

.footer-columns a {
  color: #FFF;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-columns a:hover {
  color: var(--gold-noble);
}

.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  text-align: center;
  color: #94A3B8;
  font-size: 15px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1220px) {
  .header-container {
    padding: 0 20px;
    gap: 14px;
  }
  .brand-logo-img {
    height: 44px;
  }
  .brand-name {
    font-size: 19px;
  }
  nav.site-navigation {
    gap: 15px;
  }
  .nav-link {
    font-size: 14.5px;
  }
}

@media (max-width: 1080px) {
  .header-container {
    padding: 0 20px;
  }
  nav.site-navigation {
    display: none;
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - 84px);
    max-height: calc(100dvh - 84px);
    overflow-y: auto;
    background: #FFFFFF;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    border-bottom: 2px solid var(--gold-primary);
    box-shadow: 0 16px 30px rgba(0,0,0,0.12);
    gap: 12px;
  }
  nav.site-navigation.open {
    display: flex;
  }
  .nav-item {
    width: 100%;
  }
  .nav-link {
    font-size: 16px;
    width: 100%;
    justify-content: space-between;
    padding: 8px 4px;
  }
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--gold-line);
    border-radius: 0;
    padding: 4px 0 6px 14px;
    margin-top: 4px;
    min-width: 0;
    width: 100%;
  }
  .dropdown-menu a {
    white-space: normal;
    padding: 8px 12px;
    font-size: 14.5px;
  }
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .inner-hero-title {
    font-size: 32px;
  }
  .footer-columns {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 640px) {
  header.site-header {
    height: 70px;
  }
  .header-container {
    padding: 0 14px;
    gap: 8px;
  }
  .brand-group {
    gap: 8px;
    min-width: 0;
  }
  .brand-logo-img {
    height: 36px;
  }
  .brand-name {
    font-size: 15px;
    letter-spacing: 0.2px;
  }
  .header-right-tools {
    gap: 8px;
  }
  .lang-btn {
    padding: 5px 9px;
    font-size: 11px;
  }
  .mobile-menu-btn {
    padding: 4px 8px;
    font-size: 18px;
    line-height: 1;
  }
  nav.site-navigation {
    top: 70px;
    max-height: calc(100vh - 70px);
    max-height: calc(100dvh - 70px);
    padding: 16px 18px 24px;
  }
  .container {
    padding: 0 16px;
  }
  .inner-page-hero {
    padding: 40px 0 36px;
  }
  .inner-hero-title {
    font-size: 26px;
    word-break: break-word;
  }
  .inner-hero-lead {
    font-size: 17px;
  }
  .breadcrumbs {
    font-size: 12px;
  }
  .sponsors-row {
    gap: 28px;
  }
  .sponsors-row img {
    max-height: 44px;
  }
}
