/* ============ VARIABLES ============ */
:root {
  --navy: #0a1a5c;
  --navy-2: #0a2a6b;
  --teal: #12b5a5;
  --bg-soft: #eef5fb;
  --bg-contact: #e3edf4;
  --text: #1c2540;
  --muted: #5b6785;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(20, 50, 110, .08);
  --font-title: "Josefin Sans", sans-serif;
  --font-body: "Poppins", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
}

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

/* ============ BOTONES ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .85rem 1.8rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 500;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(10, 26, 92, .25);
}

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

.btn--outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}

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

.btn--dark {
  background: var(--navy);
  color: #fff;
  font-family: var(--font-title);
  font-size: 1.3rem;
  letter-spacing: .08em;
  padding: .9rem 2.6rem;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .04);
}

.btn--lg {
  font-size: 1.4rem;
  letter-spacing: .03em;
  padding: 1rem 2.4rem;
}

/* ============ HEADER ============ */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  transition: background .3s, box-shadow .3s, padding .3s;
}

.header.is-scrolled {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .06);
  padding-block: .6rem;
}

.header__nav {
  display: flex;
  gap: 2.4rem;
  margin-right: 3rem;
  font-family: var(--font-title);
  font-size: 1.15rem;
  letter-spacing: .04em;
  color: var(--navy);
}

.header__nav a {
  position: relative;
  padding-bottom: 2px;
}

.header__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--teal);
  transition: width .3s;
}

.header__nav a:hover::after,
.header__nav a.active::after {
  width: 100%;
}

.header__burger {
  display: none;
  background: none;
  width: 30px;
  height: 22px;
  position: relative;
}

.header__burger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--navy);
  transition: .3s;
}

.header__burger span:nth-child(1) {
  top: 0;
}

.header__burger span:nth-child(2) {
  top: 10px;
}

