/* ============================================================
   Persisantpere — Persianas Sant Pere de Ribes
   Hoja de estilos compartida · sistema de fuentes (sin bloqueo)
   ============================================================ */

:root {
  --color-primary: #C62828;
  --color-primary-rgb: 198,40,40;
  --color-primary-dark: #A31D1D;
  --color-secondary: #2B2B2B;
  --text: #222222;
  --text-light: #666666;
  --border: #e2e2e2;
  --bg-light: #f6f6f7;
  --bg-dark: #2B2B2B;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.10);
  --max: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ── Reset y base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); }
h1, h2, h3, h4 { line-height: 1.2; color: var(--secondary, #1d1d1d); font-weight: 800; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ── Accesibilidad ── */
:focus-visible { outline: 3px solid rgba(var(--color-primary-rgb), .55); outline-offset: 2px; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: var(--color-primary); color: var(--white); padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 700; text-decoration: none; }
.skip-link:focus { left: 0; }
.section-label {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--color-primary); margin-bottom: 10px;
}

/* ── Botones ── */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius-sm); font-weight: 700; font-size: 15px;
  text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: all .18s ease;
  font-family: inherit;
}
.btn-primary { background: var(--color-primary); color: var(--white); }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-secondary { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-secondary:hover { background: var(--color-primary); color: var(--white); }

/* R10 — botones secundarios sobre fondo oscuro */
.hero .btn-secondary,
.cta-final .btn-secondary,
.process .btn-secondary,
.zones .btn-secondary {
  color: var(--white); border-color: rgba(255,255,255,.5);
}
.hero .btn-secondary:hover,
.cta-final .btn-secondary:hover,
.process .btn-secondary:hover,
.zones .btn-secondary:hover { background: var(--white); color: var(--color-primary); border-color:var(--white); }

/* ── Header ── */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--white); box-shadow: 0 1px 0 var(--border); }
.header-top { background: var(--secondary, var(--color-secondary)); color: var(--white); font-size: 13.5px; }
.header-top .container { padding-top: 8px; padding-bottom: 8px; text-align: center; }
.header-top a { color: var(--white); font-weight: 700; text-decoration: none; }
.header-main-inner { display: flex; align-items: center; gap: 20px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.logo img { height: 46px; width: auto; }
.nav-desktop { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav-desktop > a, .nav-link {
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; background: none;
  border: none; cursor: pointer; font-family: inherit; padding: 6px 0; display: inline-flex; align-items: center; gap: 4px;
}
.nav-desktop a[aria-current="page"] { color: var(--color-primary); }
.nav-desktop > a:hover, .nav-link:hover { color: var(--color-primary); }
.chevron { font-size: 11px; }

.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute; top: 100%; left: 0; min-width: 240px; background: var(--white);
  box-shadow: var(--shadow-lg); border-radius: var(--radius-sm); padding: 8px; display: none; flex-direction: column;
}
.nav-dropdown.is-open .nav-dropdown-menu { display: flex; }
@media (hover: hover) and (pointer: fine) {
  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu { display: flex; }
}
.nav-dropdown-menu a { padding: 10px 12px; border-radius: 6px; text-decoration: none; color: var(--text); font-size: 14.5px; font-weight: 600; }
.nav-dropdown-menu a:hover { background: var(--bg-light); color: var(--color-primary); }
.header-cta { margin-left: 6px; }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; width: 44px; height: 44px; align-items: center; justify-content: center; margin-left: auto; }
.burger span { width: 26px; height: 3px; background: var(--secondary, var(--color-secondary)); border-radius: 2px; transition: .2s; }

