/* ============================================================
   Óptica del Rey — Estilo
   Paleta: azul #1567C6 · teal #24AEB5 (identidad de la óptica)
   ============================================================ */

:root {
  --azul: #1567C6;
  --azul-oscuro: #0d4a92;
  --teal: #24AEB5;
  --bg: #F4F8FC;
  --blanco: #ffffff;
  --txt: #1C2733;
  --txt-suave: #5B6B7C;
  --sombra: 0 10px 30px rgba(21, 103, 198, .10);
  --sombra-alta: 0 20px 50px rgba(13, 74, 146, .18);
  --radio: 18px;
  --gradiente: linear-gradient(110deg, var(--azul), var(--teal));
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--txt);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.contenedor {
  width: min(1160px, 92%);
  margin-inline: auto;
}

.gradiente {
  background: var(--gradiente);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Etiqueta y texto en degradado sobre fondos oscuros (hero y contacto) */
.hero .etiqueta,
.contacto .etiqueta {
  color: #dff6ff;
  background: rgba(255, 255, 255, .16);
}
.hero .gradiente,
.contacto .gradiente {
  background: linear-gradient(100deg, #8ef1e7, #d3e9ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.etiqueta {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--azul);
  background: rgba(21, 103, 198, .08);
  padding: .4rem .9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.etiqueta--clara { color: #cfe8ff; background: rgba(255, 255, 255, .14); }

/* ---------- Iconos SVG (en lugar de emojis) ---------- */
.ico {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: -0.15em;
  flex: none;
}
.etiqueta .ico { width: 1.2em; height: 1.2em; }
.sucursal__ciudad .ico { width: 1.05em; height: 1.05em; margin-right: .15rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font: inherit;
  font-weight: 700;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn--brillo {
  background: var(--gradiente);
  color: #fff;
  box-shadow: 0 8px 22px rgba(36, 174, 181, .35);
}
.btn--brillo:hover { box-shadow: 0 14px 30px rgba(36, 174, 181, .45); }
.btn--ghost {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .45);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .22); }
.btn--peq { padding: .55rem 1.2rem; font-size: .9rem; }
.btn--claro { background: #fff; color: var(--azul-oscuro); box-shadow: var(--sombra-alta); }
.btn--claro-ghost { color: #fff; border-color: rgba(255,255,255,.5); background: transparent; }

/* ---------- Navegación ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
}
.nav--fijo {
  background: rgba(13, 74, 146, .92);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
  padding: .6rem 0;
}
.nav__interior { display: flex; align-items: center; gap: 1.5rem; }
.nav__logo img { height: 40px; width: auto; }
.nav__enlaces { display: flex; gap: 1.4rem; margin-left: auto; }
.nav__enlaces a {
  color: #eaf4ff;
  font-weight: 600;
  font-size: .95rem;
  position: relative;
  padding: .25rem 0;
}
.nav__enlaces a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: width .25s ease;
}
.nav__enlaces a:hover::after { width: 100%; }
.nav__cta { padding: .55rem 1.2rem; font-size: .9rem; }
.nav__burguer { display: none; background: none; border: 0; cursor: pointer; }
.nav__burguer span {
  display: block; width: 26px; height: 3px; margin: 5px auto;
  background: #fff; border-radius: 2px; transition: .3s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 9.5rem 0 7rem;
  color: #fff;
  overflow: hidden;
}
.hero__fondo {
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 500px at 85% 10%, rgba(36,174,181,.55), transparent 60%),
    radial-gradient(900px 600px at 10% 90%, rgba(11,58,120,.85), transparent 60%),
    linear-gradient(135deg, #0b3a78, #1567C6 55%, #1c8f96);
}
.hero__brillo {
  position: absolute;
  width: 520px; height: 520px;
  top: -180px; right: -120px;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 65%);
  animation: flotar 9s ease-in-out infinite;
}
@keyframes flotar {
  50% { transform: translate(-40px, 40px) scale(1.08); }
}
.hero__interior {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 3rem;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 1.1rem;
}
.hero p { font-size: 1.1rem; color: #dcecfb; max-width: 34rem; }
.hero__botones { display: flex; flex-wrap: wrap; gap: .9rem; margin: 1.8rem 0 1.6rem; }
.hero__datos {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: .5rem 1.6rem;
  font-size: .92rem; color: #cfe4f8;
}
.hero__datos strong { color: #fff; }

.hero__visual { position: relative; }
.hero__visual img {
  border-radius: 26px;
  box-shadow: var(--sombra-alta);
  position: relative; z-index: 2;
}
.hero__aro {
  position: absolute;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, .35);
  z-index: 1;
}
.hero__aro--1 { width: 180px; height: 180px; top: -50px; left: -50px; animation: girar 26s linear infinite; }
.hero__aro--2 { width: 120px; height: 120px; bottom: -40px; right: -30px; animation: girar 18s linear infinite reverse; }
@keyframes girar { to { transform: rotate(360deg); } }

.hero__onda { position: absolute; left: 0; right: 0; bottom: -1px; line-height: 0; }
.hero__onda svg { width: 100%; height: 90px; display: block; }

/* ---------- Secciones ---------- */
.seccion { padding: 5.5rem 0; }
.seccion--alterna { background: var(--blanco); }
.seccion__cabecera { text-align: center; max-width: 42rem; margin: 0 auto 3rem; }
.seccion__cabecera h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: .6rem;
}
.seccion__cabecera p { color: var(--txt-suave); font-size: 1.05rem; }

/* ---------- Rejillas y tarjetas ---------- */
.rejilla { display: grid; gap: 1.6rem; }
.rejilla--4 { grid-template-columns: repeat(4, 1fr); }
.rejilla--3 { grid-template-columns: repeat(3, 1fr); }

.tarjeta {
  background: var(--blanco);
  border-radius: var(--radio);
  padding: 1.8rem 1.5rem;
  box-shadow: var(--sombra);
  border: 1px solid rgba(21, 103, 198, .07);
  transition: transform .25s ease, box-shadow .25s ease;
}
.seccion--alterna .tarjeta { background: var(--bg); }
.tarjeta:hover { transform: translateY(-8px); box-shadow: var(--sombra-alta); }
.tarjeta__icono {
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: var(--gradiente);
  box-shadow: 0 8px 18px rgba(21, 103, 198, .3);
  margin-bottom: 1rem;
}
.tarjeta__icono svg {
  width: 28px; height: 28px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tarjeta h3 { font-size: 1.12rem; margin-bottom: .45rem; }
.tarjeta p { color: var(--txt-suave); font-size: .95rem; }

/* ---------- Productos ---------- */
.producto {
  background: var(--bg);
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra);
  transition: transform .25s ease, box-shadow .25s ease;
}
.seccion--alterna .producto { background: var(--blanco); }
.producto:hover { transform: translateY(-8px); box-shadow: var(--sombra-alta); }
.producto__media { aspect-ratio: 5 / 3.4; overflow: hidden; }
.producto__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.producto:hover .producto__media img { transform: scale(1.07); }
.producto__cuerpo { padding: 1.4rem 1.5rem 1.7rem; }
.producto__cuerpo h3 { margin-bottom: .4rem; }
.producto__cuerpo p { color: var(--txt-suave); font-size: .95rem; }

.nota-precio {
  margin-top: 2.4rem;
  text-align: center;
  background: var(--gradiente);
  color: #fff;
  border-radius: var(--radio);
  padding: 1.1rem 1.5rem;
  font-size: 1rem;
  box-shadow: 0 12px 28px rgba(21, 103, 198, .28);
}

/* ---------- Banda de promoción ---------- */
.promo {
  background:
    radial-gradient(760px 320px at 12% 0%, rgba(36, 174, 181, .55), transparent 62%),
    linear-gradient(125deg, #0b3a78, #1567C6 55%, #1c8f96);
  color: #fff;
  padding: 3.4rem 0;
}
.promo__interior {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 1.8rem;
  align-items: center;
}
.promo__ico {
  width: 66px; height: 66px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .32);
}
.promo__ico svg {
  width: 32px; height: 32px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.promo__marca {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  padding: .28rem .8rem;
  border-radius: 999px;
  margin-bottom: .5rem;
}
.promo__texto h2 {
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.01em;
}
.promo__texto p { color: #d9ecfb; font-size: .95rem; margin-top: .35rem; }
.promo__precio {
  background: #fff;
  color: var(--azul-oscuro);
  padding: .85rem 1.7rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .22);
}
.promo__precio small {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--txt-suave);
}
.promo__precio strong { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.promo__btn { white-space: nowrap; }

/* ---------- Sucursales ---------- */
.sucursal {
  background: var(--blanco);
  border-radius: var(--radio);
  padding: 1.9rem 1.6rem;
  box-shadow: var(--sombra);
  border-top: 5px solid transparent;
  border-image: var(--gradiente) 1;
  border-image-slice: 1;
  display: flex; flex-direction: column; gap: .7rem;
}
.sucursal__ciudad {
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: .35rem;
}
.sucursal__dir { color: var(--txt-suave); font-size: .95rem; }
.sucursal__horario { font-size: .98rem; margin-top: auto; padding-top: .4rem; }
.sucursal__horario p + p { margin-top: .55rem; }
.sucursal__horario strong { letter-spacing: .01em; }
.sucursal--principal { background: linear-gradient(150deg, #0d4a92, #1567C6); color: #fff; }
.sucursal--principal .sucursal__dir { color: #cfe4f8; }

/* ---------- Nosotros ---------- */
.nosotros { display: grid; grid-template-columns: .95fr 1.05fr; gap: 3.2rem; align-items: center; }
.nosotros__img img { border-radius: 24px; box-shadow: var(--sombra-alta); }
.nosotros__texto h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; margin-bottom: 1rem; }
.nosotros__texto > p { color: var(--txt-suave); margin-bottom: 1.2rem; }
.checklist { list-style: none; margin-bottom: 1.8rem; display: grid; gap: .55rem; }
.checklist li { padding-left: 1.9rem; position: relative; font-weight: 600; }
.checklist li::before {
  content: '✓';
  position: absolute; left: 0; top: 0;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  font-size: .75rem; color: #fff;
  background: var(--gradiente);
  border-radius: 50%;
}

/* ---------- FAQ ---------- */
.faq { max-width: 46rem; }
.faq__item {
  background: var(--blanco);
  border-radius: 14px;
  box-shadow: var(--sombra);
  padding: 1.1rem 1.4rem;
  margin-bottom: .9rem;
}
.faq__item summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 2rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: '+';
  position: absolute; right: 0; top: -.1rem;
  font-size: 1.4rem; color: var(--azul);
  transition: transform .25s ease;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { margin-top: .6rem; color: var(--txt-suave); }

/* ---------- Contacto ---------- */
.contacto {
  background:
    radial-gradient(900px 400px at 90% 0%, rgba(36,174,181,.5), transparent 60%),
    linear-gradient(130deg, #0b3a78, #1567C6 60%, #1c8f96);
  color: #fff;
  padding: 5.5rem 0;
}
.contacto__interior { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.contacto h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 800; margin-bottom: .8rem; }
.contacto__texto > p { color: #d6e8fa; max-width: 30rem; }
.contacto__lista { list-style: none; margin-top: 1.6rem; display: grid; gap: .8rem; }
.contacto__lista a {
  display: inline-flex; align-items: center; gap: .7rem;
  font-weight: 600;
  padding: .5rem .9rem .5rem .5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .18);
  transition: background .2s ease, transform .2s ease;
}
.contacto__lista a:hover { background: rgba(255, 255, 255, .2); transform: translateX(5px); }
.contacto__icono {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .18);
  border-radius: 50%;
}
.contacto__icono svg {
  width: 17px; height: 17px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.redes { display: flex; gap: .7rem; margin-top: 1.6rem; }
.redes a {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  transition: background .2s ease, transform .2s ease;
}
.redes a:hover { background: #fff; color: var(--azul-oscuro); transform: translateY(-4px); }

.contacto__cta {
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 26px;
  padding: 2.6rem 2.2rem;
  text-align: center;
  backdrop-filter: blur(10px);
}
.contacto__cta img { margin: 0 auto 1.2rem; height: 56px; width: auto; }
.contacto__cta p { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.4rem; }
.contacto__cta .btn { width: 100%; justify-content: center; margin-bottom: .8rem; }

/* ---------- Footer ---------- */
.pie { background: #072a55; color: #b9d4ee; padding: 1.8rem 0; text-align: center; font-size: .9rem; }
.pie a { color: #fff; text-decoration: underline; }
.pie__sub { opacity: .8; font-size: .82rem; margin-top: .25rem; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 60px; height: 60px;
  display: grid; place-items: center;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 10px 26px rgba(37, 211, 102, .45);
  z-index: 90;
  transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.1); }

/* ---------- Animación de aparición ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .rejilla--4 { grid-template-columns: repeat(2, 1fr); }
  .hero__interior, .nosotros, .contacto__interior { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .promo__interior { grid-template-columns: auto 1fr; gap: 1.2rem 1.4rem; }
  .promo__precio, .promo__btn { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 760px) {
  .rejilla--3 { grid-template-columns: 1fr; }
  .nav__enlaces {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(300px, 78%);
    flex-direction: column;
    background: #0d4a92;
    padding: 6rem 2rem 2rem;
    gap: 1.2rem;
    transform: translateX(100%);
    transition: transform .3s ease;
    box-shadow: -10px 0 40px rgba(0,0,0,.3);
  }
  .nav__enlaces.abierto { transform: none; }
  .nav__cta { display: none; }
  .nav__burguer { display: block; margin-left: auto; }
  .nav__burguer.activo span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav__burguer.activo span:nth-child(2) { opacity: 0; }
  .nav__burguer.activo span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .hero { padding: 7.5rem 0 5rem; }
  .seccion { padding: 4rem 0; }
}

@media (max-width: 480px) {
  .rejilla--4 { grid-template-columns: 1fr; }
  .hero__botones .btn { width: 100%; justify-content: center; }
  .promo__interior { grid-template-columns: 1fr; text-align: left; }
  .promo__precio, .promo__btn { grid-column: auto; width: 100%; justify-self: stretch; }
  .promo__btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
