/* =========================================================
   Kings Brothers Painting · estilos del sitio
   Colores y fuente iguales a kingsbrotherspaintingcorpllc.com:
   gris pizarra + naranja ámbar + turquesa, fuente Plus Jakarta Sans.
   Para cambiar un color en TODO el sitio, cámbialo solo aquí.
   ========================================================= */
:root {
  --navy: #334155;        /* gris pizarra oscuro (secciones oscuras, pie) */
  --navy-deep: #0f172a;   /* casi negro (títulos y textos fuertes) */
  --gold: #d97706;        /* naranja ámbar (botón "Free Estimate") */
  --gold-dark: #b45309;   /* ámbar oscuro (detalles sobre fondo claro) */
  --gold-light: #fbbf24;  /* ámbar claro (detalles sobre fondo oscuro) */
  --teal: #4fb6ab;        /* turquesa (botón "Call now") */
  --teal-dark: #3a9a90;
  --ink: #0f172a;         /* texto de títulos */
  --body: #334155;        /* texto normal */
  --muted: #475569;       /* texto secundario */
  --paper: #ffffff;       /* fondo */
  --paper-alt: #f8f9fa;   /* fondo de secciones alternas */
  --hero-bg: #e2e8f0;     /* fondo de la portada */
  --line: #dde3ea;        /* bordes */
  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}

body {
  background: var(--paper);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}
