/* Óptica Victoria — estilos globales */

:root {
  --color-blue: #1367ee;
  --color-cream: #f6efe6;
  --color-white: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #6b7280;
  --color-whatsapp: #25d366;
  --font-main: "Nunito", sans-serif;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-nav: 0 2px 12px rgba(0, 0, 0, 0.08);
  --max-width: 1100px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero__orb {
    filter: none;
    opacity: 0.25;
  }
}

body {
  margin: 0;
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-white);
  overflow-x: hidden;
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--space-sm);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: 1.125rem;
}

p {
  margin: 0;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  z-index: 200;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-blue);
  color: var(--color-white);
  border-radius: var(--radius-md);
}

.skip-link:focus {
  top: var(--space-sm);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--color-blue);
  color: var(--color-white);
  border-color: var(--color-blue);
}

.btn--primary:hover {
  background: #0f52c4;
  border-color: #0f52c4;
  color: var(--color-white);
}

.btn--outline {
  background: transparent;
  color: var(--color-blue);
  border-color: var(--color-blue);
}

.btn--outline:hover {
  background: var(--color-blue);
  color: var(--color-white);
}

.btn--lg {
  padding: 0.875rem 1.5rem;
  font-size: 1.05rem;
}


.contacto__llamar {
  margin: var(--space-md) 0;
  width: 100%;
  max-width: 100%;
  text-align: center;
}

@media (min-width: 640px) {
  .contacto__llamar {
    width: auto;
  }
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-white);
  transition: box-shadow 0.2s ease;
}

.nav--scrolled {
  box-shadow: var(--shadow-nav);
}

