:root {
  --color-primary: #a61d22;
  --color-secondary: #155e63;
  --color-accent: #d78b1d;
  --color-ink: #17202a;
  --color-soft: #5d6775;
  --color-line: #d9dde3;
  --color-bg: #f5efe8;
  --color-card: #ffffff;
  --color-dark: #11171e;
  --shadow-lg: 0 24px 60px rgba(17, 23, 30, 0.12);
  --shadow-md: 0 16px 34px rgba(17, 23, 30, 0.08);
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 16px;
  --container: 1180px;
  --btn-height: 54px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  color: var(--color-ink);
  background:
    radial-gradient(circle at top left, rgba(215, 139, 29, 0.18), transparent 30%),
    radial-gradient(circle at right center, rgba(21, 94, 99, 0.14), transparent 26%),
    linear-gradient(180deg, #fffaf5 0%, #f4eee6 48%, #eef4f2 100%);
  line-height: 1.65;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-secondary); }
img { display: block; max-width: 100%; }
iframe { width: 100%; border: 0; }
.container { width: min(var(--container), calc(100% - 32px)); margin: 0 auto; }
.topbar, .header-inner, .topbar-inner, .footer-grid, .footer-bottom, .hero-grid, .page-hero-grid, .split, .cards, .intro-band-grid, .cta-banner, .contact-grid, .hero-stats { display: grid; gap: 24px; }
.topbar { background: linear-gradient(90deg, var(--color-primary), #c53a28); color: #fff; }
.topbar-inner { grid-template-columns: 1.3fr auto; align-items: center; padding: 10px 0; }
.topbar-inner p { margin: 0; font-size: 0.95rem; }
.topbar-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.mini-link { color: #fff; font-weight: 800; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(23, 32, 42, 0.08);
}
.header-inner { grid-template-columns: auto 1fr auto; align-items: center; padding: 16px 0; }
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--color-ink); }
.brand img { width: 64px; height: 64px; object-fit: cover; object-position: top center; border-radius: 16px; background: #fff; }
.brand strong, .footer-brand span { display: block; font-weight: 800; }
.brand small { display: block; color: var(--color-soft); }
.main-nav { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.main-nav a { color: var(--color-ink); font-weight: 800; position: relative; padding: 10px 0; }
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--color-accent);
  transition: width .25s ease;
}
.main-nav a:hover::after, .main-nav a.is-active::after { width: 100%; }
.nav-toggle { display: none; }
.btn {
  min-height: var(--btn-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #d24829);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { color: #fff; }
.btn-secondary {
  background: rgba(21, 94, 99, 0.08);
  border-color: rgba(21, 94, 99, 0.18);
  color: var(--color-secondary);
}
.btn-secondary:hover { background: var(--color-secondary); color: #fff; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-primary);
}
.eyebrow::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--color-accent);
}
.hero, .page-hero { padding: 76px 0 52px; }
.hero-home {
  background:
    radial-gradient(circle at right top, rgba(166, 29, 34, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0));
}
.hero-grid, .page-hero-grid { grid-template-columns: 1.2fr .95fr; align-items: center; }
.hero-copy h1, .page-hero-copy h1, .section-heading h2, .split h2, .contact-box h2, .contact-form-wrap h2, .cta-banner h2 {
  margin: 14px 0 14px;
  font-family: 'Cormorant Garamond', serif;
  line-height: 1;
}
.hero-copy h1, .page-hero-copy h1 { font-size: clamp(2.8rem, 6vw, 5.4rem); }
.section-heading h2, .split h2, .contact-box h2, .contact-form-wrap h2, .cta-banner h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
.hero-copy p, .page-hero-copy p, .section-heading p, .split p, .contact-box p, .contact-form-wrap p, .cta-banner p, .hero-panel-copy p { color: var(--color-soft); }
.hero-actions, .cta-actions, .badge-row { display: flex; gap: 14px; flex-wrap: wrap; }
.badge-row { margin-top: 24px; }
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(21, 94, 99, 0.08);
  border: 1px solid rgba(21, 94, 99, 0.12);
  color: var(--color-secondary);
  font-weight: 800;
}
.card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(23, 32, 42, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px;
}
.hero-panel { overflow: hidden; padding: 0; }
.hero-panel img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center top;
  border-bottom: 1px solid rgba(23, 32, 42, 0.08);
}
.page-hero-card { overflow: hidden; }
.page-hero-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center top;
  border-radius: 22px;
  margin-bottom: 14px;
}

.hero-panel img, .page-hero-card img, .service-card img {
  max-height: 620px;
}

