/* ── MMG Consultores – Custom CSS ─────────────────────────────────────────── */
/* Fonts: Montserrat + Poppins via Google Fonts (loaded in <head>)             */

/* ── Design Tokens ── */
:root {
  --primary:    hsl(214, 28%, 33%);   /* dark blue-gray */
  --secondary:  hsl(211, 40%, 56%);   /* medium blue    */
  --accent:     hsl(189, 38%, 61%);   /* teal           */
  --bg:         hsl(0, 0%, 100%);
  --bg-muted:   hsl(210, 20%, 96%);
  --text:       hsl(214, 28%, 33%);
  --text-muted: hsl(214, 15%, 50%);
  --border:     hsl(214, 20%, 88%);
  --radius:     0.5rem;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.12);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.16);
  --container:  1280px;
  --hero-overlay: hsla(214, 28%, 33%, 0.4);
}

/* ── Reset / Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Typography ── */
h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; line-height: 1.2; }
.eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: .5rem;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1rem;
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 680px;
}
.section-lead {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: .75rem;
}
.section-body {
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header .section-subtitle { margin: 0 auto; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem 1.5rem;
  border-radius: var(--radius);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .02em;
  cursor: pointer;
  transition: all .2s ease;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: hsl(214,28%,26%); }
.btn-secondary {
  background: var(--secondary);
  color: #fff;
}
.btn-secondary:hover { background: hsl(211,40%,48%); }
.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-outline-white {
  background: transparent;
  border-color: rgba(255,255,255,.8);
  color: #fff;
}
.btn-outline-white:hover { background: rgba(255,255,255,.15); }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }
.mt-2 { margin-top: .5rem; }
.mt-6 { margin-top: 1.5rem; }

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s;
}
.navbar .container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: .75rem;
  padding-bottom: .75rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
}
.logo-img {
  height: 44px;
  width: auto;
  border-radius: 4px;
  object-fit: contain;
}
.logo-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}
.logo-mmg { color: var(--primary); }
.logo-consultores { color: var(--secondary); }
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-left: auto;
}
.nav-link {
  font-family: 'Montserrat', sans-serif;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .15s;
  white-space: nowrap;
}
.nav-link:hover,
.nav-link.active { color: var(--primary); font-weight: 600; }
.nav-cta { white-space: nowrap; }
.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  margin-left: auto;
}
.menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: all .2s;
}
.mobile-menu {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  background: var(--bg);
}
.mobile-link {
  font-family: 'Montserrat', sans-serif;
  font-size: .95rem;
  font-weight: 500;
  color: var(--text);
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
}
.mobile-link.active { color: var(--secondary); font-weight: 600; }
.hidden { display: none !important; }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 88vh;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}
.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 760px;
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.hero-eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.8);
  margin-bottom: 1rem;
}
.hero-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.hero-sub {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255,255,255,.9);
  margin-bottom: 2rem;
  max-width: 580px;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Hero variants */
.hero-sm {
  min-height: 40vh;
  background-attachment: scroll;
}
.hero-sm .hero-content { padding-top: 3rem; padding-bottom: 3rem; }

/* ── Sections ── */
.section { padding: 5rem 0; }
.section-white { background: var(--bg); }
.section-muted { background: var(--bg-muted); }

/* ── Two-col text layout ── */
.two-col-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

/* ── Value grid ── */
.value-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.value-item {
  background: var(--bg-muted);
  border-radius: var(--radius);
  padding: 1.25rem;
  border-left: 3px solid var(--secondary);
}
.value-icon {
  font-size: 1.25rem;
  color: var(--secondary);
  margin-bottom: .5rem;
}
.value-item h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .35rem;
}
.value-item p { font-size: .875rem; color: var(--text-muted); }

