/*
Theme Name: MGM Seguros
Theme URI: http://localhost:8888/mgmsaludybienestar/
Author: MGM Seguros
Description: Tema personalizado para MGM Seguros - Salud y Bienestar
Version: 1.0.53
*/

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== VARIABLES ===== */
:root {
  --primary:   #132a3b;
  --secondary: #4bbecf;
  --tertiary:  #e9426d;
  --white:     #ffffff;
  --light-blue:#ddf0f5;
  --font:      'Montserrat', sans-serif;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  /* Red de seguridad: impide que cualquier elemento ancho corte la página
     a lo ancho. Se usa 'clip' y no 'hidden' porque 'hidden' crearía un
     contenedor de scroll y rompería el position:sticky de la cabecera. */
  overflow-x: clip;
}

body {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--primary);
  background: #fff;
}

a { color: var(--secondary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1em;
  color: var(--secondary);
}

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ===== LAYOUT ===== */
.container {
  width: 90%;
  max-width: 1920px;
  margin: 0 auto;
}

/* ===== TOP BAR ===== */
#top-bar {
  background: var(--secondary);
  color: var(--white);
  font-size: 14px;
  padding: 6px 0;
  text-align: center;
}

#top-bar .container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

#top-bar a { color: var(--white); }
#top-bar span { color: var(--white); }

#bar-phone::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f095";
  color: var(--tertiary);
  margin-right: 5px;
  font-size: 13px;
}

#top-bar a[href^="mailto:"]::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f0e0";
  color: var(--tertiary);
  margin-right: 5px;
  font-size: 13px;
}

/* ===== HEADER ===== */
#site-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: box-shadow .3s;
}

#site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 85px;
  transition: height .3s;
}

.site-logo img {
  height: 68px;
  width: auto;
  transition: height .3s;
}

#site-header.scrolled .container {
  height: 55px;
}

#site-header.scrolled .site-logo img {
  height: 42px;
}

#site-header.scrolled {
  box-shadow: 0 3px 12px rgba(0,0,0,0.12);
}

/* Nav */
#main-nav ul {
  list-style: none;
}

#main-nav > ul {
  display: flex;
  gap: 16px;
}

#main-nav ul li a {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  text-transform: none;
  letter-spacing: 0;
  transition: color .2s;
}

#main-nav ul li a:hover,
#main-nav ul li.current-menu-item a,
#main-nav ul li.current-menu-ancestor > a,
#main-nav ul li.current-menu-parent > a {
  color: var(--secondary);
  text-decoration: none;
}

/* Dropdown */
#main-nav > ul > li { position: relative; }

#main-nav > ul > li > ul {
  display: none;
  position: absolute;
  top: 100%;
  left: -16px;
  background: #fff;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-radius: 0 0 10px 10px;
  padding: 8px 0;
  margin-top: 29px;
  z-index: 200;
}

#main-nav > ul > li > ul::before {
  content: '';
  position: absolute;
  top: -29px;
  left: 0;
  right: 0;
  height: 29px;
}

#site-header.scrolled #main-nav > ul > li > ul {
  margin-top: 14px;
}

#site-header.scrolled #main-nav > ul > li > ul::before {
  top: -14px;
  height: 14px;
}

#main-nav > ul > li:hover > ul { display: block; }

#main-nav > ul > li > ul li a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  white-space: nowrap;
  border-bottom: none;
}

#main-nav > ul > li > ul li a:hover { color: var(--secondary); background: var(--light-blue); }

#main-nav .menu-item-has-children > a::after {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f078";
  font-size: 10px;
  opacity: 0.6;
  margin-left: 4px;
}

/* Mobile menu toggle */
#menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

#menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: all .3s;
}

/* ===== SECTIONS COMMON ===== */
.section { padding: 56px 0; }
.section--tight { padding: 30px 0; }

/* ===== HERO ===== */
#hero .container { width: 85%; }

#hero {
  background-image: url('../../uploads/2026/05/merche-fondo-azul-ok.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  min-height: 90vh;
  display: flex;
  align-items: flex-start;
}

#hero .hero-inner {
  width: 50%;
  padding: 60px 0 80px;
}

#hero h1 {
  font-size: 5.5vw;
  font-weight: 300;
  color: #ffffff !important;
  margin-bottom: 15px;
  line-height: 1em;
}

#hero p {
  font-size: 21px;
  color: var(--primary);
  line-height: 1.7em;
}

/* ===== VALUE PROPS ===== */
#value-props { background: #fff; }

#value-props .section-title {
  text-align: center;
  margin-bottom: 12px;
}

