/*
 Theme Name:   Astra Child
 Theme URI:    https://studio38palma.com
 Description:  Child theme for Astra - Studio38 Pilates
 Author:       Elena Medina
 Author URI:   https://studio38palma.com
 Template:     astra
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  astra-child
*/

@import url('../astra/style.css');

@font-face {
  font-family: 'Ophelia';
  src: url('fonts/Ophelia.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Hero asimétrico — Fase 2.1 */
.hero-columns.wp-block-columns {
  align-items: stretch;
  margin-bottom: 0;
  min-height: 620px;
  background: radial-gradient(rgb(91, 38, 39) 0%, rgb(58, 19, 21) 100%);
}

.hero-columns .hero-image {
  display: flex;
}

.hero-columns .hero-image .wp-block-jetpack-slideshow {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.hero-columns .hero-image .wp-block-jetpack-slideshow_container {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-columns .hero-image .swiper-wrapper,
.hero-columns .hero-image .swiper-slide {
  height: 100%;
}

.hero-columns .hero-image .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-columns .hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-columns .hero-content h1 {
  font-family: 'Ophelia', Georgia, 'Times New Roman', serif;
  font-weight: normal;
}

.hero-columns .hero-image .hero-carousel .wp-block-jetpack-slideshow_button-prev,
.hero-columns .hero-image .hero-carousel .wp-block-jetpack-slideshow_button-next,
.hero-columns .hero-image .hero-carousel .wp-block-jetpack-slideshow_button-pause,
.hero-columns .hero-image .hero-carousel .wp-block-jetpack-slideshow_pagination {
  display: none;
}

/* Hero — Fase 2.4: Tablet (782px - 1024px) */
@media (max-width: 1024px) and (min-width: 782px) {
  .hero-columns.wp-block-columns {
    min-height: 480px;
  }

  .hero-columns .hero-content,
  .hero-columns .hero-image {
    flex-basis: 50% !important;
  }

  .hero-columns .hero-content {
    padding: 40px 24px !important;
  }
}

/* Hero — Fase 2.5: Mobile (<782px) */
@media (max-width: 781px) {
  .hero-columns.wp-block-columns {
    min-height: 0;
  }

  .hero-columns .hero-content {
    padding: 40px 20px !important;
  }

  .hero-columns .hero-content h1 {
    font-size: 40px;
  }

  .hero-columns .hero-image {
    height: 320px;
  }

  .hero-columns .hero-image .wp-block-jetpack-slideshow {
    height: 320px;
  }

  .hero-columns .hero-cta,
  .hero-columns .hero-cta .wp-block-button__link {
    width: 100%;
    display: block;
    text-align: center;
    box-sizing: border-box;
  }
}

/* No negociables — Fase DIS-03: espaciado del acordeón */
#sobre-nosotras .wp-block-details {
  margin-bottom: 20px;
}

#sobre-nosotras .wp-block-details:last-of-type {
  margin-bottom: 0;
}

#sobre-nosotras .wp-block-details summary {
  margin-bottom: 4px;
}

#sobre-nosotras .wp-block-details p {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.6;
}
.ast-footer-html-1 .ast-builder-html-element > div:first-child {
  font-family: 'Ophelia', Georgia, 'Times New Roman', serif !important;
}

