:root{
  --bg:#f6f7fb;
  --muted:#667085;
  --border:rgba(16,24,40,.10);
  --glass:rgba(255,255,255,.80);
  --glass2:rgba(255,255,255,.92);
  --shadow:0 18px 55px rgba(16,24,40,.10);
  --shadow2:0 12px 30px rgba(16,24,40,.08);
}

html,body{height:100%;}
body{
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(13,110,253,.14), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(25,135,84,.12), transparent 52%),
    var(--bg);
}

.container-max{max-width:1200px;}

/* Mismo espacio arriba que a los lados en el contenido público */
.public-site main.container {
  padding-top: 1.5rem;
}

.glass{
  background:var(--glass);
  border:1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow2);
  border-radius:18px;
}

.muted{color:var(--muted);}

.btn{border-radius:14px;}
.badge{border-radius:999px;}
.nav-link{border-radius:12px;}

/* Breadcrumbs modernos */
.breadcrumb{
  background: transparent;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before{
  content: "›";
  color: var(--muted);
  padding: 0 0.5rem;
}

.breadcrumb-item a{
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-item a:hover{
  color: #0d6efd;
}

.breadcrumb-item.active{
  color: #0b1220;
  font-weight: 500;
}

/* Mover badge de reCAPTCHA v3 a la izquierda, pegado al borde y minimizado */
.grecaptcha-badge {
  right: auto !important;
  left: 0 !important;
  margin: 0 !important;
  width: 70px !important;
  height: 60px !important;
  overflow: hidden !important;
  transition: width 0.3s ease !important;
}

/* Expandir al hacer hover o clic */
.grecaptcha-badge:hover,
.grecaptcha-badge:focus {
  width: 256px !important;
}

.hero{
  border-radius:26px;
  border:1px solid var(--border);
  background: var(--glass2);
  box-shadow: var(--shadow);
  overflow:hidden;
  position:relative;
}
.hero::before{
  content:"";
  position:absolute; inset:-120px -120px auto auto;
  width:380px; height:380px; border-radius:50%;
  background: radial-gradient(circle at 30% 30%, rgba(13,110,253,.28), transparent 55%);
  filter: blur(2px);
}

.icon-chip{
  width:44px;
  height:44px;
  flex: 0 0 44px;          /* ✅ no se encoge en flex */
  border-radius: 10px;     /* ✅ borde “cuadrado” (puedes poner 0 si lo quieres 100% cuadrado) */
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(13,110,253,.10);
  border: 1px solid rgba(13,110,253,.18);
}

.section{padding:64px 0;}

.footer{
  border-top:1px solid var(--border);
  background:rgba(255,255,255,.7);
  backdrop-filter: blur(14px);
  margin-top: auto;
}

.footer .icon-chip{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(13, 110, 253, .1);
  border: 1px solid rgba(13, 110, 253, .18);
  flex-shrink: 0;
}

/* Iconos de redes sociales modernos */
.footer-social{
  display: inline-flex;
  gap: 1rem;
  align-items: center;
}

.social-icon{
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .85);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  box-shadow: 0 3px 10px rgba(16, 24, 40, .08);
  color: var(--muted);
  text-decoration: none;
  transition: all 0.25s ease;
  font-size: 1.5rem;
}

.social-icon:hover{
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 16px rgba(16, 24, 40, .15);
  color: #0b1220;
  background: rgba(255, 255, 255, .95);
}

.social-icon:active{
  transform: translateY(-1px) scale(1.02);
}

.social-facebook:hover{
  background: rgba(24, 119, 242, .12);
  border-color: rgba(24, 119, 242, .25);
  color: #1877f2;
  box-shadow: 0 6px 16px rgba(24, 119, 242, .2);
}

.social-instagram:hover{
  background: linear-gradient(135deg, rgba(225, 48, 108, .12), rgba(245, 96, 64, .12));
  border-color: rgba(225, 48, 108, .25);
  color: #e1306c;
  box-shadow: 0 6px 16px rgba(225, 48, 108, .2);
}

/* Better tap targets & smooth controls */
.form-control, .form-select { min-height: 44px; }
.form-control, .form-select { border-radius: 14px; }
.modal-content { box-shadow: var(--shadow); }

/* Evitar zoom automático en móvil (iOS/Android) al enfocar inputs: font-size >= 16px */
@media (max-width: 767px) {
  .form-control,
  .form-select,
  input:not([type="submit"]):not([type="button"]):not([type="hidden"]):not([type="image"]),
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* ========== Public header & navbar ========== */
.public-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.04);
}

