/* Base settings */
:root {
  color-scheme: light;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
  font-size: 16px;
  color: #0b1e2b;
  background: #f6f8fb;
  --bg: #d9d9d9;
  --primary: #0b2a44; /* deep navy */
  --primary-contrast: #ffffff;
  --accent: #c78b2a; /* warm gold */
  --accent-soft: #fde8c8;
  --surface: #eaeaea;
  --surface-soft: #efefef;
  --surface-strong: #d6d6d6;
  --text: #0b1e2b; /* body text */
  --heading: #071428; /* headings */
  --muted: #6b7785;
  --border: rgba(11,42,68,0.08);
  --shadow: 0 20px 48px rgba(11,42,68,0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: radial-gradient(circle at 18% 10%, rgba(13, 42, 73, 0.08), transparent 18%),
              radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.6), transparent 14%),
              radial-gradient(circle at 70% 90%, rgba(13, 42, 73, 0.06), transparent 24%),
              linear-gradient(180deg, var(--bg) 0%, var(--surface) 45%, var(--bg) 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', 'Georgia', serif;
  color: var(--heading);
  margin: 0 0 18px 0;
  line-height: 1.08;
}

h1 { font-size: clamp(2rem, 3.6vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); font-weight: 600; }
h3 { font-size: clamp(1.125rem, 2.4vw, 1.5rem); font-weight: 600; }

p, li, a, span {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
}

a {
  color: var(--primary);
  text-decoration: underline dotted rgba(11,42,68,0.12);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
  color: var(--primary-contrast);
  box-shadow: 0 18px 44px rgba(199,139,42,0.14);
}

.button-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}

/* Muted text */
.muted { color: var(--muted); }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top right, rgba(255, 212, 150, 0.12), transparent 18%),
              radial-gradient(circle at 35% 18%, rgba(13, 42, 73, 0.08), transparent 14%),
              radial-gradient(circle at 78% 30%, rgba(13, 42, 73, 0.1), transparent 16%),
              radial-gradient(circle at 50% 80%, rgba(95, 130, 180, 0.1), transparent 22%),
              radial-gradient(circle at 25% 70%, rgba(255,255,255,0.08), transparent 28%);
  opacity: 1;
  mix-blend-mode: screen;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

