:root {
  --azul: #b31217;        /* rojo principal */
  --azul-2: #7a0a0e;      /* rojo oscuro */
  --naranja: #e63329;     /* acento rojo vivo */
  --naranja-2: #ff4b3e;   /* acento claro */
  --oscuro: #0a0a0a;      /* negro */
  --negro-2: #141414;
  --gris: #f5f5f6;
  --texto: #1a1a1a;
  --muted: #6b6b6b;
  --blanco: #ffffff;
  --sombra: 0 12px 40px rgba(0, 0, 0, 0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--texto);
  line-height: 1.65;
  background: var(--blanco);
}
h1, h2, h3, .logo { font-family: 'Montserrat', sans-serif; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container { width: min(1160px, 92%); margin: 0 auto; }
.section { padding: 96px 0; }
.eyebrow {
  color: var(--naranja);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.section__head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section__head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--azul); margin: 10px 0 14px; }
.section__head p { color: var(--muted); }

/* Botones */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  transition: transform .2s, box-shadow .2s, background .2s;
  cursor: pointer;
  border: none;
  font-size: .95rem;
}
.btn--primary { background: linear-gradient(135deg, var(--naranja), var(--naranja-2)); color: #fff; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(230,126,34,.4); }
.btn--ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.6); }
.btn--ghost:hover { background: rgba(255,255,255,.12); }

/* Header */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: transparent; transition: background .3s, box-shadow .3s, padding .3s;
  padding: 20px 0;
}
.header.scrolled { background: var(--blanco); box-shadow: 0 4px 20px rgba(0,0,0,.08); padding: 12px 0; }
.header__inner { display: flex; align-items: center; justify-content: space-between; }
.logo { font-weight: 800; font-size: 1.5rem; color: #fff; letter-spacing: -.02em; }
.logo span { color: var(--naranja); }
.header.scrolled .logo { color: var(--azul); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: #fff; font-weight: 500; font-size: .95rem; transition: color .2s; }
.header.scrolled .nav a { color: var(--texto); }
.nav a:hover { color: var(--naranja); }
.nav__cta { background: var(--naranja); color: #fff !important; padding: 9px 20px; border-radius: 8px; }
.nav__cta:hover { background: var(--naranja-2); }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.nav__toggle span { width: 26px; height: 3px; background: #fff; border-radius: 2px; transition: .3s; }
.header.scrolled .nav__toggle span { background: var(--azul); }

/* Hero */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  background: #000 url('assets/img/equipo.jpg') center/cover no-repeat;
  overflow: hidden; color: #fff;
}
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(120deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.75) 45%, rgba(122,10,14,.55) 100%),
    radial-gradient(circle at 85% 15%, rgba(230,51,41,.35), transparent 45%);
}
.hero__content { position: relative; max-width: 760px; padding: 120px 0 80px; }
.hero__badge {
  display: inline-block; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  padding: 7px 16px; border-radius: 40px; font-size: .82rem; font-weight: 600; margin-bottom: 22px;
}
.hero__title { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.08; font-weight: 800; }
.hero__text { margin: 22px 0 32px; font-size: 1.15rem; color: rgba(255,255,255,.85); max-width: 60ch; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__scroll { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); }
.hero__scroll span {
  display: block; width: 24px; height: 40px; border: 2px solid rgba(255,255,255,.5); border-radius: 14px; position: relative;
}
.hero__scroll span::after {
  content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; background: #fff; border-radius: 2px; animation: scroll 1.6s infinite;
}
@keyframes scroll { 0%{opacity:1;top:8px} 100%{opacity:0;top:20px} }

/* Nosotros */
.nosotros__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: center; }
.nosotros__media {
  position: relative; min-height: 380px; border-radius: 18px;
  box-shadow: var(--sombra);
  background-image:
    linear-gradient(135deg, rgba(0,0,0,.35), rgba(122,10,14,.35)),
    url('assets/img/prevencion.jpg');
  background-size: cover; background-position: center;
}
.nosotros__badge {
  position: absolute; bottom: -24px; right: -20px; background: var(--naranja); color: #fff;
  padding: 22px 28px; border-radius: 14px; text-align: center; box-shadow: var(--sombra);
}
.nosotros__badge strong { display: block; font-size: 2rem; font-family: 'Montserrat', sans-serif; }
.nosotros__body h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); color: var(--azul); margin: 10px 0 16px; }
.nosotros__body p { color: var(--muted); margin-bottom: 20px; }
.checklist { list-style: none; margin-bottom: 26px; }
.checklist li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.checklist li::before {
  content: '✓'; position: absolute; left: 0; color: #fff; background: var(--naranja);
  width: 20px; height: 20px; border-radius: 50%; font-size: .75rem; display: grid; place-items: center; top: 3px;
}

