/* ==========================================================================
   Melcox Ibérica — Rediseño (inspirado en la identidad visual de melcox.com)
   Paleta: azul marino corporativo + azul cielo de acento + blanco
   ========================================================================== */

:root {
  --navy: #0a3250;
  --navy-dark: #062033;
  --navy-soft: #0f3d63;
  --blue: #2ea3f2;
  --blue-2: #5584bb;
  --teal: #006799;
  --ink: #1c2b36;
  --muted: #5b6b78;
  --bg: #ffffff;
  --bg-alt: #f4f7fa;
  --border: #e3e9ef;
  --success: #1fae6b;

  --font-head: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Open Sans', 'Segoe UI', sans-serif;

  --radius: 10px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 10px rgba(10, 50, 80, 0.08);
  --shadow-md: 0 10px 30px rgba(10, 50, 80, 0.14);
  --shadow-lg: 0 20px 60px rgba(6, 32, 51, 0.22);

  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  margin: 0 0 0.5em;
  line-height: 1.25;
  font-weight: 600;
}

p { margin: 0 0 1em; color: var(--muted); }

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

img { max-width: 100%; display: block; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--blue);
  display: inline-block;
}

/* ---------------------------------- Buttons ---------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 30px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 20px rgba(46, 163, 242, 0.35);
}
.btn-primary:hover { background: #1c8fdb; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(46,163,242,.45); }
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.btn-navy {
  background: var(--navy);
  color: #fff;
}
.btn-navy:hover { background: var(--navy-dark); transform: translateY(-2px); }

/* ---------------------------------- Top bar ---------------------------------- */

.topbar {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.85);
  font-size: 0.82rem;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar-left { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar-item { display: flex; align-items: center; gap: 7px; }
.topbar-item svg { flex: none; opacity: 0.85; }
.topbar-right { display: flex; gap: 14px; align-items: center; }
.topbar-right a { opacity: 0.85; transition: opacity .15s; }
.topbar-right a:hover { opacity: 1; color: var(--blue); }

/* ---------------------------------- Header / Nav ---------------------------------- */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img { height: 42px; width: auto; }
.brand-text {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--navy);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.brand-text span { color: var(--blue); }

nav.main-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}
nav.main-menu a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--navy);
  padding: 10px 16px;
  border-radius: 8px;
  transition: all .15s ease;
  position: relative;
}
nav.main-menu a:hover { background: var(--bg-alt); color: var(--blue); }
nav.main-menu a.active { color: var(--blue); }
nav.main-menu a.active::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 4px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
}

.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-cta .btn { padding: 11px 22px; font-size: 0.85rem; }
.nav-cta .btn-primary { background: var(--navy); box-shadow: none; }
.nav-cta .btn-primary:hover { background: var(--blue); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.burger span { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; }

/* ---------------------------------- Hero ---------------------------------- */

.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  opacity: 0.34;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(6,32,51,0.97) 15%, rgba(10,50,80,0.86) 55%, rgba(46,163,242,0.35) 130%);
}
.hero .container {
  position: relative;
  z-index: 2;
  padding-top: 70px;
  padding-bottom: 70px;
}
.hero-inner { max-width: 660px; }
.hero .eyebrow { color: #7fd0ff; }
.hero .eyebrow::before { background: #7fd0ff; }
.hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  margin-bottom: 0.4em;
}
.hero p.lead {
  color: rgba(255,255,255,0.85);
  font-size: 1.12rem;
  max-width: 560px;
}
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
  z-index: 2;
  margin-top: -1px;
  background: var(--navy-dark);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.hero-stat {
  text-align: center;
  padding: 26px 12px;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.hero-stat:last-child { border-right: none; }
.hero-stat .num {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--blue);
}
.hero-stat .label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* ---------------------------------- Page header (inner pages) ---------------------------------- */

.page-hero {
  position: relative;
  background: var(--navy);
  padding: 86px 0 56px;
  overflow: hidden;
}
.page-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.22;
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(6,32,51,0.96), rgba(10,50,80,0.82));
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.breadcrumb {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 14px;
}
.breadcrumb a:hover { color: var(--blue); }
.page-hero .lead { color: rgba(255,255,255,0.82); max-width: 620px; font-size: 1.05rem; }

/* ---------------------------------- Sections ---------------------------------- */

section { padding: 88px 0; }
section.alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.two-col.reverse .col-media { order: 2; }
.two-col.reverse .col-text { order: 1; }

