/* 
  overrides / diseño minimalista (mobile-first)
  Este archivo se carga después de styles.css para sobre-escribir el tema base.
*/

/* ====== Tokens ====== */
:root{
  --ly-bg: #ffffff;
  --ly-surface: #ffffff;
  --ly-text: #0f172a;          /* slate-900 */
  --ly-muted: #475569;         /* slate-600 */
  --ly-border: rgba(15, 23, 42, 0.10);
  --ly-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --ly-accent: #1e3a8a;        /* navy */
  --ly-accent-2: #2563eb;      /* blue */
}

/* ====== Base ====== */
html{ scroll-behavior:smooth; }
body{
  background: var(--ly-bg);
  color: var(--ly-text);
  text-rendering: optimizeLegibility;
}

p, li{ color: var(--ly-muted); }
a{ text-decoration: none; }
a:hover{ text-decoration: none; }

.font-alt{
  /* Kanit se mantiene para títulos del tema, pero con un look más sobrio */
  letter-spacing: 0.2px;
}

/* Reduce padding global del tema en mobile */
aside, section{
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

/* Tipografías responsivas para el Hero */
.masthead h1{
  font-size: clamp(2rem, 6vw, 3.25rem);
}
.masthead .lead{
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--ly-muted) !important;
}

/* ====== Navbar ====== */
#mainNav{
  background: rgba(255,255,255,0.92) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ly-border);
}
#mainNav .navbar-brand img#imglogo{
  height: 56px;
  width: auto;
  object-fit: contain;
}
@media (min-width: 992px){
  #mainNav .navbar-brand img#imglogo{ height: 64px; }
}

#mainNav .nav-link{
  color: rgba(15,23,42,0.78) !important;
  font-weight: 600;
}
#mainNav .nav-link:hover,
#mainNav .nav-link:focus{
  color: var(--ly-text) !important;
}

/* ====== Botones / acento ====== */
.btn-primary{
  --bs-btn-bg: var(--ly-accent);
  --bs-btn-border-color: var(--ly-accent);
  --bs-btn-hover-bg: #172554;           /* darker navy */
  --bs-btn-hover-border-color: #172554;
  --bs-btn-focus-shadow-rgb: 30, 58, 138;
  --bs-btn-active-bg: #172554;
  --bs-btn-active-border-color: #172554;
}

.bg-gradient-primary-to-secondary{
  /* bajar la “vibra” neon del tema */
  background: linear-gradient(135deg, var(--ly-accent), var(--ly-accent-2)) !important;
}
.text-gradient{
  background: -webkit-linear-gradient(135deg, var(--ly-accent), var(--ly-accent-2));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ====== Cards ====== */
.card{
  border: 1px solid var(--ly-border);
  box-shadow: var(--ly-shadow);
  border-radius: 18px;
  overflow: hidden;
}
.card .card-body{
  padding: 1rem 1.25rem;
}

/* En el Hero, evita que la card quede muy angosta por el style inline */
.masthead .card{
  width: min(100%, 420px) !important;
  margin-inline: auto;
}

/* Imágenes de cards (perfil) */
.card .card-img-top{
  width: 100%;
  height: auto !important;
  width: 100% !important;
  display: block;
}

/* ====== Servicios (mejor legibilidad) ====== */
#services h3.font-alt{
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  margin-bottom: .5rem;
}
#services h4{
  color: rgba(15,23,42,0.72);
  margin-bottom: 2rem;
}
.icon-feature{
  opacity: 0.9;
}

/* ====== Lista Valores ====== */
#listavalores{
  list-style: none;
  padding-left: 0;
  margin: 0;
}
#listavalores li{
  padding: .15rem 0;
}

/* ====== Galería (SimpleLightbox) ====== */
#portfolio .container-fluid{
  max-width: 1920px;
}
#portfolio .portfolio-box{
  position: relative;
  display: block;
  overflow: hidden;
  /* Grid consistente sin depender de height inline */
  aspect-ratio: 4 / 3;
}
#portfolio .portfolio-box img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 280ms ease;
}
#portfolio .portfolio-box:hover img{
  transform: scale(1.06);
}
#portfolio .portfolio-box .portfolio-box-caption{
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  text-align: center;
  opacity: 0;
  color: #fff;
  background: rgba(15,23,42,0.68);
  transition: opacity 220ms ease;
}
#portfolio .portfolio-box:hover .portfolio-box-caption{
  opacity: 1;
}

