/* CalderasCity · fotos de cabecera + animaciones al hacer scroll
   Se carga en la portada y en las páginas de categoría.
   Fotos: Pexels (licencia libre para uso comercial). */

/* --- Cabecera con foto ------------------------------------------- */
.cc-photo{position:relative;isolation:isolate;overflow:hidden}
.cc-photo::before{
  content:"";position:absolute;inset:0;z-index:-2;
  background-image:var(--cc-img);background-size:cover;
  background-position:var(--cc-pos,center);background-repeat:no-repeat;
  transform-origin:center;animation:ccZoom 2.2s cubic-bezier(.2,.7,.2,1) both;
}
.cc-photo::after{
  content:"";position:absolute;inset:0;z-index:-1;
  background:
    radial-gradient(900px 380px at 85% -20%,rgba(255,107,53,.22),transparent 60%),
    linear-gradient(90deg,rgba(11,37,69,.96) 0%,rgba(11,37,69,.88) 36%,rgba(19,64,116,.58) 66%,rgba(19,64,116,.30) 100%);
}
.cat-hero.cc-photo .container{padding-top:64px;padding-bottom:64px}
.cat-hero.cc-photo h1,.hero.cc-photo h1{text-shadow:0 2px 18px rgba(0,0,0,.25)}

/* Texto de la cabecera: entra suave al cargar */
.cc-photo .container > *{animation:ccUp .8s cubic-bezier(.2,.7,.2,1) both}
.cc-photo .container > *:nth-child(2){animation-delay:.12s}
.cc-photo .container > *:nth-child(3){animation-delay:.24s}

@media (max-width:720px){
  .cc-photo::before{background-image:var(--cc-img-sm,var(--cc-img))}
  .cc-photo::after{background:linear-gradient(180deg,rgba(11,37,69,.90) 0%,rgba(11,37,69,.80) 100%)}
  .cat-hero.cc-photo .container{padding-top:44px;padding-bottom:44px}
}

/* --- Foto en "Quiénes somos" ------------------------------------- */
.cc-about-img{margin:0 0 16px;border-radius:18px;overflow:hidden;box-shadow:0 14px 34px rgba(11,37,69,.16)}
.cc-about-img img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover}

/* --- Aparición al hacer scroll ----------------------------------- */
.cc-reveal{opacity:0;transform:translateY(28px);
  transition:opacity .7s ease,transform .7s cubic-bezier(.2,.7,.2,1);
  transition-delay:var(--cc-d,0ms)}
.cc-reveal.cc-in{opacity:1;transform:none}

@keyframes ccZoom{from{transform:scale(1.09)}to{transform:scale(1)}}
@keyframes ccUp{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}

/* Accesibilidad: sin movimiento si el usuario lo pide; todo visible al imprimir */
@media (prefers-reduced-motion:reduce){
  .cc-photo::before,.cc-photo .container > *{animation:none}
  .cc-reveal{opacity:1!important;transform:none!important;transition:none!important}
}
@media print{.cc-reveal{opacity:1!important;transform:none!important}}

/* Aerotermia ya tiene un diagrama en la cabecera: la foto queda como textura suave */
.hero-aero.cc-photo::after{background:linear-gradient(90deg,rgba(11,37,69,.96) 0%,rgba(11,37,69,.9) 50%,rgba(19,64,116,.82) 100%)}