/* ── Services grid ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}
.service-card {
  background: var(--bg);
  border-radius: calc(var(--radius)*1.5);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.service-img {
  height: 200px;
  background-size: cover;
  background-position: center;
}
.service-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.service-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .5rem;
}
.service-card-body p {
  font-size: .875rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 1rem;
}
.link-arrow {
  font-family: 'Montserrat', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  color: var(--secondary);
  margin-top: auto;
}
.service-card:hover .link-arrow { color: var(--primary); }
.section-cta { text-align: center; }

/* ── All-services grid (13 items) ── */
.services-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}

/* ── Sectors grid ── */
.sectors-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}
.sector-card {
  position: relative;
  height: 200px;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  cursor: default;
}
.sector-card:hover .sector-overlay { opacity: 1; }
.sector-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,.1));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  opacity: .8;
  transition: opacity .2s;
}
.sector-overlay h3 {
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .25rem;
}
.sector-overlay p {
  color: rgba(255,255,255,.82);
  font-size: .75rem;
  line-height: 1.4;
  display: none;
}
.sector-card:hover .sector-overlay p { display: block; }

/* ── CTA Band ── */
.cta-band {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 4rem 0;
  color: #fff;
  text-align: center;
}
.cta-band-inner h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: .75rem;
}
.cta-band-inner p {
  font-size: 1.05rem;
  color: rgba(255,255,255,.88);
  margin-bottom: 2rem;
}

/* ── Footer ── */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,.8);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  color: var(--primary);
}
.footer-brand p {
  font-size: .875rem;
  line-height: 1.65;
  margin-top: .75rem;
  color: rgba(0,0,0,.65);
}
.footer-web {
  color: var(--accent) !important;
  font-weight: 600;
  margin-top: .5rem !important;
}
.social-links {
  display: flex;
  gap: .75rem;
  margin-top: 1rem;
  align-items: center;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0,0,0,.08);
  color: var(--primary);
  transition: background .2s, color .2s, transform .2s;
}
.social-link:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}
.footer-logo {
  height: 48px;
  width: auto;
  border-radius: 4px;
}
.footer-links h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
}
.footer-links ul { display: flex; flex-direction: column; gap: .5rem; }
.footer-links a {
  font-size: .875rem;
  color: rgba(255,255,255,.7);
  transition: color .15s;
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 1.5rem;
  text-align: center;
  font-size: .8rem;
  color: rgba(255,255,255,.5);
}

/* ── Nosotros – Specialist grid ── */
.specialists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.specialist-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-align: center;
  background: var(--bg);
}
.specialist-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.specialist-card p {
  font-size: .8rem;
  font-weight: 600;
  color: var(--primary);
  padding: .6rem .5rem;
}

/* ── Three pillars ── */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}
.pillar-card {
  background: var(--bg);
  border-radius: calc(var(--radius)*1.5);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--secondary);
}
.pillar-number {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: .5rem;
}
.pillar-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .75rem;
}
.pillar-card p { font-size: .9rem; color: var(--text-muted); }
.pillar-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.pillar-list li {
  font-size: .85rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
}
.pillar-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--secondary);
  font-size: .8rem;
}

/* ── Service Detail Page ── */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  align-items: start;
}
.service-detail-body h2 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}
.service-detail-body p { color: var(--text-muted); margin-bottom: 1rem; line-height: 1.75; }
.service-detail-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1.5rem 0 .5rem;
}
.service-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1.25rem;
}
.service-list li {
  padding: .6rem 1rem;
  background: var(--bg-muted);
  border-radius: var(--radius);
  font-size: .9rem;
  color: var(--text);
  padding-left: 2rem;
  position: relative;
}
.service-list li::before {
  content: '✓';
  position: absolute;
  left: .75rem;
  color: var(--secondary);
  font-weight: 700;
}
.service-sidebar {
  position: sticky;
  top: 6rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.sidebar-card {
  background: var(--bg-muted);
  border-radius: calc(var(--radius)*1.5);
  padding: 1.5rem;
}
.sidebar-card.accent {
  background: var(--primary);
  color: #fff;
}
.sidebar-card.accent h4 { color: #fff; }
.sidebar-card.accent p { color: rgba(255,255,255,.82); font-size: .9rem; margin-bottom: 1rem; }
.sidebar-card h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .75rem;
}
.sidebar-card ul { display: flex; flex-direction: column; gap: .35rem; }
.sidebar-card ul li {
  font-size: .85rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
}
.sidebar-card ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.tax-badge {
  background: hsl(142, 50%, 95%);
  border: 1px solid hsl(142, 40%, 75%);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  font-size: .85rem;
  color: hsl(142, 40%, 30%);
  font-weight: 500;
}
.tax-badge strong { display: block; font-weight: 700; margin-bottom: .2rem; }

/* ── Quote block ── */
.quote-block {
  border-left: 4px solid var(--accent);
  padding: 1rem 1.5rem;
  background: var(--bg-muted);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--primary);
  font-weight: 500;
}

