/* ========= Tokens del sitio ========= */
:root {
  /* paleta antigua
  --cyan-500: #24d0c0;
  --gray-logo: #696F75;
  --blue-logo: #3679FD;
  --gray-light: #D4E5ED; */

  --cyan-500: #3ca69b;
  --gray-logo: #696F75;
  --blue-logo: #225473;
  --gray-light: #D4E5ED;
  --verdecillo: #8abf88;

  --text: #0f172a;
  --text-weak: #334155;
  --border: #e5e7eb;
  --bg: #ffffff;

  --radius: 12px;
  --shadow-lg: 0 24px 60px rgba(0,0,0,.22);
  --z-header: 50;
  --z-overlay: 999;
  --z-modal: 1000;
}

/* ========= Base tipográfica ========= */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.4;
  font-size: 1.2rem;
}

/* ========= Estilos generales ========= */
h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin: 2.5rem auto 1.5rem;
  text-align: center;
  line-height: 1.3;
}
h2 {
  font-size: 2.4rem;
  font-weight: 800;
  margin: 2.5rem auto 1.5rem;  /* auto a los lados para centrar */
  text-align: center;
  max-width: 28ch;      /* ~32 caracteres por línea */
  color: var(--blue-logo);
  line-height: 1.3;
}
h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 6px;
  background: var(--cyan-500);
  margin: 0.8rem auto 0;
  border-radius: 3px;
}
h2:first-of-type {
  margin-bottom: 3.5rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border: 2px solid var(--blue-logo);
  color: var(--blue-logo);
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.2s ease;
}
.btn:hover {
  background-color: var(--blue-logo);
  color: white;
}
.btn-white {
  border-color: white;
  color: white;
  background-color: transparent;
}
.btn-white:hover {
  background-color: white;
  color: var(--blue-logo);
}
strong {
  font-weight: 700;
}
@media (min-width: 901px) {
  .two-columns {
    column-count: 2;
    column-gap: 3rem;
  }
  .two-columns p:first-child {
    margin: 0;
  }
  .one-column {
    max-width: 70ch;
    margin: 0 auto;
    text-align: justify;
  }
}
section > div.container {
  padding-bottom: 2rem;
}
.gray {
  background-color: var(--gray-light);
  padding-top: 1rem;
}
/* ========= Estilos generales Hero ========= */
.hero-generic {
  padding: 4rem 0;
  background-color: var(--blue-logo);
  position: relative; /* Necesario para que .hero-pattern (absolute) referencie a .hero */
}
.hero-generic h1 {
  color: white;
}
.hero-pattern {
  position: absolute; 
  inset: 0; 
  opacity: 0.5;
  background-image: url('/assets/img/hero-pattern.png');
  background-size: 1200px;
  background-position: center;
  background-repeat: repeat;
  pointer-events: none;
  width: 100%;
  height: 100%;
}
/* ========= Utilerías para alineación ========= */
.centercontent {
  display: flex;
  justify-content: center; /* centra horizontal */
  align-items: center;     /* centra vertical */
  flex-direction: column;  /* apila los elementos */
}

.vcenter {
  display: flex;
  flex-direction: column;
  justify-content: center; /* centra verticalmente */
  height: 100%;           /* ocupa toda la altura del contenedor padre */
}

.vcenter p {
  width: 100%;            /* ocupa todo el ancho disponible */
  margin: 0.5rem 0;       /* espacio entre párrafos */
}

.textalignright p {
  text-align: right;
}
.outline {
  outline: 1px solid red;
}

/* ========= Header ========= */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: #fff; border-bottom: 1px solid var(--border);
}
.header-bar { height: 72px; display: flex; align-items: center; gap: 24px; }
.brand img { height: 50px; width: auto; }

/* Nav desktop */
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 32px; }
.main-nav a {
  position: relative; display: inline-block; padding: 10px 0; text-decoration: none;
  color: var(--gray-logo); font-weight: 600;
}
.main-nav a:hover { color: var(--blue-logo); }
.main-nav a.active::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 6px; width: 100%; height: 3px; border-radius: 2px; background: var(--cyan-500);
}

/* Botón hamburguesa */
.hamburger {
  display: none; margin-left: auto;
  width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; cursor: pointer;
}
.hamburger-box { display: block; width: 24px; height: 16px; margin: 0 auto; position: relative; }
.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--text);
  border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.hamburger-inner { top: 50%; transform: translateY(-50%); }
.hamburger-inner::before { top: -6px; }
.hamburger-inner::after { top: 6px; }

.site-header.is-open .hamburger-inner { transform: translateY(-50%) rotate(45deg); }
.site-header.is-open .hamburger-inner::before { transform: rotate(-90deg) translateX(-6px); }
.site-header.is-open .hamburger-inner::after { opacity: 0; }

