/*
 Theme Name: Astra Child
 Theme URI: https://wpastra.com/
 Author: Jorge Molina
 Author URI: https://clinicadrmolina.es
 Template: astra
 Version: 1.0.0
 Description: Tema hijo de Astra para personalizaciones seguras.
 Text Domain: astra-child
*/

/* =========================================================
   UTILIDADES GENERALES
   ---------------------------------------------------------
   - Clases pequeñas de ayuda reutilizables
========================================================= */

.parrafo_justificado { text-align: justify; }

.marco_video {
  padding: 20px;
  margin: 10px;
  background-color: #fff;
  border-radius: 20px;
}


/* =========================================================
   HERO SECTION
   ---------------------------------------------------------
   - Estructura base + animaciones ligeras
   - Ajustes responsive de tablet y móvil
========================================================= */

.jm-hero{
  position: relative;
  width: 100%;
  height: 80vh;
  /* La imagen la pone el JS diferido; color de respaldo por si tarda */
  background: #0d2540;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding-left: 5vw;
  padding-top: 6vh;
}

.jm-hero-content{
  position: relative;
  z-index: 1;
  text-align: left;
  max-width: 720px;
  padding: 20px 0;
  color: #fff;
}

/* Título (H1) */
.jm-hero-title{
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-weight: 500;               /* menos grueso */
  letter-spacing: 0.5px;          /* aire entre letras */
  font-size: 5.2rem;
  line-height: 1.1;
  color: #fff;
  margin: 0 0 80px 0;             /* separación grande con el párrafo */
}

/* Subtítulo en 3 líneas forzadas */
.jm-hero-sub{
  font-family: "Google Sans Text","Helvetica Neue",Helvetica,Arial,sans-serif;
  color: rgb(213,227,251);        /* color exacto indicado */
  font-weight: 600;
  font-size: 2.6rem;
  line-height: 1.8;
  margin: 80px 0 0 0;
}
.jm-hero-sub span{ display: block; }

/* ---- Animaciones HERO (ligeras) ---- */
@keyframes fadeInOnly {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideDownSlow {
  from { opacity: 0; transform: translateY(-15px); }
  to   { opacity: 1; transform: translateY(0); }
}
.jm-hero-title{
  opacity: 0;                              /* oculto antes de animar */
  animation: fadeInOnly 2s ease-out both;  /* both = aplica primer y último fotograma */
  animation-delay: 0.2s;
}
.jm-hero-sub span{
  opacity: 0;
  animation: slideDownSlow 1.5s ease-out both; /* evita flashes durante el delay */
}
.jm-hero-sub span:nth-child(1){ animation-delay: 1.0s; }
.jm-hero-sub span:nth-child(2){ animation-delay: 1.6s; }
.jm-hero-sub span:nth-child(3){ animation-delay: 2.2s; }

/* ---- Responsive: Tablet (769px–991px) ---- */
@media (min-width: 769px) and (max-width: 991px){
  .jm-hero{
    padding-left: 6vw;
    padding-top: 8vh;
  }
  .jm-hero-title{
    font-size: 3.6rem;
    margin-bottom: 60px;
  }
  .jm-hero-sub{
    font-size: 2.2rem;
    line-height: 1.7;
    margin-top: 60px;
  }
}

/* ---- Responsive: Móvil (≤768px) ---- */
@media (max-width: 768px){
  .jm-hero{
    height: 60vh;
    justify-content: flex-start;  /* bloque a la izquierda */
    align-items: flex-start;      /* arriba */
    padding-left: 5vw;            /* cerca del borde izquierdo */
    padding-top: 8vh;             /* H1 más arriba */
  }
  .jm-hero-content{
    text-align: left;
    max-width: 90vw;
  }
  .jm-hero-title{
    font-size: 2.6rem;            /* valor unificado (antes había 2.8 y 2.6 en conflicto) */
    margin-bottom: 80px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.65);
  }
  .jm-hero-sub{
    font-size: 1.9rem;
    line-height: 1.7;
    margin-top: 0;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.65);
  }
}