.navbar-public {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0.5rem 1.5rem;
  gap: 1rem;
}

.navbar-public__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.navbar-public__brand img {
  height: 56px;
  width: auto;
  object-fit: contain;
  display: block;
}

.navbar-public__desktop {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-public__nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-public__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.navbar-public__link:hover {
  color: #0d6efd;
  background: rgba(13, 110, 253, 0.08);
}
.navbar-public__link i {
  font-size: 1.05em;
  opacity: 0.9;
}

.navbar-public__link--dropdown::after {
  margin-left: 0.2rem;
}

.navbar-public__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(13, 110, 253, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.navbar-public__cta:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(13, 110, 253, 0.35);
}

.navbar-public__toggler {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  color: #374151;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.navbar-public__toggler:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(16, 24, 40, 0.15);
}

.navbar-public__toggler-icon {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

/* Dropdowns del navbar público */
.navbar-public__dropdown {
  min-width: 220px;
  padding: 0.5rem;
  border-radius: 14px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  box-shadow: 0 12px 40px rgba(16, 24, 40, 0.12);
  margin-top: 0.5rem;
}

.navbar-public__dropdown .dropdown-item,
.navbar-public__dropdown .dropdown-item-text {
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-size: 0.9rem;
  transition: background 0.15s ease;
}

.navbar-public__dropdown .dropdown-item:hover {
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
}

.navbar-public__dropdown .dropdown-item i,
.navbar-public__dropdown .dropdown-item-text i {
  width: 1.25em;
  text-align: center;
  opacity: 0.85;
}

.navbar-public__dropdown .dropdown-divider {
  margin: 0.4rem 0;
  border-color: rgba(16, 24, 40, 0.06);
}

.badge-soon {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.2);
  color: #b45309;
}

/* ========== Offcanvas menú público (móvil) ========== */
.public-offcanvas.offcanvas {
  width: 340px !important;
  max-width: 88vw;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(16, 24, 40, 0.08);
}

.public-offcanvas__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(16, 24, 40, 0.06);
  background: linear-gradient(180deg, rgba(13, 110, 253, 0.04) 0%, transparent 100%);
}

.public-offcanvas__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.public-offcanvas__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 110, 253, 0.1);
  border: 1px solid rgba(13, 110, 253, 0.2);
  border-radius: 12px;
  font-size: 1.25rem;
}

.public-offcanvas__title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #0b1220;
  line-height: 1.3;
  margin: 0;
}

.public-offcanvas__subtitle {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.15rem 0 0 0;
}

