/* ==========================================================================
   Casalet d'Estiu — estils propis
   ========================================================================== */

/* Fade-in amb scroll (IntersectionObserver a estiu.js) */
.fade-section {
  opacity: 0;
  transform: translateY(18px);
  will-change: opacity, transform;
  transition: opacity .7s ease-out, transform .7s ease-out;
}
.fade-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .fade-section { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* Hero */
.estiu-hero {
  position: relative;
  min-height: calc(100svh - var(--nav-h, 76px));
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(240, 180, 41, .18), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(255, 211, 77, .12), transparent 65%),
    linear-gradient(135deg, #0b0b0b 0%, #1a1a1a 55%, #2a1d05 100%);
  color: #fff;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: 4rem 0;
  isolation: isolate;
}

/* Orbs flotants que es mouen lentament */
.estiu-hero::before,
.estiu-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
  will-change: transform;
}
.estiu-hero::before {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #ffd34d 0%, transparent 70%);
  top: -160px; left: -180px;
  opacity: .75;
  animation: estiuOrb1 9s ease-in-out infinite alternate;
}
.estiu-hero::after {
  width: 620px; height: 620px;
  background: radial-gradient(circle, #f0b429 0%, transparent 70%);
  bottom: -200px; right: -200px;
  opacity: .6;
  animation: estiuOrb2 11s ease-in-out infinite alternate;
}
@keyframes estiuOrb1 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(180px, 120px, 0) scale(1.25); }
  100% { transform: translate3d(320px, -40px, 0) scale(.95); }
}
@keyframes estiuOrb2 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-160px, -120px, 0) scale(1.2); }
  100% { transform: translate3d(-280px, 60px, 0) scale(1.05); }
}

/* Raig de llum que travessa el hero en diagonal */
.estiu-hero-beam {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.estiu-hero-beam::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -30%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 211, 77, 0) 40%,
    rgba(255, 211, 77, .35) 50%,
    rgba(255, 255, 255, .5) 55%,
    rgba(255, 211, 77, .35) 60%,
    rgba(255, 211, 77, 0) 70%,
    transparent 100%
  );
  transform: rotate(18deg) translateX(-100%);
  animation: estiuBeam 7s ease-in-out infinite;
  filter: blur(14px);
}
@keyframes estiuBeam {
  0%   { transform: rotate(18deg) translateX(-100%); opacity: 0; }
  15%  { opacity: 1; }
  50%  { transform: rotate(18deg) translateX(350%); opacity: 1; }
  65%  { opacity: 0; }
  100% { transform: rotate(18deg) translateX(350%); opacity: 0; }
}

/* Capa de partícules (punts daurats titil·lants) */
.estiu-hero__inner {
  position: relative;
  z-index: 1;
}
.estiu-hero__inner::before {
  content: "";
  position: absolute;
  inset: -10% -5%;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255, 211, 77, .9) 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 20%, rgba(255, 255, 255, .7) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 80% 70%, rgba(255, 211, 77, .8) 50%, transparent 51%),
    radial-gradient(1px 1px at 35% 85%, rgba(255, 255, 255, .5) 50%, transparent 51%),
    radial-gradient(2px 2px at 55% 40%, rgba(255, 211, 77, .6) 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 45%, rgba(255, 255, 255, .8) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 10% 75%, rgba(255, 211, 77, .7) 50%, transparent 51%);
  animation: estiuTwinkle 4s ease-in-out infinite alternate;
  z-index: -1;
}
@keyframes estiuTwinkle {
  from { opacity: .35; }
  to   { opacity: .9; }
}

.estiu-hero__eyebrow {
  display: inline-block;
  background: rgba(255, 211, 77, .15);
  border: 1px solid rgba(255, 211, 77, .45);
  color: #ffd34d;
  padding: .4rem 1rem;
  border-radius: 999px;
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  box-shadow: 0 0 20px rgba(255, 211, 77, .25);
  animation: estiuPulse 2.8s ease-in-out infinite;
}
@keyframes estiuPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 211, 77, .25); }
  50%      { box-shadow: 0 0 34px rgba(255, 211, 77, .55); }
}