#value-props .section-title h2 {
  font-size: 4vw;
  font-weight: 700;
  color: var(--secondary);
  text-align: center;
}

#value-props .section-subtitle {
  text-align: center;
  font-size: 21px;
  margin-bottom: 48px;
  color: var(--primary);
}

.blurbs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.blurb-card {
  display: flex;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 16px;
  background: var(--primary);
  border-radius: 28px;
  padding: 14px;
  box-shadow: 0 7px 14px -7px rgba(0,0,0,0.3);
  overflow: hidden;
}

.blurb-card .blurb-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin-top: 2px;
}

.blurb-card .blurb-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.blurb-card .blurb-icon i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 30px;
  color: var(--tertiary);
}

.blurb-card .blurb-text h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 6px;
}

.blurb-card .blurb-text p {
  color: var(--white);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 0;
}

/* ===== PROCESS ===== */
#process {
  background: var(--secondary);
  padding: 56px 0;
}

#process .process-steps {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}

.step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.step-icon {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  margin-bottom: 20px;
  overflow: hidden;
}

.step-icon--pink   { background: var(--tertiary); }
.step-icon--primary { background: var(--primary); }

.step-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.step-icon i {
  font-size: 48px;
  color: var(--white);
  line-height: 1;
}

.step-card h4 {
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}

.step-card p {
  color: var(--primary);
  font-size: 15px;
}

/* ===== SEGUROS ===== */
#seguros { background: var(--light-blue); }

#seguros .section-title {
  text-align: center;
  margin-bottom: 8px;
}

#seguros .section-title h2 {
  font-size: 4vw;
  font-weight: 700;
  color: var(--secondary);
  text-align: center;
}

#seguros .section-subtitle {
  text-align: center;
  font-size: 21px;
  color: var(--primary);
  margin-bottom: 48px;
}

.seguros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.seguros-card {
  background: var(--primary);
  border-radius: 28px;
  padding: 40px 36px;
  box-shadow: 0 12px 18px -6px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.seguros-card__top { display: flex; flex-direction: column; gap: 12px; }

.seguros-icon {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  color: #fff;
  flex-shrink: 0;
  margin-bottom: 8px;
}

.seguros-icon--tertiary  { background: var(--tertiary); }
.seguros-icon--secondary { background: var(--secondary); }

.seguros-card h3 {
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  margin: 0;
}

.seguros-card__top > p {
  color: rgba(255,255,255,0.8);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

.seguros-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.seguros-list li {
  color: rgba(255,255,255,0.85);
  font-size: 15px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  line-height: 1.5;
}

.seguros-list li strong { color: #fff; font-weight: 700; }
.seguros-list li a { color: inherit; text-decoration: none; }
.seguros-list--tertiary  li a:hover strong { color: var(--tertiary); }
.seguros-list--secondary li a:hover strong { color: var(--secondary); }

.seguros-list--tertiary  li i { color: var(--tertiary); }
.seguros-list--secondary li i { color: var(--secondary); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  transition: opacity .2s, transform .1s;
  text-decoration: none;
  align-self: flex-start;
  border: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.btn:hover { opacity: .88; transform: translateY(-1px); text-decoration: none; }
.btn--tertiary  { background: var(--tertiary);  color: #fff; }
.btn--secondary { background: var(--secondary); color: var(--primary); }

/* ===== TESTIMONIALS ===== */
#testimonials { background: #fff; }
#testimonials .container { width: 85%; }

#testimonials .section-header {
  text-align: center;
  margin-bottom: 48px;
}

#testimonials .section-header h2 {
  font-size: 4vw;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 8px;
}

#testimonials .section-header p {
  font-size: 18px;
  color: var(--primary);
  margin: 0;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.testimonial-card {
  background: var(--light-blue);
  border-radius: 28px;
  box-shadow: 0 12px 18px -6px rgba(0,0,0,0.3);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.testimonial-card .testi-text {
  font-size: 16px;
  color: var(--primary);
  line-height: 1.6;
  flex: 1;
}

.testimonial-card .testi-author {
  font-weight: 700;
  color: var(--tertiary);
  font-size: 16px;
}

/* ===== CTA ===== */
#cta {
  background-image: url('../../uploads/2026/05/merche-portatil-fondo-azul-ok.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  min-height: 90vh;
  display: flex;
  align-items: flex-start;
}

#cta .cta-inner {
  width: 50%;
  margin-left: 50%;
  padding: 80px 0;
}

#cta h3 {
  font-size: 5.5vw;
  font-weight: 300;
  color: var(--white);
  margin-bottom: 15px;
}

#cta p {
  font-size: 21px;
  color: var(--primary);
  line-height: 1.6;
}

/* ===== LOGOS ===== */
#partners { background: #fff; padding: 56px 0; }
#partners .container { width: 95%; }

#partners h2 {
  text-align: center;
  font-size: 4vw;
  color: var(--secondary);
  margin-bottom: -24px;
}

