/* =========== ESTILS GLOBALS I VARIABLES =========== */
:root {
  --color-primary: #f58560; /* NOU color primari: taronja corporatiu */
  --color-secondary: #c7d838; /* Daurat/Groc com a accent, combina genial amb el taronja */
  --color-dark: #121b27; /* Negre suau per a textos */
  --color-light: #ffffff;
  --color-background: #fffbf5; /* Un fons molt lleugerament taronja/crema */
  --color-gray: #6c757d;
  --font-family: "Inter", sans-serif;
  --transition-fast: all 0.2s ease-in-out;
  --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.1);
  --border-radius: 12px;
} /* --- Reseteig bàsic --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-family);
  line-height: 1.7;
  color: var(--color-dark);
  background-color: var(--color-light);
}
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
} /* --- Títols i Textos --- */
.section-title {
  font-size: 2.8rem;
  font-weight: 700;
  text-align: center;
  color: var(--color-dark);
  margin-bottom: 3rem;
  line-height: 1.2;
}
.section-subtitle {
  font-size: 1.1rem;
  text-align: center;
  color: var(--color-gray);
  max-width: 600px;
  margin: 0 auto 4rem auto;
}
ul {
  list-style: none;
}
a {
  text-decoration: none;
} /* =========== HEADER / NAVEGACIÓ =========== */
header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition-fast);
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary);
}
.logo span {
  color: var(--color-secondary);
}
nav ul {
  display: flex;
  gap: 2rem;
}
nav a {
  font-weight: 600;
  color: var(--color-dark);
  position: relative;
  padding-bottom: 5px;
}
nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: var(--transition-fast);
}
nav a:hover::after {
  width: 100%;
}
.cta-button {
  background: #c9d942;
  color: #ffffff;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition-fast);
}
.cta-button:hover {
  background: var(--color-primary);
  transform: translateY(-2px);
} /* =========== HERO SECTION =========== */
.hero {
  height: 90vh; /* Degradat actualitzat a tons taronja */
background: linear-gradient(rgba(244, 121, 32, 0.7), rgba(199, 78, 0, 0.8)),
    url("https://skolaylleure.com/wp-content/uploads/2025/10/casals-personalitzats.jpeg");
background-size: cover;
background-position: center;
background-repeat: no-repeat;

      no-repeat center center/cover;
  color: var(--color-light);
  display: flex;
  align-items: center;
  text-align: center;
}
.hero-content {
  max-width: 860px;
  margin: 0 auto;
}
.hero-title {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}
.cta-button-primary {
  background: var(--color-secondary);
  color: var(--color-dark);
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  box-shadow: var(--shadow-medium);
}
.cta-button-primary:hover {
  background: #ffd040;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
} /* =========== SECCIONS GENERALS =========== */
section {
  padding: 6rem 0;
}
.section-filosofia,
.section-faq {
  background: var(--color-background);
} /* =========== SECCIÓ CASALS =========== */
.casals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.casal-card {
  background: var(--color-light);
  padding: 2.5rem 2rem;
  text-align: center;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  transition: var(--transition-fast);
  border: 1px solid #eee;
}
.casal-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-medium);
}
.card-icon-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem auto;
  border-radius: 50%; /* Degradat actualitzat a taronja/groc */
  background: linear-gradient(
    45deg,
    var(--color-primary),
    var(--color-secondary)
  );
  color: var(--color-light);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.5rem;
}
.casal-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
.casal-card p {
  color: var(--color-gray);
} /* =========== SECCIÓ FILOSOFIA =========== */
.filosofia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}
.filosofia-item {
  text-align: center;
}
.filosofia-item i {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}
.filosofia-item h3 {
  font-size: 1.2rem;
  color: var(--color-dark);
}
.filosofia-item p {
  color: var(--color-gray);
} /* =========== SECCIÓ TESTIMONIS =========== */
.testimonial-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}
.testimonial-card {
  background: var(--color-light);
  border: 1px solid #eee;
  padding: 2.5rem;
  border-radius: var(--border-radius);
  max-width: 500px;
  flex-grow: 1;
  position: relative;
}
.testimonial-card::before {
  content: "\f10d";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 20px;
  left: 25px;
  font-size: 2.5rem;
  color: var(--color-primary);
  opacity: 0.1;
}
.testimonial-card p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
.testimonial-card cite {
  font-weight: 600;
  color: var(--color-primary);
  font-style: normal;
} /* =========== SECCIÓ FAQ =========== */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  background: var(--color-light);
  border: 1px solid #eee;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  padding: 1rem;
}
.faq-item summary {
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary i {
  transition: transform 0.3s ease;
}
.faq-item[open] summary i {
  transform: rotate(90deg);
}
.faq-content {
  padding: 1rem;
  border-top: 1px solid #eee;
  margin-top: 1rem;
  color: var(--color-gray);
} /* =========== FOOTER =========== */
footer {
  background: var(--color-dark);
  color: var(--color-gray);
  padding-top: 5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 4rem;
}
.footer-col .logo {
  color: var(--color-light);
}
.footer-tagline {
  margin: 1rem 0;
}
.footer-col h3 {
  color: var(--color-light);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}
.footer-col ul li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
}
.footer-col ul li i {
  margin-right: 10px;
  color: var(--color-primary);
}
.footer-col a {
  color: var(--color-gray);
  transition: var(--transition-fast);
}
.footer-col a:hover {
  color: var(--color-light);
}
.social-icons a {
  color: var(--color-gray);
  font-size: 1.5rem;
  margin-right: 1.5rem;
}
.footer-bottom {
  text-align: center;
  padding: 1.5rem 0;
  border-top: 1px solid #333;
}
.footer-bottom p {
  color: #888;
} /* =========== DISSENY RESPONSIVE (MÒBILS I TABLETS) =========== */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .section-title {
    font-size: 2.2rem;
  }
  .hero-title {
    font-size: 2.8rem;
  }
  .nav-container nav,
  .nav-container .cta-button {
    display: none;
  } /* Recomanació: Afegir menú hamburguesa amb JS */
  section {
    padding: 4rem 0;
  }
} /* ====== WP-specific tweaks ====== */ /* Ensure wp_nav_menu <ul> has no extra classes breaking layout */
.menu,
.menu > li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu > li {
  display: inline-flex;
  margin-right: 2rem;
}
.menu > li:last-child {
  margin-right: 0;
}
.menu > li > a {
  font-weight: 600;
  color: var(--color-dark);
  position: relative;
  padding-bottom: 5px;
}
.menu > li > a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: var(--transition-fast);
}
.menu > li > a:hover::after,
.menu > li.current-menu-item > a::after {
  width: 100%;
} /* Sticky header + admin bar */
.admin-bar header {
  top: 32px;
}
@media (max-width: 782px) {
  .admin-bar header {
    top: 46px;
  }
} /* Smooth anchor offset if header overlaps */
:target {
  scroll-margin-top: 90px;
}

