/* ==========================================================================
   Cortinas Metálicas Colloni – estilos
   Paleta: amarillo #FFC928 · rojo #D71920 · negro #171717 · blanco · gris #F4F4F4
   ========================================================================== */

:root {
  --yellow: #FFC928;
  --yellow-dark: #E8B000;
  --red: #D71920;
  --red-dark: #B01016;
  --black: #171717;
  --white: #FFFFFF;
  --gray: #F4F4F4;
  --muted: #5A5A5A;
  --focus: var(--red);
  --radius: 10px;
  --shadow: 0 6px 18px rgba(23, 23, 23, .12);
  --header-h: 84px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--yellow); color: var(--black); padding: 10px 16px; font-weight: 700; border-radius: 6px;
}
.skip-link:focus { top: 12px; }
.icon { width: 1.35em; height: 1.35em; flex: none; }

/* Franja amarillo/rojo (detalle de marca) */
.stripe { height: 6px; background: linear-gradient(90deg, var(--yellow) 0 72%, var(--red) 72% 100%); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: .7em 1.3em;
  font: inherit; font-weight: 800; font-size: .95rem; letter-spacing: .03em; text-transform: uppercase;
  text-decoration: none; text-align: center; line-height: 1.2;
  border: 2px solid transparent; border-radius: 8px; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-red { background: var(--red); color: var(--white); box-shadow: 0 4px 0 var(--red-dark); }
.btn-red:hover { background: var(--red-dark); }
.btn-whatsapp { background: var(--yellow); color: var(--black); box-shadow: 0 4px 0 var(--yellow-dark); }
.btn-whatsapp:hover { background: #ffd24f; }
.btn-outline { border-color: var(--white); color: var(--white); background: transparent; }
.btn-outline:hover { background: var(--white); color: var(--black); }
.btn-lg { min-height: 56px; padding: .8em 1.6em; font-size: 1rem; }
.btn-xl { min-height: 64px; padding: .9em 1.8em; font-size: 1.1rem; }

/* ---------- Encabezado ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--black); color: var(--white); --focus: var(--yellow); }
.header-inner { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-logo { height: 68px; width: auto; border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 1.45rem; font-weight: 900; letter-spacing: .08em; color: var(--yellow); }
.brand-text small { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--white); }

.header-wa { min-height: 44px; padding: .5em 1em; font-size: .85rem; }
.nav-cta-mobile { display: none; }

.menu-toggle {
  width: 48px; height: 48px; display: grid; place-items: center;
  background: transparent; border: 2px solid var(--yellow); border-radius: 8px; cursor: pointer;
}
.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after {
  display: block; width: 22px; height: 3px; background: var(--yellow); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle .bars { position: relative; }
.menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle .bars::before { top: -7px; }
.menu-toggle .bars::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

/* Menú móvil (por defecto) */
.nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--black); border-top: 1px solid #333;
  max-height: 0; overflow: hidden; visibility: hidden;
  transition: max-height .25s ease, visibility .25s;
}
.nav.is-open { max-height: 80vh; visibility: visible; }
.nav ul { padding: 8px 16px 20px; }
.nav a:not(.btn) {
  display: block; padding: 14px 4px; font-weight: 700; font-size: 1.1rem; text-decoration: none;
  border-bottom: 1px solid #2c2c2c;
}
.nav a:not(.btn):hover { color: var(--yellow); }
.nav .btn { width: 100%; margin-top: 14px; }

