/* ====== Reset & Base ====== */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,'Helvetica Neue',Arial,sans-serif;line-height:1.6;color:#1b1f23;background:#f6f8fa}
a{color:#0b63c8;text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%;height:auto;display:block}

/* ====== Layout ====== */
.container{max-width:1200px;margin:0 auto;padding:0 20px}
.header{position:sticky;top:0;background:#ffffffcc;backdrop-filter:saturate(1.2) blur(6px);border-bottom:1px solid #e5e7eb;z-index:50}
.header-inner{display:flex;align-items:center;justify-content:space-between;padding:12px 0}
.brand{display:flex;align-items:center;gap:12px}
.brand img{height:70px}
.nav{display:flex;gap:18px}
.nav a{font-weight:600;color:#111827;padding:8px 10px;border-radius:10px;transition:all .2s ease}
.nav a:hover{background:#eef2ff;color:#1e3a8a;transform:translateY(-1px)}

.hero{background:linear-gradient(135deg,#e8eefc 0%,#ffffff 100%);padding:80px 0}
.hero h1{font-size:clamp(28px,3.5vw,48px);margin:0 0 10px;color:#0f172a}
.hero p{font-size:clamp(16px,2vw,20px);color:#334155;margin:0 0 24px}
.btn{display:inline-block;padding:12px 18px;border-radius:14px;background:#1e40af;color:white;font-weight:700;transition:transform .15s ease, box-shadow .15s ease}
.btn:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(30,64,175,.25)}

/* Cards grid */
.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.card{background:white;border:1px solid #e5e7eb;border-radius:18px;overflow:hidden;box-shadow:0 10px 20px rgba(2,6,23,.04);transition:transform .2s ease, box-shadow .2s ease}
.card:hover{transform:translateY(-4px);box-shadow:0 18px 28px rgba(2,6,23,.08)}
.card .media{aspect-ratio:16/10;background:#f1f5f9;overflow:hidden}
.card .body{padding:16px}
.card h3{margin:0 0 8px;font-size:18px;color:#0f172a}
.card p{margin:0;color:#694747}

/* Footer */
footer{background:#0b1220;color:#cbd5e1;margin-top:40px}
.footer-top{padding:32px 0;border-top:1px solid #1f2937;border-bottom:1px solid #1f2937}
.footer-cols{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:20px}
.footer-brand img{height:70px;margin-bottom:8px}
footer a{color:#cbd5e1}
.footer-bottom{padding:14px 0;color:#94a3b8;font-size:14px}

/* WhatsApp floating button */
.whatsapp-float{position:fixed;right:18px;bottom:18px;z-index:60;background:#25D366;color:white;border-radius:999px;padding:14px 18px;font-weight:800;box-shadow:0 10px 24px rgba(0,0,0,.2)}
.whatsapp-float:hover{filter:brightness(1.05)}

/* Responsive */
@media (max-width:960px){
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .brand img{height:60px}
}
@media (max-width:640px){
  .nav{display:none}
  .grid{grid-template-columns:1fr}
  .brand img{height:56px}
}

.nosotros {
    position: relative;
    background: url("../img/imgfondonosotros.png") no-repeat center center/cover;
    color: white;
    padding: 80px 20px;
    text-align: center;
    min-height: 100vh;
}


.nosotros .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(13, 11, 80); /* Capa oscura para que el texto sea legible */
}

.nosotros .contenido {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.nosotros h2 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #8faf12; /* Amarillo para resaltar títulos */
}

.nosotros p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 40px;
}
/* LOGO EN HEADER */
.header .brand img {
  height: 150px;   /* más grande (puedes subir a 150px si quieres) */
  width: auto;     /* mantiene proporción */
}

/* LOGO EN FOOTER */
.footer-brand img {
  height: 100px;   /* más grande en el footer */
  width: auto;
}

.galeria {
  padding: 50px 5%;
  background: #f9f9f9;
}

.galeria h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 30px;
  color: #222;
  font-weight: 600;
}

.grid-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.grid-galeria img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
}

.grid-galeria img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}


.galeria {
  padding: 50px 5%;
  background: #f9f9f9;
}

.galeria h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 30px;
  color: #222;
  font-weight: 600;
}

.grid-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.grid-galeria img {
  width: 100%;
  height: 250px;       /* mismo alto para todas */
  object-fit: cover;   /* rellena el espacio, recorta si sobra */
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
}


.grid-galeria img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

/* ==== LIGHTBOX ==== */
.lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
}

.lightbox-contenido {
  margin: auto;
  display: block;
  max-width: 100%;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}

.cerrar {
  position: absolute;
  top: 20px;
  right: 40px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.cerrar:hover {
  color: #ff4444;
}

/* === A11y: Skip link visible solo con foco === */
#skip-to-content{position:absolute;top:-40px;left:0;background:#0b4f6c;color:#fff;padding:.5rem 1rem;z-index:1000;text-decoration:none;border-radius:.5rem;transition:top .25s ease;box-shadow:0 6px 20px rgba(0,0,0,.15)}
#skip-to-content:focus{top:10px}

/* Utilidad para ocultar visualmente manteniendo accesibilidad */
.visually-hidden{position:absolute!important;height:1px;width:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}

/* Imágenes fluidas */
img{max-width:100%;height:auto}

/* Tipografías fluidas */
h1{font-size:clamp(1.8rem,4vw,2.8rem)}
h2{font-size:clamp(1.3rem,3vw,2rem)}
p,li{font-size:clamp(1rem,2.2vw,1.125rem);line-height:1.6}

/* Galería responsive */
.grid-galeria{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1rem}

/* Menú responsive con hamburguesa */
#menu-toggle{display:none;align-items:center;justify-content:center;width:44px;height:44px;border:0;border-radius:.75rem;background:#0b4f6c;color:#fff;cursor:pointer}
#menu-toggle:focus{outline:2px solid #0b4f6c;outline-offset:2px}

@media (max-width: 900px){
  header{position:sticky;top:0;z-index:1000;background:#fff}
  #menu-toggle{display:flex;margin-left:auto}
  nav{display:none;position:absolute;right:1rem;top:4rem;background:#ffffff;border-radius:1rem;box-shadow:0 20px 60px rgba(0,0,0,.15);padding:1rem;min-width:60vw}
  body.nav-open nav{display:block}
  nav a{display:block;padding:.6rem .4rem}
}

/* Botón WhatsApp responsive (si existe) */
a[href*="wa.me"], a[href*="whatsapp.com"]{position:fixed;right:1rem;bottom:1rem;border-radius:999px;padding:.7rem 1rem;font-weight:600;z-index:1000}
@media (max-width:600px){
  a[href*="wa.me"], a[href*="whatsapp.com"]{bottom:.75rem;right:.75rem;padding:.6rem .9rem}
}

/* Botón volver arriba */
#back-to-top{background:#0b4f6c;color:#fff}

/* === Back-to-top modern (fade-in) === */
#back-to-top{
  position:fixed;right:1rem;bottom:1rem;
  width:48px;height:48px;border:none;border-radius:9999px;
  background:#0b4f6c;color:#fff;cursor:pointer;z-index:1100;
  box-shadow:0 8px 24px rgba(0,0,0,.18);
  opacity:0;transform:translateY(8px);pointer-events:none;
  transition:opacity .25s ease, transform .25s ease;
}
#back-to-top.show{opacity:1;transform:none;pointer-events:auto}
#back-to-top:focus{outline:2px solid #0b4f6c;outline-offset:2px}
@media (max-width:600px){
  #back-to-top{width:42px;height:42px;right:.75rem;bottom:.75rem}
}

/* --- BOTÓN FLOTANTE --- */
#bot-bubble {
  position: fixed;
  bottom: 90px;
  right: 18px;
  background: #0056b3;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display:flex;
  justify-content:center;
  align-items:center;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(0,0,0,0.3);
  z-index:9999;
  transition:transform .2s;
}
#bot-bubble:hover {
  transform: scale(1.08);
}

#bot-bubble img {
  width: 42px;
}

/* --- PANEL DEL CHAT --- */
#chat-box {
  position: fixed;
  bottom: 170px;
  right: 20px;
  width: 320px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  overflow: hidden;
  display: none;
  z-index: 9999;
}

#chat-box.open {
  display: block;
}

/* HEADER */
#chat-header {
  background: #003366;
  color: #fff;
  padding: 12px;
  font-weight: bold;
  text-align: center;
}

/* CUERPO */
#chat-body {
  max-height: 300px;
  overflow-y: auto;
  padding: 12px;
}

.bot-msg, .user-msg {
  padding: 10px;
  border-radius: 10px;
  margin: 6px 0;
  max-width: 80%;
}

.bot-msg {
  background: #e8f0ff;
  align-self: flex-start;
}

.user-msg {
  background: #d1ffd1;
  align-self: flex-end;
  text-align: right;
}

/* BOTONES DE OPCIONES */
#chat-options {
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-btn {
  background: #003366;
  color: #fff;
  padding: 7px 12px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  flex: 1;
  cursor: pointer;
}

.chat-btn:hover {
  background: #00509e;
}