.logo img {
  max-width: 200px; /* ajusta el ancho máximo */
  height: auto; /* mantiene la proporción */
  display: block;
}

/* Móvil logotipo */
@media (max-width: 768px){
  .container.nav-container{
    justify-content: flex-start; /* logo a la izquierda */
    gap: 12px;                   /* separa del resto */
    padding-inline: 12px;
  }

  /* Reduce un poco el logo en móvil */
  .container.nav-container .custom-logo-link img{
    height: 55px;   /* ajusta 24–32px a tu gusto */
    width: auto;
  }
}
/* ===========================================
   MENÚ HAMBURGUESA (dropdown vertical + icono)
   =========================================== */

/* Ocultar el botón en escritorio */
#hamburger-btn { display: none; }

@media (max-width: 768px) {

  /* ===== BOTÓN HAMBURGUESA ===== */
  #hamburger-btn {
    display: grid;
    place-items: center;
    background: transparent;
    border: 0;
    cursor: pointer;
    width: 54px;      /* más grande */
    height: 54px;
    z-index: 1002;    /* por encima del menú */
    margin-left: auto; /* alineado a la derecha */
  }

  /* Icono (3 barras) */
  #hamburger-btn span {
    position: relative;
    display: block;
    width: 28px;
    height: 3px;
    background: var(--color-dark);
    transition: transform .25s ease, background .25s ease;
  }

  #hamburger-btn span::before,
  #hamburger-btn span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 28px;
    height: 3px;
    background: var(--color-dark);
    transition: transform .25s ease, top .25s ease;
  }

  #hamburger-btn span::before { top: -8px; }
  #hamburger-btn span::after  { top:  8px; }

  /* Animación a "X" al abrir */
  #hamburger-btn[aria-expanded="true"] span { background: transparent; }
  #hamburger-btn[aria-expanded="true"] span::before {
    top: 0; transform: rotate(45deg);
  }
  #hamburger-btn[aria-expanded="true"] span::after {
    top: 0; transform: rotate(-45deg);
  }

  /* ===== DROPDOWN DEL MENÚ ===== */
  header .nav-container {
    position: relative; /* para posicionar el dropdown */
  }

  header .nav-container nav {
    position: absolute;
    top: 100%;             /* debajo del header */
    left: 0;
    right: 0;
    background: var(--color-light);
    border: 1px solid #eee;
    border-top: 0;
    box-shadow: var(--shadow-soft);
    display: none;         /* oculto por defecto */
    transform-origin: top;
    transform: scaleY(0);
    transition: transform .25s ease;
    z-index: 1001;
  }

  /* Cuando el JS lo abre (display:block), animamos la caída */
  header .nav-container nav[style*="display: block"] {
    display: block !important;
    transform: scaleY(1);
  }

  /* Enlaces dentro del menú */
  header .nav-container nav ul {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: .5rem .75rem;
  }

  header .nav-container nav li {
    display: block;
    margin: 0;
  }

  header .nav-container nav a {
    display: block;
    padding: .9rem .5rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1.1rem;
    color: var(--color-dark);
  }

  header .nav-container nav li:last-child a {
    border-bottom: 0;
  }

  header .nav-container nav a:hover {
    color: var(--color-primary);
  }

  /* Fondo oscuro cuando se abre */
  [data-hamburger-backdrop],
  #nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  [data-hamburger-backdrop][style*="display: block"],
  #nav-backdrop[style*="display: block"] {
    opacity: 1;
  }

  /* Ocultamos el botón CTA del header en móvil */
  .nav-container .cta-button {
    display: none;
  }

  /* Opcional: bordes redondeados y pequeño espacio */
  header .nav-container nav {
    margin-top: 6px;
    border-radius: 10px;
  }
}