@media (max-width: 767px) {
  /* RESP-01: font-size fijo en px (bloques Gutenberg) rompe el texto letra
     por letra en mobile porque la palabra no cabe en el ancho disponible.
     RESP-02: el preset "medium" de Astra invierte la escala en mobile
     (20px en desktop pero 36–48px en mobile), forzando "REFORMER· BARRÉ· HOT"
     a 3 líneas y sobredimensionado.
     RESP-03: en el bloque "Hace calor", Astra reduce el título a 30-38px en
     mobile mientras la pregunta de abajo se queda fija en 37px, invirtiendo
     la jerarquía visual. */
  .wp-block-cover .wp-block-paragraph {
    font-size: 48px !important;
  }

  .wp-block-cover .has-medium-font-size {
    font-size: 15px !important;
    letter-spacing: 0.04em !important;
  }

  h2#hot + p {
    font-size: 22px !important;
  }

  /* RESP-04: los títulos H2 de la página (Hace calor / Sobre Studio 38)
     tenían tamaños fijos distintos (60px y 65px) que Astra escalaba de
     forma inconsistente en mobile (34-38px vs 65px sin escalar). Se
     unifica el tamaño de todos los títulos de sección para que tengan
     la misma jerarquía visual. */
  .entry-content h2.wp-block-heading {
    font-size: 34px !important;
  }

  /* RESP-05: el isotipo "38°" decorativo se renderizaba a 236px de alto
     (imagen con mucho margen transparente), generando un hueco enorme
     entre la sección "Sobre Studio 38" y el footer. Se reduce a tamaño
     de marca de agua. */
  #sobre-studio38 + p + figure {
    max-width: 90px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  #sobre-studio38 + p + figure img {
    width: 90px !important;
    height: auto !important;
  }

  /* RESP-06: la columna "Síguenos" del footer es un widget HTML aparte
     sin text-align, por lo que quedaba a la izquierda mientras las otras
     dos columnas ("Studio38" y "Contacto") están centradas. Se unifica
     la alineación y se da aire para que no choque con el botón flotante
     de "volver arriba". */
  .site-footer-primary-section-3 .textwidget {
    text-align: center !important;
  }

  .site-footer-primary-section-3 {
    padding-bottom: 24px;
  }

  .classes-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 12px;
  }

  .flip-card {
    height: 320px; /* antes: 240px — el contenido del reverso desbordaba hasta 292px en móviles de 320px de ancho */
  }

  .flip-card-front h3 {
    font-size: 18px;
  }

  .flip-card-back h3 {
    font-size: 16px;
  }

  .flip-card-back p {
    font-size: 12px;
  }

  .flip-card-back-meta {
    gap: 12px;
    font-size: 11px;
  }

  /* Margen de seguridad: si el texto sigue sin caber (fuente del
     sistema ampliada, accesibilidad), permite scroll interno en vez
     de desbordar fuera de la tarjeta redondeada */
  .flip-card-back {
    overflow-y: auto;
  }

  /* Fix para backface-visibility en mobile */
  .flip-card-front {
    opacity: 1;
  }

  .flip-card.flipped .flip-card-front {
    opacity: 0;
    pointer-events: none;
  }

  .flip-card-back {
    opacity: 0;
  }

  .flip-card.flipped .flip-card-back {
    opacity: 1;
  }
}

@media (max-width: 480px) {
  .wp-block-cover .wp-block-paragraph {
    font-size: 36px !important;
  }

  .wp-block-cover .has-medium-font-size {
    font-size: 14px !important;
  }

  h2#hot + p {
    font-size: 18px !important;
  }

  .entry-content h2.wp-block-heading {
    font-size: 28px !important;
  }
}

/* RESP-07: el subtítulo "REFORMER· BARRÉ· HOT PILATES" heredaba el
   font-size:48px de RESP-01/02 (pensado para el título), quedando
   igual de grande que el titular en mobile. Se aísla por su alineación
   (es el único párrafo del hero con text-align:left) para darle un
   tamaño propio, más pequeño, en cada breakpoint. */
@media (max-width: 767px) {
  .wp-block-cover .wp-block-paragraph.has-text-align-left {
    font-size: 18px !important;
  }
}

@media (max-width: 480px) {
  .wp-block-cover .wp-block-paragraph.has-text-align-left {
    font-size: 15px !important;
  }
}

.ast-footer-html-1 .ast-builder-html-element > div:first-child {
  font-family: 'Ophelia', Georgia, 'Times New Roman', serif !important;
}

/* ===== HERO — escritorio ===== */
.s38-hero {
  position: relative;
  overflow: hidden;
  background-color: #5B2627;
  min-height: 640px;
  padding: 80px 6%;
  display: grid !important;
  grid-template-columns: auto 1fr !important;
  align-items: center;
  column-gap: 6%;
}

.s38-hero > .wp-block-column,
.s38-hero .wp-block-group.is-vertical,
.s38-hero .wp-block-group.is-layout-constrained {
  display: contents;
}

