/* ============================================================
   Derribos Hijedo — style.css v1
   Paleta extraída de la web original (Elementor kit):
   amarillo #FCBB21 · oscuro #222 · texto #7A7A7A · fondos #F9F9F9
   ============================================================ */

/* ---------- Secciones genéricas ---------- */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--off-white); }
.section-head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.section-head .kicker { display: inline-block; color: var(--primary-dark); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; margin-bottom: 0.6rem; }
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); line-height: 1.2; margin-bottom: 0.8rem; }
.section-head p { color: var(--text-muted); }

h2, h3 { color: var(--dark); font-weight: 800; }

/* ---------- Franja de ventajas ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.feat { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 1.6rem 1.4rem; text-align: center; }
.feat svg { width: 42px; height: 42px; stroke: var(--primary-dark); margin-bottom: 0.8rem; }
.feat-title { font-weight: 800; color: var(--dark); margin-bottom: 0.35rem; }
.feat p:not(.feat-title) { font-size: 0.92rem; color: var(--text-muted); }

/* ---------- Nosotros ---------- */
.about { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: center; }
.about-img img { width: 100%; height: auto; border-radius: 14px; display: block; }
.about-txt h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.about-txt p { margin-bottom: 1rem; color: var(--text-muted); }
.checklist { list-style: none; margin: 1.2rem 0 1.6rem; }
.checklist li { padding-left: 1.9rem; position: relative; margin-bottom: 0.6rem; font-weight: 600; color: var(--dark); }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 1.3rem; height: 1.3rem; background: var(--primary); color: var(--dark); border-radius: 50%; font-size: 0.8rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* ---------- Grid de servicios ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.svc-card { position: relative; border-radius: 14px; overflow: hidden; background: var(--dark); min-height: 300px; display: flex; align-items: flex-end; text-decoration: none; }
.svc-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; transition: transform 0.35s ease, opacity 0.35s ease; }
.svc-card:hover img { transform: scale(1.05); opacity: 0.4; }
.svc-card .svc-num { position: absolute; top: 1rem; right: 1.2rem; font-size: 2.2rem; font-weight: 800; color: var(--primary); opacity: 0.9; }
.svc-body { position: relative; padding: 1.5rem; color: var(--white); }
.svc-body h3 { color: var(--white); font-size: 1.15rem; margin-bottom: 0.4rem; }
.svc-body p { font-size: 0.9rem; color: #d8d8d8; margin-bottom: 0.7rem; }
.svc-link { color: var(--primary); font-weight: 700; font-size: 0.9rem; }

/* ---------- Proceso ---------- */
.process { background: var(--dark); color: var(--white); }
.process .section-head h2, .process .section-head p { color: var(--white); }
.process .section-head p { opacity: 0.75; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: step; }
.step { background: var(--dark-2); border-radius: 12px; padding: 1.8rem 1.4rem; position: relative; }
.step-num { display: inline-flex; width: 2.6rem; height: 2.6rem; background: var(--primary); color: var(--dark); border-radius: 50%; align-items: center; justify-content: center; font-weight: 800; font-size: 1.15rem; margin-bottom: 1rem; }
.step-title { font-weight: 800; color: var(--white); margin-bottom: 0.4rem; }
.step p:not(.step-title) { font-size: 0.92rem; color: #b9b9b9; }

/* ---------- Testimonios ---------- */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.review { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 1.6rem; display: flex; flex-direction: column; }
.review .stars { color: var(--primary-dark); letter-spacing: 2px; margin-bottom: 0.7rem; font-size: 1rem; }
.review blockquote { flex: 1; font-size: 0.95rem; color: var(--text-muted); margin-bottom: 1rem; }
.review-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.review-meta .name { font-weight: 700; color: var(--dark); font-size: 0.92rem; }
.g-badge { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--text-muted); }

/* ---------- FAQ (acordeón) ---------- */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 0.8rem; background: var(--white); overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: 0; padding: 1.1rem 1.3rem; font-size: 1rem; font-weight: 700; color: var(--dark); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-family: inherit; }
.faq-q .faq-icon { flex: 0 0 auto; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--primary); color: var(--dark); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 1rem; line-height: 1; transition: transform 0.25s ease; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-a-inner { padding: 0 1.3rem 1.2rem; color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Galería ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 170px; gap: 0.9rem; }
.gallery figure { margin: 0; border-radius: 10px; overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.gallery figure:hover img { transform: scale(1.06); }
.gallery .g-wide { grid-column: span 2; grid-row: span 2; }

/* ---------- Estadísticas ---------- */
.stats { background: var(--primary); }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stat strong { display: block; font-size: 2.2rem; font-weight: 800; color: var(--dark); line-height: 1.1; }
.stat span { color: #4d3f10; font-weight: 600; font-size: 0.95rem; }

/* ---------- Banner CTA ---------- */
.cta-banner { background: var(--dark); color: var(--white); text-align: center; }
.cta-banner h2 { color: var(--white); font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 0.8rem; }
.cta-banner p { color: #c9c9c9; max-width: 640px; margin: 0 auto 1.6rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { background: #171717; color: #c9c9c9; padding: 3.5rem 0 1rem; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-heading { font-weight: 800; color: var(--white); margin-bottom: 1rem; font-size: 1rem; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 0.55rem; }
.footer a { color: #c9c9c9; text-decoration: none; }
.footer a:hover { color: var(--primary); }
.footer-brand img { margin-bottom: 1rem; }
.footer-brand p { color: #9a9a9a; }
.footer-bottom { border-top: 1px solid #2e2e2e; padding-top: 1.2rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; color: #8f8f8f; font-size: 0.85rem; }
.footer-bottom button { background: none; border: 0; color: #8f8f8f; text-decoration: underline; cursor: pointer; font-size: 0.85rem; font-family: inherit; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb span[aria-hidden] { margin: 0 0.4rem; }

/* ---------- Hero interior (páginas de servicio) ---------- */
.page-hero { background: var(--dark); color: var(--white); padding: 8.5rem 0 3.5rem; }
.page-hero .breadcrumb { color: #a5a5a5; }
.page-hero h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); color: var(--white); line-height: 1.15; margin-bottom: 0.8rem; }
.page-hero .lead { color: #cfcfcf; max-width: 700px; }

/* ---------- Layout servicio: contenido + sidebar ---------- */
.svc-layout { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start; }
.svc-content h2 { font-size: 1.5rem; margin: 2.2rem 0 0.9rem; }
.svc-content h2:first-child { margin-top: 0; }
.svc-content p { margin-bottom: 1rem; color: var(--text-muted); }
.svc-content img { border-radius: 12px; width: 100%; height: auto; margin: 0.5rem 0 1rem; }
.svc-content ul { margin: 0 0 1rem 1.2rem; color: var(--text-muted); }
.svc-content li { margin-bottom: 0.4rem; }
.benefits-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin: 1rem 0 1.5rem; }
.benefit { background: var(--off-white); border-radius: 10px; padding: 1.2rem; border-left: 4px solid var(--primary); }
.benefit .b-title { font-weight: 800; color: var(--dark); margin-bottom: 0.3rem; }
.benefit p { font-size: 0.92rem; margin: 0; }
.steps-inline { counter-reset: st; list-style: none; margin: 1rem 0 1.5rem; }
.steps-inline li { counter-increment: st; position: relative; padding: 0 0 1.2rem 3.2rem; }
.steps-inline li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 2.2rem; height: 2.2rem; background: var(--primary); color: var(--dark); font-weight: 800; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.steps-inline .st-title { font-weight: 800; color: var(--dark); display: block; margin-bottom: 0.2rem; }
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.related a { display: block; background: var(--off-white); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; text-decoration: none; color: var(--dark); font-weight: 700; font-size: 0.92rem; }
.related a:hover { border-color: var(--primary); }

/* Sidebar */
.sidebar { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-box { background: var(--off-white); border: 1px solid var(--border); border-radius: 12px; padding: 1.4rem; }
.sidebar-box .sb-title { font-weight: 800; color: var(--dark); margin-bottom: 0.9rem; }
.sidebar-box ul { list-style: none; }
.sidebar-box li { border-bottom: 1px solid var(--border); }
.sidebar-box li:last-child { border-bottom: 0; }
.sidebar-box li a { display: block; padding: 0.55rem 0; color: var(--text); text-decoration: none; font-size: 0.92rem; }
.sidebar-box li a:hover, .sidebar-box li a[aria-current] { color: var(--primary-dark); font-weight: 700; }
.sidebar-cta { background: var(--dark); color: var(--white); border-radius: 12px; padding: 1.6rem; text-align: center; }
.sidebar-cta .sb-title { color: var(--white); font-weight: 800; margin-bottom: 0.5rem; }
.sidebar-cta p { color: #c9c9c9; font-size: 0.9rem; margin-bottom: 1rem; }
.sidebar-cta .btn { width: 100%; margin-bottom: 0.6rem; }

/* ---------- Contacto ---------- */
.contact-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: start; }
.contact-info-list { list-style: none; display: flex; flex-direction: column; gap: 1.2rem; margin-top: 1.5rem; }
.contact-info-list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact-info-list svg { flex: 0 0 auto; width: 40px; height: 40px; padding: 8px; background: var(--primary); border-radius: 10px; stroke: var(--dark); }
.contact-info-list .ci-label { font-weight: 800; color: var(--dark); display: block; font-size: 0.95rem; }
.contact-info-list a { color: var(--text-muted); text-decoration: none; }
.contact-info-list a:hover { color: var(--primary-dark); }
.contact-info-list span.ci-val { color: var(--text-muted); font-size: 0.95rem; }

.form-card { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 1.8rem; box-shadow: 0 8px 30px rgba(0,0,0,0.06); }
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-weight: 700; color: var(--dark); font-size: 0.9rem; margin-bottom: 0.35rem; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.75rem 0.9rem; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 0.95rem; color: var(--text); background: var(--white); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.form-msg { margin-top: 1rem; padding: 0.8rem 1rem; border-radius: 8px; font-size: 0.92rem; display: none; }
.form-msg.ok { display: block; background: #e7f6e9; color: #1d6b2a; }
.form-msg.err { display: block; background: #fdecec; color: #a02020; }
.map-wrap { margin-top: 3rem; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.map-wrap iframe { display: block; width: 100%; }

/* ---------- Páginas legales ---------- */
.legal-content { max-width: 800px; margin: 0 auto; }
.legal-content h2 { font-size: 1.3rem; margin: 2rem 0 0.8rem; }
.legal-content p, .legal-content li { color: var(--text-muted); margin-bottom: 0.8rem; font-size: 0.95rem; }
.legal-content ul { margin-left: 1.2rem; }
.legal-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.88rem; }
.legal-content th, .legal-content td { border: 1px solid var(--border); padding: 0.6rem 0.7rem; text-align: left; }
.legal-content th { background: var(--off-white); color: var(--dark); }
.table-scroll { overflow-x: auto; }

/* ---------- 404 ---------- */
.err-404 { min-height: 70vh; display: flex; align-items: center; text-align: center; padding-top: 6rem; }
.err-404 .big { font-size: 6rem; font-weight: 800; color: var(--primary); line-height: 1; }

/* ---------- Cookie banner ---------- */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 3000; background: var(--dark); color: var(--white); padding: 1.2rem 1.5rem; display: none; box-shadow: 0 -4px 20px rgba(0,0,0,0.3); }
.cookie-banner.show { display: block; }
.cookie-inner { max-width: 1140px; margin: 0 auto; display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.cookie-inner p { flex: 1 1 320px; font-size: 0.88rem; color: #d5d5d5; margin: 0; }
.cookie-inner a { color: var(--primary); }
.cookie-btns { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cookie-btns .btn { padding: 0.55rem 1.1rem; font-size: 0.85rem; }
.btn-ghost { background: transparent; border: 1px solid #666; color: var(--white); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.cookie-modal-overlay { position: fixed; inset: 0; z-index: 3100; background: rgba(0,0,0,0.6); display: none; align-items: center; justify-content: center; padding: 1rem; }
.cookie-modal-overlay.show { display: flex; }
.cookie-modal { background: var(--white); border-radius: 14px; max-width: 520px; width: 100%; padding: 1.8rem; max-height: 85vh; overflow-y: auto; }
.cookie-modal-title { font-weight: 800; font-size: 1.2rem; color: var(--dark); margin-bottom: 1.2rem; }
.cookie-cat { border: 1px solid var(--border); border-radius: 10px; padding: 1rem; margin-bottom: 0.9rem; display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.cookie-cat-title { font-weight: 800; color: var(--dark); margin-bottom: 0.2rem; }
.cookie-cat p:not(.cookie-cat-title) { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: #ccc; border-radius: 26px; transition: 0.25s; }
.slider::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: var(--white); border-radius: 50%; transition: 0.25s; }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:disabled + .slider { opacity: 0.55; cursor: not-allowed; }

/* ---------- Barra móvil fija ---------- */
.mobile-bar { display: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 992px) {
  .features, .stats-row { grid-template-columns: repeat(2, 1fr); }
  .services-grid, .reviews { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .svc-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .contact-layout { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about-img { max-width: 420px; margin: 0 auto; }
}

@media (max-width: 640px) {
  .section { padding: 3rem 0; }
  .services-grid, .reviews, .features, .steps { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .benefits-grid, .related { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.8rem; }

  /* Barra móvil fija inferior */
  .mobile-bar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 2000; }
  .mobile-bar a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.95rem 0.5rem; font-weight: 800; font-size: 0.95rem; text-decoration: none; color: var(--white); }
  .mobile-bar .mb-call { background: #1a73e8; }
  .mobile-bar .mb-wa { background: #25d366; }
  body { padding-bottom: 3.4rem; }
  .footer { padding-bottom: 4.5rem; }
  .cookie-banner { padding-bottom: 5rem; }
}