.public-offcanvas__close {
  opacity: 0.7;
  padding: 0.5rem;
  border-radius: 10px;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.public-offcanvas__close:hover {
  opacity: 1;
  background: rgba(16, 24, 40, 0.06);
}

.public-offcanvas__body {
  padding: 1.25rem 1.25rem;
  overflow-y: auto;
}

.public-offcanvas__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(13, 110, 253, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.public-offcanvas__cta:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

.public-offcanvas__section {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.5rem 0;
  padding: 0;
}

.public-offcanvas__link {
  display: flex;
  align-items: center;
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #111827;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(16, 24, 40, 0.06);
  border-radius: 12px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.public-offcanvas__link:hover {
  background: rgba(13, 110, 253, 0.08);
  border-color: rgba(13, 110, 253, 0.15);
  color: #0d6efd;
  transform: translateX(4px);
}
.public-offcanvas__link i {
  opacity: 0.85;
}

.public-offcanvas__link--disabled {
  cursor: default;
  color: var(--muted);
  background: rgba(16, 24, 40, 0.03);
}
.public-offcanvas__link--disabled:hover {
  transform: none;
  color: var(--muted);
  background: rgba(16, 24, 40, 0.03);
  border-color: rgba(16, 24, 40, 0.06);
}

.public-offcanvas__footer {
  border-top: 1px solid rgba(16, 24, 40, 0.06);
}
.public-offcanvas__footer .public-offcanvas__link {
  background: transparent;
  border: none;
  padding-left: 0;
}
.public-offcanvas__footer .public-offcanvas__link:hover {
  background: transparent;
  transform: none;
}

/* Desktop vs Mobile visibility */
.d-mobile-only{ display:none; }
.d-desktop-only{ display:flex; }

@media (max-width: 991.98px){
  .d-mobile-only{ display:flex; }
  .d-desktop-only{ display:none; }

  main.container { padding-left: 12px; padding-right: 12px; padding-top: 12px; }
  .container-max { max-width: 100%; }

  /* En móvil un poco menos de padding lateral para aprovechar espacio */
  .public-header .navbar-public {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

/* Modal form scroll fix */
.modal-content > form.modal-form{
  display:flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.modal-content > form.modal-form .modal-body{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Modal becomes modern bottom sheet on small phones */
@media (max-width: 576px){
  .modal { padding-right: 0 !important; height: 100dvh; }

  .modal-dialog{
    margin: 12px;
    width: calc(100% - 24px);
    height: calc(100dvh - 24px);
    display:flex;
    align-items:flex-end;
  }

  .modal-content{
    height: 100%;
    max-height: 100%;
    display:flex;
    flex-direction: column;
    overflow:hidden;
  }
}

h1, .display-5, .display-6 { letter-spacing: -0.02em; }

.modal-notice{
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(16,24,40,.08);
  border-radius: 14px;
  padding: 10px 12px;
}

/* Toasts (modern glass) */
.toast-container{ z-index: 1085; }

.toast.glass-toast{
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(16,24,40,.10);
  box-shadow: var(--shadow2);
  border-radius: 16px;
}
.toast .toast-body{ padding: .85rem .95rem; }

.call-fab-container{
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1080;
}

.call-fab{
  width: 56px;
  height: 56px;
  border: none;
  transition: all 0.3s ease;
  animation: pulse-ring 2s infinite;
}

.call-fab:hover{
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(13, 110, 253, 0.4);
}

.call-fab:active{
  transform: scale(0.95);
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(13, 110, 253, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
  }
}

/* Popover modernizado */
.popover{
  max-width: 280px;
  border: none;
  box-shadow: 0 12px 40px rgba(16, 24, 40, 0.15);
  border-radius: 16px;
  padding: 0;
  z-index: 1081 !important;
}

.popover-header{
  display: none;
}

.popover-body{
  padding: 1.25rem;
}

.call-popover-content{
  text-align: center;
}

.call-popover-content .fw-bold{
  font-size: 1.1rem;
  color: #1a1a1a;
}

.call-popover-content .text-muted{
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.call-popover-content .btn{
  border-radius: 12px;
  font-weight: 500;
  padding: 0.5rem 1rem;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.call-popover-content .d-flex.gap-2{
  align-items: stretch;
}

.call-popover-content .btn i{
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.call-popover-content .btn span{
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.call-popover-content .btn-success{
  background: linear-gradient(135deg, #198754 0%, #157347 100%);
  border: none;
  transition: all 0.2s ease;
}

.call-popover-content .btn-success:hover{
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

/* Animación de entrada del popover */
.popover.show{
  animation: popoverFadeIn 0.3s ease-out;
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Flecha del popover */
.popover .popover-arrow::before{
  border-top-color: white;
}

.popover .popover-arrow::after{
  border-top-color: white;
}

/* Responsive */
@media (max-width: 576px){
  .call-fab-container{
    right: 20px;
    bottom: 20px;
  }
  
  .call-fab{
    width: 60px;
    height: 60px;
  }
  
  .popover{
    max-width: calc(100vw - 40px);
    right: 0 !important;
    left: auto !important;
    transform: translateX(calc(60px - 100% + 20px)) !important;
  }
}