.header__burger span:nth-child(3) {
  top: 20px;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 8.5rem 0 0;
  background: linear-gradient(180deg, #e6f1f8 0%, #f4f9fc 100%);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: -40px 0 0 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .9), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(160, 200, 225, .45), transparent 50%),
    url("assets/hero-bg.jpg") center/cover;
  opacity: .55;
  filter: blur(2px);
  will-change: transform;
}

.hero__inner {
  position: relative;
  width: min(1100px, 92%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 2rem;
}

.hero__brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 2rem;
}

.hero__mark {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.hero__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Marcador visual cuando todavía no subes la imagen (se quita solo al cargar la imagen) */
.is-empty {
  outline: 2px dashed rgba(10, 42, 107, .35);
  outline-offset: -2px;
  border-radius: 14px;
}

.is-empty::after {
  content: "Tu imagen";
  font-size: .6rem;
  color: var(--muted);
  text-align: center;
}

.hero__name {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.hero__dr {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: .12em;
  color: var(--navy-2);
}

.hero__surname {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: .14em;
  color: var(--teal);
}

.hero__title {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.2vw, 1.5rem);
  color: var(--navy);
  letter-spacing: .03em;
  margin-bottom: .6rem;
}

.hero__text {
  font-size: 1rem;
  font-style:normal;
  color: var(--text);
  margin-bottom: 1.7rem;
  max-width: 460px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero__photo {
  justify-self: center;
  width: min(340px, 80%);
  aspect-ratio: 3/4;
  border-radius: 170px 170px 14px 14px;
  overflow: hidden;
  background: linear-gradient(160deg, #cfe3f1, #9cc0d9);
  box-shadow: var(--shadow);
  will-change: transform;
}

.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__info {
  position: relative;
  width: min(990px, 99%);
  margin: 2.5rem auto 0;
  transform: translateY(0);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-radius: 22px 22px 0 0;
  background: rgba(214, 232, 245, .8);
  backdrop-filter: blur(6px);
}

.info-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .2rem 1rem;
}

.info-item+.info-item {
  border-left: 1px solid rgba(10, 42, 87, .2);
}

.info-item strong {
  display: block;
  font-size: 1rem;
  color: var(--navy-2);
  font-weight: 600;
}

.info-item small {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.3;
  display: block;
}

.ogma-logo {
  width: 100px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.ogma-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ============ TÍTULOS ============ */
.section-title {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: .1em;
  text-align: center;
  color: var(--navy);
}

.section-title span {
  display: inline-block;
  font-weight: 600;
  border-bottom: 3px solid var(--teal);
  padding-bottom: 2px;
}

.section-title--teal {
  color: var(--teal);
  border-bottom: 3px solid var(--teal);
  display: table;
  margin-inline: auto;
  padding-bottom: 4px;
}

.section-subtitle {
  text-align: center;
  font-family: var(--font-title);
  font-size: 1.2rem;
  letter-spacing: .06em;
  color: var(--navy);
  margin: .6rem 0 2.2rem;
}

/* ============ SERVICIOS ============ */
.services {
  padding: 4rem 0 5rem;
  background: linear-gradient(180deg, #f4f9fc, #e8f1f8);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem 1.2rem;
  align-items: start;
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  padding: 1.6rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s;
}

.card__main {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 38px rgba(20, 50, 110, .14);
}

.card__icon {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, #d4e9f4 70%);
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .6);
}

.card__icon img {
  width: 55%;
  height: 55%;
  object-fit: contain;
}

.card__icon.is-empty {
  border-radius: 50%;
}

/* ---- Desplegable "Conocer más" ---- */
.card__more {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s ease, margin-top .45s ease;
}

.card__more>div {
  overflow: hidden;
  min-height: 0;
}

.card.is-open .card__more {
  grid-template-rows: 1fr;
  margin-top: 1.2rem;
}

.card__more ul {
  padding: .2rem .3rem .3rem;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .4s .1s, transform .4s .1s;
}

.card.is-open .card__more ul {
  opacity: 1;
  transform: none;
}

.card__more li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: .55rem;
  font-size: .88rem;
  font-style: normal;
  color: #333;
  line-height: 1.55;
}

.card__more li::before {
  content: "-";
  position: absolute;
  left: 0;
}

.card h3 {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.75rem;
  color: var(--navy);
  margin-bottom: .3rem;
}

.card p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: .7rem;
}

.card__link {
  background: none;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 500;
  color: var(--navy-2);
  border-bottom: 1.5px solid var(--teal);
  padding: 0 0 1px;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
}

.card__link .arrow {
  display: inline-block;
  transition: transform .3s;
}

.card__link:hover .arrow {
  transform: translateX(5px);
}

/* Al abrir, la flecha → gira y se convierte en ↓ */
.card.is-open .card__link .arrow,
.card.is-open .card__link:hover .arrow {
  transform: rotate(90deg);
}

/* ============ SOBRE MÍ ============ */
.about {
  padding: 4.5rem 0 3rem;
  background: #fff;
}

.about__inner {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 3.5rem;
  align-items: center;
}

.about__photo {
  position: relative;
  isolation: isolate;
  aspect-ratio: 4/5;
  border-radius: 150px 150px 14px 14px;
  overflow: hidden;
  background: linear-gradient(160deg, #c8d6e6, #8ea6c4);
  box-shadow: var(--shadow);
}

/* ---- Carrusel automático ---- */
.carousel__track {
  display: flex;
  height: 100%;
  transition: transform .9s cubic-bezier(.65, 0, .35, 1);
  will-change: transform;
}

.carousel__slide {
  flex: 0 0 100%;
  height: 100%;
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  color: var(--navy);
  font-size: 1.6rem;
  line-height: 1;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .3s, background .3s;
}

.carousel__btn--prev {
  left: 12px;
}

.carousel__btn--next {
  right: 12px;
}

.about__photo:hover .carousel__btn,
.carousel__btn:focus-visible {
  opacity: 1;
}

.carousel__btn:hover {
  background: #fff;
}

.carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: .5rem;
}

.carousel__dots button {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .6);
  transition: width .3s, background .3s;
}

.carousel__dots button.active {
  width: 26px;
  background: #fff;
}

.about__photo.is-single .carousel__btn,
.about__photo.is-single .carousel__dots {
  display: none;
}

.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.about__eyebrow {
  font-family: var(--font-title);
  color: var(--teal);
  letter-spacing: .1em;
  font-size: 1rem;
  display: block;
}

.about__title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  letter-spacing: 0.13em;
  color: var(--navy);
  line-height: 1.25;
  margin: .3rem 0 .8rem;
}

.about__role {
  font-weight: 400;
  font-size: 1.65rem;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 1.4rem;
}

.about__text {
  font-size: 1rem;
  letter-spacing: .08em;
  line-height: 1.9;
  margin-bottom: 1.4rem;
}

.about__list li {
  font-size: .85rem;
  letter-spacing: .08em;
  margin: .8rem 0 .8rem 4.5rem;
  position: relative;
}

.about__list li::before {
  content: "•";
  position: absolute;
  left: -.9rem;
}

.about__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
}

/* ============ CONTACTO ============ */
.contact {
  padding: 4rem 0 4.5rem;
  background: var(--bg-contact);
}