.hero-panel-copy { padding: 22px; }
.hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-card strong { display: block; font-size: 1.6rem; margin-bottom: 6px; }
.intro-band { padding-top: 24px; }
.intro-band-grid { grid-template-columns: 1.15fr .85fr; align-items: stretch; }
.dark-card {
  background: linear-gradient(160deg, #11171e, #243341);
  color: rgba(255,255,255,0.86);
}
.dark-card a { color: #ffe0a6; }
.section { padding: 76px 0; }
.section.alt { background: rgba(255,255,255,0.52); }
.section-heading { max-width: 820px; margin-bottom: 34px; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.service-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center top;
  border-radius: 22px;
  margin-bottom: 18px;
}
.service-card h3, .locality-card h3 { margin: 0 0 8px; }
.text-link { display: inline-flex; margin-top: 10px; font-weight: 800; }
.split { grid-template-columns: 1.15fr .85fr; align-items: center; }
.align-start { align-items: start; }
.accent-card {
  background: linear-gradient(160deg, rgba(166,29,34,0.95), rgba(17,23,30,0.98));
  color: #fff;
}
.accent-card h3 { margin-top: 0; font-size: 1.5rem; }
.highlight-box {
  background: linear-gradient(180deg, rgba(21, 94, 99, 0.08), rgba(215, 139, 29, 0.08));
  border: 1px solid rgba(21, 94, 99, 0.14);
}
.list-clean { margin: 0; padding: 0; list-style: none; }
.list-clean li { position: relative; padding-left: 26px; margin-bottom: 10px; }
.list-clean li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
}
.zone-grid .card { min-height: 100%; }
.map-wrap iframe { min-height: 420px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.contact-grid { grid-template-columns: .95fr 1.05fr; align-items: start; }
.contact-methods { display: grid; gap: 14px; margin-top: 24px; }
.contact-methods a, .contact-methods span {
  display: block;
  padding: 16px 18px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(23, 32, 42, 0.08);
  border-radius: 18px;
  color: var(--color-ink);
}
.form-grid { display: grid; gap: 14px; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid var(--color-line);
  font: inherit;
  color: var(--color-ink);
  background: #fff;
}
.form-grid textarea { min-height: 140px; resize: vertical; }
.notice { margin: 0; color: var(--color-soft); font-size: 0.95rem; }
.contact-card p { margin: 0 0 10px; }
.cta-banner {
  grid-template-columns: 1.1fr auto;
  align-items: center;
  padding: 34px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(166,29,34,0.96), rgba(21,94,99,0.95));
  color: #fff;
}
.cta-banner .eyebrow, .cta-banner a { color: #fff; }
.site-footer { background: #11171e; color: rgba(255,255,255,0.78); padding-top: 54px; }
.footer-grid { grid-template-columns: 1.2fr .8fr .8fr; }
.site-footer h3 { color: #fff; margin-top: 0; }
.site-footer a { display: inline-flex; color: #fff; margin-bottom: 10px; }
.footer-bottom {
  grid-template-columns: 1fr;
  padding: 20px 0;
  margin-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.footer-bottom p { margin: 0; }
.floating-action {
  position: fixed;
  right: 18px;
  z-index: 45;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow-lg);
}
.floating-call { bottom: 96px; background: var(--color-primary); }
.floating-whatsapp { bottom: 18px; background: #25d366; }
@media (max-width: 980px) {
  .header-inner, .hero-grid, .page-hero-grid, .intro-band-grid, .cards.three, .cards.two, .split, .contact-grid, .cta-banner, .footer-grid, .hero-stats {
    grid-template-columns: 1fr;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(23, 32, 42, 0.1);
    background: #fff;
    font-weight: 800;
  }
  .main-nav {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 8px;
  }
  .main-nav.is-open { display: flex; }
  .header-cta { display: none; }
  .topbar-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero, .page-hero, .section { padding: 60px 0; }
  .card, .cta-banner { padding: 22px; }
  .floating-action {
    width: auto;
    height: auto;
    min-height: var(--btn-height);
    padding: 0 20px;
    border-radius: 999px;
    right: 14px;
  }
  .floating-call { bottom: 86px; }
  .floating-whatsapp { bottom: 14px; }
}
/* codex-local-fixes */
img, svg, video, iframe { max-width: 100%; }
iframe { display: block; }
.button-row, .hero-actions, .inline-actions, .top-actions, .footer-links, .footer-actions, .header-actions { gap: 12px; flex-wrap: wrap; }
.container, .wrap, .hg-container { width: min(100% - 32px, 1200px); margin-inline: auto; }
details { margin-top: 14px; }
summary { cursor: pointer; }
.faq-answer p, p, li, a { overflow-wrap: anywhere; }
.hg-section { padding: 32px 0; }
.hg-cta-band { padding: 24px; border-radius: 18px; background: rgba(0,0,0,.04); }


/* codex-global-route-fixes */
.brand img,
.site-header .brand img,
.navbar-brand img,
.header-logo img,
.logo img {
  width: min(220px, 100%);
  max-width: 100%;
  max-height: 120px;
  height: auto;
  object-fit: contain;
}

.footer-logo,
.site-footer .brand img,
.site-footer .logo img,
footer .brand img,
footer img[alt*="logo" i],
footer img[alt*="cerrajero" i] {
  width: min(180px, 100%);
  max-width: 100%;
  max-height: 140px;
  height: auto;
  object-fit: contain;
}

#nuevas-rutas-locales details {
  margin-top: 1rem;
  padding: 1.2rem 1.25rem;
  border: 1px solid rgba(17, 36, 61, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(17, 36, 61, 0.08);
}

#nuevas-rutas-locales summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-weight: 800;
  font-size: 1.05rem;
  list-style: none;
}

#nuevas-rutas-locales summary::-webkit-details-marker {
  display: none;
}

#nuevas-rutas-locales .footer-links,
#nuevas-rutas-locales .quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

#nuevas-rutas-locales .footer-links a,
#nuevas-rutas-locales .quick-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(17, 36, 61, 0.12);
  box-shadow: 0 8px 20px rgba(17, 36, 61, 0.06);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.35;
}

#nuevas-rutas-locales .footer-links a:hover,
#nuevas-rutas-locales .quick-links a:hover {
  transform: translateY(-1px);
}

.floating-actions .btn-whatsapp,
.floating-whatsapp,
a[href*="wa.me/34653373620"] {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .brand img,
  .site-header .brand img,
  .navbar-brand img,
  .header-logo img,
  .logo img {
    width: min(180px, 100%);
    max-height: 96px;
  }

  .footer-logo,
  .site-footer .brand img,
  .site-footer .logo img,
  footer .brand img,
  footer img[alt*="logo" i],
  footer img[alt*="cerrajero" i] {
    width: min(150px, 100%);
    max-height: 112px;
  }

  #nuevas-rutas-locales .footer-links a,
  #nuevas-rutas-locales .quick-links a {
    width: 100%;
    justify-content: flex-start;
  }
}

#nuevas-rutas-locales summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  color: #c9b000;
}

