/* Public CSS overrides and variables for the building identity */
:root{
  --color-primary: #5B3FD3;
  --color-secondary: #6E5CE6;
  --color-support: #2D4C8F;
  --color-accent: #A78BFA;
  --bg-light: #F8F9FC;
  --bg-white: #FFFFFF;
  --text-color: #1F2937;
  --radius: 12px;
}

/* Base */
html,body{height:100%;}
body{
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  color:var(--text-color);
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-light) 100%);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  font-size:16px;
  line-height:1.5;
}

.container-main{
  max-width:1100px;
  margin:0 auto;
  padding:2rem 1rem;
}

/* Navbar */
.site-navbar{
  background:rgba(255,255,255,0.85);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  border-bottom:1px solid rgba(45,76,143,0.08);
  position:sticky;
  top:0;
  z-index:1030;
}
.navbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:0.75rem 1rem;
}
.navbar-brand{
  display:flex;
  align-items:center;
  gap:0.65rem;
  text-decoration:none;
}
.navbar-logo{
  width:38px;
  height:38px;
  border-radius:8px;
  object-fit:cover;
}
.logo-placeholder{
  width:48px;
  height:48px;
  background:linear-gradient(135deg,var(--color-primary),var(--color-secondary));
  border-radius:10px;
  display:inline-block;
}
.brand-title{
  font-weight:700;
  font-size:1rem;
  color:var(--color-support);
  line-height:1.2;
}
.navbar-links{
  align-items:center;
  gap:1.75rem;
}
.navbar-links a{
  color:var(--text-color);
  text-decoration:none;
  font-weight:600;
  font-size:0.95rem;
}
.navbar-links a:hover{color:var(--color-primary)}
.navbar-toggler{
  border:1px solid rgba(45,76,143,0.15);
  background:var(--bg-white);
  border-radius:8px;
  padding:0.4rem 0.65rem;
  font-size:1.25rem;
  color:var(--color-support);
  line-height:1;
}
.navbar-toggler:focus{box-shadow:0 0 0 0.2rem rgba(110,92,230,0.2)}
.navbar-mobile-panel{
  display:flex;
  flex-direction:column;
  gap:0.75rem;
  padding:1rem;
  background:var(--bg-white);
  border-top:1px solid rgba(45,76,143,0.08);
}
.navbar-mobile-panel a{
  color:var(--text-color);
  text-decoration:none;
  font-weight:600;
}