/* En escritorio, todo como antes */

@media (max-width: 768px){
  /* sigue ocultando la CTA del header... */
  .nav-container .cta-button { display: none; }

  /* ...pero muestra la CTA clonada dentro del menú */
  header .nav-container nav .cta-button[data-mobile-cta="true"]{
    display: block !important;
    margin: .5rem .75rem 1rem;
    text-align: center;
    padding: .9rem 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    background: var(--color-secondary);
    color: var(--color-dark);
  }
  header .nav-container nav .cta-button[data-mobile-cta="true"]:hover{
    background: #ffd040;
  }
}

/* Header no fijo */
header {
  position: static !important;
  top: auto !important;
}

/* Quita compensaciones del admin bar que ya no hacen falta */
.admin-bar header { top: auto !important; }
@media (max-width: 782px) {
  .admin-bar header { top: auto !important; }
}

/* Header 100% opaco, sin blur */
header{
  background: #ffffff !important;
  backdrop-filter: none !important;
}

/* Header siempre opaco, sin blur */
header { background: #fff !important; backdrop-filter: none !important; }

/* Desactivar overlay (por si el JS lo muestra) */
[data-hamburger-backdrop], #nav-backdrop { display: none !important; opacity: 0 !important; }

/* Cuando el menú está abierto, el header “actúa como el menú” */
@media (max-width: 768px){
  /* El header mantiene fondo sólido y misma “caja” que el dropdown */
  header.menu-open{
    background: #fff !important;
    box-shadow: var(--shadow-soft);
    z-index: 1002;
  }

  /* El dropdown se pega al header (sin hueco ni esquinas redondeadas) */
  header.menu-open .nav-container nav{
    margin-top: 0 !important;
    border-radius: 0 !important;
    border-top: 1px solid #eee;  /* línea de separación sutil */
    background: #fff !important; /* por si acaso */
  }
}

/* ==========================
   MEJORA VISUAL HEADER MÓVIL
   ========================== */
@media (max-width: 768px){

  /* Header base */
  header{
    background: #fff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 0.6rem 0;
    border-bottom: 1px solid #eee;
  }

  /* Contenedor interno: alinea logo a la izquierda y botón a la derecha */
  .container.nav-container{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 .75rem;
  }

  /* Logo algo más pequeño y con espacio */
  .nav-container .custom-logo-link img{
    height: 48px;
    width: auto;
  }

  /* Botón hamburguesa más limpio y visible */
  #hamburger-btn{
    width: 56px;
    height: 56px;
    background: none;
    border: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.25s ease;
  }

  #hamburger-btn:hover{
    background: rgba(0,0,0,0.05);
  }

  /* Barras del icono */
  #hamburger-btn span{
    width: 26px;
    height: 3px;
    background: var(--color-dark);
    position: relative;
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  #hamburger-btn span::before,
  #hamburger-btn span::after{
    content: "";
    position: absolute;
    left: 0;
    width: 26px;
    height: 3px;
    background: var(--color-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  #hamburger-btn span::before{ top: -8px; }
  #hamburger-btn span::after{ top: 8px; }

  /* Animación a X */
  #hamburger-btn[aria-expanded="true"] span{
    background: transparent;
  }
  #hamburger-btn[aria-expanded="true"] span::before{
    transform: rotate(45deg);
    top: 0;
  }
  #hamburger-btn[aria-expanded="true"] span::after{
    transform: rotate(-45deg);
    top: 0;
  }

  /* Menú desplegable bonito */
  header .nav-container nav{
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-radius: 0 0 16px 16px;
    overflow: hidden;
    display: none;
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 0.25s ease;
  }
  header .nav-container nav[style*="display: block"]{
    display: block !important;
    transform: scaleY(1);
  }

  header .nav-container nav ul{
    display: flex;
    flex-direction: column;
  }

  header .nav-container nav a{
    display: block;
    padding: 1rem;
    font-weight: 600;
    color: var(--color-dark);
    border-bottom: 1px solid #f3f3f3;
    text-align: center;
  }

  header .nav-container nav a:hover{
    background: var(--color-background);
    color: var(--color-primary);
  }

  /* CTA final del menú */
  header .nav-container nav .cta-button[data-mobile-cta="true"]{
    display: block !important;
    margin: 1rem auto 1.5rem;
    width: 80%;
    text-align: center;
    font-weight: 700;
    border-radius: 50px;
    background: var(--color-secondary);
    color: var(--color-dark);
    padding: 1rem 1.2rem;
    transition: background 0.3s ease;
  }

  header .nav-container nav .cta-button[data-mobile-cta="true"]:hover{
    background: #d8e85a;
  }

  /* El header y el menú se ven como una sola pieza */
  header.menu-open{
    background: #fff !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  }

  /* Sin overlay detrás */
  [data-hamburger-backdrop], #nav-backdrop{ display: none !important; opacity: 0 !important; }
}