/* Carrusel continuo de logos */
.logos-marquee {
  margin-top: 48px;
  overflow: hidden;
  /* iOS Safari no recorta descendientes animados con transform si el
     contenedor es 'static': sin esto, la pista del carrusel (varios miles
     de píxeles) desborda y la página se puede arrastrar en horizontal. */
  position: relative;
  max-width: 100%;
  /* Los logos se desvanecen al entrar y salir por los lados */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.logos-track {
  display: flex;
  align-items: center;
  gap: 64px;
  width: max-content;
  animation: logos-scroll 70s linear infinite;
}

.logos-marquee:hover .logos-track {
  animation-play-state: paused;
}

/* Anchura común para todos los logos */
.logos-track .logo-item {
  flex: 0 0 206px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* El tope de altura evita que los logos cuadrados (ARAG, AXA) se disparen */
.logos-track .logo-item img {
  width: 100%;
  height: auto;
  max-height: 100px;
  object-fit: contain;
}

/* La pista contiene la lista duplicada, así que -50% equivale a una vuelta exacta */
@keyframes logos-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .logos-track { animation: none; }
}

/* ===== FOOTER ===== */
#site-footer {}

.footer-main {
  background: var(--primary);
  padding: 60px 0;
}

.footer-main .container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-col-logo {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}
.footer-col-logo img {
  width: auto;
  max-width: 100%;
  max-height: 64px;
}

.footer-logo img {
  width: 85%;
  height: auto;
  margin-top: -25px;
}

.footer-contact h4,
.footer-legal h4 {
  color: var(--secondary);
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-contact p,
.footer-legal p {
  color: var(--white);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.8;
  margin: 0;
}

.footer-legal a {
  color: var(--white);
  display: block;
  line-height: 1.8;
}

.footer-copyright {
  background: var(--secondary);
  text-align: center;
  padding: 12px 0;
}

.footer-copyright p {
  color: var(--white);
  font-size: 15px;
  font-weight: 400;
  margin: 0;
}

.footer-copyright p strong {
  font-weight: 700;
}

/* ===== INTERIOR PAGES ===== */
.page-hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(19,42,59,0.90) 40%, rgba(19,42,59,0.42) 100%);
}

.hero-bg-mirror {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scaleX(-1);
  z-index: -1;
}

.page-hero .container {
  position: relative;
  z-index: 1;
  padding: 90px 0 80px;
}

.page-hero-badge {
  display: inline-block;
  background: var(--secondary);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 18px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.page-hero h1 {
  font-size: 5.5vw;
  font-weight: 300;
  color: #fff;
  margin-bottom: 22px;
  line-height: 1.15em;
  max-width: 65%;
}

.page-hero p {
  font-size: 19px;
  color: rgba(255,255,255,0.88);
  line-height: 1.75;
  max-width: 65%;
  margin: 0 0 36px;
}

/* Stat strip */
.stat-strip {
  background: var(--secondary);
  padding: 30px 0;
}

.stat-strip .container {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.stat-item {
  text-align: center;
  padding: 0 20px;
}

.stat-item strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.stat-item span {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* Section intro heading */
.section-intro {
  text-align: center;
  max-width: 65%;
  margin: 0 auto 48px;
}

.section-intro h2 {
  font-size: 4vw;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 14px;
  line-height: 1.2;
}

.section-intro p {
  font-size: 21px;
  color: var(--primary);
  line-height: 1.7;
  margin: 0;
}

/* Feature cards */
.feat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feat-card {
  background: #fff;
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: 0 4px 24px rgba(19,42,59,0.07);
  border: 1px solid rgba(19,42,59,0.05);
  transition: transform .22s, box-shadow .22s;
}

.feat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(19,42,59,0.13);
}

.feat-card .feat-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: #fff;
  margin-bottom: 22px;
  flex-shrink: 0;
}

.feat-card:nth-child(even) .feat-icon {
  background: var(--tertiary);
}

.feat-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.feat-card p {
  font-size: 14px;
  color: var(--primary);
  line-height: 1.65;
  margin: 0;
}

/* Info split (2 columns) */
.info-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.info-split h2 {
  font-size: 4vw;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 16px;
  line-height: 1.2;
}

.info-split p {
  font-size: 16px;
  color: var(--primary);
  line-height: 1.8;
  margin-bottom: 16px;
}

/* Steps */
.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  counter-reset: step;
  margin-bottom: 0;
}