.mobile-nav { display: none; flex-direction: column; padding: 12px 20px 20px; border-top: 1px solid var(--border); background: var(--white); }
.mobile-nav.open { display: flex; max-height: calc(100vh - 108px); overflow-y: auto; }
body.nav-open { overflow: hidden; }
.mobile-nav > a { padding: 12px 4px; text-decoration: none; color: var(--text); font-weight: 600; border-bottom: 1px solid var(--border); }
.mobile-nav a[aria-current="page"] { color: var(--color-primary); }
.mobile-dropdown-toggle {
  width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--border);
  padding: 12px 4px; font-size: 16px; font-weight: 600; font-family: inherit; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; color: var(--text);
}
.mobile-dropdown-menu { display: none; flex-direction: column; padding-left: 12px; }
.mobile-dropdown-menu.open { display: flex; }
.mobile-dropdown-menu a { padding: 11px 4px; text-decoration: none; color: var(--text-light); font-weight: 600; border-bottom: 1px solid var(--border); }
.mobile-cta { margin-top: 16px; justify-content: center; }

@media (max-width: 900px) {
  .nav-desktop, .header-cta { display: none; }
  .burger { display: flex; }
}

/* ── Hero ── */
.hero { position: relative; color: var(--white); background: var(--secondary, var(--color-secondary)); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,20,20,.86) 0%, rgba(20,20,20,.62) 55%, rgba(20,20,20,.35) 100%); z-index: 1; }
.hero .container { position: relative; z-index: 2; padding-top: 72px; padding-bottom: 72px; }
.hero-content { max-width: 640px; }
.hero h1 { color: var(--white); margin-bottom: 16px; }
.hero-sub { font-size: 1.12rem; color: rgba(255,255,255,.92); margin-bottom: 24px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero-badge { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* ── Secciones genéricas ── */
section { padding: 60px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 42px; }
.bg-light { background: var(--bg-light); }

/* ── Grids de tarjetas ── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card .icon { width: 44px; height: 44px; color: var(--color-primary); margin-bottom: 14px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-light); font-size: 15px; margin-bottom: 14px; }
.card .card-link { font-weight: 700; text-decoration: none; color: var(--color-primary); font-size: 14.5px; }
.card .card-link::after { content: " →"; }

/* Servicios con imagen */
.service-card img { border-radius: var(--radius-sm); margin-bottom: 16px; aspect-ratio: 16/10; object-fit: cover; width: 100%; }

/* Listas dentro de contenido */
.check-list { list-style: none; padding: 0; margin: 0 0 18px; }
.check-list li { position: relative; padding-left: 28px; margin-bottom: 10px; color: var(--text); }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--color-primary); font-weight: 800; }

/* ── Proceso (fondo oscuro) ── */
.process { background: var(--secondary, var(--color-secondary)); color: var(--white); }
.process .section-head h2 { color: var(--white); }
.process-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 22px; }
.process-step { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 24px; }
.process-step .num { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; background: var(--color-primary); font-weight: 800; margin-bottom: 12px; }
.process-step h3 { color: var(--white); }
.process-step p { color: rgba(255,255,255,.82); font-size: 14.5px; margin: 0; }

