/* =========================================================
   components.css
   - Títulos de sección
   - Carrusel + cajas
   - Botones, cards, proceso
   - Carrito
   - Opiniones, consultas, alianzas
   - Componentes específicos reutilizables
   ========================================================= */

/* =========================
   TÍTULOS DE SECCIÓN
   ========================= */
.section-title,
h2.section-title{
  display: block;
  width: max-content;
  margin: 0 auto 1.5rem;
  text-align: center;
  position: relative;
  padding-bottom: 6px;
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--text);
}

.section-title::after,
h2.section-title::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--accent);
  border-radius: 2px;
}

/* =========================
   CARRUSEL / HERO
   ========================= */
.carousel-item img{
  height: 75vh;
  object-fit: cover;
  filter: brightness(.9);
}

/* Reduce trabajo de render inicial en secciones fuera del primer viewport */
#servicios,
#opiniones,
#proceso,
#contacto,
footer{
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

.carousel-caption{
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 0 15px;
}

.translucent-box{
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-md);
  padding: 1rem 2rem;
  color: var(--text);
  max-width: 600px;
  margin: 0 auto;
  box-shadow: 0 4px 15px rgba(0,0,0,.15);
  text-align: center;
}

.translucent-box h2{
  font-weight: 700;
  font-size: 1.8rem;
  margin-bottom: .5rem;
}

/* =========================
   BOTONES (tuning)
   ========================= */
.btn-danger{
  background-color: var(--danger);
  border: none;
}

.btn-danger:hover,
.btn-outline-danger:hover{
  background-color: var(--accent);
  color: var(--text);
  border: none;
  transition: .3s ease;
}

/* =========================
   TARJETAS
   ========================= */
.card{
  border-radius: 10px;
  transition: transform .3s ease;
}

.card:hover{ transform: scale(1.03); }

/* =========================
   PROCESO
   ========================= */
.process-flow{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.circle{
  width: 110px;
  height: 110px;
  background: #fff;
  border: 3px solid var(--danger);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  transition: all .3s ease;
}

.circle small{
  font-size: .8rem;
  margin-top: 4px;
}

.arrow{
  font-size: 2rem;
  color: var(--accent);
}

/* =========================
   NOSOTROS (video)
   ========================= */
#nosotros video{
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* =========================
   CARRITO (offcanvas)
   ========================= */
#offcanvasCart .offcanvas-body{
  display: flex;
  flex-direction: column;
  align-items: center;
}

#cartItems{
  width: 100%;
  padding: 0;
  margin-bottom: 1rem;
  list-style: none;
}

.cart-item-fixed{
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 48px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  padding: .5rem 1rem;
  margin-bottom: .5rem;
  font-size: .95rem;
  width: 100%;
  transition: background .2s ease-in-out;
}

.cart-item-fixed:hover{
  background-color: #fff7cc;
}

.cart-actions button{
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

#clearCart,
#goPay{
  height: 48px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  width: 100%;
}

#clearCart{
  background-color: var(--danger);
  color: #fff;
  border: none;
}

#clearCart:hover{
  background-color: var(--accent);
  color: var(--text);
}

#goPay{
  border: 2px solid var(--danger);
  color: var(--danger);
  background: #fff;
}

#goPay:hover{
  background-color: var(--accent);
  color: var(--text);
  border-color: var(--accent);
}

#goPay:disabled,
#checkoutPay:disabled{
  background: linear-gradient(180deg, #fff7f7 0%, #fdf2f2 100%);
  color: #b76e79;
  border-color: #f3c8cf;
  cursor: not-allowed;
  opacity: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}

#goPay:disabled:hover,
#checkoutPay:disabled:hover{
  background: linear-gradient(180deg, #fff7f7 0%, #fdf2f2 100%);
  color: #b76e79;
  border-color: #f3c8cf;
}

/* =========================
   OPINIONES
   ========================= */
.opinion-card{
  max-width: 850px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: 0 14px 35px rgba(0,0,0,.08);
}