.steps-list li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  font-size: 16px;
  color: var(--primary);
  line-height: 1.6;
  counter-increment: step;
}

.steps-list li::before {
  content: counter(step);
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--primary);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  margin-top: calc((1.6em - 40px) / 2);
}

/* CTA block */
.page-cta-block {
  background: var(--primary);
  padding: 90px 0;
  text-align: center;
}

.page-cta-block h2 {
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.2;
}

.page-cta-block p {
  font-size: 19px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 36px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}

.page-cta-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn--outline {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}

.btn--outline:hover {
  background: #fff;
  color: var(--primary);
  opacity: 1;
}

.btn--white {
  background: #fff;
  color: var(--primary);
}

.btn--white:hover {
  opacity: .9;
}

/* ===== QUIÉN SOY ===== */
.quien-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.quien-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: left center;
  border-radius: 24px;
  display: block;
  margin-top: 15px;
}

.quien-text h2 {
  font-size: 4vw;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 22px;
  line-height: 1.2;
}

.quien-text p {
  font-size: 16px;
  color: var(--primary);
  line-height: 1.85;
  margin-bottom: 16px;
}

/* ===== CONTACT FORM SECTION ===== */
.page-form-section {
  background: var(--primary);
  padding: 80px 0;
}

.page-form-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.page-form-intro h2 {
  font-size: 4vw;
  color: #fff;
  margin-bottom: 18px;
  line-height: 1.2;
}

.page-form-intro p {
  font-size: 17px;
  color: rgba(255,255,255,0.82);
  line-height: 1.75;
  margin-bottom: 36px;
}

.page-form-contacts {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.page-form-contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255,255,255,0.9);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s;
}

.page-form-contact-item:hover { color: var(--secondary); text-decoration: none; }

.pfc-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(75,190,207,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--secondary);
  flex-shrink: 0;
}

.page-form-box {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
}

.form-notice {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-notice--ok    { background: #d4f5e9; color: #0a6644; }
.form-notice--error { background: #fde8e8; color: #9b1c1c; }

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 0;
}

.form-group { margin-bottom: 14px; }

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1.5px solid #d0dce5;
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--primary);
  background: #f7fbfc;
  transition: border-color .2s, background .2s;
  appearance: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary);
  background: #fff;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

.btn--full { width: 100%; justify-content: center; display: flex; align-items: center; }

/* ===== CONTACT PAGE ===== */
.contact-cards-section { padding: 64px 0; }

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.contact-card {
  background: var(--light-blue);
  border-radius: 18px;
  padding: 36px 28px;
  text-align: center;
}

.contact-card .cc-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  margin: 0 auto 20px;
}

.contact-card:nth-child(2) .cc-icon { background: var(--tertiary); }
.contact-card:nth-child(3) .cc-icon { background: var(--primary); }

.contact-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.contact-card p,
.contact-card a {
  font-size: 15px;
  color: #4a6070;
  line-height: 1.7;
  text-decoration: none;
  display: block;
  margin: 0;
}

.contact-card a:hover { color: var(--secondary); text-decoration: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .blurbs-grid {
    grid-template-columns: 1fr 1fr;
  }

  #cta .cta-inner {
    width: 50%;
    margin-left: 50%;
  }

  .logos-track {
    gap: 48px;
  }

  .logos-track .logo-item {
    flex-basis: 175px;
  }

  .logos-track .logo-item img {
    max-height: 68px;
  }

  #main-nav ul {
    gap: 16px;
  }

  #main-nav ul li a {
    font-size: 13px;
    letter-spacing: 0;
  }
}

