/* =============================================
   VARIABLES & RESET
============================================= */
:root {
  --primary:        #3690b2;
  --primary-dark:   #2a7a9a;
  --primary-light:  #e3f2f9;
  --primary-xlight: #f5f9fc;
  --secondary:      #e89843;
  --secondary-dark: #d4872e;
  --secondary-pale: #f5c07a;
  --secondary-light:#fef3e6;
  --text-dark:      #1a2a35;
  --text-mid:       #4a6070;
  --text-muted:     #7a9aaa;
  --border:         #d6e8f0;
  --white:          #ffffff;
  --radius-sm:      6px;
  --radius-md:      10px;
  --radius-lg:      14px;
  --shadow-sm:      0 2px 8px rgba(54,144,178,0.08);
  --shadow-md:      0 6px 24px rgba(54,144,178,0.14);
  --transition:     0.25s ease;
  --font-display:   'Montserrat', sans-serif;
  --font-body:      'Lato', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

/* =============================================
   ACCESSIBILITY
============================================= */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =============================================
   LAYOUT
============================================= */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 80px 0;
}

.section--alt {
  background: var(--primary-xlight);
}

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

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

/* =============================================
   SECTION HEADERS
============================================= */
.section__tag {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 10px;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 10px;
}

.section__subtitle {
  font-size: 15px;
  color: var(--text-mid);
  margin-bottom: 44px;
  max-width: 540px;
}

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

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.10s; }
.reveal-delay-2 { transition-delay: 0.20s; }
.reveal-delay-3 { transition-delay: 0.30s; }
.reveal-delay-4 { transition-delay: 0.40s; }
.reveal-delay-5 { transition-delay: 0.50s; }

/* =============================================
   BUTTONS
============================================= */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius-md);
  padding: 11px 24px;
  cursor: pointer;
  border: none;
  outline: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

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

.btn--primary:hover {
  background: var(--primary-dark);
}

.btn--secondary {
  background: var(--secondary);
  color: var(--white);
}

.btn--secondary:hover {
  background: var(--secondary-dark);
}

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

.btn--outline-white:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* =============================================
   NAVBAR
============================================= */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--white);
  transition: box-shadow var(--transition);
}

#navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

/* Logo */
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__logo-svg {
  flex-shrink: 0;
}

.nav__logo-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  color: var(--primary);
  letter-spacing: 0.04em;
  line-height: 1;
}

.nav__logo-text span {
  color: var(--secondary);
}

.nav__logo-sub {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* Links */
.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav__links a {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.02em;
  position: relative;
  transition: color var(--transition);
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--secondary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.nav__links a:hover {
  color: var(--secondary);
}

.nav__links a:hover::after {
  transform: scaleX(1);
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

.nav__hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
.nav__mobile {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 12px 0 20px;
}

.nav__mobile.open {
  display: flex;
}

.nav__mobile a {
  padding: 13px 32px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  transition: background var(--transition);
}

.nav__mobile .btn--primary {
  color: white;
}

.nav__mobile a:hover {
  background: var(--primary-xlight);
}

.nav__mobile .btn {
  margin: 10px 32px 0;
  text-align: center;
}

/* =============================================
   HERO
============================================= */
#inicio {
  padding-top: 68px; /* altura del navbar */
}

#hero {
  /*background: linear-gradient(125deg, #3690b2 0%, #2a7a9a 50%, #1d607e 100%);*/
  background-image: url('./images/hero-bg.png');
  background-size: cover;
  background-position: center;
  padding: 90px 0 80px;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

#hero::after {
  content: '';
  position: absolute;
  right: 120px;
  bottom: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(232, 152, 67, 0.1);
  pointer-events: none;
}

.hero__badge {
  display: inline-block;
  background: rgba(232, 152, 67, 0.8);
  border: 1px solid rgba(232, 152, 67, 0.5);
  border-radius: 99px;
  padding: 5px 16px;
  font-size: 11px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 900;
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 18px;
  max-width: 540px;
}

.hero__title span {
  color: rgba(232, 152, 67);
}

.hero__desc {
  font-size: 16px;
  color: var(--text-mid);
  max-width: 430px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero__ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero__stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  align-items: center;
}

.hero__stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
}

.hero__stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  color: var(--secondary-pale);
}

.hero__stat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}

/* =============================================
   SERVICIOS
============================================= */
.service-card {
  background: var(--primary-xlight);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.service-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 22px;
  color: var(--primary);
  transition: background var(--transition), color var(--transition);
}

.service-card:hover .service-card__icon {
  background: var(--primary);
  color: var(--white);
}

.service-card__title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.service-card__desc {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.65;
}

/* =============================================
   SOBRE NOSOTROS
============================================= */
.about__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about__text {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 18px;
}

.about__photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.about__photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  background: var(--primary-light);
  border: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 8px;
}

.about__photo-placeholder i {
  font-size: 38px;
  color: var(--primary);
  opacity: 0.35;
}