.stars{
  color: #fbbf24;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.opinion-text{
  font-size: 1.05rem;
  color: #374151;
  margin-bottom: 16px;
}

.opinion-author{
  font-weight: 600;
  color: #6b7280;
}

/* =========================
   CONSULTAS
   ========================= */
.consulta-box{
  width: 100%;
  transition: transform .3s ease, box-shadow .3s ease;
}

.consulta-box:hover{
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
}

.consulta-card{
  border: 1px solid rgba(0,0,0,.06);
}

.consulta-icon{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(220,53,69,.10);
  color: var(--danger-bs);
  flex: 0 0 44px;
}

.consulta-icon i{ font-size: 1.2rem; }

/* =========================
   ALIANZAS
   ========================= */
.alianzas-grid{ row-gap: 12px; }

.logo-box{
  width: 170px;
  aspect-ratio: 1 / 1;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.logo-img{
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (min-width: 992px){
  .logo-box{ width: 190px; }
}

/* ===== Checkout modal overlay ===== */
.checkout-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}
.checkout-overlay.hidden{ display:none; }

.checkout-panel{
  width: min(720px, 94vw);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  padding: 22px;
}

.checkout-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 14px;
}

.checkout-close{
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #111;
}

.checkout-items{
  display:flex;
  flex-direction:column;
  gap: 10px;
  max-height: 280px;
  overflow:auto;
  padding-right: 6px;
}