@media (max-width: 767px) {
  .page-hero h1 { font-size: 9vw; }
  .page-hero p { font-size: 16px; }
  .page-hero .container { padding: 60px 0 50px; }
  .feat-cards { grid-template-columns: 1fr; }
  .info-split { grid-template-columns: 1fr; gap: 32px; }
  .quien-split { grid-template-columns: 1fr; gap: 36px; }
  .quien-text h2 { font-size: 7vw; }
  .stat-strip .container { flex-direction: column; gap: 20px; }
  .section-intro h2,
  .info-split h2,
  .page-form-intro h2 { font-size: 7vw; }
  .page-cta-block h2 { font-size: 1.8rem; }
  .page-cta-btns { flex-direction: column; align-items: center; }

  /* En móvil la foto va debajo del texto, no detrás:
     se dibuja a ancho completo anclada abajo y el hueco superior
     se rellena con el mismo turquesa de la propia foto. */
  #hero {
    background-image: url('../../uploads/2026/05/merche-fondo-azul-ok-mov.jpg');
    background-color: #00bfd1;
    background-size: 100% auto;
    background-position: bottom center;
    min-height: 0;
    flex-direction: column;
  }

  /* Reserva solo la parte donde ella aparece (empieza al 43% de la foto).
     El resto de la imagen queda detrás del texto, y no se nota porque
     es el mismo turquesa liso que el background-color. */
  #hero::after {
    content: '';
    display: block;
    width: 100%;
    padding-top: 109%;
    flex: none;
  }

  #hero .hero-inner {
    width: 100%;
    padding: 40px 0 24px;
  }

  #hero h1 {
    font-size: 9vw;
  }

  #hero p {
    font-size: 18px;
  }

  #value-props .section-title h2,
  #testimonials .section-header h2,
  #seguros .section-title h2 {
    font-size: 7vw;
  }

  .seguros-grid {
    grid-template-columns: 1fr;
  }

  .seguros-card {
    padding: 32px 24px;
  }

  .blurbs-grid {
    grid-template-columns: 1fr;
  }

  #process .process-steps {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  /* Mismo criterio que el hero: foto debajo del texto */
  #cta {
    background-image: url('../../uploads/2026/05/merche-portatil-fondo-azul-ok-mov.jpg');
    background-color: #00bfd1;
    background-size: 100% auto;
    background-position: bottom center;
    min-height: 0;
    flex-direction: column;
  }

  /* En esta foto el sujeto empieza algo más abajo (48%) */
  #cta::after {
    content: '';
    display: block;
    width: 100%;
    padding-top: 101%;
    flex: none;
  }

  #cta .cta-inner {
    width: 100%;
    margin-left: 0;
    padding: 40px 0 24px;
  }

  #cta h3 {
    font-size: 9vw;
  }

  #cta p {
    font-size: 18px;
  }

  .logos-marquee {
    margin-top: 36px;
  }

  .logos-track {
    gap: 36px;
    animation-duration: 45s;
  }

  .logos-track .logo-item {
    flex-basis: 144px;
  }

  .logos-track .logo-item img {
    max-height: 58px;
  }

  .footer-main .container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* A una sola columna el logo se comía todo el ancho. */
  .footer-logo img {
    width: 53.125%;
    margin-top: 0;
  }

  /* Hueco para que el botón flotante de WhatsApp no tape el copyright. */
  .footer-copyright {
    padding-bottom: 76px;
  }

  .footer-contact,
  .footer-legal {
    padding: 0 0 0 85px;
  }

  .footer-contact p,
  .footer-legal p {
    font-size: 14px;
  }

  /* Panel del menú: 'top: 100%' lo mantiene pegado a la cabecera
     aunque cambie su altura (antes iba fijo a 85px y se descolgaba). */
  #main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 12px 22px rgba(19,42,59,0.14);
    border-top: 1px solid var(--light-blue);
    padding: 10px 0 12px;
  }

  #main-nav.open {
    display: block;
  }

  /* Dos columnas: los 8 enlaces pasan de 8 filas a 4 */
  #main-nav > ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 6px;
    row-gap: 2px;
    padding: 0 4%;
  }

  #main-nav ul li a {
    display: block;
    padding: 11px 10px;
    font-size: 15px;
    border-radius: 10px;
  }

  #main-nav ul li.current-menu-item a {
    background: var(--light-blue);
  }

  /* Si algún día se añaden submenús, que se vean en línea
     en vez de quedar ocultos esperando un hover que no existe */
  #main-nav > ul > li > ul {
    display: block;
    position: static;
    min-width: 0;
    margin-top: 0;
    padding: 0 0 4px;
    box-shadow: none;
    border-radius: 0;
  }
  #main-nav > ul > li > ul::before { display: none; }
  #main-nav > ul > li > ul li a { padding: 8px 10px; font-size: 14px; }
  #main-nav .menu-item-has-children > a::after { display: none; }

  #menu-toggle {
    display: flex;
  }

  /* La hamburguesa se convierte en aspa al abrir */
  #menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  #menu-toggle.open span:nth-child(2) { opacity: 0; }
  #menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* OJO: no poner aquí 'position: relative'. La cabecera debe seguir siendo
     'sticky' también en móvil, y 'sticky' ya crea contexto de posicionamiento,
     así que el panel del menú (absolute) se ancla igual de bien. */

  .page-form-split { grid-template-columns: 1fr; gap: 40px; }
  .contact-cards { grid-template-columns: 1fr; gap: 16px; }
  .form-row-2 { grid-template-columns: 1fr; }
  .page-form-section { padding: 56px 0; }
  .page-form-box { padding: 28px 20px; }
}