/* Hero */
.hero{
  display:flex;
  gap:2.5rem;
  align-items:center;
  padding:3.5rem 0;
}
.hero-left{flex:1}
.hero-right{width:360px;flex-shrink:0}
.hero-title{
  font-size:2rem;
  font-weight:800;
  color:var(--color-support);
  line-height:1.2;
}
.hero-subtitle{color:var(--color-secondary);font-weight:600;margin-top:0.15rem}
.hero-desc{margin-top:1.1rem;color:#374151;font-size:1.05rem;max-width:46ch}
.hero-cta{margin-top:1.75rem;display:flex;gap:0.75rem;flex-wrap:wrap}
.hero-right .card-custom{padding:1.5rem;border-top:4px solid var(--color-accent)}
.hero-right h5{font-weight:700;color:var(--color-support);margin-bottom:0.9rem}
.hero-right ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:0.6rem}
.hero-right li{color:#374151}

/* Card */
.card-custom{
  background:var(--bg-white);
  border-radius:var(--radius);
  box-shadow:0 6px 18px rgba(16,24,40,0.06);
  padding:1rem;
}

/* Buttons */
.btn-primary-custom{
  background:linear-gradient(90deg,var(--color-primary),var(--color-secondary));
  color:white;
  border-radius:10px;
  padding:0.6rem 1rem;
  border:none;
}
.btn-secondary-custom{
  background:transparent;
  color:var(--color-support);
  border-radius:10px;
  padding:0.6rem 1rem;
  border:1px solid rgba(45,76,143,0.08);
}

/* Sections */
.section{padding:3.5rem 0}
.section h3{
  font-size:1.5rem;
  font-weight:800;
  color:var(--color-support);
  margin-bottom:1.75rem;
}
.steps{display:flex;gap:1.25rem;flex-wrap:wrap}
.step{
  flex:1 1 220px;
  background:var(--bg-white);
  padding:1.5rem;
  border-radius:var(--radius);
  box-shadow:0 6px 18px rgba(16,24,40,0.05);
  border:1px solid rgba(45,76,143,0.06);
  transition:transform 0.25s ease, box-shadow 0.25s ease;
}
.step:hover{
  transform:translateY(-3px);
  box-shadow:0 10px 26px rgba(91,63,211,0.12);
}
.step-icon{
  width:52px;
  height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.5rem;
  background:var(--bg-light);
  border-radius:50%;
  margin-bottom:1rem;
}
.step h4{
  font-size:1.05rem;
  font-weight:700;
  color:var(--color-support);
  margin-bottom:0.4rem;
}
.step p{
  color:#4b5563;
  font-size:0.95rem;
  margin:0;
}

/* Acordeón FAQ */
.accordion-item{
  border:1px solid rgba(45,76,143,0.08);
  border-radius:var(--radius) !important;
  overflow:hidden;
  margin-bottom:0.75rem;
}
.accordion-button{
  font-weight:600;
  color:var(--color-support);
  background:var(--bg-white);
  padding:1.1rem 1.25rem;
}
.accordion-button:not(.collapsed){
  background:rgba(110,92,230,0.06);
  color:var(--color-primary);
  box-shadow:none;
}
.accordion-button:focus{
  box-shadow:0 0 0 0.2rem rgba(110,92,230,0.15);
}
.accordion-button::after{
  filter:sepia(1) saturate(4) hue-rotate(215deg);
}
.accordion-body{
  color:#4b5563;
  padding:1rem 1.25rem 1.25rem;
}

.form-section-title{
  font-size:1rem;
  font-weight:700;
  color:var(--color-support);
  margin-bottom:1rem;
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:1rem;
}

.form-grid-full{
  grid-column:1 / -1;
}

.public-input{
  border-radius:10px;
  border:1px solid rgba(45,76,143,0.12);
  min-height:46px;
  padding:0.75rem 0.9rem;
}

.public-input:focus{
  border-color:var(--color-secondary);
  box-shadow:0 0 0 0.2rem rgba(110,92,230,0.12);
}

.draft-badge{
  display:inline-flex;
  align-items:center;
  gap:0.35rem;
  background:rgba(167,139,250,0.14);
  color:var(--color-support);
  border-radius:999px;
  padding:0.45rem 0.75rem;
  font-size:0.9rem;
  margin-bottom:1rem;
}

/* Footer */
.site-footer{
  padding:2rem 0;
  color:#6b7280;
  border-top:1px solid rgba(45,76,143,0.08);
  margin-top:1rem;
  font-size:0.9rem;
}
.footer-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding-top:0;
  padding-bottom:0;
  flex-wrap:wrap;
  gap:0.5rem;
}

/* ========== WIZARD ========== */

.wizard-container{
  position:fixed;
  top:0;
  left:0;
  right:0;
  bottom:0;
  display:flex;
  flex-direction:column;
  background:#fff;
  z-index:1000;
  overflow-y:auto;
}

.wizard-container.d-none{
  display:none !important;
}

.wizard-header{
  background:var(--bg-white);
  border-bottom:1px solid rgba(0,0,0,0.06);
}

.wizard-body{
  flex:1;
  padding:2rem 0;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-light) 100%);
}

.wizard-footer{
  background:var(--bg-white);
  border-top:1px solid rgba(0,0,0,0.06);
}

.wizard-step{
  display:block;
  animation:fadeIn 0.3s ease-in;
}

.wizard-step.d-none{
  display:none !important;
}

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

.wizard-step h3{
  font-size:1.5rem;
  font-weight:700;
  color:var(--color-support);
  margin-bottom:1.5rem;
}

/* ========== STEPPER ========== */