/* ---------- Hero ---------- */
.hero { background: var(--black); color: var(--white); --focus: var(--yellow); scroll-margin-top: var(--header-h); }
.hero-img { width: 100%; height: 38vh; min-height: 220px; max-height: 340px; object-fit: cover; object-position: 50% center; }
.hero-shade { display: none; }
.hero-inner { padding-block: 28px 44px; }
.eyebrow {
  display: inline-block; margin-bottom: 14px; padding: .25em .8em;
  background: var(--yellow); color: var(--black);
  font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; border-radius: 4px;
}
.hero h1 {
  font-size: clamp(1.85rem, 7vw, 3.4rem); font-weight: 900; line-height: 1.04;
  letter-spacing: .02em; text-transform: uppercase;
}
.hero h1 span { color: var(--yellow); }
.hero-sub { margin-top: 14px; font-size: 1.125rem; max-width: 34em; }
.hero-claim {
  margin-top: 16px; padding-left: 14px; border-left: 6px solid var(--red);
  font-size: 1.2rem; font-weight: 800;
}
.hero-note { margin-top: 10px; color: #d9d9d9; max-width: 34em; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(56px, 8vw, 96px); scroll-margin-top: calc(var(--header-h) - 4px); }
.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 44px); }
.kicker {
  display: inline-block; margin-bottom: 10px;
  font-size: .8rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--red);
}
.kicker::before { content: ""; display: inline-block; width: 28px; height: 4px; margin-right: 10px; vertical-align: middle; background: var(--yellow); }
.kicker-dark { color: var(--black); }
.kicker-dark::before { background: var(--red); }
h2 { font-size: clamp(1.6rem, 4.4vw, 2.5rem); font-weight: 900; line-height: 1.12; text-transform: uppercase; letter-spacing: .01em; }
h3 { font-size: 1.2rem; font-weight: 800; line-height: 1.25; }
.lead { margin-top: 12px; font-size: 1.1rem; color: var(--muted); }

.cards { display: grid; gap: 20px; }
.card { background: var(--white); border-radius: var(--radius); }