/* Certificaciones */
.cert__heading {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.cert__heading i {
  font-size: 18px;
  color: var(--secondary);
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.cert-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.cert-card__icon {
  min-width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 20px;
}

.cert-card__title {
  font-weight: 700;
  font-size: 13px;
  color: var(--primary);
}

.cert-card__sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.cert-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--secondary-light);
  border: 1px solid #f5d5a8;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 6px;
  font-size: 12px;
  color: #a06820;
  line-height: 1.6;
}

.cert-notice i {
  font-size: 16px;
  color: var(--secondary);
  min-width: 16px;
  margin-top: 1px;
}

/* =============================================
   GALERÍA
============================================= */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 14px;
}

.gallery__item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--primary-light);
  cursor: pointer;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery__item:hover img {
  transform: scale(1.05);
}

.gallery__item--tall {
  grid-row: span 2;
}

.gallery__placeholder {
  width: 100%;
  height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.gallery__item--tall .gallery__placeholder {
  height: 374px;
}

.gallery__placeholder i {
  font-size: 32px;
  color: var(--primary);
  opacity: 0.35;
}

.gallery__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(22, 60, 80, 0.78));
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  padding: 32px 14px 12px;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery__item:hover .gallery__caption {
  opacity: 1;
}

/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 35, 0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

#lightbox.open {
  display: flex;
}

#lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  object-fit: contain;
}

#lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: var(--white);
  font-size: 32px;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  transition: opacity var(--transition);
}

#lightbox-close:hover {
  opacity: 0.7;
}

/* =============================================
   POR QUÉ NOSOTROS
============================================= */
.why-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.why-item__icon {
  min-width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.why-item__icon--blue {
  background: var(--primary-light);
  color: var(--primary);
}

.why-item__icon--orange {
  background: var(--secondary-light);
  color: var(--secondary);
}

.why-item__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 5px;
}

.why-item__desc {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.65;
}

/* =============================================
   CONTACTO
============================================= */
.contact__layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 52px;
  align-items: start;
}

/* Formulario */
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.form__group {
  margin-bottom: 14px;
}

.form__input,
.form__select,
.form__textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-dark);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: var(--text-muted);
}

.form__select {
  color: var(--text-muted);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a9aaa' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form__select option {
  color: var(--text-dark);
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(54, 144, 178, 0.12);
}

.form__textarea {
  resize: vertical;
  min-height: 115px;
}

.form__submit {
  width: 100%;
  padding: 14px;
  font-size: 14px;
  margin-top: 4px;
}

.form__feedback {
  display: none;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  align-items: center;
  gap: 8px;
}

.form__feedback.visible {
  display: flex;
}

.form__feedback--success {
  background: #e6f4ea;
  border: 1px solid #a8d5b5;
  color: #2d6a4a;
}

.form__feedback--error {
  background: #fdecea;
  border: 1px solid #f5b8b5;
  color: #8b2020;
}

/* Info lateral */
.contact__info-item {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}

.contact__info-icon {
  min-width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 22px;
}

.contact__info-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact__info-value {
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
  margin-top: 2px;
}

.contact__hours {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border);
  margin-top: 10px;
}

.contact__hours-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 12px;
}

.contact__hours table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.contact__hours td {
  padding: 5px 0;
  color: var(--text-mid);
}

.contact__hours td:last-child {
  text-align: right;
  font-weight: 700;
  color: var(--text-dark);
}

.contact__hours .urgent {
  color: var(--secondary);
  font-weight: 700;
}

/* =============================================
   FOOTER
============================================= */
footer {
  background: var(--primary);
  padding: 26px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
  color: var(--white);
  letter-spacing: 0.04em;
}

.footer__logo span {
  color: var(--secondary-pale);
}

.footer__links {
  display: flex;
  gap: 22px;
}

.footer__links a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.footer__copy {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
}

/* =============================================
   RESPONSIVE — TABLET (≤ 900px)
============================================= */
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .about__layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .contact__layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

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

  .gallery__item--tall {
    grid-row: span 1;
  }

  .gallery__item--tall .gallery__placeholder {
    height: 180px;
  }
}

/* =============================================
   RESPONSIVE — MOBILE (≤ 650px)
============================================= */
@media (max-width: 650px) {
  .container {
    padding: 0 20px;
  }

  .section {
    padding: 56px 0;
  }

  /* Navbar */
  .nav__links {
    display: none;
  }

  .nav__btn-desktop {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  /* Grids */
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  /* Hero */
  .hero__stats {
    gap: 20px;
  }

  .hero__stat-divider {
    display: none;
  }

  /* Form */
  .form__row {
    grid-template-columns: 1fr;
  }

  /* Gallery */
  .gallery__grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer__links {
    justify-content: center;
  }
}

/* =============================================
   WHATSAPP FLOTANTE
============================================= */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.whatsapp-float:hover {
  background: #1ebe5d;
  transform: scale(1.12) rotate(-8deg);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.55);
}

@media (max-width: 650px) {
  .whatsapp-float {
    bottom: 18px;
    right: 18px;
    width: 50px;
    height: 50px;
  }
}