/* =========================================================
   AJUSTES ESPECÍFICOS DE SECCIONES (GETWID)
   ---------------------------------------------------------
   - Equipo: overlay solo en móvil + tipografías
========================================================= */

@media (max-width:768px){
  /* Aclara el fondo de la sección Equipo en móvil */
  #equipo .wp-block-getwid-section__background{
    opacity: .20; /* 0.2 = más claro; ajusta a gusto */
  }

  /* Título de sección en móvil */
  #equipo h2 {
    font-size: 1.6em;
    line-height: 1.3em;
  }

  /* Color del texto encima */
  #equipo .texto_equipo{
    color: #404248 !important;
  }
}


/* =========================================================
   GOOGLE REVIEWS (jm-gr)
   ---------------------------------------------------------
   - Grid responsive 1/2/3 columnas
   - Tarjeta tipo “burbuja”, estrellas y “Leer más”
   - Etiqueta “Reseñas · Google”
========================================================= */

/* Contenedor / byline */
.jm-gr{ position: relative; }
#jm-gr .jm-gr__powered{ margin-top: 8px; color: #6b7280; font-size: .9rem; text-align: right; opacity: .8; }
#jm-gr .jm-gr__powered span{ font-weight: 600; }

/* Grid: 1 / 2 / 3 columnas */
.jm-gr__list{
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;              /* móvil */
}
@media (min-width: 768px){
  .jm-gr__list{ grid-template-columns: repeat(2, 1fr); }  /* tablet */
}
@media (min-width: 992px){
  .jm-gr__list{ grid-template-columns: repeat(3, 1fr); }  /* desktop */
}

/* Tarjeta */
.jm-gr__item{ display: block; }

/* Burbuja con sombra */
.jm-gr__bubble{
  position: relative;
  padding: 24px 22px 28px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.06);
}

/* Comillas decorativas */
.jm-gr__quote{
  position: absolute; left: 16px; top: 10px;
  font-size: 54px; line-height: 1; color: #cfd8e3; font-weight: 700;
}