/* ===== PÁGINAS DE SEGUROS (intro + bloques) ===== */
.seguros-intro .section-title {
  text-align: center;
  margin-bottom: 12px;
}
.seguros-intro .section-title h2 {
  font-size: 4vw;
  font-weight: 700;
  color: var(--secondary);
}
.seguros-intro .section-subtitle {
  text-align: center;
  font-size: 20px;
  max-width: 880px;
  margin: 0 auto 56px;
  color: var(--primary);
}

.seguros-bloques {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.seguro-bloque {
  flex: 0 1 calc((100% - 48px) / 3);
  max-width: calc((100% - 48px) / 3);
  background: var(--light-blue);
  border-radius: 22px;
  padding: 32px 28px;
  text-align: center;
  transition: transform .2s, box-shadow .2s;
}
.seguro-bloque:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -16px rgba(19,42,59,0.45);
}

.seguro-bloque__icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  margin: 0 auto 20px;
}
.seguro-bloque:nth-child(3n+2) .seguro-bloque__icon { background: var(--tertiary); }
.seguro-bloque:nth-child(3n)   .seguro-bloque__icon { background: var(--primary); }

.seguro-bloque h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}
.seguro-bloque p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--primary);
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .seguro-bloque {
    flex-basis: calc((100% - 24px) / 2);
    max-width: calc((100% - 24px) / 2);
  }
  .seguros-intro .section-title h2 { font-size: 30px; }
}
@media (max-width: 600px) {
  .seguro-bloque {
    flex-basis: 100%;
    max-width: 100%;
  }

  /* En móvil el top bar va en dos líneas: correo arriba y teléfono debajo.
     El 'order' lo consigue sin tocar el orden del HTML, que en escritorio
     debe seguir siendo teléfono y luego correo. */
  #top-bar { font-size: 13px; padding: 6px 0; line-height: 1.45; }

  #top-bar .container {
    flex-direction: column;
    gap: 1px;
  }

  #top-bar a[href^="mailto:"] { order: 1; }
  #bar-phone { order: 2; }

  #bar-phone,
  #top-bar a { white-space: nowrap; }

  /* Logo grande en reposo (50% más que los 50px anteriores) y, al desplazarse,
     de vuelta al tamaño reducido de siempre. La altura del contenedor sube en
     paralelo para conservar los 16px de holgura del logo. */
  #site-header .container { height: 91px; }
  .site-logo img { height: 75px; }
  #site-header.scrolled .container { height: 54px; }
  #site-header.scrolled .site-logo img { height: 40px; }
}

/* ===== HOME · CATEGORÍAS DE SEGUROS ===== */
.cat-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.cat-card {
  flex: 0 1 calc((100% - 48px) / 3);
  max-width: calc((100% - 48px) / 3);
  display: flex;
  flex-direction: column;
  background: var(--primary);
  border-radius: 28px;
  padding: 34px 30px;
  box-shadow: 0 10px 24px -16px rgba(19,42,59,0.5);
  text-decoration: none;
}
.cat-card:hover { text-decoration: none; }

.cat-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  margin-bottom: 20px;
}
.cat-card:nth-child(even) .cat-card__icon { background: var(--tertiary); }

.cat-card h3 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.cat-card__desc {
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 18px;
}

.cat-card__toggle {
  margin-top: auto;
  gap: 8px;
}
.cat-card__toggle i { transition: transform .45s cubic-bezier(.16,1,.3,1); }
.cat-card.is-open .cat-card__toggle i { transform: rotate(180deg); }

.cat-card__listwrap {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
  transition: grid-template-rows 1.1s cubic-bezier(.16,1,.3,1), opacity .9s ease, margin-top 1.1s cubic-bezier(.16,1,.3,1);
}
.cat-card.is-open .cat-card__listwrap {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 20px;
}

/* La apertura por hover solo en ratón: en pantallas táctiles el :hover
   se queda pegado tras el toque e impide volver a plegar la lista. */
@media (hover: hover) and (pointer: fine) {
  .cat-card__toggle:hover i { transform: rotate(180deg); }

  .cat-card__toggle:hover ~ .cat-card__listwrap,
  .cat-card__listwrap:hover {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 20px;
  }
}