/* Nav móvil */
.mobile-nav {
  display: none; border-top: 1px solid var(--border); background: #fff;
}
.mobile-nav a {
  display: block; padding: 14px 24px; text-decoration: none; color: var(--gray-logo); font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.mobile-nav a:hover { background: #f8fafc; }
.mobile-nav a.active { color: var(--blue-logo); }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .hamburger { display: inline-flex; align-items: center; justify-content: center; }
  .mobile-nav { display: none; }
  .site-header.is-open .mobile-nav { display: block; }
}

/* === Modal (componente global) === */
.ui-modal{
  position:fixed; inset:0; display:grid; place-items:center; padding:24px;
  z-index: 1000; pointer-events:none; opacity:0; transition: opacity .18s ease;
}
.ui-modal.is-open{ opacity:1; pointer-events:auto; }
.ui-modal__panel{
  max-width:min(700px, 92vw); max-height:80vh; overflow:auto;
  background:#fff; border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.22);
  padding:24px; outline: none;
}
.ui-modal__header{ display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:12px; }
.ui-modal__title{ font-size:1.25rem; font-weight:800; margin:0; color:#0f172a; }
.ui-modal__close{ border:1px solid #e5e7eb; background:#fff; border-radius:8px; width:36px; height:36px; cursor:pointer; }
.ui-modal__body{ color:#334155; }

/* ===== Agenda una consulta ===== */
.agenda {
  background: linear-gradient(45deg, var(--blue-logo) 0%, var(--cyan-500) 60%);
  color: white;
}
.agenda h3 {
  font-size: 1.6rem;
}
p.agenda-cta {
  font-size: 2.5rem;
  font-weight: 500;
  margin: 1rem 0;
  line-height: 1.2;
}
.contact-icons {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  cursor: pointer;
}
.contact-icons img {
  height: 2.7rem;
  width: auto;
  transition-duration: 0.2s;
}
.contact-icons img:hover {
  transform: scale(1.2);
}
.contact-icons > a:first-child img {
  /* ajuste a icono whats */
  height: 2.2rem;
}

/* ==== Footer global ==== */
.site-footer{
  background:var(--gray-logo); 
  color:#e2e8f0;
}
.footer-inner{
  padding-top: 40px;
  padding-bottom: 40px;
  display:grid; gap:24px;
  grid-template-columns: 1fr;
}
@media (min-width:700px){
  .footer-inner{ grid-template-columns: 1fr 1fr; }
}
@media (min-width:1024px){
  .footer-inner{ grid-template-columns: 1.2fr 1fr 1fr 1fr; }
}

/* Brand */
.footer-logo{ height:50px; width:auto; display:block; margin-bottom:8px; }
.footer-copy{ font-size:12px; opacity:.8; margin:0; }

/* Columnas */
.footer-col{ min-width:0; }
.footer-title{
  font-size:14px; font-weight:800; letter-spacing:.01em;
  margin:0 0 10px; color:#f1f5f9;
}
.footer-list{ list-style:none; padding:0; margin:0; }
.footer-list li + li{ margin-top:8px; }

.footer-contact p{ margin:.25rem 0; }
.footer-contact a{
  color:#cbd5e1; text-decoration:none; border-bottom:1px solid transparent;
}
.footer-contact a:hover{ border-bottom-color:#cbd5e1; }

/* Links */
.site-footer a{
  color:#cbd5e1; text-decoration:none; border-bottom:1px solid transparent;
}
.site-footer a:hover{ border-bottom-color:#94a3b8; }

/* Línea inferior */
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.08);
  background:#0a1020;
  font-size: 0.9rem;
}
.footer-bottom-inner{
  display:flex; gap:16px; justify-content:space-between; align-items:center;
  color:#98a2b3;
  padding-top: 12px;
  padding-bottom: 12px;
}
.footer-bottom a{ color:#cbd5e1; }
.footer-bottom a:hover{ color:#e2e8f0; }

/* Accesibilidad: enfoque visible */
.site-footer a:focus{
  outline:2px solid #24d0c0; outline-offset:2px; border-bottom-color:transparent;
}


/* ========= Carousel ========= */
.carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
}

.carousel-item {
  flex: 0 0 calc(100% / var(--visible-items, 4));
  min-width: 0;
  padding: 0 1rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-item img {
  max-width: 100%;
  height: auto;
  transition: filter 0.3s ease;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}

.carousel-prev,
.carousel-next {
  pointer-events: auto;
  background: transparent;
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
  position: relative;
  /*border: 1px solid grey;*/
  opacity: 0.7;
}

@media (max-width: 768px) and (max-width: 768px){
  .carousel-item {
    padding: 0 0.5rem;
  }
  .carousel-prev,
  .carousel-next{
    display: none;
  }
}

.carousel-prev {
  left: -13px;
}

.carousel-next {
  right: -13px;
}

.carousel-prev:hover,
.carousel-next:hover {
  opacity: 1;
}

.carousel-prev img,
.carousel-next img {
  width: 55px;
  height: 55px;
  transition: transform 0.2s ease;
  position: absolute;
  top: 0;
  left: 0;
}

.carousel-prev:hover svg {
  transform: translateX(-2px);
}

.carousel-next:hover svg {
  transform: translateX(2px);
}

/* ===== Ajustes generales para moviles ===== */

@media (max-width: 900px) {
  p 
  {
    font-size: 1.25rem;
    line-height: 1.7;
  }
  .footer-title, .footer-list 
  {
    font-size: 1.25rem;
    line-height: 1.9;
  }
}