:root {
  --primary: #7c2d2d;
  --primary-dark: #5b1f1f;
  --secondary: #1e293b;
  --light: #f8fafc;
  --muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

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

html,
body {
  overflow-x: hidden;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--secondary);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(249, 250, 251, 0.92) 60%, rgba(255, 255, 255, 0.92) 100%),
    url("/images/altres/patron.png");
  background-repeat: repeat;
  background-size: 300px auto;
  background-attachment: fixed;
  line-height: 1.6;
  font-weight: 300;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 500;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1200px, 90%);
  margin: 0 auto;
}

.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  position: relative;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 1 auto;
  min-width: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-text {
  font-weight: 500;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.header-whatsapp {
  white-space: nowrap;
}

.nav-wrapper {
  position: relative;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 0.65rem 1.1rem;
  min-height: 44px;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle-icon {
  width: 22px;
  height: 2px;
  background: var(--secondary);
  position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--secondary);
}

.nav-toggle-icon::before {
  top: -7px;
}

.nav-toggle-icon::after {
  top: 7px;
}

.main-nav {
  position: absolute;
  right: 0;
  top: calc(100% + 0.6rem);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.4rem;
  padding: 0.75rem;
  min-width: 220px;
  max-width: min(90vw, 320px);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.site-header.is-open .main-nav {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.main-nav a {
  color: var(--secondary);
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a.active,
.main-nav a:hover {
  background: var(--light);
  color: var(--primary);
  transform: translateY(-1px);
}



.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  border-radius: 8px;
  padding: 0.75rem 1.4rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.btn-secondary {
  background: #e2d5d5;
  color: var(--primary);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.btn-outline {
  border-color: #fff;
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.btn-link {
  color: var(--primary);
  padding: 0;
}

.btn-light {
  background: #ffffff;
  color: var(--primary);
}

.btn-light:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.btn-outline-light {
  border-color: #fff;
  color: #fff;
}

.btn-whatsapp {
  background: #22c55e;
  color: #fff;
}

.btn-whatsapp:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(34, 197, 94, 0.25);
}


.hero {
  background:
    linear-gradient(135deg, rgba(124, 45, 45, 0.85), rgba(30, 41, 59, 0.85)),
    url("/images/concierto_escena_iluminada.webp");
  background-size: cover;
  background-position: center;
  color: #fff;
  min-height: 50vh;
  display: flex;
  align-items: center;
  padding: 2.5rem 0;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin-bottom: 0.35rem;
}

.hero-subtitle {
  max-width: 720px;
  font-size: 1rem;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-size: 0.9rem;
}

.hero-points span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  opacity: 0.9;
}

.hero-points span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
}

.hero-cta {
  margin-top: 0.5rem;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.value-card {
  background: #fff;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.value-icon {
  width: 144px;
  height: 144px;
  border-radius: 50%;
  background: #f3e8e8;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.value-icon .icon {
  width: 120px;
  height: 120px;
  display: block;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.icon-user {
  background-image: url("/images/altres/per-a-totes-les-edats.png");
}

.icon-grad {
  background-image: url("/images/altres/professorat-qualificat.png");
}

.icon-heart {
  background-image: url("/images/altres/aprenentage-proper-i-practic.png");
}

.section {
  padding: 4rem 0;
}

.section.light {
  background: transparent;
}

.section.dark {
  background: var(--secondary);
  color: #fff;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.family-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.5rem;
  background: #f8f5f5;
  border-radius: 999px;
}

.family-tab {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid transparent;
  color: var(--secondary);
  transition: all 0.2s ease;
}

.family-tab.active,
.family-tab:hover {
  background: var(--primary);
  color: #fff;
}

.family-tab:hover {
  transform: translateY(-1px);
}

.instruments-panel {
  display: grid;
  gap: 1.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.detail-image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 1.5rem;
}

.info-card,
.group-card,
.teacher-card,
.highlight-card,
.placeholder-card,
.confirmation-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.group-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-card h3,
.group-card h3,
.teacher-card h3 {
  margin-bottom: 0.5rem;
}

.modern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.modern-card {
  background: rgba(255, 255, 255, 0.08);
  padding: 1.5rem;
  border-radius: 14px;
  text-align: center;
}

.modern-card .card-image {
  height: 140px;
  border-radius: 10px;
}

.quick-links {
  padding: 2rem 0 2.5rem;
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 500;
  color: var(--secondary);
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.quick-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--primary);
}

.quick-link-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
}

.section-cta {
  text-align: center;
  margin-top: 2rem;
}

.cta {
  background: var(--primary);
  color: #fff;
}

.cta-content {
  text-align: center;
}

.cta-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.hero-sub {
  background: #f4f1f1;
  padding: 3.5rem 0;
}

.teacher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.info-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: start;
}

.instruments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.gallery-card {
  background: #fff;
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: var(--shadow);
}

.gallery-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}

.instrument-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.instruments-panel[data-layout="card"] .instrument-card {
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}

.instruments-panel[data-layout="card"] .instrument-card span {
  display: block;
  width: 100%;
}

.instrument-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.info-card,
.group-card,
.teacher-card,
.highlight-card,
.placeholder-card,
.confirmation-card,
.modern-card,
.gallery-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover,
.group-card:hover,
.teacher-card:hover,
.highlight-card:hover,
.placeholder-card:hover,
.confirmation-card:hover,
.modern-card:hover,
.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.instrument-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f3e8e8;
  object-fit: cover;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.contact-form {
  background: #fff;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1.2rem;
}

.form-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.contact-info {
  background: var(--primary);
  color: #fff;
  padding: 2rem;
  border-radius: 16px;
  display: grid;
  gap: 1rem;
}

.contact-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 0.7rem;
  row-gap: 0.25rem;
  align-items: start;
}