/* ── Contact page ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.contact-img {
  border-radius: calc(var(--radius)*2);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.contact-img img { width: 100%; height: 420px; object-fit: cover; }
.contact-form-wrap h2 {
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: .5rem;
}
.contact-form-wrap > p { color: var(--text-muted); margin-bottom: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: .4rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: .7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Poppins', sans-serif;
  font-size: .9rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color .15s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-success {
  background: hsl(142,50%,95%);
  border: 1px solid hsl(142,40%,75%);
  border-radius: var(--radius);
  padding: 1rem;
  color: hsl(142,40%,28%);
  font-weight: 500;
  margin-top: 1rem;
}
.form-error {
  background: hsl(0,50%,95%);
  border: 1px solid hsl(0,40%,75%);
  border-radius: var(--radius);
  padding: 1rem;
  color: hsl(0,50%,35%);
  font-weight: 500;
  margin-top: 1rem;
}

/* ── Legal page ── */
.legal-content { max-width: 800px; }
.legal-content h2 {
  font-size: 1.3rem;
  color: var(--primary);
  margin: 2rem 0 .75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.legal-content h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.legal-content p { color: var(--text-muted); margin-bottom: .75rem; line-height: 1.8; }
.legal-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.legal-content ul li { color: var(--text-muted); margin-bottom: .4rem; font-size: .9rem; }

/* ── Scroll reveal ── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.reveal.animate-in { opacity: 1; transform: none; }

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: .8rem;
  color: rgba(255,255,255,.7);
  margin-bottom: 1rem;
  display: flex;
  gap: .5rem;
  align-items: center;
}
.breadcrumb a { color: rgba(255,255,255,.7); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: rgba(255,255,255,.5); }

/* ── Service nav ── */
.services-nav {
  background: var(--bg);
  border-radius: calc(var(--radius)*1.5);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.services-nav h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--border);
}
.services-nav ul { display: flex; flex-direction: column; gap: .25rem; }
.services-nav a {
  font-size: .85rem;
  color: var(--text-muted);
  padding: .4rem .5rem;
  border-radius: calc(var(--radius)*.5);
  transition: all .15s;
  display: block;
}
.services-nav a:hover,
.services-nav a.active {
  background: var(--bg-muted);
  color: var(--primary);
  font-weight: 600;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .sectors-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-desktop, .nav-cta { display: none; }
  .menu-btn { display: flex; }

  .two-col-text { grid-template-columns: 1fr; gap: 2rem; }
  .value-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .services-grid-full { grid-template-columns: 1fr; }
  .pillars-grid { grid-template-columns: 1fr; }
  .sectors-grid { grid-template-columns: repeat(2, 1fr); }
  .service-detail { grid-template-columns: 1fr; }
  .service-sidebar { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }

  .hero { background-attachment: scroll; }
  .hero-title { font-size: 1.8rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
  .sectors-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 3rem 0; }
  .specialists-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Navbar shadow (added by JS on scroll) ── */
.navbar.shadow-md { box-shadow: var(--shadow-md); }
