/* =========================================
   ConstructorMaster - Estilos principales
   Paleta: Azul #1A4B7C, Naranja #F38D21, Gris #4A4A4A, Blanco #FFFFFF
   ========================================= */

:root {
  --azul: #0E5AA7;         /* Azul principal */
  --azul-medio: #1E73BE;   /* Azul medio */
  --azul-claro: #4FB3E8;   /* Azul claro */
  --azul-profundo: #0A3D6E;/* Azul oscuro profundo */
  --naranja: #2FBF71;      /* Usado como acento/CTA (verde principal) */
  --verde-medio: #27AE60;
  --verde-claro: #6EDC9F;
  --verde-oscuro: #1E8449;
  --gris: #0A3D6E;         /* Texto principal (alto contraste) */
  --gris-claro: #E6E6E6;
  --gris-medio: #BFC9D1;
  --blanco: #FFFFFF;
  --bg: #FFFFFF;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  --header-h: 72px;
}

/* Reset básico y tipografía */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--gris);
  background: var(--bg);
  line-height: 1.6;
  padding-top: var(--header-h);
}
html, body { overflow-x: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--azul); text-decoration: none; }

/* Contenedor */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Botones */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--naranja);
  color: var(--blanco);
  box-shadow: var(--shadow);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--azul);
  border: 2px solid var(--azul);
}
.btn-outline:hover { background: var(--azul); color: var(--blanco); }

/* Header sticky */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  transition: background .25s ease, box-shadow .25s ease, padding .25s ease;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  box-shadow: none;
}
.site-header.scrolled {
  background: var(--blanco);
  box-shadow: var(--shadow);
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-wrap img {
  height: 50px;
  width: auto;
}
.brand {
  font-weight: 700;
  color: var(--azul);
  font-size: 18px;
}

/* Navegación */
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav a {
  color: var(--azul);
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 6px;
}
.nav a:hover { background: rgba(26,75,124,0.08); }
.nav a:hover { background: rgba(14,90,167,0.10); }
.nav .cta {
  margin-left: 6px;
}

/* Hamburguesa (mobile) */
.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid rgba(26,75,124,0.2);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.hamburger span {
  position: relative;
  width: 18px;
  height: 2px;
  background: var(--azul);
  display: block;
}
.hamburger span::before,
.hamburger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--azul);
  transition: transform .2s ease, top .2s ease, opacity .2s ease;
}
.hamburger span::before { top: -6px; }
.hamburger span::after { top: 6px; }
.hamburger.active span { background: transparent; }
.hamburger.active span::before { top: 0; transform: rotate(45deg); }
.hamburger.active span::after { top: 0; transform: rotate(-45deg); }

/* Hero */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--header-h));
  padding-top: 0;
  padding-bottom: 0;
  color: var(--blanco);
  background: var(--azul) url("../img/hero-placeholder.jpg") center/cover no-repeat;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 32px;
}
.hero-lead {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-form {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(10,61,110,0.85), rgba(30,115,190,0.55));
}
.hero .container { position: relative; z-index: 1; }
.hero-title {
  font-size: 44px;
  line-height: 1.15;
  margin: 0 0 10px 0;
  color: var(--blanco);
  font-weight: 800;
  max-width: 720px;
}
.hero-subtitle {
  font-size: 18px;
  max-width: 640px;
  margin-bottom: 22px;
  color: #EAF2F9;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.hero-bullets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 720px;
}
.hero-bullets .bullet {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: #EAF2F9;
  border-radius: 12px;
  padding: 14px;
}
.hero-bullets .bullet strong { color: #fff; }

/* Formulario en hero */
.hero-form {
  background: var(--blanco);
  color: var(--gris);
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.hero-form h3 {
  margin-top: 0;
  color: var(--azul);
  font-size: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-weight: 600; color: var(--azul); font-size: 13px; }
.form-group input,
.form-group select,
.form-group textarea {
  border: 1.5px solid rgba(26,75,124,0.25);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--azul);
  box-shadow: 0 0 0 4px rgba(26,75,124,0.12);
}
.form-actions { margin-top: 8px; }
.notice {
  background: var(--gris-claro);
  color: var(--azul);
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 14px;
}

/* Sección genérica */
section { padding: 64px 0; }
.section-title {
  font-size: 32px;
  color: var(--azul);
  margin: 0 0 10px 0;
  font-weight: 800;
}
.section-subtitle {
  color: var(--gris);
  margin-bottom: 28px;
}

/* Servicios destacados */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  background: var(--blanco);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,0.12); }
.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(47,191,113,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.card h4 { margin: 6px 0; color: var(--azul); }
.card p { margin: 0; color: var(--gris); }

/* Por qué elegirnos */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.feature {
  background: var(--blanco);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.feature h5 { margin: 6px 0; color: var(--azul); font-size: 16px; }
.feature p { margin: 0; font-size: 14px; }

/* Proyectos recientes / Galería */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.filter-bar .filter {
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid var(--azul);
  color: var(--azul);
  background: transparent;
  font-weight: 600;
  cursor: pointer;
}
.filter-bar .filter.active {
  background: var(--azul);
  color: var(--blanco);
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #f6f8fb;
}
.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,61,110,0.7), rgba(10,61,110,0.0) 60%);
  opacity: 0;
  transition: opacity .2s ease;
}
.gallery-item:hover .overlay { opacity: 1; }
.gallery-item .caption {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  color: var(--blanco);
  font-weight: 600;
}