.col-media {
  position: relative;
}
.col-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.media-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.media-frame::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(10,50,80,0.15), transparent 60%);
}
.stat-badge {
  position: absolute;
  bottom: -22px;
  right: -22px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.stat-badge .num { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; color: var(--blue); }
.stat-badge .label { font-size: 0.72rem; color: var(--muted); max-width: 110px; line-height: 1.3; }

.col-text ul.check-list { list-style: none; margin: 22px 0 0; padding: 0; }
.col-text ul.check-list li {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  color: var(--ink);
  font-weight: 500;
}
.col-text ul.check-list li svg { flex: none; margin-top: 3px; }

/* Cards grid: services */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.service-icon {
  width: 58px; height: 58px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
  color: #fff;
}
.service-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.service-card p { flex: 1; font-size: 0.94rem; }
.service-card .card-link {
  margin-top: 16px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.service-card .card-link svg { transition: transform .15s ease; }
.service-card:hover .card-link svg { transform: translateX(4px); }

/* Sub-service accordion-style list used on emision/recepcion detail sections */

.subservice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.subservice {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  box-shadow: var(--shadow-sm);
}
.subservice h4 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.02rem;
  color: var(--navy);
  margin-bottom: 10px;
}
.subservice h4 .idx {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--blue);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}
.subservice p { font-size: 0.92rem; margin-bottom: 0; }

/* Value strip */

.value-strip {
  background: var(--navy);
  color: #fff;
  padding: 46px 0;
}
.value-strip .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.value-item { display: flex; gap: 14px; align-items: flex-start; }
.value-item .vi-icon {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
}
.value-item h4 { color: #fff; font-size: 0.98rem; margin-bottom: 4px; }
.value-item p { color: rgba(255,255,255,0.65); font-size: 0.86rem; margin: 0; }

/* Quote / CTA band */

.cta-band {
  background: linear-gradient(120deg, var(--navy) 0%, var(--teal) 120%);
  border-radius: 20px;
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; margin-bottom: 6px; font-size: 1.7rem; }
.cta-band p { color: rgba(255,255,255,0.82); margin: 0; }

/* Timeline (empresa) */

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 10px;
}
.timeline-item {
  border-top: 3px solid var(--blue);
  padding-top: 18px;
}
.timeline-item .year { font-family: var(--font-head); font-weight: 700; color: var(--navy); font-size: 1.3rem; }
.timeline-item p { font-size: 0.9rem; }

/* Contact page */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 50px;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 34px;
}
.contact-info-item {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.contact-info-item:last-child { border-bottom: none; }
.contact-info-item .ci-icon {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--bg-alt);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.contact-info-item h4 { font-size: 0.95rem; margin-bottom: 3px; color: var(--navy); }
.contact-info-item p { margin: 0; font-size: 0.92rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 18px; }
.form-field.full { grid-column: 1 / -1; }
label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 7px;
}
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.94rem;
  background: var(--bg-alt);
  transition: border-color .15s ease, background .15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
}
textarea { resize: vertical; min-height: 120px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.82rem; color: var(--muted); margin-bottom: 20px; }
.consent input { width: auto; margin-top: 3px; }

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  height: 230px;
  margin-top: 24px;
  border: 1px solid var(--border);
}

/* Logos strip */
.logo-strip { display: flex; justify-content: center; gap: 60px; flex-wrap: wrap; opacity: 0.6; margin-top: 40px; }
.logo-strip span { font-family: var(--font-head); font-weight: 700; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; font-size: 0.8rem; }

/* ---------------------------------- Footer ---------------------------------- */

footer.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.68);
  padding-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand img {
  height: 40px;
  margin-bottom: 16px;
  background: #fff;
  padding: 8px 14px;
  border-radius: 8px;
}
.footer-brand p { color: rgba(255,255,255,0.55); font-size: 0.88rem; max-width: 280px; }
.footer-col h4 {
  color: #fff;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 11px; font-size: 0.9rem; }
.footer-col a:hover { color: var(--blue); }
.footer-col address { font-style: normal; font-size: 0.9rem; line-height: 1.7; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom a:hover { color: var(--blue); }
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }

/* Review banner (staging notice) */
.staging-banner {
  background: #ffb020;
  color: #3a2600;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 16px;
}
.staging-banner strong { text-transform: uppercase; letter-spacing: .04em; }

/* ---------------------------------- Responsive ---------------------------------- */

@media (max-width: 980px) {
  nav.main-menu { display: none; }
  nav.main-menu.open-mobile {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    padding: 10px 24px 20px;
    box-shadow: var(--shadow-md);
  }
  .nav-cta .btn.btn-outline-hide { display: none; }
  .burger { display: flex; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .two-col, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .two-col.reverse .col-media, .two-col.reverse .col-text { order: initial; }
  .card-grid { grid-template-columns: 1fr; }
  .value-strip .container { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .subservice-grid { grid-template-columns: 1fr; }
  .topbar .container { justify-content: center; text-align: center; }
}

@media (max-width: 620px) {
  .value-strip .container { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .cta-band { padding: 40px 26px; flex-direction: column; text-align: center; }
  section { padding: 60px 0; }
  .form-row { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
}