/* Servicios */
.servicios { background: var(--gris); }
.servicios__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.card {
  background: #fff; padding: 36px 28px; border-radius: 16px; box-shadow: var(--sombra);
  transition: transform .25s, box-shadow .25s; border-top: 4px solid transparent;
}
.card:hover { transform: translateY(-8px); border-top-color: var(--naranja); box-shadow: 0 20px 50px rgba(10,61,98,.18); }
.card__media {
  width: 100%; height: 160px; border-radius: 12px; overflow: hidden; margin-bottom: 18px;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card__media img { transform: scale(1.06); }
.logo__img { height: 52px; width: auto; display: block; background: #fff; padding: 5px 10px; border-radius: 8px; }
.logo__img--footer { height: 60px; background: #fff; padding: 6px 12px; border-radius: 8px; }
.cliente img { max-height: 56px; max-width: 80%; object-fit: contain; filter: grayscale(1); opacity: .7; transition: .25s; }
.cliente:hover img { filter: grayscale(0); opacity: 1; }
.card h3 { color: var(--azul); margin-bottom: 10px; font-size: 1.2rem; }
.card p { color: var(--muted); font-size: .95rem; }

/* Detalle de servicios */
.detalle { background: var(--blanco); }
.detalle__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 26px; }
.panel {
  background: var(--gris); border-radius: 16px; padding: 30px 28px;
  border-left: 4px solid var(--naranja); transition: transform .25s, box-shadow .25s;
}
.panel:hover { transform: translateY(-6px); box-shadow: var(--sombra); }
.panel h3 { color: var(--azul); margin-bottom: 16px; font-size: 1.25rem; }
.panel ul { list-style: none; }
.panel li { padding-left: 24px; position: relative; margin-bottom: 9px; color: var(--muted); font-size: .93rem; }
.panel li::before { content: '▸'; position: absolute; left: 0; color: var(--naranja); font-weight: 700; }

/* Misión y Visión */
.mv { background: linear-gradient(135deg, var(--oscuro), var(--negro-2)); }
.mv__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.mv__card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(230,51,41,.3);
  border-radius: 16px; padding: 40px 34px; color: rgba(255,255,255,.85);
}
.mv__card .eyebrow { font-size: 1rem; }
.mv__card p { margin-top: 14px; font-size: 1.05rem; }
@media (max-width: 760px) { .mv__grid { grid-template-columns: 1fr; } }

/* Acreditaciones / stats */
.acreditaciones { background: linear-gradient(135deg, var(--oscuro), var(--azul)); color: #fff; }
.acreditaciones .section__head h2 { color: #fff; }
.acreditaciones .section__head p { color: rgba(255,255,255,.75); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 30px; text-align: center; }
.stat strong { font-size: 3rem; font-family: 'Montserrat', sans-serif; color: var(--naranja); display: block; }
.stat span { color: rgba(255,255,255,.8); font-size: .95rem; }

/* Clientes */
.clientes__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.cliente {
  background: var(--gris); border-radius: 12px; height: 90px; display: grid; place-items: center;
  color: var(--muted); font-weight: 600; transition: .2s; border: 1px solid #e6edf3;
}
.cliente:hover { background: #fff; box-shadow: var(--sombra); color: var(--azul); }

/* Contacto */
.contacto { background: var(--gris); }
.contacto__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.contacto h2 { color: var(--azul); font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin: 10px 0 22px; }
.contacto__list { list-style: none; }
.contacto__list li { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; font-size: 1.05rem; }
.contacto__list span { font-size: 1.3rem; }
.contacto__list a:hover { color: var(--naranja); }
.form { background: #fff; padding: 34px; border-radius: 16px; box-shadow: var(--sombra); display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form input, .form textarea {
  width: 100%; padding: 13px 15px; border: 1px solid #dce4ea; border-radius: 9px;
  font-family: inherit; font-size: .95rem; transition: border .2s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--naranja); }
.form__msg { font-size: .9rem; color: #27ae60; text-align: center; min-height: 1em; }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(0,0,0,.7); backdrop-filter: blur(3px);
}
.modal.open { display: flex; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal__box {
  background: #fff; border-radius: 18px; padding: 40px 34px; max-width: 420px; width: 100%;
  text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.4); animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal__icon {
  width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 2rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #2ecc71, #27ae60);
}
.modal__icon--error { background: linear-gradient(135deg, var(--naranja), var(--azul-2)); }
.modal__title { color: var(--azul); font-size: 1.4rem; margin-bottom: 10px; }
.modal__text { color: var(--muted); margin-bottom: 24px; }

/* Footer */
.footer { background: var(--oscuro); color: rgba(255,255,255,.8); padding: 40px 0; }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.footer .logo { color: #fff; }
.footer p { font-size: .9rem; }

/* Responsive */
@media (max-width: 860px) {
  .nav {
    position: fixed; inset: 0 0 0 auto; width: 78%; max-width: 320px; background: var(--azul);
    flex-direction: column; justify-content: center; gap: 28px; transform: translateX(100%);
    transition: transform .3s; box-shadow: -10px 0 40px rgba(0,0,0,.3);
  }
  .nav.open { transform: translateX(0); }
  .nav a { color: #fff !important; font-size: 1.1rem; }
  .nav__toggle { display: flex; z-index: 101; }
  .nosotros__grid, .contacto__grid { grid-template-columns: 1fr; gap: 40px; }
  .nosotros__media { min-height: 280px; }
  .form__row { grid-template-columns: 1fr; }
}