.s38-hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -4%;
  width: 900px;
  height: 900px;
  max-width: 80vw;
  max-height: 80vw;
  border-radius: 50%;
  background: #9D5743;
  transform: translateY(-50%);
  z-index: 0;
  pointer-events: none;
}

.s38-hero::after {
  content: "";
  position: absolute;
  top: calc(50% - 40px);
  left: calc(-4% + 30px);
  width: 760px;
  height: 760px;
  max-width: calc(80vw - 140px);
  max-height: calc(80vw - 140px);
  border-radius: 50%;
  background: #5B2627;
  transform: translateY(-50%);
  z-index: 0;
  pointer-events: none;
}

.s38-hero .wp-block-image {
  grid-column: 1;
  grid-row: 1 / 5;
  position: relative;
  z-index: 1;
  width: 38vw;
  max-width: 460px;
  align-self: center;
}
.s38-hero .wp-block-image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  -webkit-mask-image: radial-gradient(ellipse at center, black 55%, transparent 100%);
  mask-image: radial-gradient(ellipse at center, black 55%, transparent 100%);
}

.s38-hero__title {
  grid-column: 2;
  position: relative;
  z-index: 1;
  color: #F0E7DA;
  font-size: clamp(2.5rem, 4.5vw, 5.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-top: 0 !important;
  margin-bottom: 0.3em !important;
}

.s38-hero__mark {
  grid-column: 2;
  position: relative;
  z-index: 1;
  text-align: right;
  font-family: 'Ophelia', Georgia, 'Times New Roman', serif !important;
  color: #9D5743;
  font-size: clamp(2.5rem, 4vw, 4.5rem);
  margin: 1.5rem 0 0;
}

.s38-hero__caption {
  position: absolute;
  left: 4%;
  bottom: 8%;
  z-index: 2;
  color: #F0E7DA;
  font-weight: 700;
  letter-spacing: 0.15em;
  font-size: clamp(0.85rem, 1.3vw, 1.1rem);
  text-transform: uppercase;
}

.s38-hero .wp-block-buttons {
  position: absolute;
  left: 0;
  bottom: 2%;
  width: 100%;
  z-index: 2;
}

.s38-hero__title,
.s38-hero__mark {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* ===== HERO — móvil ===== */
@media (max-width: 767px) {

  .s38-hero {
    grid-template-columns: 120px 1fr !important;
    align-content: end;
    row-gap: 0.5rem;
    column-gap: 4%;
    min-height: 100vh;
    padding: 32px 6% 40px;
  }

  .s38-hero::before {
    content: "";
    position: absolute;
    top: -15%;
    left: -80%;
    width: 160vw;
    height: 160vw;
    max-width: none;
    max-height: none;
    border-radius: 50%;
    background: #9D5743;
    transform: none;
    z-index: 0;
    pointer-events: none;
  }

  .s38-hero::after {
    content: "";
    position: absolute;
    top: calc(-5% - 8vw);
    left: calc(-70% + 4vw);
    width: 135vw;
    height: 135vw;
    max-width: none;
    max-height: none;
    border-radius: 50%;
    background: #5B2627;
    transform: none;
    z-index: 0;
    pointer-events: none;
  }

  
.s38-hero .wp-block-image {
  position: absolute;
  left: 6%;
  bottom: 30%;
  width: 120px;
  z-index: 1;
}

  .s38-hero__title {
    grid-column: 2;
    text-align: right !important;
    font-size: clamp(1rem, 5.5vw, 1.4rem) !important;
    white-space: nowrap;
    margin-top: 0 !important;
    margin-bottom: 0.3em !important;
	    align-self: start;
  }

  .s38-hero__mark {
    grid-column: 2;
    text-align: right;
    font-size: clamp(1.6rem, 8vw, 2.1rem) !important;
    margin-top: 0.3rem;
  }

  .s38-hero__caption {
    text-align: left;
    font-size: 0.6rem !important;
    margin-top: 10px;
  }
	
.s38-hero > .wp-block-column,
.s38-hero .wp-block-group.is-vertical,
.s38-hero .wp-block-group.is-layout-constrained {
  display: contents !important;
}
	

}