/* Confianza */
.trust { background: var(--white); }
.trust-card { padding: 28px 24px; background: var(--gray); border-top: 6px solid var(--yellow); box-shadow: var(--shadow); }
.trust-card:nth-child(2) { border-top-color: var(--red); }
.badge { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 16px; border-radius: 12px; background: var(--red); color: var(--white); }
.trust-card:nth-child(2) .badge { background: var(--yellow); color: var(--black); }
.badge .icon { width: 30px; height: 30px; }
.trust-card p { margin-top: 8px; color: #3a3a3a; }

/* Servicios */
.services { background: var(--yellow); }
.services .lead { color: #2b2b2b; }
.service-card { overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); border-bottom: 6px solid var(--red); }
.service-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #ddd; }
.card-body { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: 20px; }
.card-body p { color: #3a3a3a; font-size: 1rem; }
.card-body .btn { margin-top: auto; width: 100%; }
.card-body h3 { text-transform: uppercase; letter-spacing: .04em; }
.card-body p + .btn { margin-top: 10px; }

/* Galería */
.gallery { background: var(--black); color: var(--white); --focus: var(--yellow); }
.gallery .lead { color: #cfcfcf; }
.gallery .kicker { color: var(--yellow); }
.gallery .kicker::before { background: var(--red); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.chip {
  min-height: 44px; padding: .5em 1.1em; font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer;
  color: var(--white); background: transparent; border: 2px solid #555; border-radius: 999px;
  transition: background-color .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--yellow); }
.chip.is-active { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.gallery-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.shot[hidden] { display: none; }
.shot figure { margin: 0; overflow: hidden; border-radius: 8px; background: #262626; border: 1px solid #3a3a3a; }
.shot img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .35s ease; }
.shot:hover img { transform: scale(1.03); }
.shot figcaption { padding: 12px 14px; font-size: .95rem; font-weight: 600; border-top: 4px solid var(--red); }
.note { margin-top: 22px; font-size: .9rem; color: #bdbdbd; }

/* Nosotros */
.about { background: var(--white); }
.about-grid { display: grid; gap: 40px; align-items: center; }
.about-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); box-shadow: 12px 12px 0 var(--yellow), 12px 12px 0 3px var(--black); }
.about-copy { display: grid; gap: 16px; justify-items: start; }
.about-copy h2 { margin-bottom: 4px; }
.about-copy p { color: #2f2f2f; max-width: 38em; }
.about-copy .btn { margin-top: 8px; }

/* Llamada a la acción */
.cta { background: var(--yellow); border-block: 8px solid var(--red); padding-block: clamp(44px, 6vw, 72px); }
.cta-inner { display: grid; gap: 28px; align-items: center; }
.cta h2 { max-width: 20em; }
.cta p { margin-top: 12px; max-width: 36em; font-size: 1.1rem; color: #222; }

/* Contacto */
.contact { background: var(--gray); }
.contact-grid { display: grid; gap: 36px; }
.contact-list { display: grid; gap: 18px; margin: 24px 0 28px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .icon { width: 44px; height: 44px; padding: 10px; border-radius: 10px; background: var(--red); color: var(--white); }
.contact-list .label { display: block; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact-list a { font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--yellow); }
.contact-list a:hover { text-decoration-color: var(--red); }
.contact-list div { padding-top: 2px; word-break: break-word; }
.map-wrap { position: relative; border-radius: var(--radius); overflow: hidden; border: 4px solid var(--black); background: #ddd; min-height: 320px; }
.map-wrap iframe { display: block; width: 100%; height: 100%; min-height: 320px; border: 0; }
.map-link {
  position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: .5em;
  padding: .55em 1em; background: var(--red); color: var(--white); font-weight: 800; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .04em; text-decoration: none; border-radius: 6px;
}
.map-link .icon { width: 1.1em; height: 1.1em; }

/* Pie */
.site-footer { background: var(--black); color: var(--white); padding-bottom: 28px; --focus: var(--yellow); }
.footer-inner { padding-top: 28px; display: grid; gap: 6px; }
.footer-inner strong { color: var(--yellow); letter-spacing: .06em; text-transform: uppercase; }
.footer-small { font-size: .9rem; color: #bdbdbd; }
.footer-logo { width: 150px; height: auto; padding: 8px 10px; margin-bottom: 8px; background: var(--yellow); border-radius: 10px; }

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed; z-index: 90;
  right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 10px;
  min-width: 60px; height: 60px; padding: 0 16px; justify-content: center;
  background: #1FAF55; color: var(--white); text-decoration: none; font-weight: 800;
  border-radius: 999px; border: 3px solid var(--white);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transition: transform .15s ease, background-color .15s;
}
.wa-float:hover { transform: translateY(-2px); background: #17994a; }
.wa-float .icon { width: 30px; height: 30px; }
.wa-float-text { display: none; }
/* Evita que el botón tape el último contenido en móvil */
.site-footer { padding-bottom: 92px; }

/* Revelado suave (solo si hay JS y no se pidió reducir movimiento) */
.js-reveal .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js-reveal .reveal.in { opacity: 1; transform: none; }

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

/* ---------- Teléfonos pequeños ---------- */
@media (max-width: 420px) {
  .header-wa { display: none; }
  .nav-cta-mobile { display: block; }
}

/* ---------- Tablet ---------- */
@media (min-width: 600px) {
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .wa-float-text { display: inline; }
  .site-footer { padding-bottom: 96px; }
}

/* ---------- Escritorio ---------- */
@media (min-width: 900px) {
  .menu-toggle { display: none; }
  .header-wa { display: inline-flex; }
  .nav { position: static; max-height: none; overflow: visible; visibility: visible; background: transparent; border: 0; }
  .nav ul { display: flex; gap: 6px; padding: 0; }
  .nav a:not(.btn) { padding: 10px 12px; font-size: .95rem; border: 0; border-radius: 6px; position: relative; }
  .nav a:not(.btn)::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 3px; background: var(--red);
    transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
  }
  .nav a:not(.btn):hover::after { transform: scaleX(1); }
  .brand { margin-right: 0; }
  .header-inner { gap: 24px; }
  .nav { margin-left: auto; }

  .hero { position: relative; display: flex; align-items: center; min-height: min(78vh, 700px); overflow: hidden; }
  .hero-img { position: absolute; inset: 0; height: 100%; max-height: none; min-height: 0; object-position: 70% center; }
  .hero-shade { display: block; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(23, 23, 23, .94) 0%, rgba(23, 23, 23, .82) 38%, rgba(23, 23, 23, .15) 70%, rgba(23, 23, 23, 0) 100%); }
  .hero-inner { position: relative; width: min(1160px, 100% - 48px); padding-block: 72px; }
  .hero-copy { max-width: 580px; }

  .cards-4 { grid-template-columns: repeat(4, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .about-grid { grid-template-columns: 1fr 1fr; gap: 72px; }
  .cta-inner { grid-template-columns: 1fr auto; gap: 48px; }
  .contact-grid { grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: stretch; }
  .site-footer { padding-bottom: 28px; }
}

@media (min-width: 1100px) {
  .service-card .card-body { padding: 22px; }
}