/* Estrellas */
.jm-gr__stars{ margin-left: 34px; margin-bottom: 10px; }
.jm-gr__star{ color: #d7dbe2; font-size: 20px; margin-right: 2px; }
.jm-gr__star.is-on{ color: #f5c518; }

/* Texto + botón “Leer más” */
.jm-gr__text{
  margin: 6px 0 0 0; color: #4a5568;
  font-size: 1.05rem; line-height: 1.6;
}
.jm-gr__more{
  margin-top: 8px; background: none; border: none; color: #2b6cb0; cursor: pointer;
  padding: 0; font-weight: 600;
}

/* Marca Google redondeada en esquina */
.jm-gr__gmark{
  position: absolute; right: 14px; bottom: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background: conic-gradient(#4285F4 0 25%, #34A853 0 50%, #FBBC05 0 75%, #EA4335 0);
  color: #fff;
}

/* Pie con avatar y nombre */
.jm-gr__foot{ display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.jm-gr__avatar{ border-radius: 50%; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.jm-gr__author{ display: block; color: #1f2937; font-weight: 700; }
.jm-gr__time{ display: block; color: #6b7280; font-size: .9rem; margin-top: 2px; }

/* Ajustes finos móvil para la burbuja */
@media (max-width:768px){
  .jm-gr__bubble{ padding: 18px 18px 22px 18px; }
  .jm-gr__quote{ left: 12px; top: 8px; font-size: 40px; }
}

/* Bocadillo: “pico” visible y con sombra, inclinado estilo cómic, apuntando al avatar */
.jm-gr__bubble{
  position: relative;
  overflow: visible;
  z-index: 1;
}
.jm-gr__bubble::after{
  content: "";
  position: absolute;
  bottom: -26px;          /* cuelga por fuera del borde */
  left: 36px;             /* AJUSTA para que apunte al centro del avatar */
  width: 48px; height: 36px;
  background: #fff;       /* mismo color que la burbuja */
  clip-path: polygon(50% 100%, 0 0, 100% 0);  /* triángulo */
  transform: rotate(22deg);                  /* INCLINACIÓN (ajústalo) */
  transform-origin: 50% 0%;                   /* pivota desde el “techo” del triángulo */
  box-shadow: 0 8px 18px rgba(0,0,0,.10);
  pointer-events: none;
  z-index: 0;
}
/* Pie por encima del pico */
.jm-gr__foot{ position: relative; z-index: 2; margin-top: 26px; }

@media (max-width:768px){
  .jm-gr__bubble::after{ left: 34px; transform: rotate(18deg); }
}

/* =========================
   LITE VIDEO (placeholder clicable)
========================= */
.jm-yt{
  position: relative;
  display: block;
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
  transition: transform .18s ease, box-shadow .18s ease;
  line-height: 0; /* elimina gap bajo la imagen */
}
.jm-yt img{
  display: block;
  width: 100%;
  height: auto;
}
.jm-yt::after{
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center,
              rgba(0,0,0,.0) 40%, rgba(0,0,0,.25) 100%);
  pointer-events: none;
}
.jm-yt:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,.14);
}

/* =========================
   LIGHTBOX (overlay para escritorio)
   (el JS creará .jm-lb, .jm-lb__inner, .jm-lb__frame)
========================= */
.jm-lb{
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.7);
  display: none; /* se activa con .is-open */
  align-items: center; justify-content: center;
  padding: 24px;
}
.jm-lb.is-open{ display: flex; }
.jm-lb__inner{
  position: relative;
  width: min(1100px, 92vw);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.jm-lb__close{
  position: absolute; top: 10px; right: 12px;
  background: rgba(0,0,0,.55); color: #fff;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  cursor: pointer; font-size: 18px; line-height: 36px; text-align:center;
}
.jm-lb__frame{
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0;
}

/* Evita scroll del fondo cuando la lightbox está abierta */
body.jm-noscroll{ overflow: hidden; }

/* Oculta cualquier botón de Astra si quedara activo por CSS */
#ast-scroll-top, .ast-scroll-top, a.ast-scroll-to-top { display: none !important; }

/* Botón propio */
.topbutton{
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  border-radius: 30px;
  z-index: 2147483647;
  background-image: url("https://clinica.jorge-molina.es/wp-content/uploads/sites/4/Topbutton.gif?v=4");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-color: rgba(200, 200, 200, 0.4);
  background-position: 0 -5px;     /* mismo ajuste que usabas */
  display: none;                   /* se muestra con .is-visible */
  box-shadow: none !important;
}
.topbutton.is-visible{ display: block; }

/* Forzar icono hamburguesa en BLANCO (Astra, móvil) */
.ast-header-break-point .menu-toggle,
.ast-header-break-point .ast-mobile-menu-trigger {
  color: #fff !important; /* algunos SVG heredan de color */
}

/* Cubre las variantes de Astra (SVG inline) */
.ast-header-break-point .menu-toggle svg,
.ast-header-break-point .ast-mobile-menu-trigger svg,
.ast-header-break-point .menu-toggle svg * ,
.ast-header-break-point .ast-mobile-menu-trigger svg * {
  fill: #fff !important;
  stroke: #fff !important;
  opacity: 1 !important;
}

/* Por si usa barras con pseudo-elementos */
.ast-header-break-point .menu-toggle .menu-toggle-icon::before,
.ast-header-break-point .menu-toggle .menu-toggle-icon::after {
  background: #fff !important;
}

/* Subrayado animado en hover + activo (Astra) */
.main-header-menu .menu-item > a{
  position: relative;
}
.main-header-menu .menu-item > a::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom: 0.45em;            /* ajusta si queda muy arriba/abajo */
  height:2px;
  width:0;
  margin:auto;
  background: currentColor;  /* usa el color del enlace */
  transition: width .25s ease;
}
.main-header-menu .menu-item:hover > a::after,
.main-header-menu .current-menu-item > a::after,
.main-header-menu .current-menu-ancestor > a::after{
  width:100%;
}

/* Opcional: quitar la animación en el menú móvil (accordion) */
@media (max-width: 921px){
  .main-header-menu .menu-item > a::after{ display:none; }
}