/* En pantallas chicas, evita “3-4 columnas” demasiado pequeñas */
@media (min-width: 576px) and (max-width: 991.98px){
  /* si mantienes col-sm-3 en el HTML, esto lo vuelve 2 columnas */
  #portfolio .row > [class*="col-sm-3"]{
    flex: 0 0 auto;
    width: 50%;
  }
}

/* ====== Botón Top ====== */
#myBtn{
  display: none;
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 1050;
  border: 0;
  outline: none;
  background: var(--ly-accent);
  color: #fff;
  cursor: pointer;
  padding: 12px 14px;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.20);
  font-size: 14px;
}
#myBtn:hover{ background: #172554; }

/* ====== Social (minimalista + iconos grandes) ====== */
.icon-bar{
  position: fixed;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1050;
}

.icon-bar a{
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;

  /* look minimal */
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.14);
  color: #0f172a;
  backdrop-filter: blur(8px);

  font-size: 26px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);

  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

/* Neutraliza colores fuertes heredados */
.facebook,
.twitter,
.google{
  background: rgba(255, 255, 255, 0.92) !important;
}

.icon-bar a:hover{
  transform: translateY(-2px);
  background: #0f172a;
  border-color: #0f172a;
  color: #0f172a;
}

.icon-bar a:active{
  transform: translateY(-1px);
}

.icon-bar a:focus-visible{
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 4px;
}

/* Ajustes en móvil */
@media (max-width: 575.98px){
  .icon-bar{ left: 12px; gap: 10px; }
  .icon-bar a{ width: 50px; height: 50px; font-size: 24px; }
}

/* ====== Mapa ====== */
#telefonos iframe{
  border-radius: 18px;
  box-shadow: var(--ly-shadow);
}
@media (max-width: 575.98px){
  #telefonos iframe{ height: 320px; }
}


/* ====== Navegación suave (opcional) ====== */
html{ scroll-behavior: smooth; }
section{ scroll-margin-top: 92px; }

/* ====== Galería (uniforme + responsive) ====== */
#portfolio .portfolio-box img.gallery-img{
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

@media (max-width: 575.98px){
  section{ scroll-margin-top: 80px; }
  #portfolio .portfolio-box img.gallery-img{ aspect-ratio: 1 / 1; }
}



/* ====== Refinamientos (fase 2) ====== */
/* Mejor legibilidad en textos largos */
#features p.text-muted,
#directorio p.text-muted{
  max-width: 68ch;
  margin-left: auto;
  margin-right: auto;
}

/* ====== Servicios (grid estable sin desbordes) ====== */
#services{
  overflow: visible;
}

#services .services-grid{
  align-items: stretch;
}

#services .service-card{
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 20px;
  padding: 22px 18px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#services .service-card:hover{
  transform: translateY(-2px);
  border-color: rgba(15, 23, 42, 0.16);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.08);
}

#services .service-icon{
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 2px auto 6px;
  background: rgba(15,23,42,0.06);
  border: 1px solid rgba(15,23,42,0.10);
}

#services .service-icon i{
  font-size: 28px;
  line-height: 1;
  color: var(--ly-text);
}

#services .service-card h3{
  margin: 0;
  font-size: 1.55rem;
}

#services .service-card p{
  margin: 0;
  color: rgba(15,23,42,0.74);
  line-height: 1.65;
  font-size: 0.98rem;
}

/* Ajustes de densidad en pantallas medianas */
@media (max-width: 991.98px){
  #services .service-card{ padding: 20px 16px; }
  #services .service-card h3{ font-size: 1.45rem; }
}
/* Cards de personas: coherencia visual */
.card{
  border-radius: 22px;
  overflow: hidden;
}

/* Footer más limpio */
footer a{
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}
footer a:hover{
  border-bottom-color: rgba(255,255,255,0.5);
}
