/* ==========================================================================
   Limpiezas Apeles — replacement site stylesheet
   Design: dark slate header/footer, brand red accent (#dd2a1b from source),
   light content area, system font stack (no external font dependencies).
   ========================================================================== */

:root {
  --dark: #0e1a24;
  --dark-2: #14232f;
  --ink: #252525;
  --muted: #5a6a75;
  --brand: #dd2a1b;
  --brand-dark: #b81f12;
  --bg: #f5f7f9;
  --card: #ffffff;
  --line: #e2e8ee;
  --ok: #1c7c3d;
  --radius: 10px;
  --shadow: 0 8px 24px rgba(14, 26, 36, 0.08);
  --shadow-lg: 0 18px 44px rgba(14, 26, 36, 0.14);
  --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }

h1, h2, h3, h4, h5 {
  font-weight: 800;
  line-height: 1.2;
  color: var(--dark);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--dark);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

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

.topbar {
  background: var(--dark);
  color: #cdd8e0;
  font-size: 0.84rem;
}
.topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 7px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: space-between;
  align-items: center;
}
.topbar a { color: #e9eef2; font-weight: 600; }
.topbar a:hover { color: #fff; }
.topbar .topbar-phone { white-space: nowrap; }

.site-header {
  background: var(--dark-2);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 40px; width: auto; }
.brand-name { color: #fff; font-weight: 800; font-size: 1.05rem; letter-spacing: 0.02em; }
.brand-name small { display: block; font-weight: 500; font-size: 0.7rem; color: #9fb2c0; letter-spacing: 0.14em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: #dbe4ea;
  padding: 9px 13px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.92rem;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,0.08); text-decoration: none; }
.nav a.active { color: #fff; background: var(--brand); }
.nav .nav-cta {
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  margin-left: 8px;
  white-space: nowrap;
}
.nav .nav-cta:hover { background: var(--brand-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.nav-toggle[aria-expanded="true"] { background: var(--brand); border-color: var(--brand); }

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

.hero {
  position: relative;
  background: var(--dark);
  color: #fff;
  overflow: hidden;
}
.hero img.hero-img {
  width: 100%;
  height: clamp(300px, 52vw, 520px);
  object-fit: cover;
  opacity: 0.55;
}
.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}
.hero-content .container { width: 100%; }
.hero h1 { color: #fff; max-width: 14ch; }
.hero p.lead { color: #e6edf2; font-size: 1.18rem; max-width: 52ch; }
.hero .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff !important;
  font-weight: 700;
  padding: 13px 24px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  font-size: 0.98rem;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn.btn-light { background: #fff; color: var(--dark) !important; }
.btn.btn-light:hover { background: #e8edf2; }
.btn.btn-ghost { background: transparent; border: 2px solid rgba(255,255,255,0.7); color: #fff !important; }
.btn.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,0.12); }
.btn.btn-dark { background: var(--dark); color: #fff !important; }
.btn.btn-dark:hover { background: var(--dark-2); }

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

.section { padding: 64px 0; }
.section.tight { padding: 40px 0; }
.section.alt { background: #fff; }
.section.brand-band { background: var(--brand); color: #fff; }
.section.dark-band { background: var(--dark); color: #e6edf2; }
.section.brand-band h2, .section.dark-band h2 { color: #fff; }
.section.brand-band p, .section.dark-band p { color: #e9eef2; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 10px;
}
.section.brand-band .eyebrow, .section.dark-band .eyebrow { color: #ffd9d4; }

.lead { font-size: 1.1rem; color: var(--muted); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card .card-body { padding: 22px; }
.card h3 { margin-bottom: 8px; }
.card img.card-img { width: 100%; height: 180px; object-fit: cover; }

/* Stats band */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.stat .num { font-size: 2.6rem; font-weight: 800; color: var(--brand); line-height: 1.1; }
.stat .lbl { color: var(--muted); font-weight: 600; }

/* Services list */
.service-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.service-item img { width: 130px; height: 130px; object-fit: contain; border-radius: 8px; background: #f2f5f8; padding: 8px; }
.service-item h3 { margin-bottom: 4px; }
.service-item .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 8px;
}

/* Clients */
.client-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease;
}
.client-card:hover { transform: translateY(-2px); }
.client-card .client-logo { display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 6px; min-height: 70px; }
.client-card .client-logo img { max-height: 56px; max-width: 100%; object-fit: contain; }
.client-card h3 { font-size: 1rem; margin: 0; }
.client-card p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* Certifications */
.cert-band { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-wrap: wrap; gap: 22px; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.cert-band img { max-height: 90px; width: auto; }

/* Contact blocks */
.contact-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  box-shadow: var(--shadow);
}
.contact-card .icon { font-size: 1.6rem; }
.contact-card h3 { font-size: 1rem; margin-bottom: 6px; }
.contact-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.contact-card a.tel { font-weight: 700; color: var(--dark); font-size: 1.05rem; }
.contact-card a.tel:hover { color: var(--brand); }

/* Map */
.map-frame { border: 0; width: 100%; height: 380px; border-radius: var(--radius); box-shadow: var(--shadow); display: block; }

/* Checklist / bullets */
.checklist { list-style: none; margin: 0 0 1.2em; padding: 0; }
.checklist li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand);
}
.checklist li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 0.6em;
  width: 6px;
  height: 3px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

/* Tables (survey scale) */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
table.data th, table.data td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
table.data th { background: var(--dark); color: #fff; font-weight: 700; }
table.data tr:last-child td { border-bottom: 0; }

/* Prose / legal */
.prose { max-width: 860px; }
.prose a, .note a, .footer-contact a { overflow-wrap: anywhere; }
.prose h2 { font-size: 1.35rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.1rem; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.4em; }
.prose li { margin-bottom: 6px; }

/* Page hero (inner pages) */
.page-hero {
  background: var(--dark);
  color: #fff;
  padding: 58px 0 54px;
  margin-bottom: 8px;
}
.page-hero h1 { color: #fff; margin-bottom: 6px; }
.page-hero p { color: #c7d4dd; margin: 0; max-width: 60ch; }

/* Breadcrumb-ish small note */
.note {
  background: #fff7f6;
  border: 1px solid #f2c4be;
  border-radius: 8px;
  padding: 14px 18px;
  color: #7c2d24;
  font-size: 0.95rem;
  margin-bottom: 22px;
}
.note a { font-weight: 700; }

/* Video */
.video-frame { aspect-ratio: 16/9; width: 100%; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }

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

.site-footer { background: var(--dark); color: #b8c6d0; font-size: 0.92rem; }
.footer-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 52px 22px 30px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: 34px;
}
.site-footer h3 { color: #fff; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #b8c6d0; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-contact li { padding-left: 0; margin-bottom: 10px; }
.footer-contact .fc-label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: #7e93a3; }
.footer-brand img { height: 34px; margin-bottom: 12px; }
.footer-brand p { color: #9fb2c0; }

.social { display: flex; gap: 10px; margin-top: 14px; }
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255,255,255,0.09);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}
.social a:hover { background: var(--brand); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 22px 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  justify-content: space-between;
  font-size: 0.84rem;
  color: #7e93a3;
}
.footer-bottom a { color: #9fb2c0; }
.footer-bottom a:hover { color: #fff; }

/* Back to top */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  border: 0;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 40;
}
.to-top.visible { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--brand); }

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

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .contact-cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark-2);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 18px 20px;
    gap: 4px;
    box-shadow: 0 18px 30px rgba(0,0,0,0.3);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 12px; }
  .nav .nav-cta { margin: 8px 0 0; text-align: center; }
  .nav-toggle { display: inline-block; }
}

@media (max-width: 640px) {
  .section { padding: 44px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; gap: 18px; }
  .contact-cards { grid-template-columns: 1fr; }
  .service-item { grid-template-columns: 1fr; }
  .service-item img { width: 100%; height: auto; max-height: 180px; object-fit: contain; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .topbar-inner { justify-content: center; text-align: center; }
  .topbar .topbar-phone { white-space: normal; }
  .hero-content { position: static; }
  .hero img.hero-img { height: 340px; }
  .hero-content .container { padding: 26px 22px 34px; }
  .brand-name { display: none; }
}

/* Focus visibility */
a:focus-visible, button:focus-visible, .nav-toggle:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