/* Testimonios */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.testimonial {
  background: var(--blanco);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.testimonial p { margin: 0 0 8px 0; }
.testimonial .author { color: var(--azul); font-weight: 700; }

/* CTA grande */
.cta {
  background: linear-gradient(135deg, rgba(14,90,167,1), rgba(10,61,110,0.95));
  color: var(--blanco);
  text-align: center;
  padding: 64px 0;
}
.cta h3 { margin: 0 0 10px 0; font-size: 28px; }
.cta p { margin: 0 0 18px 0; }

/* Footer */
.site-footer {
  background: #0A3D6E; /* Azul profundo */
  color: #EAF2F9;
}
.footer-top {
  padding: 48px 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 18px;
}
.footer-grid h5 { margin: 0 0 10px 0; color: #EAF2F9; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: #EAF2F9; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand img { height: 42px; }
.footer-desc { margin-top: 8px; color: #CFE1EF; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 16px 0;
  font-size: 14px;
}
.socials { display: flex; gap: 10px; }
.socials a {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
}
.socials a:hover { background: rgba(255,255,255,0.2); }

/* Páginas internas */
.page-hero {
  background: url("../img/hero-placeholder.svg") center/cover no-repeat;
  color: var(--blanco);
  padding: 120px 0 64px 0;
  position: relative;
  margin-top: 0;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10,61,110,0.8);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 {
  margin: 0;
  font-size: 40px;
  font-weight: 800;
}
.page-hero p { margin-top: 10px; color: #EAF2F9; }

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}
.list-check {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list-check li {
  padding-left: 26px;
  position: relative;
  margin-bottom: 8px;
}
.list-check li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--naranja);
}
.info-block {
  background: var(--blanco);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
}

/* Contacto */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.map {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.contact-info .item { margin-bottom: 10px; }
.contact-info .label { color: var(--azul); font-weight: 700; }

/* Responsivo */
@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { padding: 36px 0; }
  .footer-brand img { height: 38px; }
  .footer-desc { font-size: 14px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .testimonials { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero { min-height: calc(100vh - var(--header-h)); padding-top: 12px; padding-bottom: 12px; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-bullets { grid-template-columns: 1fr; }
  .hero-title { font-size: 36px; }
  .hero-subtitle { font-size: 16px; }
  .hero-form { margin-top: 12px; }
}
@media (max-width: 768px) {
  .nav { display: none; }
  .hamburger { display: inline-flex; }
  .nav.open {
    display: flex;
    position: fixed;
    top: calc(var(--header-h) + 8px);
    left: 12px;
    right: 12px;
    background: var(--blanco);
    padding: 12px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    flex-direction: column;
    gap: 8px;
    min-width: 220px;
    z-index: 5000;
  }
  .nav.open a { padding: 12px 16px; border-radius: 8px; }
  .nav.open a:hover { background: rgba(14,90,167,0.10); }
  .hero-title { font-size: 28px; }
  .hero-subtitle { font-size: 15px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-top { padding: 28px 0; }
  .footer-brand { justify-content: flex-start; }
  .socials { flex-wrap: wrap; }
  .cards { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .testimonials { grid-template-columns: 1fr; }
}

/* Backdrop para menú móvil */
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2500;
  pointer-events: none;
  display: none;
}
.menu-backdrop.show { display: block; pointer-events: auto; }
body.menu-open { overflow: hidden; }