/* ── Coste ── */
.cost-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.cost-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; background: var(--white); box-shadow: var(--shadow); }
.cost-level { display: inline-block; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 4px 12px; border-radius: 999px; margin-bottom: 12px; }
.cost-level.economico { background: #e7f4ea; color: #1a6e3a; }
.cost-level.moderado { background: #fff3e0; color: #915600; }
.cost-level.premium { background: #fde8e8; color: var(--color-primary); }
.cost-card p { color: var(--text-light); font-size: 14.5px; margin: 0; }

/* ── Reseñas ── */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.review-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.review-stars { color: #b07400; font-size: 16px; letter-spacing: 2px; }
.review-body { font-size: 15px; margin: 12px 0; color: var(--text); }
.review-meta { font-size: 13.5px; color: var(--text-light); font-weight: 600; }
.reviews-summary { text-align: center; margin-bottom: 30px; font-weight: 600; }
.reviews-summary strong { color: var(--color-primary); font-size: 1.3rem; }

/* ── Zonas (fondo oscuro) ── */
.zones { background: var(--color-primary); color: var(--white); }
.zones .section-head h2 { color: var(--white); }
.zones .section-label { color: rgba(255,255,255,.85); }
.zones-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 22px; }
.zones-list span { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14.5px; }
.zones .zones-note { text-align: center; color: rgba(255,255,255,.9); }

/* ── Averías / tipos (icon grid) ── */
.icon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.icon-item { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
.icon-item .icon { width: 40px; height: 40px; color: var(--color-primary); margin-bottom: 12px; }
.icon-item h3 { font-size: 1.05rem; }
.icon-item p { color: var(--text-light); font-size: 14.5px; margin: 0; }

/* ── FAQ ── */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 20px 44px 20px 0; font-size: 1.05rem; font-weight: 700; color: var(--text); cursor: pointer; position: relative; font-family: inherit; }
.faq-q::after { content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--color-primary); font-weight: 400; }
.faq-q[aria-expanded="true"]::after { content: "−"; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a p { padding: 0 0 20px; color: var(--text-light); margin: 0; }

/* ── CTA final (fondo oscuro) ── */
.cta-final { background: var(--secondary, var(--color-secondary)); color: var(--white); text-align: center; }
.cta-final h2 { color: var(--white); }
.cta-final p { color: rgba(255,255,255,.88); max-width: 640px; margin: 0 auto 24px; }
.cta-final .hero-ctas { justify-content: center; }

/* ── Breadcrumbs ── */
.breadcrumbs { font-size: 13.5px; color: var(--text-light); padding: 14px 0; }
.breadcrumbs a { color: var(--text-light); text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-primary); }

/* ── Contenido de subpágina ── */
.service-intro { max-width: 720px; }
.media-text { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.media-text img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 768px) { .media-text { grid-template-columns: 1fr; } }

/* ── SECCIÓN DE CONTACTO COMPARTIDA ── */
.contact-section { background: var(--bg-light); padding: 60px 0; }
.contact-header { text-align: center; margin-bottom: 40px; }
.contact-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: start; }
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }
.contact-form-wrap { background: var(--white); padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 16px; transition: border-color .2s; box-sizing: border-box;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: #6b6b6b; opacity: 1; }
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), .12);
}
.form-checkbox { margin-bottom: 24px; }
.checkbox-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 400; line-height: 1.4; }
.checkbox-label input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox-custom { flex-shrink: 0; width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 4px; margin-top: 2px; transition: all .15s ease; position: relative; background: var(--white); }
.checkbox-custom::after { content: ''; position: absolute; left: 5px; top: 1px; width: 6px; height: 11px; border: solid var(--white); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); transition: transform .15s ease; }
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom { background: var(--color-primary); border-color: var(--color-primary); }
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after { transform: rotate(45deg) scale(1); }
.checkbox-label input[type="checkbox"]:focus-visible + .checkbox-custom { box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), .3); }
.checkbox-text { font-size: 13px; color: var(--text-light); }
.checkbox-text a { color: var(--color-primary); text-decoration: underline; }
.btn-submit { width: 100%; padding: 14px 24px; font-size: 16px; font-weight: 700; cursor: pointer; border: none; border-radius: var(--radius-sm); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }
.form-message { margin-top: 12px; padding: 10px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; }
.contact-info-wrap { display: flex; flex-direction: column; gap: 20px; }
.contact-info-card { background: var(--white); padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-info-card h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-light); margin: 0 0 12px; }
.contact-phone { font-size: 24px; font-weight: 700; color: var(--color-primary); text-decoration: none; display: block; }
.contact-schedule { font-size: 14px; color: var(--text-light); margin: 8px 0 0; }
.contact-nap { font-style: normal; line-height: 1.6; font-size: 15px; }
.contact-nap strong { font-weight: 600; }
.contact-nap a { color: var(--color-primary); text-decoration: none; }