.stepper-container{
  background:var(--bg-white);
  border-radius:12px;
  padding:1.5rem;
}

.stepper{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
}

.stepper-item{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:0.5rem;
  opacity:0.5;
  transition:opacity 0.3s ease, transform 0.3s ease;
}

.stepper-item.active{
  opacity:1;
  transform:scale(1.05);
}

.stepper-circle{
  font-size:2rem;
  width:60px;
  height:60px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--bg-light);
  border-radius:50%;
  border:3px solid rgba(45,76,143,0.1);
  transition:all 0.3s ease;
}

.stepper-item.active .stepper-circle{
  background:linear-gradient(135deg,var(--color-primary),var(--color-secondary));
  border-color:var(--color-primary);
  color:#fff;
  box-shadow:0 6px 20px rgba(91,63,211,0.3);
}

.stepper-label{
  font-size:0.85rem;
  font-weight:600;
  color:var(--text-color);
  text-align:center;
}

.stepper-line{
  flex:1;
  height:2px;
  background:rgba(45,76,143,0.1);
  margin:0 0.5rem;
  transition:all 0.3s ease;
}

.stepper-line.active{
  background:linear-gradient(90deg,var(--color-primary),var(--color-secondary));
}

/* ========== PROGRESS BAR ========== */

.progress-bar-container{
  background:var(--bg-white);
  border-radius:12px;
  padding:1rem;
}

.progress-bar{
  height:8px;
  background:var(--bg-light);
  border-radius:999px;
  overflow:hidden;
  margin-bottom:0.5rem;
}

.progress-bar-fill{
  height:100%;
  background:linear-gradient(90deg,var(--color-primary),var(--color-secondary));
  transition:width 0.4s ease;
  border-radius:999px;
}

.progress-text{
  font-size:0.85rem;
  color:#6b7280;
  text-align:right;
  font-weight:500;
}

/* ========== FORMS - MEJORADO PARA ADULTOS MAYORES ========== */

.form-control-lg,
.form-select-lg{
  min-height:54px;
  font-size:1.1rem;
  padding:0.75rem 1rem;
  line-height:1.5;
}

.form-control:focus,
.form-select:focus{
  border-color:var(--color-secondary);
  box-shadow:0 0 0 0.25rem rgba(110,92,230,0.15);
}

.form-label{
  font-size:1rem;
  font-weight:600;
  color:var(--text-color);
  margin-bottom:0.5rem;
}

.form-check-lg{
  padding-left:3.5rem;
  margin-bottom:1rem;
}

.form-check-lg .form-check-input{
  width:1.5rem;
  height:1.5rem;
  margin-left:-3.5rem;
  margin-top:0.35rem;
  cursor:pointer;
}

.form-check-lg .form-check-label{
  font-size:1rem;
  cursor:pointer;
}

/* ========== RESIDENT CARD ========== */

.resident-card{
  background:var(--bg-white);
  border:1px solid rgba(45,76,143,0.08);
  border-radius:12px;
  padding:1.25rem;
  transition:all 0.3s ease;
}

.resident-card:hover{
  box-shadow:0 8px 24px rgba(91,63,211,0.12);
  transform:translateY(-2px);
}

.resident-card h6{
  font-size:1.1rem;
  font-weight:700;
  color:var(--color-support);
}

.resident-card-actions{
  display:flex;
  gap:0.5rem;
}

.resident-card-actions .btn-link{
  font-size:0.95rem;
  font-weight:500;
  text-decoration:none;
  color:var(--color-secondary);
}

.resident-card-details{
  margin-top:1rem;
  padding-top:1rem;
  border-top:1px solid rgba(0,0,0,0.06);
}

/* ========== PET CARD ========== */

.pet-card{
  background:var(--bg-white);
  border:1px solid rgba(45,76,143,0.08);
  border-radius:12px;
  padding:1.25rem;
  transition:all 0.3s ease;
}

.pet-card:hover{
  box-shadow:0 8px 24px rgba(91,63,211,0.12);
  transform:translateY(-2px);
}