.checkout-item{
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.checkout-total{
  display:flex;
  justify-content:space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* ===== Carrito row (offcanvas) ajustes ===== */
.cart-row{
  border-radius: 12px;
}

.cart-qty{
  min-width: 18px;
  text-align: center;
  font-weight: 700;
}

.cart-remove{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 0;
}

.cart-x{
  color: #dc3545;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

/* ===== PRIVACIDAD - MENÚ LATERAL ===== */

.policy-aside {
  position: sticky;
  top: 100px; /* debajo del navbar sticky */
}

.policy-card {
  border-radius: 14px;
  border: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

/* Título del menú */
.policy-card h5 {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

/* Contenedor de enlaces */
.policy-toc {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Enlaces estilo limpio y profesional */
.policy-toc a {
  padding: 10px 14px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e9ecef;
  font-size: 0.9rem;
  font-weight: 500;
  color: #212529;
  transition: all 0.25s ease;
}

/* Hover elegante estilo HARO */
.policy-toc a:hover {
  background-color: rgba(220, 53, 69, 0.08);
  border-color: #dc3545;
  color: #dc3545;
  transform: translateX(4px);
}

/* Sección info inferior */
.policy-card .small {
  font-size: 0.8rem;
}

/* Alinea botones al mismo nivel en todas las cards */
.service-card .card-body{
  display: flex;
  flex-direction: column;
}

.service-card .card-body .card-text{
  flex: 1 1 auto;   /* ocupa el espacio disponible */
}

.service-card .card-body .btn{
  margin-top: auto; /* empuja el botón al fondo */
}

/* ==============================
   FOOTER HARO - PROFESIONAL
============================== */

/* ===== FOOTER HARO 4 COLUMNAS ===== */
.footer-haro{
  background:#0b1220;
  border-top:1px solid rgba(255,255,255,.06);
  color:#fff;
}

.footer-container{
  max-width: 1200px;     /* controla el ancho en pantalla completa */
  margin: 0 auto;
  padding: 2.2rem 1.25rem 1rem;
}

.footer-grid-4{
  display:grid;
  grid-template-columns: repeat(4, 1fr); /* 🔥 4 columnas */
  gap: 2rem;
  align-items:start;
}

/* Col */
.footer-col{ min-width: 0; }

/* Brand */
.footer-brand{
  display:flex;
  align-items:center;
  gap:.75rem;
  margin-bottom:.8rem;
}

.footer-logo{
  width:42px;
  height:42px;
  object-fit:contain;
  border-radius:8px;
  background:rgba(255,255,255,.05);
  padding:6px;
}

.footer-title-main{
  font-weight:800;
  font-size:1.05rem;
  letter-spacing:.3px;
}

.footer-sub{
  color:rgba(255,255,255,.6);
  font-size:.85rem;
}

.footer-desc{
  color:rgba(255,255,255,.65);
  font-size:.92rem;
  line-height:1.5;
  margin:0;
  max-width: 38ch;
}

/* Titles */
.footer-section-title{
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.8px;
  font-size:.85rem;
  margin-bottom:.8rem;
}

/* Contact items */
.footer-item{
  display:grid;
  grid-template-columns: 18px 1fr;
  gap:.6rem;
  margin-bottom:.6rem;
  color:rgba(255,255,255,.72);
  font-size:.92rem;
  line-height:1.45;
}

.footer-item i{
  color:#dc3545;
  margin-top:.2rem;
}

/* Links */
.footer-links{
  display:flex;
  flex-direction:column;
  gap:.5rem;
}

.footer-link{
  color:rgba(255,255,255,.72);
  text-decoration:none;
  overflow-wrap:anywhere;
  word-break:break-word;
}

.footer-link:hover{ color:#fff; }

/* Pay */
.footer-pay-text{
  margin:0 0 .45rem;
  color:rgba(255,255,255,.65);
  font-size:.92rem;
  line-height:1.4;
}

/* Bottom */
.footer-copy{
  margin-top: 1.6rem;
  padding-top: .9rem;
  border-top:1px solid rgba(255,255,255,.06);
  color:rgba(255,255,255,.55);
  font-size:.85rem;
}

/* ===== RESPONSIVE: 2 filas x 2 columnas ===== */
@media (max-width: 992px){
  .footer-grid-4{
    grid-template-columns: repeat(2, 1fr); /* 🔥 2 columnas */
    gap: 1.6rem;
  }

  .footer-desc{
    max-width: 100%;
  }
}

.footer-social-link{
  width:38px;
  height:38px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,.08);
  color:#ffffff !important;   /* siempre blanco */
  font-size:1rem;
  transition:.25s ease;
  text-decoration:none;
}

.footer-social-link i{
  color:#ffffff !important;   /* fuerza icono blanco */
}

.footer-social-link:hover{
  background: var(--accent);
  color:#ffffff !important;   /* se mantiene blanco */
  transform: translateY(-2px);
}

.footer-social-link:hover i{
  color:#ffffff !important;   /* icono blanco en hover */
}

.footer-social{
  display:flex;
  flex-direction: row;
  gap: 14px;
  margin-top: .8rem;
  justify-content: flex-start; /* cambia a center si los quieres centrados */
  align-items: center;
  flex-wrap: wrap;
}

.footer-col{
  display:flex;
  flex-direction:column;
}

/* Opcional: en móviles muy pequeños, 1 columna para mejor lectura */
@media (max-width: 520px){
  .footer-grid-4{
    grid-template-columns: 1fr;
  }
}

/* ===== BLOQUE TRABAJA CON NOSOTROS ===== */
.cv-row{
  display: grid;
  grid-template-columns: 1fr auto; /* texto | botón */
  gap: .75rem 1rem;
  align-items: center;
  margin-top: .75rem;
}

.cv-info{
  min-width: 0;                /* evita desbordes */
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cv-btn{
  white-space: nowrap;         /* botón estable */
}

/* Tablet y móvil */
@media (max-width: 768px){
  .cv-row{
    grid-template-columns: 1fr;  /* se apila */
  }

  .cv-btn{
    width: 100%;                 /* botón ocupa todo el ancho */
  }
}

/* ===== MODULO APRENDIZAJE: AUTH (Login/Register) ===== */
.haro-auth-bg{
  min-height: 100vh;
  background: #2f2f2f;
  position: relative;
  overflow: hidden;
}
.haro-auth-wave{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 35vh;
  background: var(--danger);
  border-top-left-radius: 60% 30%;
  border-top-right-radius: 40% 25%;
}
.haro-auth-card{
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.haro-auth-sideimg{
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(4px);
}

/* ==============================
   CONTACTO - UI refinements
============================== */
.contact-page .contact-section{
  background:
    radial-gradient(1200px 450px at 15% -15%, rgba(255,204,0,.20), transparent 60%),
    radial-gradient(1000px 420px at 85% -20%, rgba(220,53,69,.12), transparent 60%),
    #f8f9fa;
}

.contact-page .contact-shell{
  max-width: 1140px;
}

.contact-page .contact-intro{
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
}

.contact-page .contact-map-card,
.contact-page .contact-form-card,
.contact-page .contact-work-card{
  border-color: rgba(0,0,0,.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 32px rgba(16,24,40,.10) !important;
}

.contact-page .contact-block-title{
  font-weight: 700;
  letter-spacing: .2px;
}

.contact-page .sede-switcher{
  flex-wrap: wrap;
}

.contact-page .sede-switcher .btn{
  border-radius: 999px;
  padding: .45rem .95rem;
}

.contact-page .contact-map-frame{
  min-height: 320px;
}

.contact-page .contact-map-note{
  margin-bottom: 0;
}

.contact-page .contact-input{
  border-radius: 12px;
  border-color: #d0d5dd;
  padding-top: .62rem;
  padding-bottom: .62rem;
}

.contact-page .contact-input:focus{
  border-color: #e63946;
  box-shadow: 0 0 0 .2rem rgba(230,57,70,.16);
}

.contact-page .contact-submit-btn{
  border-radius: 12px;
  font-weight: 600;
  min-height: 46px;
}

.contact-page .contact-work-text{
  line-height: 1.55;
}

.contact-page .work-email-link{
  text-decoration: none;
  color: #111;
  font-weight: 600;
}

.contact-page .work-email-link:hover{
  color: #dc3545;
}

.contact-page .work-btn{
  border-radius: 999px;
  padding-left: 1rem;
  padding-right: 1rem;
  align-self: center;
}

@media (max-width: 768px){
  .contact-page .contact-map-card,
  .contact-page .contact-form-card,
  .contact-page .contact-work-card{
    padding: 1.1rem !important;
  }

  .contact-page .sede-switcher .btn{
    width: 100%;
  }
}

/* ==============================
   HARO Road Loader
============================== */
.haro-loader{
  --haro-road-color: #1f2937;
  --haro-accent-color: #ffcc00;
  --haro-speed: 3000ms;
  --haro-loader-width: 320px;
  --haro-loader-scale: clamp(0.82, calc((100vw - 24px) / 320), 1);

  position: fixed;
  inset: 0;
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(11, 18, 32, .38);
}

.haro-loader,
.haro-loader *{
  box-sizing: border-box;
}

.haro-loader.is-visible{
  display: flex;
}

.haro-loader__panel{
  width: var(--haro-loader-width);
  min-width: var(--haro-loader-width);
  max-width: var(--haro-loader-width);
  background: transparent;
  border-radius: 14px;
  padding: 12px 14px;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(var(--haro-loader-scale));
  transform-origin: center;
}

.haro-loader__logo-top{
  width: 76px;
  height: 76px;
  object-fit: contain;
  margin-bottom: 4px;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.25));
}

.haro-loader__road{
  position: relative;
  height: 40px;
  width: 220px;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--haro-road-color);
  overflow: hidden;
}

.haro-loader__road::before{
  content: "";
  position: absolute;
  left: -60%;
  top: 50%;
  width: 220%;
  height: 3px;
  transform: translateY(-50%);
  background: repeating-linear-gradient(
    90deg,
    var(--haro-accent-color) 0 22px,
    transparent 22px 44px
  );
  animation: haroRoadMove var(--haro-speed) linear infinite;
}

.haro-loader__msg{
  margin: 8px 0 0;
  color: #ffffff;
  font-size: 14px;
  text-align: center;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

@keyframes haroRoadMove{
  from{ transform: translate(-20%, -50%); }
  to{ transform: translate(20%, -50%); }
}
