:root {
  --blue: #1f6faa;
  --dark: #132233;
  --muted: #6c7a89;
  --light: #f5f8fb;
  --accent: #f28c28;
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(19, 34, 51, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
}

.site-header {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(8,24,41,.94) 0%, rgba(8,35,58,.76) 45%, rgba(8,24,41,.28) 100%),
    url("assets/hero-pro-bg.jpg") center center/cover no-repeat;
  color: white;
}

.navbar {
  position: fixed;
  z-index: 20;
  top: 0; left: 0; right: 0;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7%;
  background: rgba(255,255,255,.97);
  box-shadow: 0 8px 28px rgba(0,0,0,.08);
}

.brand img { height: 72px; width: auto; object-fit: contain; display: block; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--dark); text-decoration: none; font-weight: 700; font-size: 14px; }
.nav-cta { color: var(--blue) !important; }
.menu-toggle { display: none; background: none; border: 0; font-size: 28px; }

.hero {
  min-height: 100vh;
  padding: 150px 7% 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
  gap: 56px;
  align-items: center;
}

.eyebrow, .section-title span {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 13px;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 18px; }
h1 { font-size: clamp(42px, 5.3vw, 76px); max-width: 920px; }
h2 { font-size: clamp(30px, 4vw, 46px); }
h3 { font-size: 23px; }

.hero p { font-size: 20px; max-width: 720px; color: rgba(255,255,255,.9); }

.hero-panel {
  width: min(100%, 520px);
  justify-self: end;
  background: rgba(255,255,255,.95);
  color: var(--dark);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.65);
}

.panel-logo {
  padding: 28px 34px 12px;
  background: linear-gradient(135deg, #ffffff 0%, #eef5fb 100%);
}

.panel-logo img {
  display: block;
  width: min(100%, 330px);
  height: auto;
}

.panel-main {
  padding: 26px 34px 28px;
  border-left: 7px solid var(--accent);
}

.panel-main span {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 13px;
}

.panel-main strong {
  display: block;
  color: var(--blue);
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.05;
  margin: 10px 0 12px;
}

.panel-main p {
  margin: 0;
  color: #3c4652;
  font-size: 17px;
}

.panel-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid #e6edf3;
}

.panel-stats div {
  padding: 22px 28px;
  background: #f8fbfe;
}

.panel-stats div + div {
  border-left: 1px solid #e6edf3;
}

.panel-stats strong {
  display: block;
  color: var(--dark);
  font-size: 28px;
  line-height: 1;
}

.panel-stats span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.hero-actions, .contact-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

.btn {
  display: inline-block;
  padding: 14px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.primary { background: var(--blue); color: white; }
.secondary { background: white; color: var(--dark); }

.section { padding: 90px 7%; }
.section-title { max-width: 760px; margin-bottom: 42px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.intro { background: var(--light); }
.intro-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 34px;
  font-size: 20px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.service-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid #e8eef5;
}
.service-visual {
  height: 190px;
  position: relative;
  background-size: cover;
  background-position: center;
}
.service-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(19,34,51,.72), rgba(31,111,170,.28));
}
.service-visual span {
  position: absolute;
  z-index: 1;
  left: 24px;
  bottom: 20px;
  color: white;
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -.04em;
}
.service-visual.lineas { background-image: url("assets/service-lineas.jpg"); }
.service-visual.subestaciones { background-image: url("assets/service-subestaciones.jpg"); }
.service-visual.inspeccion { background-image: url("assets/service-inspeccion.jpg"); }

.service-body { padding: 28px; }
.service-body small {
  display: block;
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
}
.service-body h3 { font-size: 24px; }
.service-body p { color: #3c4652; margin-bottom: 20px; }

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.service-tags span {
  background: #eef5fb;
  color: #33516d;
  border: 1px solid #dbe8f2;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 700;
}

.stats {
  background: var(--dark);
  color: white;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  gap: 24px;
}
.stats strong { display: block; color: var(--accent); font-size: 40px; }
.stats span { color: rgba(255,255,255,.82); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.project-grid article {
  background: var(--light);
  border-radius: 24px;
  overflow: hidden;
}
.project-grid img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}
.project-grid h3, .project-grid p { padding: 0 24px; }
.project-grid h3 { padding-top: 24px; }
.project-grid p { padding-bottom: 24px; color: var(--muted); }

.project-list {
  margin-top: 34px;
  background: white;
  border: 1px solid #e5edf5;
  border-radius: 22px;
  padding: 30px;
}

.clients { background: var(--light); }
.clients img {
  width: min(900px, 100%);
  display: block;
  margin: auto;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.contact-box {
  background:
    linear-gradient(135deg, rgba(31,111,170,.95), rgba(19,34,51,.98));
  color: white;
  border-radius: 30px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.contact-box p { color: rgba(255,255,255,.86); }
.address { width: 100%; margin-top: 12px; }

footer {
  padding: 28px 7%;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  background: #0d1722;
  color: white;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .brand img { height: 58px; }
  .menu-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 78px; left: 0; right: 0;
    display: none;
    flex-direction: column;
    background: white;
    padding: 22px;
  }
  .nav-links.open { display: flex; }
  .hero, .intro-grid, .cards, .project-grid, .stats, .contact-box {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 130px 6% 70px;
    gap: 34px;
  }
  .hero-panel {
    justify-self: start;
    width: 100%;
    max-width: 560px;
  }
  .panel-logo img { width: min(100%, 260px); }
  .panel-stats { grid-template-columns: 1fr; }
  .panel-stats div + div {
    border-left: 0;
    border-top: 1px solid #e6edf3;
  }
  h1 { font-size: clamp(36px, 10vw, 54px); }
  .hero p { font-size: 18px; }
  .section { padding: 70px 6%; }
}