#nuevas-rutas-locales details[open] summary::after {
  content: "−";
}

/* SEO FOOTER UPGRADE START */
.hg-section {
  padding: 2.4rem 0;
}

.hg-container {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.hg-cta-band {
  padding: 1.8rem 2rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(15, 76, 92, 0.1), rgba(191, 91, 44, 0.12)), var(--paper);
  border: 1px solid rgba(15, 76, 92, 0.16);
  box-shadow: var(--shadow);
}

.hg-cta-band h2 {
  margin-bottom: 0.75rem;
}

.hg-cta-band p:last-child {
  margin-bottom: 0;
}

.site-footer {
  background:
    radial-gradient(circle at top left, rgba(231, 159, 111, 0.16), transparent 26%),
    linear-gradient(180deg, #161b25 0%, #11161f 100%);
}

.footer-shell {
  padding: 3.4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  align-items: start;
}

.footer-card {
  min-width: 0;
  padding: 1.3rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer .brand {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  text-decoration: none;
}

.site-footer .brand-name {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-footer .brand-copy {
  color: rgba(255, 248, 240, 0.78);
  font-size: 0.95rem;
}

.footer-brand .brand {
  margin-bottom: 0.9rem;
}

.footer-card h3 {
  margin-bottom: 0.9rem;
  color: #fff;
  font-size: 1.05rem;
}

.footer-note,
.footer-card p,
.footer-card a {
  color: rgba(255, 248, 240, 0.84);
}

.footer-note {
  margin-bottom: 1rem;
}

.footer-links {
  display: grid;
  gap: 0.65rem;
}

.footer-links a {
  line-height: 1.45;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.site-footer .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.2rem;
  border-radius: 999px;
  border: 0;
  font-weight: 700;
  text-decoration: none;
}

.site-footer .button-primary {
  background: linear-gradient(135deg, #bf5b2c, #e79f6f);
  color: #fff;
}

.site-footer .button-secondary {
  background: linear-gradient(135deg, #0f4c5c, #2d7f94);
  color: #fff;
}

.footer-legal {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 248, 240, 0.62);
  font-size: 0.92rem;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .hg-cta-band,
  .footer-card {
    padding: 1.15rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
/* SEO FOOTER UPGRADE END */