.cat-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 0;
  overflow: hidden;
}
.cat-card__list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  line-height: 1.4;
}
.cat-card__list li i {
  color: var(--secondary);
  font-size: 13px;
  margin-top: 3px;
  flex-shrink: 0;
}

@media (max-width: 980px) {
  .cat-card {
    flex-basis: calc((100% - 24px) / 2);
    max-width: calc((100% - 24px) / 2);
  }
}
@media (max-width: 600px) {
  .cat-card {
    flex-basis: 100%;
    max-width: 100%;
  }
}

/* ===== HOME · SEGUROS DESTACADOS ===== */
#destacados { background: var(--secondary); }
#destacados .section-title { text-align: center; margin-bottom: 12px; }
#destacados .section-title h2 { font-size: 4vw; font-weight: 700; color: #fff; }
#destacados .section-subtitle { text-align: center; font-size: 20px; max-width: 760px; margin: 0 auto 48px; color: rgba(255,255,255,0.92); }

.destacados-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.destacado-card {
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  background: var(--primary);
  box-shadow: 0 10px 24px -16px rgba(19,42,59,0.5);
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.destacado-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 36px -18px rgba(19,42,59,0.55);
  text-decoration: none;
}

.destacado-card__img {
  display: block;
  height: 200px;
  background-size: cover;
  background-position: center;
  transition: transform .4s ease;
}
.destacado-card:hover .destacado-card__img { transform: scale(1.06); }

.destacado-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px 24px 26px;
}
.destacado-card__title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.destacado-card__desc {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255,255,255,0.85);
  margin-bottom: 16px;
}
.destacado-card__link {
  margin-top: auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.destacado-card__link i { transition: transform .25s ease; }
.destacado-card:hover .destacado-card__link i { transform: translateX(4px); }

@media (max-width: 980px) {
  .destacados-grid { grid-template-columns: repeat(2, 1fr); }
  #destacados .section-title h2 { font-size: 30px; }
}
@media (max-width: 560px) {
  .destacados-grid { grid-template-columns: 1fr; }
}

/* ===== PÁGINAS LEGALES ===== */
.page-hero--legal {
  min-height: 50vh;
}
.legal-content h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 20px;
  line-height: 1.2;
}
.legal-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 32px;
  margin-bottom: 12px;
}
.legal-content p {
  font-size: 16px;
  color: var(--primary);
  line-height: 1.8;
  margin-bottom: 14px;
}
.legal-content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 16px;
}
.legal-content ul li {
  font-size: 16px;
  color: var(--primary);
  line-height: 1.8;
  padding-left: 28px;
  position: relative;
  margin-bottom: 6px;
}
.legal-content ul li::before {
  content: '\f00c';
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--secondary);
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 14px;
}
.legal-content strong {
  font-weight: 700;
  color: var(--primary);
}
@media (max-width: 767px) {
  .legal-content h2 { font-size: 1.5rem; }
  .legal-content h3 { font-size: 1.15rem; }
}

/* ===== AVISO DE COOKIES ===== */
.mgm-cookies {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9998;
  background: var(--white);
  border-radius: 22px;
  box-shadow: 0 18px 50px -12px rgba(19, 42, 59, .45);
  padding: 26px 30px;
  animation: mgm-cookies-in .35s ease both;
}
.mgm-cookies[hidden] { display: none; }

@keyframes mgm-cookies-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mgm-cookies__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 34px;
}

.mgm-cookies__text h2 {
  font-size: 19px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}
.mgm-cookies__text p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--primary);
  margin: 0;
}
.mgm-cookies__text a {
  color: var(--tertiary);
  font-weight: 700;
}

.mgm-cookies__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Aceptar y Rechazar comparten tamaño y peso visual: lo exige la guía de la AEPD */
.mgm-cookies__btn {
  font-size: 14px;
  padding: 13px 26px;
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
}
.mgm-cookies__btn--accept {
  background: var(--secondary);
  color: var(--primary);
}
.mgm-cookies__btn--reject {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.mgm-cookies__btn--reject:hover { background: var(--primary); color: var(--white); }
.mgm-cookies__btn--save {
  background: var(--primary);
  color: var(--white);
}

.mgm-cookies__link {
  background: none;
  border: 0;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
  padding: 8px 4px;
}
.mgm-cookies__link:hover { color: var(--tertiary); }

/* ----- Panel de preferencias ----- */
.mgm-cookies-panel {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(19, 42, 59, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.mgm-cookies-panel[hidden] { display: none; }

.mgm-cookies-panel__box {
  background: var(--white);
  border-radius: 22px;
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mgm-cookies-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 30px 18px;
  border-bottom: 1px solid var(--light-blue);
}
.mgm-cookies-panel__head h2 {
  font-size: 21px;
  font-weight: 700;
  color: var(--primary);
}
.mgm-cookies-panel__close {
  background: none;
  border: 0;
  font-size: 30px;
  line-height: 1;
  color: var(--primary);
  cursor: pointer;
  padding: 0 4px;
}
.mgm-cookies-panel__close:hover { color: var(--tertiary); }

.mgm-cookies-panel__body {
  padding: 8px 30px;
  overflow-y: auto;
}

.mgm-cookie-group { padding: 20px 0; border-bottom: 1px solid var(--light-blue); }
.mgm-cookie-group:last-child { border-bottom: 0; }

.mgm-cookie-group__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}
.mgm-cookie-group__top h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}
.mgm-cookie-group__always {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--secondary);
  white-space: nowrap;
}
.mgm-cookie-group p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--primary);
  margin: 0;
}