/* Header */
.header-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(90deg, var(--primary) 0%, #071428 100%);
  color: var(--primary-contrast);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Force consistent vertical centering for header elements */
.header-bar {
  display: flex;
  align-items: center;
}

.header-bar .header-wrap {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.header-bar .main-nav,
.header-bar .logo-link,
.header-bar .phone-cta,
.header-bar .nav-dropdown {
  display: inline-flex;
  align-items: center;
}

.header-bar .logo-link {
  justify-self: center;
  height: 32px;
}

.header-bar .dropdown-toggle,
.header-bar .phone-cta {
  height: 32px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.header-bar.header-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.header-wrap {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 4px 8px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  position: relative;
}

.logo-link {
  position: relative;
  left: 0;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--primary-contrast);
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  transform: translateY(24px);
  font-size: 1.9rem;
  height: 60px;
}

/* Placements: menu left, logo center, CTA right */
.main-nav { grid-column: 1; justify-self: start; }
.logo-link { grid-column: 2; justify-self: center; }
.phone-cta { grid-column: 3; justify-self: end; }

.main-nav {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.nav-dropdown {
  position: relative;
  overflow: visible;
  z-index: 60;
  display: flex;
  align-items: center;
}

.dropdown-toggle,
.phone-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  min-width: 90px;
  height: 32px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
}


.dropdown-toggle {
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  color: var(--primary-contrast);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
  transform: translateY(-16px);
}

.phone-cta {
  background: linear-gradient(135deg, #ff9f3d 0%, #ffc87b 100%);
  color: var(--primary-contrast);
  box-shadow: 0 18px 44px rgba(255, 159, 61, 0.12);
  justify-self: end;
  transform: translateY(-16px);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  width: 280px;
  max-width: 360px;
  max-height: calc(100vh - 140px);
  background: linear-gradient(180deg, rgba(11,42,68,0.98), rgba(7,20,40,0.95));
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(2,6,23,0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms ease;
  z-index: 12000;
  overflow: hidden;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Allow opening dropdown via JS by toggling .open on .nav-dropdown */
.nav-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu {
  padding: 12px 0;
}

.dropdown-menu a {
  display: block;
  padding: 12px 18px;
  color: var(--primary-contrast) !important;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.dropdown-menu a:last-child {
  border-bottom: none;
}

.dropdown-menu a:hover {
  background: rgba(255,255,255,0.03);
}

.main-nav > a {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  transition: color 180ms ease;
}

.main-nav > a:hover {
  color: var(--accent-soft);
}

.phone-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  min-width: 0;
  background: linear-gradient(135deg, #f79f3d 0%, #ffc78b 100%);
  color: #0d2a49;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 20px 50px rgba(247, 159, 61, 0.24);
}

/* Hero */
.hero-panel {
  overflow: hidden;
  padding: 28px 0 12px;
  min-height: calc(100vh - 64px);
  background: linear-gradient(180deg, #f6f8fb 0%, var(--surface) 70%);
  position: relative;
}

.hero-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 25% 20%, rgba(13, 42, 73, 0.08), transparent 16%),
              radial-gradient(circle at 80% 15%, rgba(255,255,255,0.55), transparent 20%),
              radial-gradient(circle at 60% 85%, rgba(13, 42, 73, 0.06), transparent 24%);
  opacity: 0.55;
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px 0;
}

.hero-copy {
  position: relative;
  z-index: 1;
  margin-left: 40px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero-copy h1 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(2.2rem, 3.5vw, 3.6rem);
  line-height: 1.05;
}

.hero-copy p {
  margin: 20px 0 24px;
  max-width: 540px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-buttons .button {
  min-width: 170px;
}

.hero-benefits {
  margin: 24px 0 0;
  padding-left: 20px;
  color: var(--text);
  list-style: disc;
  list-style-position: inside;
  max-width: 540px;
  line-height: 1.8;
}

.hero-benefits li {
  margin-bottom: 12px;
}

.hero-visual {
  display: flex;
  justify-content: flex-end;
}

.hero-card {
  width: 100%;
  max-width: 520px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 24px 54px rgba(13, 42, 73, 0.12);
  background: linear-gradient(180deg, rgba(13, 42, 73, 0.96), rgba(17, 59, 99, 0.96));
}

.hero-card.logo-only {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: hidden;
  border-radius: 50%;
}

.hero-card.logo-only img {
  display: block;
  width: min(100%, 420px);
  height: auto;
  object-fit: cover;
  clip-path: circle(50% at 50% 50%);
  border-radius: 50%;
  background: transparent !important;
}

.hero-card.logo-only .hero-card-top {
  display: none;
}

.hero-card img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.section {
  padding: 72px 24px;
  background: var(--surface);
  min-height: 620px;
}

.section:nth-child(even) {
  background: var(--surface-soft);
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 40px;
}

.section-label {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.4rem);
  line-height: 1.05;
  color: var(--heading);
}

.section-head p {
  margin: 20px auto 0;
  color: var(--text);
  max-width: 680px;
  line-height: 1.9;
}

/* Ensure readable dark text on light sections and hero area */
.hero-panel h1, .hero-panel h2, .hero-panel h3, .hero-panel p, .hero-panel li, .hero-panel a,
.section:not(.contact) h1, .section:not(.contact) h2, .section:not(.contact) h3, .section:not(.contact) p, .section:not(.contact) li, .section:not(.contact) a {
  color: var(--text);
}

.stats-grid,
.trust-cards,
.services-grid,
.why-grid,
.projects-grid,
.process-grid,
.certifications-grid,
.contact-layout {
  display: grid;
  gap: 20px;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
  align-items: stretch;
}

.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 180px;
  background: rgba(247, 250, 255, 0.96);
  border: 1px solid rgba(30, 109, 168, 0.12);
  border-radius: 24px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(16, 42, 68, 0.08);
}

.stat-card span {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  color: #0d2a49;
  margin-bottom: 10px;
}

.stat-card p {
  margin: 0;
  color: #111111;
  line-height: 1.8;
}

/* Final override: ensure dark text on all light sections */
.hero-panel h1, .hero-panel h2, .hero-panel h3, .hero-panel p, .hero-panel li, .hero-panel a,
.section:not(.contact) h1, .section:not(.contact) h2, .section:not(.contact) h3, .section:not(.contact) p, .section:not(.contact) li, .section:not(.contact) a {
  color: var(--text) !important;
}

.trust-cards,
.services-grid,
.why-grid,
.projects-grid,
.process-grid,
.certifications-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.certifications-grid.certifications-single {
  grid-template-columns: 1fr;
  justify-items: center;
}

.trust-card,
.service-card,
.why-card,
.project-card,
.process-step,
.cert-box,
.contact-card,
.contact-form {
  background: rgba(13, 42, 73, 0.96);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 18px 40px rgba(13, 42, 73, 0.14);
  min-height: 400px;
}

.cert-box-images,
.certifications-grid.certifications-single .cert-box {
  min-height: auto;
  padding: 20px;
  width: min(100%, 1040px);
}

.section .trust-card h3,
.section .service-card h3,
.section .why-card h3,
.section .project-summary h3,
.section .process-step h3,
.section .cert-box h3,
.section .contact-card h3 {
  margin: 0 0 16px;
  color: var(--accent) !important;
  font-size: 1.2rem;
}

.section .trust-card p,
.section .service-card p,
.section .why-card p,
.section .project-summary p,
.section .process-step p,
.section .cert-box p,
.section .contact-card p {
  margin: 0;
  color: #ffffff !important;
  line-height: 1.8;
}

/* Ensure any links or list items inside dark cards are white */
.section .trust-card a, .section .service-card a, .section .why-card a, .section .project-summary a, .section .process-step a, .section .cert-box a, .section .contact-card a,
.section .trust-card li, .section .service-card li, .section .why-card li, .section .project-summary li, .section .process-step li, .section .cert-box li, .section .contact-card li {
  color: #ffffff !important;
}

.cert-images {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  align-items: center;
}

.cert-images img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  object-position: center;
  border-radius: 18px;
  border: 1px solid rgba(30, 109, 168, 0.08);
  background: #f7f9fc;
}
.trust-card {
  min-height: 260px;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 260px;
}

.service-icon,
.why-icon,
.step-number {
  width: 60px;
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(247, 159, 61, 0.14);
  color: #f79f3d;
  font-size: 1.6rem;
}

.service-card a {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f79f3d 0%, #ffc78b 100%);
  color: #0d2a49;
  padding: 14px 18px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease;
}

.service-card a:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #ff9f4a 0%, #ffd29f 100%);
}

.projects-carousel {
  position: relative;
  width: 100%;
}

.projects-grid {
  display: flex;
  gap: 20px;
  overflow: hidden;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  margin: 0 -10px;
}

.projects-grid::-webkit-scrollbar {
  display: none;
}

.project-card {
  overflow: hidden;
  display: grid;
  grid-template-rows: 180px 1fr;
  min-height: 320px;
  min-width: calc((100% - 20px) / 2);
  flex: 0 0 calc((100% - 20px) / 2);
  border-radius: 24px;
  scroll-snap-align: start;
  background: rgba(247, 250, 255, 0.98);
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: rgba(247, 250, 255, 0.96);
}

.project-summary {
  padding: 14px 16px 18px;
}

/* Project cards: bold labels in orange, remaining copy in dark text */
.section .projects-grid .project-summary strong,
.section .projects-grid .project-summary b,
.section .project-card .project-summary strong,
.section .project-card .project-summary b {
  color: var(--accent) !important;
  font-weight: 700;
}

/* Specific accent for the four highlighted project titles only */
.section.proyectos .project-summary h3.special-accent,
.section#proyectos .project-summary h3.special-accent,
.projects-grid .project-summary h3.special-accent,
.project-card .project-summary h3.special-accent {
  color: #ff2f00 !important;
}

.section .projects-grid .project-summary p,
.section .project-card .project-summary p,
.section .projects-grid .project-summary span,
.section .project-card .project-summary span,
.section .projects-grid .project-summary li,
.section .project-card .project-summary li {
  color: var(--text) !important;
}

/* Label style for project detail prefixes (Problema detectado / Solución aplicada / Resultado) */
.section .project-summary p strong,
.section .project-summary p b,
.project-summary p strong,
.project-summary p b {
  color: #f79f3d !important;
}

/* Ensure process step copy is dark (black) on the method/process section */
.process-grid .process-step p,
.process-grid .process-step li,
.process-grid .process-step a {
  color: var(--text) !important;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: start center;
  background: rgba(4, 17, 40, 0.92);
  padding: 40px 24px 24px;
}

.lightbox-overlay.hidden {
  display: none;
}

.lightbox-content {
  position: relative;
  width: min(680px, 50vw);
  max-height: min(55vh, 440px);
}

.lightbox-overlay.small .lightbox-content {
  width: min(420px, 40vw);
  max-height: min(42vh, 360px);
}

.lightbox-content img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 159, 68, 0.98);
  color: #072244;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.30);
}

