html {
  scroll-behavior: smooth;
  scroll-padding-top: 85px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; color: #1e293b; background: #f8fafc; line-height: 1.6; }

/* Menú y Botones */
.navbar { background: #fff; padding: 16px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 100; }
.nav-wrap, .container { max-width: 1140px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
.navbar-nav { list-style: none; display: flex; gap: 24px; align-items: center; }
.nav-link { text-decoration: none; color: #0b2545; font-weight: 600; font-size: 15px; }
.nav-link:hover, .nav-link.active { color: #00a8e8; }
.btn-varkem, .btn-pdf { background: #00a8e8; color: #fff !important; text-decoration: none; font-weight: 600; padding: 10px 22px; border-radius: 6px; display: inline-block; }
.btn-varkem:hover, .btn-pdf:hover { background: #0284c7; }

/* Portada e Inicio */
/*.hero { background: linear-gradient(135deg, #071930, #134074); color: #fff; padding: 90px 20px; }*/
.hero {
    background: linear-gradient(135deg, rgba(7, 25, 48, 0.85), rgba(19, 64, 116, 0.78)), url('../img/planta-varkem.png') center/cover no-repeat;
    color: #fff;
    padding: 110px 20px 130px;
}

.hero-box, .wrap { max-width: 1140px; margin: 0 auto; }
.badge { background: #00a8e8; padding: 5px 12px; border-radius: 20px; font-size: 13px; font-weight: bold; }
.hero h1 { font-size: 42px; margin: 18px 0; max-width: 700px; line-height: 1.2; }
.hero p { font-size: 18px; color: #cbd5e1; max-width: 600px; margin-bottom: 28px; }
.sec { padding: 60px 20px; max-width: 1140px; margin: 0 auto; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: -90px; }
.card {
  background: #fff;
  padding: 28px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border-top: 4px solid #00a8e8;
  text-decoration: none;
  display: block;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}
.card p {
  color: #475569;
  font-size: 15px;
  line-height: 1.5;
}

.card h3 { color: #0b2545; margin-bottom: 10px; font-size: 20px; }
.about-row { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center; padding-top: 65px; }
.about-row.reverse .about-txt { order: 2; }
.about-row.reverse .about-img { order: 1; }
@media (max-width: 850px) {
  .about-row { grid-template-columns: 1fr; gap: 24px; }
  .about-row.reverse .about-txt, .about-row.reverse .about-img { order: unset; }
}
.sub-tag { color: #00a8e8; font-weight: 700; font-size: 13px; letter-spacing: 1px; display: block; margin-bottom: 6px; }
.about-txt h2 { color: #0b2545; font-size: 32px; margin-bottom: 18px; }
.about-txt p { color: #334155; line-height: 1.75; margin-bottom: 14px; font-size: 15.5px; }
.about-img img { width: 100%; border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,0.1); display: block; object-fit: cover; max-height: 380px; }


/* Contacto y Alertas */
.contact-sec { background: #f8fafc; padding: 70px 20px; border-top: 1px solid #e2e8f0; }
.contact-grid { max-width: 1140px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.form-box, .card-box { background: #fff; padding: 32px; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.05); margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; color: #0b2545; font-size: 14px; }
.form-group input, .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-family: inherit; }
.alert-ok { background: #dcfce7; color: #166534; padding: 12px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-err { background: #fee2e2; color: #991b1b; padding: 12px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }

/* Cabeceras internas y Layouts de 2 columnas */
.header-prod, .header-sec { background: linear-gradient(135deg, #071930, #134074); color: #fff; padding: 55px 20px; }
.search-box { width: 100%; max-width: 450px; padding: 12px 16px; border-radius: 8px; border: none; margin-top: 18px; font-size: 15px; }
.prod-layout, .cal-layout, .st-layout { max-width: 1140px; margin: 40px auto; padding: 0 20px; display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
@media (max-width: 850px) { .prod-layout, .cal-layout, .st-layout { grid-template-columns: 1fr; } }
.side-card { background: linear-gradient(135deg, #071930, #134074); color: #fff; padding: 28px 22px; border-radius: 12px; margin-bottom: 20px; text-decoration: none; display: block; transition: 0.2s; }
.side-card:hover { transform: translateY(-3px); }

/* Acordeones Productos, Calidad y Servicio Técnico */
details.fam { margin-bottom: 12px; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
details.fam > summary { background: #0b3b60; color: #fff; padding: 14px 20px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; text-transform: uppercase; font-size: 14px; }
details.fam > summary::after { content: "▼"; font-size: 11px; background: #fff; color: #0b3b60; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
details.fam[open] > summary::after { content: "▲"; }
.fam-body { padding: 14px 20px; }
details.sub { border-bottom: 1px solid #e2e8f0; padding: 8px 0; }
details.sub > summary { color: #00a8e8; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; padding: 6px 0; font-size: 15px; }
.item-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: #f8fafc; margin-top: 6px; border-radius: 6px; font-size: 14px; }
.item-links a { text-decoration: none; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 4px; margin-left: 6px; }
.btn-hs { background: #e2e8f0; color: #0b2545; }
.btn-ft { background: #00a8e8; color: #fff; }
.firma-box, .lab-box { background: #f1f5f9; border-left: 4px solid #00a8e8; padding: 18px 22px; border-radius: 6px; margin: 22px 0; }
.lista-cal { list-style: none; margin-top: 16px; }
.lista-cal li { padding: 10px 0 10px 26px; border-bottom: 1px solid #f1f5f9; position: relative; color: #334155; }
.lista-cal li::before { content: "✓"; color: #00a8e8; font-weight: bold; position: absolute; left: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 20px; }
.feat-item { background: #f8fafc; padding: 20px; border-radius: 8px; border-top: 3px solid #00a8e8; }

/* Pie de página */
footer { background: #071930; color: #cbd5e1; padding: 50px 20px 25px; font-size: 14px; margin-top: 40px; }
.foot-grid { max-width: 1140px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; margin-bottom: 30px; }
footer h4 { color: #fff; margin-bottom: 14px; font-size: 16px; }
footer a { color: #cbd5e1; text-decoration: none; display: block; margin-bottom: 8px; }
footer a:hover { color: #00a8e8; }

/* Galería de Instalaciones */
.gal-sec { padding: 60px 20px; max-width: 1140px; margin: 0 auto; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 28px; }
.gal-item { position: relative; border-radius: 10px; overflow: hidden; height: 220px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); cursor: pointer; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; display: block; }
.gal-item:hover img { transform: scale(1.06); }
.gal-cap { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(7,25,48,0.85)); color: #fff; padding: 14px; font-size: 14px; font-weight: 600; }
/* Visor emergente (Lightbox) */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(7, 25, 48, 0.92); z-index: 999; justify-content: center; align-items: center; flex-direction: column; padding: 20px; }
.lightbox.activo { display: flex; }
.lightbox img { max-width: 90%; max-height: 80vh; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.lightbox-txt { color: #fff; margin-top: 14px; font-size: 16px; font-weight: 600; }
.lightbox-cerrar { position: absolute; top: 20px; right: 28px; color: #fff; font-size: 36px; cursor: pointer; line-height: 1; }