.contact__subtitle {
  text-align: center;
  font-family: var(--font-title);
  font-style: normal;
  letter-spacing: .08em;
  font-size: 1.55rem;
  color: var(--navy);
  margin: 1.4rem 0 2rem;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.office {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1rem;
  background: #fff;
  padding: 1.6rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  align-items: center;
  transition: transform .3s;
}

.office:hover {
  transform: translateY(-5px);
}

.office h3 {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--teal);
  margin-bottom: .8rem;
}

.office li {
  display: flex;
  gap: .6rem;
  margin-bottom: .6rem;
  align-items: flex-start;
}

.office .ico {
  font-size: 1rem;
  width: 30px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e3f0f8;
  flex-shrink: 0;
}

.office strong {
  display: block;
  font-size: 1.2rem;
  color: var(--navy);
}

.office small {
  display: block;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.85;
}

.office li a {
  font-size: 1rem;
  color: #1a6fd1;
}

.office__map {
  position: relative;
  height: 120px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .55) 2px, transparent 2px) 0 0/34px 34px,
    linear-gradient(0deg, rgba(255, 255, 255, .55) 2px, transparent 2px) 0 0/34px 34px,
    #dfe8d6;
  transition: transform .3s;
}

.office__map:hover {
  transform: scale(1.04);
}

* Contenedor principal de la tarjeta */
.office {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: #ffffff;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  max-width: 650px; /* Ajusta según el ancho de tu diseño */
}

/* Ajuste para el texto */
.office__info {
  flex: 1;
}

/* Estilos específicos para la miniatura del mapa */
.office__map {
  width: 220px; /* Ancho idéntico al de la imagen */
  height: 290px; /* Alto idéntico al de la imagen */
  border-radius: 12px;
  overflow: hidden; /* Corta los bordes rectos del iframe */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); /* Sombra suave para el mapa */
  flex-shrink: 0; /* Evita que el mapa se deforme en pantallas pequeñas */
}

.pin {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  background: #e53935;
  border-radius: 50% 50% 50% 0;
  transform: translate(-50%, -50%) rotate(-45deg);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .3);
}

.contact__notes {
  text-align: center;
  margin: 2.6rem auto 2rem;
  max-width: 600px;
}

.contact__notes p {
  font-family: var(--font-title);
  font-size: 1.35rem;
  letter-spacing: .02em;
  color: var(--navy);
  margin-bottom: 1.4rem;
  line-height: 1.5;
}

.contact__cta {
  text-align: center;
}

/* ============ REDES ============ */
.social {
  padding: 4.5rem 1rem 5rem;
  text-align: center;
}

.social h2 {
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: .12em;
  font-size: 1.2rem;
  margin-bottom: 1.4rem;
}

.social__icons {
  display: flex;
  justify-content: center;
  gap: .9rem;
}

.social__icons a {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #000;
  display: grid;
  place-items: center;
  transition: transform .25s, background .25s;
}

.social__icons a:hover {
  transform: translateY(-4px) scale(1.08);
  background: var(--navy);
}

/* ============ WHATSAPP FLOTANTE ============ */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 28px;
  z-index: 60;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25d366;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(37, 211, 102, .45);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, .55);
  }

  70% {
    box-shadow: 0 0 0 16px rgba(37, 211, 102, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* ============ ANIMACIONES SCROLL ============ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0s);
}

.reveal--scale {
  transform: scale(.92) translateY(20px);
}

.reveal--left {
  transform: translateX(-40px);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Hero: la foto usa parallax vía JS, así que se anima aparte */
.hero__photo.reveal.is-visible {
  transform: translateY(var(--py, 0px));
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .header {
    padding: .8rem 1.2rem;
  }

  .header__burger {
    display: block;
  }

  .header__nav {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    background: #fff;
    margin: 0;
    transition: right .35s;
    box-shadow: -10px 0 30px rgba(0, 0, 0, .1);
  }

  .header__nav.open {
    right: 0;
  }

  .hero__inner,
  .about__inner {
    grid-template-columns: 1fr;
  }

  .hero__photo {
    order: -1;
    width: 240px;
  }

  .hero__brand {
    justify-content: center;
  }

  .hero__content {
    text-align: center;
  }

  .hero__text {
    margin-inline: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__info {
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .info-item+.info-item {
    border-left: 0;
    border-top: 1px solid rgba(10, 42, 107, .2);
  }

  .services__grid,
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .card__main {
    flex-direction: column;
    text-align: center;
  }

  .carousel__btn {
    opacity: 1;
  }

  .about__photo {
    max-width: 340px;
    margin-inline: auto;
  }

  .about__list li {
    margin-left: 1.5rem;
  }

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

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}