.lightbox-close:hover {
  transform: scale(1.04);
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  background: rgba(255, 159, 68, 0.95);
  color: #072244;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(3, 18, 38, 0.16);
  z-index: 2;
}

.carousel-control.prev {
  left: 0;
}

.carousel-control.next {
  right: 0;
}

.carousel-control:hover {
  transform: translateY(-50%) scale(1.05);
}

@media (max-width: 960px) {
  .projects-grid {
    padding: 12px 16px;
    grid-template-columns: auto 1fr auto;
  }

  .carousel-control {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 680px) {
  .projects-grid {
    grid-auto-columns: minmax(260px, 100%);
    gap: 16px;
  }

  .project-card {
    grid-template-rows: 160px 1fr;
    min-height: 280px;
  }

  .carousel-control {
    display: none;
  }
}
.project-summary p {
  margin: 12px 0 0;
}

.process-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

.process-step {
  display: grid;
  gap: 0;
  background: rgba(247, 250, 255, 0.98);
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 26px 60px rgba(3, 18, 38, 0.12);
  min-height: 250px;
}

.step-icon {
  display: block;
  height: 110px;
  width: 100%;
  background: linear-gradient(180deg, rgba(9, 30, 58, 0.08), rgba(255, 255, 255, 0.1));
  overflow: hidden;
}

.step-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: rgba(255, 255, 255, 0.04);
}