/* ===============================
   OSCURECER FONDO AL ABRIR MENÚ
   =============================== */

/* Overlay general (creado por el JS) */
[data-hamburger-backdrop] {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35); /* nivel de oscuridad */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Cuando el menú está abierto */
[data-hamburger-backdrop].active {
  opacity: 1;
  pointer-events: all;
}

/* Garantizar que header y menú sigan visibles encima del overlay */
header {
  z-index: 1002 !important;
}
header .nav-container nav {
  z-index: 1003 !important;
}

/* ===== Overlay del menú (forzado y sin romper el layout) ===== */

/* Base del overlay: por detrás del header y del nav */
[data-hamburger-backdrop]{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 950; /* debajo de header/nav */
  /* Importante: no declarar display:none aquí */
}

/* Mostrar overlay cuando el JS pone .active
   (forzamos el display por si tienes alguna regla anterior con !important) */
html body [data-hamburger-backdrop].active{
  display: block !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Asegura que el header y el dropdown están por encima del overlay */
header{
  position: relative !important;  /* no es sticky; solo para que z-index funcione */
  z-index: 1002 !important;
}
header .nav-container nav{
  z-index: 1003 !important; /* tu nav sigue absolute como antes */
}

/* Si en tu CSS existe algo como:
   [data-hamburger-backdrop], #nav-backdrop { display:none !important; ... }
   DEBE ir eliminado o quedar sobreescrito por este bloque final. */

.section-title {
  text-align: center !important;
}

@media (max-width: 768px) {
  .page-id-35 .elementor-container {
    display: flex !important;
    flex-direction: column-reverse !important;
  }
}

.hero-extraescolars {
  background: linear-gradient(
      rgba(244, 121, 32, 0.7),
      rgba(199, 78, 0, 0.8)
    ),
    url("https://skolaylleure.com/wp-content/uploads/2025/11/fiestas-de-graduacion.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (max-width: 480px) {
  .hero .cta-button-primary {
    font-size: 0.95rem;
    padding: 0.9rem 1.4rem;
    border-radius: 40px;
    margin-top: 1.2rem;
    width: 100%;
    max-width: 310px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* BOTONES CTA - RESPONSIVE */
@media (max-width: 480px) {
  .cta-button,
  .cta-button-primary {
    display: block;
    width: 100%;
    font-size: 1rem;
    padding: 0.9rem 1rem;
    white-space: normal !important; /* Permite salto de línea */
    line-height: 1.3;
    text-align: center;
  }
}

@media (max-width: 768px) {
  header .cta-button {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    max-width: 160px;
    white-space: normal;
  }
}

/* Ajuste de márgenes para H1 y subtítulo en móvil */
@media (max-width: 480px) {
  .hero-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-title {
    font-size: 2.2rem;     /* Reduce ligeramente para que respire */
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-top: 0.8rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
  }
}