.contact-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-row: 1 / span 3;
}

.contact-item-icon svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}

.contact-item strong,
.contact-item span,
.contact-item a {
  grid-column: 2;
}

.site-footer {
  background: #111827;
  color: #e2e8f0;
  padding: 3rem 0 1.5rem;
}


.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.footer-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-title {
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.site-footer a {
  color: #cbd5f5;
  display: block;
  margin-bottom: 0.4rem;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.confirmation-card ul {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 2rem;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .main-nav,
  .main-nav a,
  .instrument-card,
  .info-card,
  .group-card,
  .teacher-card,
  .highlight-card,
  .placeholder-card,
  .confirmation-card,
  .modern-card,
  .gallery-card,
  .family-tab,
  .quick-link {
    transition: none;
  }
}

@media (max-width: 900px) {
  .header-content {
    flex-direction: row;
    align-items: center;
  }

  .main-nav {
    left: 50%;
    right: auto;
    width: min(92vw, 320px);
    transform: translate(-50%, -10px);
  }

  .site-header.is-open .main-nav {
    transform: translate(-50%, 0);
  }
}

@media (max-width: 560px) {
  .header-content {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.75rem;
  }

  .brand-text {
    font-size: 1rem;
  }

  .main-nav {
    left: auto;
    right: 0;
    width: min(92vw, 320px);
    max-width: calc(100vw - 1rem);
    transform: translate(0, -10px);
  }

  .main-nav a {
    white-space: normal;
    word-break: break-word;
  }

  .site-header.is-open .main-nav {
    transform: translate(0, 0);
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: 60vh;
    padding: 2.5rem 0;
  }

  .hero-points {
    gap: 0.35rem 0.9rem;
    line-height: 1.2;
  }

  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .header-whatsapp {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 4.5rem 0;
  }

  .value-grid,
  .card-grid,
  .modern-grid,
  .instruments-grid,
  .gallery-grid,
  .teacher-grid,
  .info-split {
    gap: 1.75rem;
  }

  .hero-content {
    gap: 1rem;
  }
}

.instrument-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.instrument-card-name {
  font-size: 1rem;
  line-height: 1.3;
}

.instrument-card-meta {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.detail-meta {
  margin-top: 0.5rem;
  color: var(--muted);
  font-weight: 500;
}

.teacher-card-profile {
  text-align: center;
}

.teacher-avatar {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 1rem;
}

.teacher-role {
  color: var(--primary);
  font-weight: 500;
}

.teacher-specialties {
  margin-top: 0.5rem;
  color: var(--muted);
}

.instruments-panel[data-layout="card"] .instrument-card-body {
  align-items: center;
}