.process-content {
  padding: 14px 14px 16px;
  display: grid;
  gap: 8px;
}

.step-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.step-number {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(7, 29, 59, 0.16);
}

.step-heading h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.2;
  color: var(--surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.process-step p {
  margin: 0;
  color: rgba(17, 24, 39, 0.82);
  line-height: 1.85;
}

.certifications-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cert-box {
  min-height: 180px;
}

.section.contact {
  background: rgba(5, 24, 42, 0.98);
  padding: 38px 20px 48px;
}

.section.contact .section-head {
  max-width: 640px;
  margin: 0 auto 20px;
}

.section.contact .section-head h2 {
  font-size: clamp(1.8rem, 2.2vw, 2.4rem);
  line-height: 1.1;
}

.section.contact .section-head .section-label {
  color: #ffcb7f;
}

.contact-layout {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: start;
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto;
  justify-content: space-between;
}

.contact-form,
.contact-panel {
  background: rgba(13, 42, 73, 0.95);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 14px 32px rgba(13, 42, 73, 0.14);
  min-height: 420px;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid label {
  display: grid;
  gap: 8px;
  color: rgba(255,255,255,0.92);
  font-weight: 600;
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.95);
  border-radius: 14px;
  padding: 10px 12px;
  min-height: 42px;
}

.contact-form textarea {
  min-height: 130px;
  resize: vertical;
  grid-column: span 2;
}

.contact-form button {
  width: fit-content;
  padding: 12px 26px;
  font-size: 0.98rem;
  align-self: end;
}

.contact-panel {
  display: grid;
  gap: 16px;
  justify-content: stretch;
}

.contact-logo {
  width: 100%;
  max-width: 180px;
  border-radius: 18px;
  justify-self: center;
}

.contact-panel-copy {
  margin: 0;
  color: rgba(255,255,255,0.96);
  line-height: 1.75;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 8px 18px rgba(13, 42, 73, 0.12);
}

.contact-panel-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.contact-panel-item:first-of-type {
  border-top: none;
}

.contact-panel-item .icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255,255,255,0.16);
  color: #ffd385;
  font-size: 1.25rem;
}

.contact-panel-item strong {
  display: block;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.94);
}

.contact-panel-item a {
  color: rgba(248,250,252,0.88);
  text-decoration: none;
  font-weight: 600;
}


/* Improve readability and professional presentation in contact section */
.section.contact {
  background: linear-gradient(180deg, rgba(7,20,36,0.98), rgba(8,22,38,0.98));
  color: var(--primary-contrast);
}
.section.contact .section-head h2 {
  color: var(--primary-contrast);
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.section.contact .section-label {
  color: var(--accent);
  letter-spacing: 0.22em;
}

.contact-form, .contact-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.04);
  padding: 22px;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(2,6,23,0.35);
  color: var(--primary-contrast);
}