.nav__logo {
  width: 120px;
  max-height: 48px;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.nav__logo-link {
  flex-shrink: 0;
}

.nav__logo-link:hover {
  text-decoration: none;
}

.nav__links {
  display: none;
  gap: var(--space-lg);
}

.nav__links a {
  color: var(--color-text);
  font-weight: 700;
}

.nav__links a:hover {
  color: var(--color-blue);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.nav__social {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-size: 1.35rem;
  color: var(--color-blue);
  border-radius: var(--radius-md);
}

.nav__social a:hover {
  color: #0f52c4;
  text-decoration: none;
  background: var(--color-cream);
}

.nav__cta {
  flex-shrink: 0;
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
}

.nav__cta-icon {
  font-size: 1.2rem;
}

.nav__cta--back {
  font-size: 0.85rem;
  padding: 0.45rem 0.75rem;
}

@media (max-width: 420px) {
  .nav__logo {
    width: 96px;
  }

  .nav__cta-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .nav__cta {
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
  }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 8vw, 5.5rem) 0;
  min-height: min(88vh, 920px);
  display: flex;
  align-items: center;
  background: linear-gradient(
    145deg,
    var(--color-cream) 0%,
    #eef4fe 42%,
    #dce8fd 78%,
    #c5d9fb 100%
  );
  text-align: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
}

.hero__orb--1 {
  width: min(420px, 70vw);
  height: min(420px, 70vw);
  top: -12%;
  right: -8%;
  background: radial-gradient(circle, rgba(19, 103, 238, 0.35) 0%, transparent 70%);
}

.hero__orb--2 {
  width: min(360px, 60vw);
  height: min(360px, 60vw);
  bottom: -15%;
  left: -10%;
  background: radial-gradient(circle, rgba(246, 239, 230, 0.9) 0%, transparent 70%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.hero__content {
  max-width: 36rem;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 auto var(--space-md);
  padding: 0.5rem 1rem;
  max-width: 100%;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-blue);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(19, 103, 238, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(19, 103, 238, 0.08);
}

.hero__badge-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  line-height: 1.35;
  text-align: left;
}

.hero__badge-line--accent {
  font-size: 0.9em;
  opacity: 0.9;
}

.hero__badge i {
  flex-shrink: 0;
  font-size: 1.1rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.hero__accent {
  color: var(--color-blue);
  display: inline-block;
}

.hero__subtitle {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: var(--color-muted);
  margin: 0 auto var(--space-md);
  max-width: 34ch;
  line-height: 1.55;
}

.hero__offer {
  position: relative;
  margin: 0 auto var(--space-lg);
  max-width: 26rem;
  padding: var(--space-md);
  text-align: left;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow:
    0 8px 32px rgba(19, 103, 238, 0.12),
    0 0 0 1px rgba(19, 103, 238, 0.08);
}

.hero__offer-tag {
  position: absolute;
  top: -0.65rem;
  left: var(--space-md);
  padding: 0.2rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-white);
  background: var(--color-blue);
  border-radius: 999px;
}

.hero__offer-text {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.5;
}

.hero__offer-text i {
  font-size: 1.35rem;
  color: var(--color-blue);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.hero__offer-copy {
  flex: 1;
  min-width: 0;
}

.hero__offer-copy strong {
  color: var(--color-blue);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .hero__content {
    width: 100%;
  }

  .hero__badge {
    width: 100%;
    justify-content: center;
    padding: 0.6rem 0.85rem;
    font-size: 0.78rem;
  }

  .hero__badge-text {
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 0;
  }

  .hero__badge-line {
    display: block;
  }

  .hero__offer {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 1.1rem 0.85rem 0.85rem;
  }

  .hero__offer-tag {
    left: 0.85rem;
  }

  .hero__offer-text {
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .hero__offer-copy strong {
    white-space: normal;
  }
}

@media (min-width: 641px) {
  .hero__badge {
    border-radius: 999px;
  }

  .hero__badge-text {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
  }

  .hero__badge-line--accent::before {
    content: "·";
    margin-right: 0.25rem;
  }
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: stretch;
  margin-bottom: var(--space-md);
}

.btn--hero-primary {
  box-shadow: 0 6px 24px rgba(19, 103, 238, 0.35);
}

.btn--hero-primary:hover {
  box-shadow: 0 8px 28px rgba(19, 103, 238, 0.45);
}

.btn--hero-secondary {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  color: var(--color-blue);
  border: 2px solid rgba(19, 103, 238, 0.25);
  font-weight: 700;
}

.btn--hero-secondary:hover {
  background: var(--color-white);
  border-color: var(--color-blue);
  color: var(--color-blue);
}

.btn__label-short {
  display: none;
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-muted);
}

.hero__trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hero__trust i {
  font-size: 1rem;
  color: var(--color-blue);
}

.hero__visual {
  display: flex;
  justify-content: center;
  width: 100%;
}

.hero__logo-card {
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  border-radius: calc(var(--radius-lg) + 8px);
  box-shadow:
    0 20px 50px rgba(19, 103, 238, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.hero__logo {
  width: min(260px, 65vw);
  border-radius: var(--radius-md);
}

@media (max-width: 520px) {
  .btn__label-full {
    display: none;
  }

  .btn__label-short {
    display: inline;
  }
}

.section-intro {
  text-align: center;
  color: var(--color-muted);
  max-width: 42ch;
  margin: -0.5rem auto var(--space-lg);
}

/* Servicios */
.servicios {
  padding: var(--space-xl) 0;
  background: var(--color-white);
}

.servicios__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.card {
  background: var(--color-cream);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  text-align: center;
}

.card__icon {
  font-size: 2rem;
  color: var(--color-blue);
  display: block;
  margin-bottom: var(--space-sm);
}

.card h3 {
  color: var(--color-blue);
  margin-bottom: var(--space-xs);
}

.card p {
  font-size: 0.9rem;
  color: var(--color-muted);
}

.card--highlight {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

.card--highlight strong {
  color: var(--color-blue);
}

/* Por qué */
.por-que {
  padding: var(--space-xl) 0;
  background: var(--color-blue);
  color: var(--color-white);
}

.por-que h2 {
  color: var(--color-cream);
}

.por-que__intro {
  text-align: center;
  color: rgba(246, 239, 230, 0.95);
  max-width: 48ch;
  margin: -0.5rem auto var(--space-lg);
}

.por-que__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.por-que__item {
  text-align: center;
}

.por-que__icon {
  font-size: 2.5rem;
  color: var(--color-cream);
  display: block;
  margin-bottom: var(--space-sm);
}

.por-que__item h3 {
  color: var(--color-white);
}

.por-que__item p {
  color: rgba(246, 239, 230, 0.9);
  max-width: 28ch;
  margin: 0 auto;
}

/* Instagram */
.instagram {
  padding: var(--space-xl) 0;
  background: var(--color-white);
}

.instagram__intro {
  text-align: center;
  color: var(--color-muted);
  margin: 0 auto var(--space-lg);
  max-width: 36ch;
}

.instagram__posts {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  justify-items: center;
}

.instagram__posts .instagram-media {
  background: var(--color-cream);
  border: 0;
  border-radius: var(--radius-lg);
  margin: 0 auto;
  max-width: 340px;
  min-width: 280px;
  width: 100%;
}

@media (min-width: 640px) {
  .instagram__posts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .instagram__posts {
    grid-template-columns: repeat(3, 1fr);
  }

  .instagram__posts .instagram-media {
    max-width: 100%;
  }
}

/* Contacto */
.contacto {
  padding: var(--space-xl) 0;
  background: var(--color-cream);
}

.contacto h2 {
  text-align: left;
  margin-bottom: var(--space-md);
}

.contacto__layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.contacto__list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.contacto__list i {
  font-size: 1.25rem;
  color: var(--color-blue);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.contacto__list a {
  font-weight: 700;
}

.contacto__horarios h3,
.contacto__redes h3 {
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
  color: var(--color-blue);
}

.contacto__horarios dl {
  margin: 0;
}

.contacto__horarios dl > div {
  margin-bottom: var(--space-xs);
}

.contacto__horarios dt {
  font-weight: 700;
}

.contacto__horarios dd {
  margin: 0 0 var(--space-sm);
  color: var(--color-muted);
}

.redes__list li {
  margin-bottom: var(--space-xs);
}

.redes__list a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

.redes__list i {
  font-size: 1.25rem;
}

.contacto__media {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contacto__foto {
  margin: 0;
}

.contacto__foto img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.contacto__foto figcaption {
  margin-top: var(--space-xs);
  font-size: 0.85rem;
  color: var(--color-muted);
  text-align: center;
}

.contacto__mapa iframe {
  width: 100%;
  height: 300px;
  border-radius: var(--radius-lg);
}

/* Footer */
.footer {
  background: var(--color-blue);
  color: var(--color-cream);
  padding: var(--space-lg) 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
}

.footer__logo {
  width: 100px;
  border-radius: var(--radius-md);
}

.footer__meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer__copy {
  margin: 0;
  font-size: 0.9rem;
}

.footer__legal {
  margin: 0;
  font-size: 0.85rem;
}

.footer__legal a {
  color: var(--color-cream);
}

.footer__legal a:hover {
  color: var(--color-white);
}

.footer__redes {
  display: flex;
  gap: var(--space-md);
}

.footer__redes a {
  color: var(--color-cream);
  font-size: 1.5rem;
  display: flex;
  padding: 0.25rem;
}

.footer__redes a:hover {
  color: var(--color-white);
  text-decoration: none;
}

/* WhatsApp float */
.whatsapp-float {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  right: calc(24px + env(safe-area-inset-right, 0px));
  z-index: 90;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-whatsapp);
  color: var(--color-white);
  border-radius: 50%;
  font-size: 1.75rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.05);
  text-decoration: none;
  color: var(--color-white);
}

/* Tablet */
@media (min-width: 640px) {
  .hero__actions {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  .servicios__grid {
    gap: var(--space-lg);
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .nav__links {
    display: flex;
  }

  .hero__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
    text-align: left;
  }

  .hero__content {
    flex: 1;
    max-width: 34rem;
  }

  .hero__subtitle {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
  }

  .hero__offer {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
  }

  .hero__actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .hero__trust {
    justify-content: flex-start;
  }

  .hero__visual {
    flex: 0 0 auto;
    width: auto;
  }

  .hero__logo {
    width: 300px;
  }

  .hero__logo-card {
    padding: var(--space-lg);
  }

  .servicios__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .por-que__grid {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-lg);
  }

  .por-que__item {
    flex: 1 1 200px;
    max-width: 240px;
  }

  .contacto__layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .contacto__info {
    flex: 1;
  }

  .contacto__media {
    flex: 1;
    min-width: 0;
  }

  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .footer__meta {
    flex: 1;
    text-align: center;
  }
}

/* Legal / privacidad */
.legal {
  padding: var(--space-lg) 0 var(--space-xl);
  background: var(--color-cream);
  min-height: 60vh;
}

.legal__content {
  max-width: 720px;
}

.legal h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  color: var(--color-blue);
  text-align: left;
  margin-bottom: var(--space-xs);
}

.legal__updated {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
}

.legal h2 {
  font-size: 1.2rem;
  text-align: left;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--color-blue);
}

.legal p,
.legal li {
  margin-bottom: var(--space-sm);
}

.legal ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: var(--space-md);
}
