/* ====== Estilos base ====== */
:root{
  --brand:#0076A8;       /* Azul principal del logo */
  --brand-dark:#005F85;  /* Versión más oscura para hover */
  --accent:#40BCE2;      /* Celeste secundario */
  --bg:#f5f6fa;
  --ink:#222;
  --ink-soft:#555;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;background:var(--bg);color:var(--ink);line-height:1.6}

/* ====== Navbar ====== */
.nav{
  position:fixed; inset:0 0 auto 0; height:64px; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding:0 20px; background:var(--brand); color:#fff;
  box-shadow:0 6px 18px rgba(0,0,0,.1);
}
.logo{font-weight:800; letter-spacing:.5px}
.nav ul{list-style:none; display:flex; gap:18px}
.nav a{color:#fff; text-decoration:none; font-weight:700}
.nav a:hover{color:var(--accent)} /* detalle con celeste */

/* ====== Secciones ====== */
.section{padding:96px 18px 64px; max-width:1100px; margin:0 auto}
h2{font-size:clamp(22px,3vw,28px); margin-bottom:10px}
.muted{color:var(--ink-soft)}

/* ====== Hero con carrusel ====== */
.hero{padding-top:0px}
.hero-carousel{
  position:relative; height:70vh; min-height:440px; max-height:760px;
  border-radius:16px; overflow:hidden; background:#000;
  box-shadow:0 10px 28px rgba(0,0,0,.15);
}
.slide{position:absolute; inset:0; opacity:0; transition:opacity .8s ease}
.slide.active{opacity:1}
.slide img{width:100%; height:100%; object-fit:cover}

/* Overlay de texto */
.hero-overlay{
  position:absolute; inset:auto 0 0 0; padding:28px 24px 34px;
  background:linear-gradient(180deg,rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 60%, rgba(0,0,0,.75) 100%);
  color:#fff; text-align:center; display:grid; gap:10px;
}
.hero-overlay h1{font-size:clamp(28px,4vw,40px); line-height:1.2}
.hero-overlay p{opacity:.9}
.cta{
  justify-self:center; margin-top:6px; display:inline-block; padding:12px 22px;
  background:var(--brand); color:#fff; border-radius:999px; font-weight:800; text-decoration:none
}
.cta:hover{background:var(--brand-dark)}

/* ====== Productos ====== */
.grid{
  margin-top:18px;
  display:grid; gap:18px;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
}
.card{
  background:#fff; border-radius:14px; padding:16px;
  box-shadow:0 10px 24px rgba(0,0,0,.08);
  display:grid; gap:10px; align-content:start;
  transition:transform .2s ease;
}
.card:hover{transform:translateY(-4px)}
.ph{
  width:100%; aspect-ratio:4/3; border-radius:10px; background:#e8f7f8;
  display:grid; place-items:center; color:var(--brand); font-weight:800
}

/* ====== Contacto ====== */
form{max-width:520px; margin:12px auto 0; display:grid; gap:12px}
input,textarea{
  width:100%; padding:12px 14px; border-radius:10px; border:1px solid #d9dee3; background:#fff; font:inherit
}
textarea{min-height:120px; resize:vertical}
button{
  padding:12px 16px; border:none; border-radius:999px; background:var(--brand);
  color:#fff; font-weight:800; cursor:pointer
}
button:hover{background:var(--brand-dark)}

/* ====== Footer ====== */
footer{
  background:var(--brand); color:#fff; text-align:center; padding:28px 16px; margin-top:40px;
  border-radius:16px 16px 0 0;
}

/* ====== Controles carrusel ====== */
.hc-prev,.hc-next{
  position:absolute; top:50%; transform:translateY(-50%);
  background:rgba(0,0,0,.45); color:#fff; border:0; width:40px; height:40px;
  border-radius:50%; cursor:pointer; display:grid; place-items:center;
}
.hc-prev{left:12px} .hc-next{right:12px}
.hc-prev:hover,.hc-next:hover{background:rgba(0,0,0,.6)}

/* ====== Animación reveal ====== */
.reveal{opacity:0; transform:translateY(16px); transition:opacity .6s ease, transform .6s ease}
.reveal.show{opacity:1; transform:none}

/* ====== Responsive ====== */
@media (max-width:720px){
  .nav ul{gap:12px; font-size:14px}
  .section{padding-left:14px; padding-right:14px}
  .hero-carousel{height:60vh; min-height:360px}
}

.card img {
  width: 100%;
  height: 180px;          /* Fuerza altura uniforme */
  object-fit: cover;      /* Recorta la imagen para llenar todo */
  border-radius: 10px;
  display: block;
  background: #f0f4f8;    /* Color de fondo por si la imagen no carga */
}

/* Quita/borra la regla global :invalid */

/* Muestra errores solo cuando el form tenga la clase .was-validated */
.was-validated input:invalid,
.was-validated textarea:invalid {
  border-color: #e53e3e;
}

/* Opcional: borde en foco (no rojo) */
input:focus, textarea:focus {
  outline: 3px solid rgba(0,118,168,.15);
  border-color: var(--brand);
}