.container {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

h1, h2, h3, h4, .brand-text {
  font-family: var(--font-display);
  text-wrap: balance;
  letter-spacing: -0.025em;
  color: var(--ink);
}
h2 { font-weight: 700; font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.15; margin-bottom: .75rem; }
h3 { font-weight: 700; font-size: 1.2rem; }
a { color: var(--navy); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.eyebrow {
  font-size: .8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .14em; color: var(--gold-dark); margin-bottom: .5rem;
}
.gold { color: var(--gold); }

/* Marcas de contenido pendiente: borra la etiqueta cuando pongas el dato real */
.todo {
  display: inline-block; font-style: normal; font-size: .75rem; font-weight: 600;
  background: #fff3c4; color: #6b4e00; border: 1px dashed #c9a000;
  padding: 0 .4em; border-radius: 4px; vertical-align: middle;
}

/* ---------- Botones ---------- */
.btn-gold { background: var(--gold); color: var(--navy-deep); font-weight: 600; border: 0; border-radius: 8px; }
.btn-gold:hover, .btn-gold:focus { background: #ea8a0c; color: var(--navy-deep); }
.btn-call { background: var(--teal); color: #fff; font-weight: 700; border-radius: 8px; padding: .6rem 1.2rem; }
.btn-call:hover { background: var(--teal-dark); color: #fff; }

/* ---------- Barra superior y menú ---------- */
.topbar { background: var(--navy); color: #e2e8f0; font-size: .85rem; padding-block: .45rem; }
.topbar i { color: var(--gold-light); margin-right: .3rem; }
.site-nav {
  background: var(--paper); border-bottom: 1px solid var(--line);
  top: env(safe-area-inset-top, 0px); padding-block: .6rem;
}
.brand-logo { height: 52px; width: auto; }
.brand-text { display: flex; flex-direction: column; font-weight: 700; font-size: 1.25rem; line-height: 1; color: var(--navy-deep); margin: 0; }
.brand-text small { font-family: var(--font-body); font-size: .7rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-dark); margin-top: .25rem; }
.brand-text.light { color: #fff; }
.site-nav .nav-link { font-weight: 500; color: var(--ink); }
.site-nav .nav-link:hover { color: var(--gold-dark); }

/* ---------- Portada ---------- */
.hero {
  background: var(--hero-bg);
  color: var(--ink); padding-block: 4.5rem 5rem;
}
.hero h1 { font-weight: 700; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; margin-bottom: 1.25rem; }
.hero .lead { color: var(--body); font-size: 1.15rem; max-width: 34em; }
.hero .eyebrow { color: var(--gold-dark); }
.hero .gold { color: var(--gold-dark); }
.hero .btn-outline-light { color: var(--ink); border-color: var(--ink); }
.hero .btn-outline-light:hover { background: var(--ink); color: #fff; }
.hero-proof { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; color: var(--body); font-size: .95rem; }
.hero-proof i { color: var(--gold-dark); margin-right: .35rem; }

/* ---------- Fotos con recuadro de reemplazo ---------- */
/* Si la foto no existe, se muestra el recuadro rayado con el nombre del archivo. */
.photo {
  position: relative; overflow: hidden; border-radius: 10px; margin: 0;
  aspect-ratio: 4 / 3; max-width: 100%;
  background: repeating-linear-gradient(135deg, #e6eaf2 0 14px, #dde2ec 14px 28px);
}
.photo::before {
  content: attr(data-label); position: absolute; inset: 0; display: grid; place-items: center;
  padding: 1rem; text-align: center; font-size: .85rem; font-weight: 600; color: #5a6478;
}
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: .6rem .8rem; font-size: .85rem; font-weight: 600;
  color: #fff; background: linear-gradient(transparent, rgba(15,23,42,.85));
}
.hero-photo { aspect-ratio: 5 / 4; border: 6px solid #fff; box-shadow: 0 24px 50px rgba(15,23,42,.18); }
.about-photo { aspect-ratio: 4 / 5; }

/* ---------- Datos rápidos ---------- */
.stats { background: var(--gold); color: var(--navy-deep); padding-block: 1.75rem; }
.stats strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.stats span { font-size: .9rem; font-weight: 500; }

/* ---------- Secciones ---------- */
.section { padding-block: 5rem; }
.section-alt { background: var(--paper-alt); }
.section-navy { background: var(--navy); color: #e2e8f0; }
.section-navy .eyebrow { color: var(--gold-light); }
.section-navy h2 { color: #fff; }
.section-head { max-width: 640px; margin: 0 auto 3rem; text-align: center; }
.section-head p:last-child { color: var(--muted); }

/* Servicios */
.service { height: 100%; padding: 1.75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); transition: border-color .2s, transform .2s; }
.service:hover { border-color: var(--gold); transform: translateY(-3px); }
.service > i { font-size: 1.8rem; color: var(--gold-dark); display: inline-block; margin-bottom: .75rem; }
.service p { color: var(--muted); margin: 0; }

/* Pasos */
.steps li { position: relative; }
.step-n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--gold-light); font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: 1rem; }
.steps p { color: var(--muted); }

/* Nosotros */
.checks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .6rem; }
.checks i { color: var(--gold-light); margin-right: .5rem; }

/* Reseñas */
.review { height: 100%; margin: 0; padding: 1.75rem; background: var(--paper); border-radius: 10px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 1rem; }
.review p { margin: 0; font-size: 1.05rem; }
.review footer { margin-top: auto; font-size: .9rem; font-weight: 600; color: var(--muted); }
.stars { color: var(--gold); letter-spacing: .1em; }

/* Pueblos */
.towns { list-style: none; padding: 0; margin: 0 auto; max-width: 820px; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.towns li { padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; }

/* Contacto */
.contact-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.1rem; }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact-list i { font-size: 1.3rem; color: var(--gold-dark); width: 1.5rem; flex: none; }
.contact-list strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.contact-list div { min-width: 0; overflow-wrap: anywhere; }
.estimate-form { background: var(--paper); padding: 2rem; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 20px 40px rgba(15,23,42,.08); }
.form-label { font-weight: 600; font-size: .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--gold); box-shadow: 0 0 0 .2rem rgba(217,119,6,.25); }
.form-msg { margin: 1rem 0 0; padding: .75rem 1rem; border-radius: 8px; background: #e8f4ea; color: #1d5b2a; font-weight: 500; }

.link-arrow { font-weight: 600; text-decoration: none; }

/* ---------- Pie ---------- */
.site-footer { background: var(--navy); color: #e2e8f0; padding-block: 3.5rem 6rem; font-size: .95rem; }
.site-footer h4 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: .4rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--gold-light); }
.site-footer .copy { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2rem; padding-top: 1.5rem; font-size: .85rem; }
@media (min-width: 768px) { .site-footer { padding-bottom: 3.5rem; } }

/* ---------- Botones fijos ---------- */
.wa-float {
  position: fixed; right: calc(1.25rem + env(safe-area-inset-right, 0px)); bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; font-size: 1.8rem;
  align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(0,0,0,.25); z-index: 1030;
}
.wa-float:hover { color: #fff; background: #1ebe5b; }
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--navy); padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
}
.mobile-bar a { color: #fff; text-align: center; padding: .85rem .25rem; font-weight: 600; font-size: .9rem; text-decoration: none; }
.mobile-bar a i { margin-right: .3rem; }
.mobile-bar a.gold { background: var(--gold); color: var(--navy-deep); }

@media (max-width: 575.98px) {
  .section { padding-block: 3.5rem; }
  .hero { padding-block: 3rem 3.5rem; }
  .estimate-form { padding: 1.25rem; }
  .brand-logo { height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

/* ---------- Carrusel de la portada ---------- */
.hero-carousel, .hero-carousel .carousel-inner, .hero-carousel .carousel-item { height: 100%; }
.hero-carousel .carousel-item { overflow: hidden; }
.hero-carousel .carousel-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-carousel .carousel-item.active img { animation: kenburns 6s ease-out both; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.07); } }
.hero-carousel .carousel-item { transition-duration: 1s; }
.hero-tag {
  position: absolute; left: 1rem; bottom: 2.4rem; z-index: 2; padding: .35rem .8rem; border-radius: 999px;
  background: rgba(15,23,42,.78); color: #fff; font-size: .85rem; font-weight: 600; backdrop-filter: blur(4px);
}
.hero-carousel .carousel-indicators { margin-bottom: .8rem; }
.hero-carousel .carousel-indicators [data-bs-target] { width: 22px; height: 4px; border-radius: 2px; }
.hero-carousel .carousel-indicators .active { background-color: var(--gold); }
.hero-carousel .carousel-control-prev, .hero-carousel .carousel-control-next { width: 12%; opacity: 0; transition: opacity .2s; }
.hero-carousel:hover .carousel-control-prev, .hero-carousel:hover .carousel-control-next { opacity: .85; }
@media (hover: none) { .hero-carousel .carousel-control-prev, .hero-carousel .carousel-control-next { opacity: .7; } }

/* ---------- Animaciones al bajar ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }
.gallery .photo img { transition: transform .5s ease; }
.gallery .photo:hover img { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) {
  .hero-carousel .carousel-item.active img { animation: none; }
  .js-reveal .reveal { opacity: 1; transform: none; }
}

/* ---------- Galería con filtros ---------- */
.g-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 2rem; }
.g-filter {
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px;
  padding: .5rem 1.1rem; font-weight: 600; font-size: .95rem; transition: background .2s, color .2s, border-color .2s;
}
.g-filter span { font-weight: 500; opacity: .6; font-size: .85em; margin-left: .15rem; }
.g-filter:hover { border-color: var(--gold); }
.g-filter.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.g-item { transition: opacity .35s ease, transform .35s ease; }
.g-item.is-hiding { opacity: 0; transform: scale(.96); }
.g-item[hidden] { display: none !important; }
.g-link { display: block; cursor: zoom-in; }
.g-link img { transition: transform .5s ease; }
.g-link:hover img, .g-link:focus-visible img { transform: scale(1.06); }
.g-link:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.g-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: .6rem .8rem; font-size: .85rem; font-weight: 600;
  color: #fff; background: linear-gradient(transparent, rgba(15,23,42,.85));
}
.g-zoom {
  position: absolute; top: .6rem; right: .6rem; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.9); color: var(--navy); opacity: 0; transform: scale(.8); transition: opacity .2s, transform .2s;
}
.g-link:hover .g-zoom, .g-link:focus-visible .g-zoom { opacity: 1; transform: none; }
@media (hover: none) { .g-zoom { opacity: .9; transform: none; } }

/* ---------- Visor de fotos ---------- */
.lightbox .modal-content { background: transparent; border: 0; position: relative; display: flex; flex-direction: row; align-items: center; justify-content: center; }
.modal-backdrop.show { opacity: .88; }
.lb-figure { margin: 0; flex: 0 1 auto; min-width: 0; display: flex; flex-direction: column; }
.lb-figure img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-figure figcaption { display: flex; justify-content: space-between; gap: 1rem; color: #fff; font-weight: 600; padding: .75rem .25rem 0; }
#lb-count { opacity: .7; font-weight: 500; }
.lb-nav, .lb-close {
  border: 0; background: rgba(255,255,255,.12); color: #fff; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.3rem; flex: none; transition: background .2s;
}
.lb-nav:hover, .lb-close:hover { background: var(--gold); color: var(--navy-deep); }
.lb-prev { margin-right: .75rem; } .lb-next { margin-left: .75rem; }
.lb-close { position: absolute; top: -58px; right: 0; }
@media (max-width: 575px) {
  .lb-nav { position: absolute; top: 40%; z-index: 2; width: 40px; height: 40px; background: rgba(0,0,0,.45); }
  .lb-prev { left: 6px; margin: 0; } .lb-next { right: 6px; margin: 0; }
}

/* ---------- Idiomas ---------- */
.lang-badge {
  display: inline-flex; align-items: center; gap: .45rem; margin-bottom: 1rem; padding: .4rem .9rem; border-radius: 999px;
  background: #fff; border: 1px solid #cbd5e1; color: var(--ink); font-weight: 600; font-size: .9rem;
}
.lang-badge i, .lang-badge span { color: var(--gold-dark); }
.footer-lang { font-weight: 600; }
.footer-lang i { color: var(--gold-light); }

/* ---------- Formulario ---------- */
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.estimate-form { position: relative; }
.form-msg.is-error { background: #fdecea; color: #b42318; }
.estimate-form button[disabled] { opacity: .7; }
.areas-es { max-width: 720px; margin: 1.75rem auto 0; text-align: center; color: var(--muted); }

/* ---------- Botón flotante de llamada (encima del de WhatsApp) ---------- */
.call-float {
  position: fixed; right: calc(1.25rem + env(safe-area-inset-right, 0px)); bottom: calc(1.25rem + 58px + .8rem + env(safe-area-inset-bottom, 0px));
  width: 58px; height: 58px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 1.5rem;
  align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(0,0,0,.25); z-index: 1030; text-decoration: none;
  animation: call-pulse 2.4s ease-out infinite;
}
.call-float:hover, .call-float:focus-visible { color: #fff; background: var(--teal-dark); }
.call-float-label {
  position: absolute; right: calc(100% + .6rem); white-space: nowrap; background: var(--navy-deep); color: #fff;
  font-size: .9rem; font-weight: 600; padding: .4rem .75rem; border-radius: 8px;
  opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .2s; pointer-events: none;
}
.call-float:hover .call-float-label, .call-float:focus-visible .call-float-label { opacity: 1; transform: none; }
@keyframes call-pulse {
  0% { box-shadow: 0 8px 20px rgba(0,0,0,.25), 0 0 0 0 rgba(79,182,171,.55); }
  70% { box-shadow: 0 8px 20px rgba(0,0,0,.25), 0 0 0 16px rgba(79,182,171,0); }
  100% { box-shadow: 0 8px 20px rgba(0,0,0,.25), 0 0 0 0 rgba(79,182,171,0); }
}
@media (prefers-reduced-motion: reduce) { .call-float { animation: none; } }

/* ---------- Aviso de cookies ---------- */
.cookie-banner {
  position: fixed; z-index: 1060; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px)); max-width: 760px; margin: 0 auto;
  display: flex; gap: 1.25rem; align-items: center; padding: 1.25rem 1.4rem;
  background: #fff; color: var(--body); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15,23,42,.25); font-size: .92rem; animation: cookie-in .4s ease-out;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0 0 .35rem; }
.cookie-title { font-weight: 700; color: var(--ink); font-size: 1rem; }
.cookie-title i { color: var(--gold-dark); margin-right: .3rem; }
.cookie-es { color: var(--muted); font-size: .88rem; }
.cookie-actions { display: flex; flex-direction: column; gap: .5rem; flex: none; }
.cookie-actions .btn { white-space: nowrap; font-weight: 600; }
.btn-cookie-reject { background: #fff; color: var(--ink); border: 1px solid var(--ink); border-radius: 8px; }
.btn-cookie-reject:hover { background: var(--ink); color: #fff; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; font: inherit; }
.link-btn:hover { color: var(--gold-light); }
@keyframes cookie-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@media (max-width: 767.98px) {
  .cookie-banner { flex-direction: column; align-items: stretch; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .cookie-actions { flex-direction: row; } .cookie-actions .btn { flex: 1; white-space: normal; }
}

/* ---------- Preguntas frecuentes ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: .75rem; }
.faq-item { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 0 1.25rem; }
.faq-item summary { cursor: pointer; list-style: none; padding: 1.05rem 2rem 1.05rem 0; font-weight: 700; color: var(--ink); position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--gold-dark); font-weight: 500; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0 0 1.1rem; color: var(--body); }
.faq-item[open] { border-color: var(--gold); }
#faq { border-top: 1px solid var(--line); }