.contact-panel-copy {
  background: rgba(255,255,255,0.02);
  padding: 14px 18px;
  border-radius: 12px;
  color: rgba(255,255,255,0.95);
  font-weight: 500;
}

.contact-form label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.95);
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.95);
  padding: 12px 14px;
  border-radius: 10px;
  outline: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255,255,255,0.6);
}

.contact-panel-item strong {
  color: rgba(255,255,255,0.95);
  font-weight: 800;
}

.contact-panel-item a {
  color: rgba(255,255,255,0.95);
  text-decoration: none;
  font-weight: 600;
}

/* Increase contrast for form button */
.contact-form .button-primary,
.contact-form button.button-primary {
  background: linear-gradient(135deg, #f79f3d 0%, #ffc78b 100%);
  color: #072244;
  box-shadow: 0 18px 44px rgba(247,159,61,0.24);
}
.contact-panel-item a:hover {
  color: #ffffff;
}

.contact-form label {
  display: grid;
  gap: 6px;
  color: rgba(255,255,255,0.92);
  font-weight: 600;
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.95);
  border-radius: 14px;
  padding: 10px 12px;
  min-height: 40px;
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form button {
  width: fit-content;
  padding: 12px 24px;
  font-size: 0.98rem;
}

.button {
  border: none;
  border-radius: 999px;
  padding: 14px 26px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 180ms ease, filter 180ms ease;
}

.button-primary {
  background: linear-gradient(135deg, #f79f3d 0%, #ffc78b 100%);
  color: #0d2a49;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: var(--primary);
  border: 1px solid rgba(11,42,68,0.12);
}

.button:hover {
  transform: translateY(-2px);
}

.site-footer {
  background: #0d2a49;
  padding: 40px 24px 28px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-wrap {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
}

.footer-brand {
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 18px;
}

.footer-links,
.footer-contact {
  display: grid;
  gap: 12px;
}

.footer-links a,
.footer-contact a {
  color: rgba(255,255,255,0.8);
  font-weight: 600;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--surface);
}

@media (max-width: 1120px) {
  .hero-grid,
  .stats-grid,
  .trust-cards,
  .services-grid,
  .why-grid,
  .projects-grid,
  .process-grid,
  .certifications-grid,
  .contact-layout,
  .footer-wrap {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    padding-top: 56px;
  }

  .hero-copy {
    margin-left: 0;
  }

  .hero-copy p,
  .hero-benefits {
    max-width: 100%;
  }

  .hero-visual {
    justify-content: center;
  }

  .hero-buttons {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero-buttons .button {
    width: 100%;
    min-width: 0;
  }

  .contact-layout {
    max-width: 100%;
    gap: 20px;
  }

  .contact-form,
  .contact-panel {
    min-height: auto;
    width: 100%;
  }

  .contact-panel {
    justify-items: center;
    text-align: center;
  }

  .contact-panel-item {
    justify-content: center;
  }

  .contact-panel-item div {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .header-wrap {
    max-width: 100%;
    grid-template-columns: auto 1fr auto;
    align-items: center;

  .main-nav { grid-column: 1; justify-self: start; }
  .logo-link { grid-column: 2; justify-self: center; }
  .phone-cta { grid-column: 3; justify-self: end; }
    justify-items: center;
    padding: 8px 12px;
  }

  .logo-link {
    position: static;
    transform: none;
    display: block;
    margin: 0 auto 12px;
    text-align: center;
  }

  .main-nav {
    justify-self: stretch;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .nav-dropdown {
    width: 100%;
  }

  .dropdown-toggle,
  .phone-cta {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 8px 10px;
    height: 32px;
  }

  /* Raise the menu and CTA buttons on smaller screens as well (slightly less than desktop) */
  .dropdown-toggle { transform: translateY(-12px) !important; }
  .phone-cta { transform: translateY(-12px) !important; }

  .dropdown-menu {
    min-width: calc(100vw - 40px);
    width: auto;
    left: 0;
    right: 0;
    margin: 0 auto;
  }

  .hero-copy h1 {
    font-size: clamp(2.2rem, 8vw, 3.2rem);
  }

  .hero-card img {
    height: 360px;
  }
}

@media (max-width: 520px) {
  .header-wrap {
    padding: 8px 12px;
  }

  .hero-panel {
    padding: 32px 16px 36px;
    min-height: auto;
  }

  .hero-grid {
    gap: 22px;
    padding: 0 12px 0;
  }

  .hero-copy {
    margin-left: 0;
  }

  .hero-copy h1 {
    font-size: clamp(2rem, 8vw, 2.6rem);
    line-height: 1.1;
  }

  .hero-copy p {
    margin: 18px 0 22px;
    max-width: 100%;
    font-size: 0.98rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .hero-buttons .button {
    width: 100%;
    padding: 14px 16px;
  }

  .hero-benefits {
    margin: 22px 0 0;
    padding-left: 18px;
    max-width: 100%;
    font-size: 0.96rem;
  }

  .hero-card.logo-only {
    max-width: 320px;
    margin: 0 auto;
  }

  .hero-card img {
    width: 100%;
    height: auto;
  }

  .hero-visual {
    justify-content: center;
  }

  .service-card,
  .trust-card,
  .project-card,
  .process-step,
  .cert-box,
  .contact-card,
  .contact-form {
    padding: 18px;
  }

  .contact-layout {
    gap: 18px;
    padding: 0 12px;
  }

  .contact-form,
  .contact-panel {
    width: 100%;
    box-shadow: none;
    border: 1px solid rgba(255,255,255,0.08);
  }

  .contact-panel {
    text-align: center;
  }

  .contact-panel-copy {
    font-size: 0.96rem;
    padding: 14px 16px;
  }

  .contact-panel-item {
    justify-content: center;
  }

  .contact-panel-item div {
    text-align: left;
  }
}

@media (max-width: 980px) {
  html {
    min-width: 1320px !important;
  }

  body {
    min-width: 1320px !important;
    overflow-x: auto !important;
  }

  .header-wrap {
    grid-template-columns: auto 1fr auto !important;
    align-items: center !important;
    justify-items: stretch !important;
    padding: 8px 12px !important;
  }

  .stats-grid,
  .trust-cards,
  .services-grid,
  .why-grid,
  .projects-grid,
  .process-grid,
  .certifications-grid,
  .footer-wrap {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 22px !important;
  }

  .service-detail-container,
  .contact-content {
    grid-template-columns: 1fr 1.1fr !important;
    align-items: start !important;
    gap: 24px !important;
  }

  .logo-link {
    position: static !important;
    transform: none !important;
    display: block !important;
    margin: 0 !important;
    grid-column: 2 !important;
    justify-self: center !important;
    font-size: 1.05rem !important;
  }

  .main-nav {
    justify-self: start !important;
    width: auto !important;
    display: flex !important;
    justify-content: flex-start !important;
  }

  .nav-dropdown {
    width: auto !important;
  }

  .dropdown-toggle,
  .phone-cta {
    width: auto !important;
    min-width: 120px !important;
    padding: 8px 10px !important;
    height: 32px !important;
  }

  .dropdown-menu {
    min-width: 320px !important;
    width: auto !important;
    left: 0 !important;
    right: auto !important;
    margin: 0 !important;
  }

  .hero-grid,
  .services-grid,
  .why-grid,
  .projects-grid,
  .process-grid,
  .certifications-grid,
  .contact-layout,
  .footer-wrap {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 22px !important;
  }

  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr !important;
    gap: 28px !important;
    padding: 0 24px 0 !important;
  }

  .services-grid,
  .why-grid,
  .process-grid,
  .certifications-grid,
  .footer-wrap {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .projects-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 20px !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    padding-bottom: 8px !important;
    margin: 0 -10px !important;
  }

  .projects-grid::-webkit-scrollbar {
    display: none !important;
  }

  .project-card {
    min-width: calc((100% - 20px) / 2) !important;
    flex: 0 0 calc((100% - 20px) / 2) !important;
    scroll-snap-align: start !important;
  }

  .contact-layout {
    grid-template-columns: 1.1fr 0.9fr !important;
    align-items: start !important;
    gap: 28px !important;
    max-width: 1320px !important;
  }

  .contact-form,
  .contact-panel,
  .contact-card,
  .project-card,
  .service-card,
  .why-card,
  .process-step,
  .cert-box {
    min-height: auto !important;
    padding: 20px !important;
  }

  .hero-copy {
    margin-left: 40px !important;
  }

  .hero-copy h1 {
    font-size: clamp(2.2rem, 3.5vw, 3.6rem) !important;
    line-height: 1.05 !important;
  }

  .hero-copy p,
  .hero-benefits {
    max-width: 540px !important;
    font-size: 1rem !important;
  }

  .hero-buttons {
    flex-direction: row !important;
    align-items: center !important;
    gap: 16px !important;
  }

  .hero-buttons .button {
    width: auto !important;
  }

  .hero-visual {
    justify-content: flex-end !important;
  }

  .hero-card.logo-only {
    max-width: 520px !important;
    margin: 0 auto !important;
  }

  .hero-card.logo-only img {
    width: min(100%, 420px) !important;
  }

  .section {
    padding: 36px 24px !important;
  }

  .section-head,
  .footer-wrap {
    max-width: 1320px !important;
    margin: 0 auto !important;
  }

  .section-head h2 {
    font-size: clamp(2rem, 3vw, 3.4rem) !important;
  }

  .button,
  .dropdown-toggle,
  .phone-cta {
    white-space: nowrap !important;
  }
}

/* Detalle de servicio mejorado */
.header {
  background: linear-gradient(135deg, #051827 0%, #0b325b 100%);
  color: var(--surface);
}

.header-top {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-content {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.2em;
}

.nav-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.nav-links a {
  color: rgba(247,250,255,0.85);
  font-weight: 600;
  transition: color 180ms ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.header-banner {
  padding: 72px 24px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
}

.banner-content {
  max-width: 980px;
  margin: 0 auto;
}

.banner-content h2 {
  margin: 0 0 16px;
  font-size: clamp(2.6rem, 4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: 0.04em;
}

.banner-content p {
  margin: 0;
  font-size: 1.05rem;
  color: rgba(247,250,255,0.88);
  max-width: 760px;
}

.section.service-detail {
  padding: 72px 24px 56px;
  background: rgba(247,250,255,0.04);
}

.section-content {
  max-width: 1200px;
  margin: 0 auto;
}

.service-detail-container {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 32px;
  align-items: start;
}

.service-detail-image {
  min-height: 420px;
  border-radius: 28px;
  background: linear-gradient(135deg, #0d2a49 0%, #1e6da8 100%);
  box-shadow: 0 30px 75px rgba(0, 0, 0, 0.18);
  background-size: cover;
  background-position: center;
}

.service-detail-image.service-acceso {
  background-image: url('assets/imagenes/service-acceso.jpg');
}

.service-detail-image.service-impermeabilizacion {
  background-image: url('assets/imagenes/service-impermeabilizacion.jpg');
}

.service-detail-image.service-limpieza {
  background-image: url('assets/imagenes/service-limpieza.jpg');
}

.service-detail-content {
  background: rgba(255,255,255,0.96);
  border-radius: 28px;
  padding: 36px;
  box-shadow: 0 24px 60px rgba(3, 18, 38, 0.12);
}

.service-detail-content h2 {
  margin-top: 0;
  font-size: clamp(2.2rem, 3.5vw, 3rem);
  color: #10293f;
}

.service-description {
  margin: 24px 0 32px;
  color: #1c3046;
  line-height: 1.85;
  font-size: 1.05rem;
}

.service-detail-content h3 {
  margin-bottom: 18px;
  color: #0d2a49;
}

.service-ventajas {
  margin: 0 0 32px;
  padding-left: 1.2rem;
  color: #1c3046;
  line-height: 1.9;
}

.service-ventajas li {
  margin-bottom: 12px;
}

.service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.service-actions .button {
  min-width: 180px;
}

.section.contact {
  background: rgba(5, 24, 42, 0.96);
  padding: 64px 24px 84px;
}

.contact-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 32px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
}

.contact-content h2 {
  margin: 0 0 12px;
  color: var(--surface);
}

.contact-content p,
.contact-content a {
  margin: 0;
  color: rgba(247,250,255,0.88);
}

.contact-content a:hover {
  color: var(--accent);
}

.contact-content .button-secondary {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--surface);
}

@media (max-width: 980px) {
  .service-detail-container {
    grid-template-columns: 1fr;
  }

  .header-content {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-content {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 620px) {
  .header-content,
  .banner-content,
  .service-detail-content,
  .contact-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .banner-content h2 {
    font-size: clamp(2rem, 7vw, 3rem);
  }

  .nav-links {
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .service-detail-content,
  .contact-content {
    padding: 24px;
  }
}

/* Overrides para forzar apariencia de escritorio en móviles (ajustes finos) */
@media (max-width: 480px) {
  .hero-grid {
    grid-template-columns: 1fr 0.8fr !important;
    gap: 12px !important;
    padding: 0 12px !important;
    align-items: center !important;
  }

  .hero-copy {
    margin-left: 16px !important;
  }

  .hero-copy h1 {
    font-size: 2.2rem !important;
    line-height: 1.02 !important;
  }

  .hero-copy p,
  .hero-benefits {
    font-size: 0.95rem !important;
    max-width: none !important;
  }

  .hero-card.logo-only {
    max-width: 320px !important;
    margin: 0 !important;
    border-radius: 50% !important;
  }

  .hero-card.logo-only img {
    width: min(180px, 38vw) !important;
    height: auto !important;
    clip-path: circle(50% at 50% 50%) !important;
  }

  .header-wrap {
    grid-template-columns: auto 1fr auto !important;
    padding: 8px 12px !important;
  }

  .logo-link {
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-size: 1rem !important;
  }

  .dropdown-toggle,
  .phone-cta {
    padding: 8px 10px !important;
    min-width: 0 !important;
  }

  .section {
    padding: 28px 12px !important;
    min-height: auto !important;
  }

  .lightbox-content {
    width: min(420px, 80vw) !important;
    max-height: 60vh !important;
  }

  .hero-visual {
    justify-content: flex-end !important;
  }

  body {
    -webkit-text-size-adjust: 100% !important;
  }
}

/* Override final para forzar vista desktop en móviles */
@media (max-width: 1320px) {
  html {
    min-width: 1320px !important;
  }

  body {
    min-width: 1320px !important;
    overflow-x: auto !important;
  }

  .header-wrap {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    align-items: center !important;
    justify-items: stretch !important;
    padding: 10px 16px !important;
  }

  .logo-link {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: block !important;
    margin: 0 !important;
    font-size: 1rem !important;
  }

  .main-nav {
    justify-self: start !important;
    width: auto !important;
    display: flex !important;
    justify-content: flex-start !important;
  }

  .dropdown-toggle,
  .phone-cta {
    width: auto !important;
    min-width: 120px !important;
    padding: 8px 10px !important;
    height: 32px !important;
  }

  .dropdown-menu {
    min-width: 320px !important;
    width: auto !important;
    left: 0 !important;
    right: auto !important;
    margin: 0 !important;
  }

  .hero-grid,
  .services-grid,
  .why-grid,
  .projects-grid,
  .process-grid,
  .certifications-grid,
  .contact-layout,
  .footer-wrap {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 22px !important;
  }

  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr !important;
    gap: 28px !important;
    padding: 0 24px !important;
  }

  .projects-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 20px !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    padding-bottom: 8px !important;
    margin: 0 -10px !important;
  }

  .projects-grid::-webkit-scrollbar {
    display: none !important;
  }

  .project-card {
    min-width: calc((100% - 20px) / 2) !important;
    flex: 0 0 calc((100% - 20px) / 2) !important;
    scroll-snap-align: start !important;
  }

  .contact-layout,
  .service-detail-container,
  .contact-content {
    grid-template-columns: 1.1fr 0.9fr !important;
    align-items: start !important;
    gap: 28px !important;
    max-width: 1320px !important;
  }

  .hero-copy {
    margin-left: 40px !important;
  }

  .hero-copy h1 {
    font-size: 3.2rem !important;
    line-height: 1.02 !important;
  }

  .hero-copy p,
  .hero-benefits {
    max-width: 540px !important;
    font-size: 1rem !important;
  }

  .hero-buttons {
    flex-direction: row !important;
    align-items: center !important;
    gap: 16px !important;
  }

  .hero-buttons .button {
    width: auto !important;
  }

  .hero-visual {
    justify-content: flex-end !important;
  }

  .hero-card.logo-only {
    max-width: 520px !important;
    margin: 0 auto !important;
  }

  .hero-card.logo-only img {
    width: min(100%, 420px) !important;
  }

  .section {
    padding: 36px 24px !important;
  }

  .section-head,
  .footer-wrap {
    max-width: 1320px !important;
    margin: 0 auto !important;
  }

  .section-head h2 {
    font-size: clamp(2rem, 3vw, 3.4rem) !important;
  }

  .button,
  .dropdown-toggle,
  .phone-cta {
    white-space: nowrap !important;
  }
}