/* Interruptor */
.mgm-switch { position: relative; display: inline-block; width: 50px; height: 28px; flex-shrink: 0; }
.mgm-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.mgm-switch__slider {
  position: absolute;
  inset: 0;
  background: #c6d2d9;
  border-radius: 100px;
  transition: background .25s;
  pointer-events: none;
}
.mgm-switch__slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: transform .25s;
}
.mgm-switch input:checked + .mgm-switch__slider { background: var(--secondary); }
.mgm-switch input:checked + .mgm-switch__slider::before { transform: translateX(22px); }
.mgm-switch input:focus-visible + .mgm-switch__slider { outline: 3px solid var(--tertiary); outline-offset: 2px; }

.mgm-cookies-panel__foot {
  display: flex;
  gap: 10px;
  padding: 20px 30px 26px;
  border-top: 1px solid var(--light-blue);
  flex-wrap: wrap;
}
.mgm-cookies-panel__foot .mgm-cookies__btn { flex: 1 1 auto; text-align: center; }

@media (max-width: 980px) {
  .mgm-cookies__inner { flex-direction: column; align-items: stretch; gap: 20px; }
  .mgm-cookies__actions { flex-wrap: wrap; justify-content: center; }
  .mgm-cookies__btn { flex: 1 1 auto; }
}

@media (max-width: 600px) {
  .mgm-cookies { left: 10px; right: 10px; bottom: 10px; padding: 22px 20px; border-radius: 18px; }
  .mgm-cookies__text h2 { font-size: 17px; }
  .mgm-cookies__text p { font-size: 13.5px; }
  .mgm-cookies__actions { flex-direction: column; }
  .mgm-cookies__btn { width: 100%; }
  .mgm-cookies-panel__head,
  .mgm-cookies-panel__body,
  .mgm-cookies-panel__foot { padding-left: 20px; padding-right: 20px; }
  .mgm-cookies-panel__foot { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .mgm-cookies { animation: none; }
  .mgm-switch__slider,
  .mgm-switch__slider::before { transition: none; }
}

/* ===== ANIMACIÓN DE ENTRADA (titulares) =====
   Todo el estado inicial cuelga de la clase '.mgm-anim', que pone un script
   en la cabecera SOLO si hay JS y el visitante no ha pedido reducir el
   movimiento. */

/* --- Titulares: cada palabra entra rebotando --- */
.mgm-palabra {
  display: inline-block;
  /* 'inline-block' recorta los descendentes (g, j, p) si la caja va justa. */
  padding-bottom: .06em;
}

.mgm-anim .mgm-palabra {
  opacity: 0;
}

.mgm-anim .mgm-titular--visible .mgm-palabra {
  animation: mgm-palabra-in .6s cubic-bezier(.34, 1.56, .64, 1) both;
}

@keyframes mgm-palabra-in {
  from {
    opacity: 0;
    transform: translate3d(0, .55em, 0) rotate(6deg) scale(.86);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0) scale(1);
  }
}

/* Nadie debería quedarse con texto invisible: si la animación no llega a
   ejecutarse (pestaña en segundo plano, fallo del observer), este respaldo la
   muestra igualmente pasados unos segundos. */
.mgm-anim .mgm-titular--forzado .mgm-palabra {
  opacity: 1;
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  /* Redundante con la comprobación de main.js (que ya no llega a añadir
     '.mgm-anim' en ese caso), pero una @media sí reacciona si el visitante
     cambia la preferencia del sistema a mitad de sesión, sin recargar. */
  .mgm-anim .mgm-palabra {
    opacity: 1;
    animation: none;
  }
}