.estiu-hero__title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1.05;
  margin-bottom: .75rem;
  background: linear-gradient(90deg, #ffffff 0%, #ffd34d 40%, #f0b429 60%, #ffffff 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: estiuShine 6s linear infinite;
}
@keyframes estiuShine {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.estiu-hero__subtitle {
  font-size: 1.25rem;
  opacity: .92;
  max-width: 720px;
  margin: 0 auto 1.75rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
.estiu-hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.75rem;
  font-size: 1rem;
  opacity: .95;
  margin-bottom: 2rem;
}
.estiu-hero__meta span {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 211, 77, .25);
  padding: .5rem 1rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.estiu-hero__meta i { color: #ffd34d; margin-right: .4rem; }

/* Reduir moviment si l'usuari ho prefereix */
@media (prefers-reduced-motion: reduce) {
  .estiu-hero::before,
  .estiu-hero::after,
  .estiu-hero__inner::before,
  .estiu-hero__eyebrow,
  .estiu-hero__title { animation: none !important; }
}

/* Secció amb cartell + text */
.estiu-card-section { padding: 4rem 0; }
.estiu-card-section--dark { background: #111; color: #f5f5f5; }
.estiu-card-section--light { background: #f7f5f0; color: #1a1a1a; }

.estiu-poster-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}
.estiu-poster-wrap img.js-zoom {
  cursor: zoom-in;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  transition: transform .25s ease;
  display: block;
}
.estiu-poster-wrap img.js-zoom:hover,
.estiu-poster-wrap img.js-zoom:focus-visible {
  transform: scale(1.015);
  outline: 2px solid #ffd34d;
  outline-offset: 4px;
}
.estiu-poster-actions {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.estiu-poster-actions .btn {
  font-weight: 600;
  padding: .55rem 1.1rem;
}

/* Graella d'activitats */
.estiu-activities {
  padding: 4rem 0;
  background: #fff;
  color: #1a1a1a;
}
.estiu-activity-card {
  text-align: center;
  padding: 1.75rem 1rem;
  border-radius: 14px;
  background: #faf8f3;
  border: 1px solid #ecebe6;
  height: 100%;
  transition: transform .25s ease, box-shadow .25s ease;
}
.estiu-activity-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .08);
}
.estiu-activity-card__icon {
  font-size: 2.4rem;
  color: #d4a72c;
  margin-bottom: .6rem;
  display: block;
}
.estiu-activity-card__title {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0;
}

/* Preus */
.estiu-prices { padding: 4rem 0; background: #fdfbf4; color: #1a1a1a; }
.estiu-prices-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  border-top: 1px solid #e6dfcc;
}
.estiu-prices-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: .9rem .25rem;
  border-bottom: 1px solid #e6dfcc;
  font-size: 1.1rem;
}
.estiu-prices-list li strong { font-weight: 700; }
.estiu-prices-list .price {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: #b8860b;
}
.estiu-prices-note {
  background: #fff3cd;
  border-left: 4px solid #f0b429;
  padding: .75rem 1rem;
  font-weight: 600;
  border-radius: 6px;
}

/* Ubicació */
.estiu-location {
  position: relative;
  padding: 5rem 0;
  background:
    radial-gradient(1000px 500px at 15% 0%, rgba(240, 180, 41, .12), transparent 60%),
    radial-gradient(800px 500px at 100% 100%, rgba(255, 211, 77, .08), transparent 60%),
    linear-gradient(135deg, #0d0d0d 0%, #181818 60%, #221802 100%);
  color: #f5f5f5;
  overflow: hidden;
}

/* Logo giratori (variant local per no dependre de quisom.css) */
.estiu-location__logo-wrap {
  position: relative;
  display: inline-block;
  padding: 1.5rem;
}
.estiu-location__logo-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 211, 77, .35) 0%, transparent 65%);
  filter: blur(30px);
  z-index: 0;
}
.img-spin-estiu {
  position: relative;
  z-index: 1;
  max-width: 320px;
  width: 100%;
  border-radius: 50%;
  animation: estiuLogoSpin 10s linear infinite;
  box-shadow: 0 0 40px rgba(255, 211, 77, .2);
}
@keyframes estiuLogoSpin {
  0%   { transform: rotate(0deg);   box-shadow: 0 0 20px rgba(255, 211, 77, .35); }
  50%  { transform: rotate(180deg); box-shadow: 0 0 40px rgba(0, 0, 0, .55); }
  100% { transform: rotate(360deg); box-shadow: 0 0 20px rgba(255, 211, 77, .35); }
}

/* Text i cabecera */
.estiu-location__eyebrow {
  display: inline-block;
  color: #ffd34d;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .85rem;
  margin-bottom: .75rem;
}
.estiu-location__title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  line-height: 1.15;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, #ffffff 0%, #ffd34d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.estiu-location__lead {
  font-size: 1.1rem;
  opacity: .85;
  margin-bottom: 2rem;
  max-width: 56ch;
}

