/* ───────────────────────────────────────────────────────────────────────
   Maestranza RG — sistema de diseño propio (sin Bootstrap/CDN externos)
   Paleta: navy de marca + acento cian "tecnológico" para precisión/CNC.
   ─────────────────────────────────────────────────────────────────────── */

:root {
  --navy-900: #0a1f38;
  --navy-800: #0f2a4b;
  --navy-700: #183562;
  --navy-600: #2a4a85;
  --cyan-500: #19b7d6;
  --cyan-400: #4fd4ef;
  --neutral-50:  #f7f8fa;
  --neutral-100: #edf0f4;
  --neutral-300: #d7dce3;
  --neutral-700: #3a4350;
  --white: #ffffff;

  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(10, 31, 56, 0.08);
  --shadow-md: 0 10px 28px rgba(10, 31, 56, 0.12);
  --shell-width: 1200px;

  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  color: var(--neutral-700);
  background: var(--white);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--navy-800);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; }

.layout-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.main-content { flex: 1; }

.shell {
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header / nav ────────────────────────────────────────────────────── */

.site-header {
  background: var(--navy-800);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  position: relative;
}

.brand { display: flex; align-items: center; }
.brand img { height: 40px; width: auto; }

.nav-toggle-input { display: none; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 600;
  font-size: 0.95rem;
}
.site-nav a { color: rgba(255,255,255,0.82); padding: 8px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover,
.site-nav a.is-active { color: var(--white); border-bottom-color: var(--cyan-500); }
.site-nav a.btn-nav {
  background: var(--cyan-500);
  color: var(--navy-900);
  padding: 8px 18px;
  border-radius: var(--radius);
  border-bottom: none;
}
.site-nav a.btn-nav:hover { background: var(--cyan-400); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--navy-800);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    box-shadow: var(--shadow-md);
  }
  .site-nav a { padding: 14px 24px; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .site-nav a.btn-nav { margin: 12px 24px; text-align: center; }
  .nav-toggle-input:checked ~ .site-nav { max-height: 400px; }
  .nav-toggle-input:checked ~ .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle-input:checked ~ .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-toggle-input:checked ~ .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ── Botones ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--navy-800); color: var(--white); }
.btn--primary:hover { background: var(--navy-700); }
.btn--accent { background: var(--cyan-500); color: var(--navy-900); }
.btn--accent:hover { background: var(--cyan-400); }
.btn--outline { border-color: var(--navy-800); color: var(--navy-800); }
.btn--outline:hover { background: var(--navy-800); color: var(--white); }
.btn--outline-light { border-color: rgba(255,255,255,0.6); color: var(--white); }
.btn--outline-light:hover { background: var(--white); color: var(--navy-800); }

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: var(--white);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(10,31,56,0.92) 0%, rgba(15,42,75,0.78) 45%, rgba(25,183,214,0.35) 100%);
}
.hero__content { position: relative; z-index: 1; max-width: 640px; }
.hero__eyebrow {
  display: inline-block;
  color: var(--cyan-400);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 14px;
}
.hero h1 { color: var(--white); font-size: clamp(2rem, 4.5vw, 3.1rem); margin-bottom: 14px; }
.hero p { color: rgba(255,255,255,0.88); font-size: 1.15rem; margin-bottom: 0; }
.hero__stats {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 32px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.hero__stat strong { display: block; font-size: 1.8rem; color: var(--cyan-400); font-weight: 800; }
.hero__stat span { font-size: 0.85rem; color: rgba(255,255,255,0.75); }

/* ── Secciones genéricas ─────────────────────────────────────────────── */

.section { padding: 72px 0; }
.section--alt { background: var(--neutral-100); }
.section--dark { background: var(--navy-900); color: rgba(255,255,255,0.85); }
.section--dark h2, .section--dark h3 { color: var(--white); }

.section__eyebrow {
  display: block;
  color: var(--cyan-500);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 10px;
}
.section__title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 14px; }
.section__title--center { text-align: center; margin-left: auto; margin-right: auto; }
.section__lede { color: var(--neutral-700); font-size: 1.05rem; max-width: 640px; }
.section__lede--center { margin: 0 auto 36px; text-align: center; }

/* ── Layout de dos columnas ──────────────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.split--reverse .split__media { order: -1; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split--reverse .split__media { order: 0; }
}
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; height: 100%; object-fit: cover; }

/* ── Tarjetas de trabajos / portafolio ───────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 860px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } }

.work-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--cyan-500);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.work-card img { height: 210px; object-fit: cover; }
.work-card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.work-card__title { font-size: 1.05rem; font-weight: 700; color: var(--navy-800); margin-bottom: 8px; }
.work-card__text { font-size: 0.92rem; color: var(--neutral-700); flex: 1; margin-bottom: 0; }

/* ── Checklist de servicios ──────────────────────────────────────────── */

.checklist { list-style: none; }
.checklist li {
  position: relative;
  padding: 10px 0 10px 32px;
  border-bottom: 1px solid var(--neutral-300);
  font-size: 1.02rem;
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 16px;
  height: 16px;
  background: var(--cyan-500);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

/* ── Slideshow de servicios (home) ───────────────────────────────────── */

.slideshow {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
}
.slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.slideshow img.active { opacity: 1; }

/* ── Contacto ────────────────────────────────────────────────────────── */

.contact-list { list-style: none; font-size: 1.05rem; }
.contact-list li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--neutral-300); }
.contact-list li:last-child { border-bottom: none; }
.contact-list strong { color: var(--navy-800); min-width: 150px; display: inline-block; }
.contact-list a { color: var(--navy-700); font-weight: 600; }
.contact-list a:hover { color: var(--cyan-500); }

.map-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.map-frame iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }

/* ── Footer ──────────────────────────────────────────────────────────── */

.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.7); padding: 56px 0 24px; }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr; gap: 28px; } }

.site-footer__brand img { margin-bottom: 14px; }
.site-footer__brand p { color: rgba(255,255,255,0.6); font-size: 0.92rem; max-width: 320px; }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--white);
  transition: background 0.2s ease, transform 0.2s ease;
}
.social-link:hover { background: var(--cyan-500); color: var(--navy-900); transform: translateY(-2px); }

.site-footer__links { display: flex; flex-direction: column; gap: 10px; font-weight: 600; }
.site-footer__links a:hover { color: var(--cyan-400); }

.site-footer__contact { display: flex; flex-direction: column; gap: 10px; font-size: 0.95rem; }
.site-footer__contact a:hover { color: var(--cyan-400); }

.site-footer__copy { text-align: center; font-size: 0.82rem; color: rgba(255,255,255,0.45); margin: 24px 0 0; }