/* ── Footer ── */
.site-footer { background: var(--secondary, #1f1f1f); color: #cfcfcf; padding: 54px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-logo img { height: 46px; width: auto; margin-bottom: 14px; }
.footer-tagline { font-size: 14px; color: #a9a9a9; max-width: 320px; }
.footer-col h3 { color: var(--white); font-size: 15px; margin-bottom: 14px; }
.footer-col a { display: block; color: #cfcfcf; text-decoration: none; font-size: 14.5px; padding: 5px 0; }
.footer-col a:hover { color: var(--white); }
.footer-nap { font-style: normal; font-size: 14.5px; line-height: 1.7; color: #cfcfcf; margin-bottom: 8px; }
.footer-nap strong { color: var(--white); }
.footer-nap a, .footer-email { color: var(--color-primary); text-decoration: none; }
.footer-schedule { font-size: 13.5px; color: #a9a9a9; margin-top: 8px; }
.footer-zonas { border-top: 1px solid rgba(255,255,255,.12); margin-top: 34px; padding-top: 20px; font-size: 13.5px; color: #a9a9a9; }
.footer-zonas span { color: var(--white); font-weight: 600; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 18px; padding-top: 18px; text-align: center; font-size: 13px; color: #9a9a9a; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ── Cookie banner (sin CLS: hidden hasta decidir) ── */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.cookie-banner[hidden] { display: none; }
.cookie-inner { display: flex; align-items: center; gap: 20px; padding: 18px 22px; max-width: var(--max); margin: 0 auto; flex-wrap: wrap; }
.cookie-text { font-size: 13.5px; color: var(--text-light); margin: 0; flex: 1 1 320px; }
.cookie-text a { color: var(--color-primary); }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn { padding: 10px 18px; font-size: 14px; }
@media (max-width: 520px) { .cookie-actions { width: 100%; } .cookie-btn { flex: 1; } }

/* ── Páginas legales ── */
.legal { padding: 50px 0 60px; }
.legal .container { max-width: 720px; }
.legal h1 { margin-bottom: 8px; }
.legal .legal-updated { color: var(--text-light); font-size: 14px; margin-bottom: 30px; }
.legal h2 { font-size: 1.3rem; margin: 34px 0 12px; }
.legal h3 { font-size: 1.08rem; margin: 22px 0 8px; }
.legal p, .legal li { color: #333; font-size: 15.5px; }
.legal ul { padding-left: 20px; margin-bottom: 16px; }
.legal li { margin-bottom: 8px; }
.legal .legal-note { background: var(--bg-light); border-left: 3px solid var(--color-primary); padding: 14px 18px; border-radius: 6px; font-size: 14px; color: var(--text-light); }
.legal a { color: var(--color-primary); }
/* 404 */
.error-page { text-align: center; padding: 80px 0; }
.error-page .code { font-size: 5rem; font-weight: 800; color: var(--color-primary); line-height: 1; }
.error-page h1 { margin: 10px 0 14px; }
.error-page p { color: var(--text-light); max-width: 520px; margin: 0 auto 26px; }
.error-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ── Franja de estadísticas / confianza (EEAT) ── */
.stats-band { background: var(--color-primary); color: var(--white); padding: 34px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: 14px; color: rgba(255,255,255,.9); }
@media (max-width: 640px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 26px; } }
.tips .icon-item h3 { font-size: 1.05rem; }

/* ── Anclas bajo cabecera fija (evita que el título quede tapado) ── */
:target, #main, #contacto, section[id] { scroll-margin-top: 116px; }

/* ── Respeto a prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ── Hoja de impresión (páginas legales, presupuestos) ── */
@media print {
  .site-header, .mobile-nav, .cookie-banner, .skip-link, .stats-band, .cta-final, .contact-section, .zones { display: none !important; }
  body { color: #000; background: var(--white); }
  a { color: #000; text-decoration: underline; }
  .container { max-width: 100%; }
  section { padding: 12px 0; }
}