/* Graella de targetes de contacte */
.estiu-contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}
@media (min-width: 768px) {
  .estiu-contact-grid { grid-template-columns: 1fr 1fr; }
}
.estiu-contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 211, 77, .18);
  border-radius: 14px;
  backdrop-filter: blur(6px);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.estiu-contact-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 211, 77, .06);
  border-color: rgba(255, 211, 77, .4);
}
.estiu-contact-card__icon {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f0b429, #ffd34d);
  color: #111;
  font-size: 1.3rem;
  box-shadow: 0 6px 18px rgba(255, 211, 77, .25);
}
.estiu-contact-card__body {
  min-width: 0;
  flex: 1;
}
.estiu-contact-card__label {
  display: block;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #ffd34d;
  margin-bottom: .15rem;
}
.estiu-contact-card__value {
  font-weight: 600;
  font-size: 1.05rem;
  color: #f5f5f5;
  word-break: break-word;
}
.estiu-contact-link {
  text-decoration: none;
  transition: color .2s ease;
}
.estiu-contact-link:hover,
.estiu-contact-link:focus-visible {
  color: #ffd34d;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  outline: none;
}

/* Botons socials */
.estiu-location__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.estiu-btn-whatsapp,
.estiu-btn-instagram {
  display: inline-flex;
  align-items: center;
  padding: .75rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.estiu-btn-whatsapp {
  background: #25d366;
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 211, 102, .3);
}
.estiu-btn-whatsapp:hover,
.estiu-btn-whatsapp:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 12px 28px rgba(37, 211, 102, .45);
}
.estiu-btn-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(220, 39, 67, .3);
}
.estiu-btn-instagram:hover,
.estiu-btn-instagram:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 12px 28px rgba(220, 39, 67, .45);
}

@media (prefers-reduced-motion: reduce) {
  .img-spin-estiu { animation: none; }
}

/* ==========================================================================
   CTA final — patró .sec-cta compartit amb cursos / professorat
   ========================================================================== */
.sec-cta {
  background-image: var(--cta-img) !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-attachment: fixed !important;
  position: relative;
  overflow: hidden;
  min-height: calc(100svh - var(--nav-h, 76px));
  display: grid;
  align-items: center;
  color: #fff !important;
}
.sec-cta .overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.4) 100%
  );
}
.sec-cta .container {
  position: relative;
  z-index: 1;
}
/* Gradient titles (reutilitzable com a les altres pàgines) */
.gradient-title,
.gradient-title-alt {
  position: relative;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
}
.gradient-title::after,
.gradient-title-alt::after {
  content: "";
  display: block;
  width: clamp(160px, 38%, 280px);
  height: 4px;
  margin-top: .55rem;
  border-radius: 9999px;
  background: linear-gradient(90deg, #f0b429 0%, #ffd34d 45%, rgba(240, 180, 41, .25) 80%, transparent 100%);
  box-shadow: 0 6px 20px rgba(240, 180, 41, .35);
}
.gradient-title--center::after,
.gradient-title-alt--center::after {
  margin-left: auto;
  margin-right: auto;
}

/* Títol del CTA amb gradient daurat i ombra forta per contrast */
.sec-cta h2 {
  font-size: clamp(2rem, 4.8vw, 3rem);
  background: linear-gradient(90deg, #ffffff 0%, #ffd34d 45%, #f0b429 70%, #ffffff 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .55));
  animation: estiuShine 8s linear infinite;
}
.sec-cta p {
  font-weight: 500;
  letter-spacing: 0.06em;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: #f0f0f0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .65);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

/* iOS/Android: fixed-attachment penalitza rendiment */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  .sec-cta { background-attachment: scroll !important; }
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.estiu-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10050;
  padding: 2rem;
  animation: estiuFadeIn .2s ease;
}
@keyframes estiuFadeIn { from { opacity: 0; } to { opacity: 1; } }
.estiu-lightbox__img {
  max-width: 100%;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, .6);
}
.estiu-lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, transform .2s ease;
}
.estiu-lightbox__close:hover,
.estiu-lightbox__close:focus-visible {
  background: rgba(255, 211, 77, .9);
  color: #111;
  outline: none;
  transform: scale(1.05);
}

/* Promo a la home */
.home-estiu { padding: 4rem 0; background: #fdfbf4; color: #1a1a1a; }
.home-estiu__eyebrow {
  display: inline-block;
  background: #fff3cd;
  color: #8a6d1a;
  padding: .3rem .8rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.home-estiu__title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
}
.home-estiu img.js-zoom {
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
  cursor: zoom-in;
  transition: transform .25s ease;
}
.home-estiu img.js-zoom:hover { transform: scale(1.02); }