.pet-card h6{
  font-size:1.1rem;
  font-weight:700;
  color:var(--color-support);
}

.pet-card-actions{
  display:flex;
  gap:0.5rem;
}

/* ========== MODAL ========== */

.modal-content{
  border:none;
  box-shadow:0 20px 60px rgba(0,0,0,0.15);
  border-radius:16px;
}

.modal-header{
  border:none;
  padding:1.5rem;
  background:var(--bg-light);
}

.modal-header .btn-close{
  opacity:0.6;
}

.modal-body{
  padding:1.5rem;
}

.modal-footer{
  border:none;
  padding:1.5rem;
  background:var(--bg-light);
}

/* ========== TOAST ========== */

.toast-container{
  pointer-events:none;
}

.toast{
  pointer-events:all;
  border:none;
  border-radius:12px;
  box-shadow:0 20px 60px rgba(0,0,0,0.15);
  font-size:1rem;
}

.toast-header{
  border:none;
  font-weight:600;
}

.toast-body{
  padding:1rem;
}

/* ========== SUMMARY ========== */

.summary-section{
  margin-bottom:2rem;
}

.summary-section h5{
  font-size:1.2rem;
  font-weight:700;
  color:var(--color-support);
  margin-bottom:1rem;
}

.summary-card{
  background:var(--bg-light);
  border-radius:12px;
  padding:1.5rem;
  border-left:4px solid var(--color-secondary);
}

.summary-card p{
  margin:0.5rem 0;
  font-size:1rem;
}

/* ========== BOTONES ========== */

.btn-primary-custom,
.btn-secondary-custom{
  min-height:54px;
  font-size:1.05rem;
  font-weight:600;
  border-radius:12px;
  transition:all 0.3s ease;
  cursor:pointer;
}

.btn-primary-custom{
  background:linear-gradient(90deg,var(--color-primary),var(--color-secondary));
  color:white;
  border:none;
}

.btn-primary-custom:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 25px rgba(91,63,211,0.3);
}

.btn-secondary-custom{
  background:var(--bg-white);
  color:var(--color-support);
  border:2px solid var(--color-secondary);
}

.btn-secondary-custom:hover{
  background:rgba(110,92,230,0.05);
  transform:translateY(-2px);
}

/* ========== RESPONSIVE MOBILE-FIRST ========== */

@media (max-width:767px){
  .stepper{
    flex-wrap:wrap;
    gap:0.75rem;
  }

  .stepper-line{
    flex:none;
    width:100%;
    height:1px;
    margin:0.5rem 0;
  }

  .stepper-item{
    flex:1;
    min-width:70px;
  }

  .stepper-circle{
    width:50px;
    height:50px;
    font-size:1.5rem;
  }

  .stepper-label{
    font-size:0.75rem;
  }

  .wizard-step h3{
    font-size:1.25rem;
  }

  .form-control-lg,
  .form-select-lg{
    min-height:48px;
    font-size:1rem;
  }

  .btn-primary-custom,
  .btn-secondary-custom{
    min-height:48px;
    width:100%;
  }

  .d-flex.gap-2{
    flex-direction:column;
  }

  .d-flex.gap-2 .btn{
    width:100%;
  }
}

/* Responsive */
@media (max-width:767px){
  .hero{flex-direction:column;padding:2rem 0;gap:1.5rem}
  .hero-right{width:100%}
  .hero-title{font-size:1.4rem}
  .hero-subtitle{font-size:0.9rem}
  .hero-desc{max-width:none}
  .hero-cta{flex-direction:column}
  .hero-cta .btn{width:100%;text-align:center}
  .form-grid{grid-template-columns:1fr}
  .form-grid-full{grid-column:auto}

  .brand-title{font-size:0.85rem}
  .navbar-logo{width:32px;height:32px}
  .navbar-inner{padding:0.6rem 1rem}

  .section{padding:2.25rem 0}
  .section h3{font-size:1.25rem}

  .footer-inner{
    flex-direction:column;
    align-items:flex-start;
    text-align:left;
  }
}
