/* ====== CERTIFICADOYA — Estilo Certicalia ====== */
:root {
  --primary: #547c24;
  --primary-dark: #43631d;
  --primary-light: #71a530;
  --primary-lighter: #8cc842;
  --accent: #f24d2e;
  --accent-dark: #d92e0d;
  --bg: #fafafa;
  --bg-green: #f3f9eb;
  --text: #20201f;
  --text-light: #6b7280;
  --text-lighter: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f0f0f0;
  --white: #ffffff;
  --radius: 10px;
  --radius-sm: 6px;
  --font: 'Montserrat', -apple-system, sans-serif;
  --shadow: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.1);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ====== HEADER ====== */
.header {
  position: sticky; top:0; z-index:100;
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 1px 4px rgba(0,0,0,.03);
}
.header-inner {
  max-width: 1200px; margin:0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.logo { display:flex; align-items:center; gap:.65rem; text-decoration:none; }
.logo svg { flex-shrink:0; }
.logo-text { font-size:1.3rem; font-weight:700; color:var(--text); letter-spacing:-.02em; }
.logo-highlight { color:var(--primary); }
.nav { display:flex; align-items:center; gap:1.5rem; }
.nav a { text-decoration:none; color:var(--text); font-size:.9rem; font-weight:500; transition:color .15s; }
.nav a:hover { color:var(--primary); }
.nav a.active { color:var(--primary); font-weight:600; border-bottom:2px solid var(--primary); padding-bottom:.15rem; }
.btn-nav {
  background:var(--accent); color:white !important; padding:.55rem 1.2rem; border-radius:var(--radius-sm);
  font-weight:600; font-size:.85rem; transition:background .15s;
}
.btn-nav:hover { background:var(--accent-dark); }

/* ====== HERO ====== */
.hero-new {
  background: linear-gradient(135deg, rgba(84,124,36,.88) 0%, rgba(60,95,25,.82) 100%), url('/img/hero-building.jpg') center/cover no-repeat;
  color: #fff;
  padding: 3rem 2rem 4rem;
}
.hero-new-grid {
  max-width: 1100px; margin:0 auto;
  display:grid; grid-template-columns:1fr 400px; gap:3rem; align-items:center;
}
.hero-new a, .hero-new h1, .hero-new h2, .hero-new h3, .hero-new p, .hero-new span { color: inherit; }
.hero-new-text h1 { color:#fff; font-size:2.2rem; font-weight:700; line-height:1.2; margin:0 0 .75rem; }
.hero-new-text h1 span { color:#ffe0a0; }
.hero-new .hero-lead { color:rgba(255,255,255,.92); font-size:1.05rem; line-height:1.6; }
.hero-new .hero-lead strong { color:#ffe0a0; }
.hero-badge { background:rgba(255,255,255,.15); color:#fff; border:1px solid rgba(255,255,255,.2); backdrop-filter:blur(4px); }
.hero-trust { display:flex; gap:1.25rem; margin-top:1.25rem; flex-wrap:wrap; }
.trust-item { display:flex; align-items:center; gap:.4rem; font-size:.85rem; color:rgba(255,255,255,.88); font-weight:500; }
.trust-item svg { fill:#fff; opacity:.9; }

/* Card presupuesto */
.hero-new-card { position:relative; }
.presupuesto-card-v2 {
  background:var(--white); border:1px solid var(--border); border-radius:var(--radius);
  padding:1.75rem; box-shadow:var(--shadow-md);
}
.presupuesto-card-v2 h3 {
  font-size:1.15rem; font-weight:700; margin-bottom:1.25rem; color:var(--text);
}
.form-group { margin-bottom:1rem; }
.form-group label { display:block; font-size:.8rem; font-weight:600; margin-bottom:.3rem; color:var(--text); text-transform:uppercase; letter-spacing:.03em; }
.form-group input, .form-group select {
  width:100%; padding:.6rem .75rem; border:1px solid var(--border); border-radius:var(--radius-sm);
  font-family:var(--font); font-size:.9rem; color:var(--text); background:var(--white); transition:border-color .15s;
}
.form-group input:focus, .form-group select:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px rgba(84,124,36,.12); }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:.75rem; }
.input-error { display:block; color:#ef4444; font-size:.72rem; margin-top:.2rem; min-height:1.1em; }
input.error { border-color:#ef4444 !important; background:#fef2f2; }
.btn-cta {
  display:block; width:100%; padding:.7rem; border:none; border-radius:var(--radius-sm);
  background:var(--accent); color:white; font-family:var(--font); font-size:.95rem; font-weight:600;
  cursor:pointer; transition:background .15s,transform .1s; text-align:center;
}
.btn-cta:hover { background:var(--accent-dark); transform:translateY(-1px); }
.btn-cta-outline { background:white; color:var(--primary); border:2px solid var(--primary); margin-top:.75rem; }
.btn-cta-outline:hover { background:var(--bg-green); transform:translateY(-1px); }
.resultado-box { display:none; margin-top:1rem; padding:1.25rem; background:var(--bg-green); border-radius:var(--radius-sm); text-align:center; }
.resultado-precio { font-size:2rem; font-weight:800; color:var(--primary-dark); }
.resultado-texto { color:var(--text-light); font-size:.85rem; margin-top:.2rem; }
.presupuesto-note { text-align:center; font-size:.75rem; color:var(--text-lighter); margin-top:.75rem; }

/* ====== PASOS ====== */
.pasos-section {
  max-width:1100px; margin:3rem auto; padding:0 2rem; text-align:center;
}
.pasos-section h2 {
  font-size:1.8rem; font-weight:700; margin-bottom:2.5rem; color:var(--text);
}
.pasos-grid {
  display:grid; grid-template-columns:repeat(4, 1fr); gap:1.5rem;
}
.paso {
  padding:2rem 1.25rem; background:var(--white); border:1px solid var(--border); border-radius:var(--radius);
  transition:box-shadow .2s;
}
.paso:hover { box-shadow:var(--shadow-md); }
.paso-num {
  width:40px; height:40px; border-radius:50%; background:var(--bg-green); color:var(--primary);
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:1.1rem; margin:0 auto .75rem;
}
.paso h4 { font-size:1rem; font-weight:700; margin-bottom:.35rem; }
.paso p { font-size:.85rem; color:var(--text-light); line-height:1.5; }

/* ====== PROVINCIAS ====== */
.provincias-section-v2 {
  max-width:1100px; margin:3rem auto; padding:0 2rem; text-align:center;
  background:var(--bg); border-radius:var(--radius); padding-top:2.5rem; padding-bottom:2.5rem;
}
.provincias-section-v2 h2 { font-size:1.6rem; font-weight:700; margin-bottom:.25rem; }
.section-sub { color:var(--text-light); margin-bottom:1.5rem; font-size:.95rem; }
.provincias-grid-v2 {
  display:grid; grid-template-columns:repeat(auto-fill, minmax(130px, 1fr)); gap:.4rem;
}
.prov-link {
  display:block; padding:.5rem .6rem; background:var(--white); border:1px solid var(--border);
  border-radius:var(--radius-sm); text-decoration:none; color:var(--text); font-size:.85rem; font-weight:500;
  transition:all .15s;
}
.prov-link:hover { background:var(--bg-green); border-color:var(--primary); color:var(--primary); }
.prov-link-destacada { background:var(--bg-green); border-color:var(--primary-lighter); color:var(--primary); font-weight:600; }

/* ====== VENTAJAS ====== */
.ventajas-v2 { max-width:1100px; margin:3rem auto; padding:0 2rem; }
.ventajas-grid-v2 { display:grid; grid-template-columns:repeat(3, 1fr); gap:1.5rem; }
.ventaja-v2 { display:flex; gap:1rem; padding:1.5rem; background:var(--white); border:1px solid var(--border); border-radius:var(--radius); transition:box-shadow .2s; }
.ventaja-v2:hover { box-shadow:var(--shadow-md); }
.ventaja-v2 svg { flex-shrink:0; margin-top:.15rem; }
.ventaja-v2 h4 { font-size:.95rem; font-weight:700; margin-bottom:.2rem; }
.ventaja-v2 p { font-size:.82rem; color:var(--text-light); line-height:1.5; }

/* ====== FAQ ====== */
.faq-v2 {
  max-width:800px; margin:3rem auto; padding:0 2rem;
}
.faq-v2 h2 { font-size:1.6rem; font-weight:700; text-align:center; margin-bottom:2rem; }
.faq-item-v2 {
  background:var(--white); border:1px solid var(--border); border-radius:var(--radius); margin-bottom:.5rem; overflow:hidden;
}
.faq-item-v2 summary {
  padding:.9rem 1.25rem; font-weight:600; font-size:.95rem; cursor:pointer; list-style:none;
  display:flex; justify-content:space-between; align-items:center; color:var(--text);
}
.faq-item-v2 summary::after { content:'+'; font-size:1.3rem; color:var(--primary); font-weight:300; }
.faq-item-v2[open] summary::after { content:'−'; }
.faq-item-v2 summary::-webkit-details-marker { display:none; }
.faq-body { padding:.5rem 1.25rem 1.25rem; font-size:.88rem; color:var(--text-light); line-height:1.65; }

/* ====== CTA ====== */
.cta-v2 {
  text-align:center; padding:3rem 2rem; background:var(--primary);
  color:white; margin:2rem 0;
}
.cta-v2 h2 { font-size:1.8rem; font-weight:700; margin-bottom:.5rem; }
.cta-v2 p { font-size:1.05rem; opacity:.9; margin-bottom:1.5rem; }
.btn-cta-large {
  display:inline-block; padding:.8rem 2.5rem; background:var(--accent); color:white; text-decoration:none;
  border-radius:var(--radius-sm); font-weight:700; font-size:1rem; transition:background .15s;
}
.btn-cta-large:hover { background:var(--accent-dark); }

/* ====== FOOTER ====== */
.footer-v2 {
  max-width:1100px; margin:0 auto; padding:2.5rem 2rem 1.5rem;
  border-top:1px solid var(--border); color:var(--text-light); font-size:.85rem;
}
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr; gap:2rem; margin-bottom:1.5rem; }
.footer-logo { font-size:1.2rem; font-weight:700; color:var(--primary); display:block; margin-bottom:.5rem; }
.footer-brand p { line-height:1.6; max-width:320px; }
.footer-links { display:flex; flex-direction:column; gap:.35rem; }
.footer-links strong { color:var(--text); margin-bottom:.25rem; }
.footer-links a { color:var(--text-light); text-decoration:none; transition:color .15s; }
.footer-links a:hover { color:var(--primary); }
.footer-bottom { text-align:center; padding-top:1rem; border-top:1px solid var(--border-light); color:var(--text-lighter); font-size:.78rem; }

/* ====== MODAL ====== */
.modal-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:200; align-items:center; justify-content:center; }
.modal-overlay.visible { display:flex; }
.modal-box { background:white; border-radius:var(--radius); padding:2rem; width:90%; max-width:420px; position:relative; }
.modal-close { position:absolute; top:.75rem; right:.75rem; background:none; border:none; font-size:1.3rem; cursor:pointer; color:var(--text-light); }
.modal-box h3 { margin-bottom:.5rem; }
.modal-box p { font-size:.88rem; color:var(--text-light); margin-bottom:1rem; }
.btn-sm { display:inline-block; padding:.35rem .9rem; font-size:.8rem; }
.btn-outline { display:inline-block; padding:.35rem .9rem; font-size:.8rem; background:white; color:var(--text); border:1px solid var(--border); border-radius:var(--radius-sm); cursor:pointer; text-decoration:none; }

/* Cookie banner */
.cookie-banner { position:fixed; bottom:0; left:0; right:0; background:var(--text); color:white; z-index:199; padding:1rem 2rem; font-size:.82rem; }
.cookie-banner.hidden { display:none; }
.cookie-banner-content { max-width:1100px; margin:0 auto; display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; }

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
  .hero-new-grid { grid-template-columns:1fr; }
  .hero-new-text h1 { font-size:1.9rem; }
  .pasos-grid { grid-template-columns:repeat(2, 1fr); }
  .ventajas-grid-v2 { grid-template-columns:1fr; }
  .footer-grid { grid-template-columns:1fr; gap:1.5rem; }
}
@media (max-width: 600px) {
  .header-inner { padding:0 1rem; }
  .nav { display:none; }
  .hero-new { padding:2rem 1rem 3rem; }
  .hero-new-text h1 { font-size:1.55rem; }
  .pasos-grid { grid-template-columns:1fr; }
  .provincias-grid-v2 { grid-template-columns:repeat(3, 1fr); }
  .prov-link { font-size:.75rem; padding:.35rem .45rem; }
}

/* ====== BLOG ====== */
.breadcrumb-v2 { max-width:1100px; margin:1.5rem auto 0; padding:0 2rem; font-size:.82rem; color:var(--text-lighter); }
.breadcrumb-v2 a { color:var(--primary); text-decoration:none; }
.blog-page { max-width:1100px; margin:1.5rem auto 3rem; padding:0 2rem; }
.blog-page-title { font-size:2rem; font-weight:700; margin-bottom:.25rem; }
.blog-page-sub { color:var(--text-light); margin-bottom:2rem; font-size:.95rem; }

/* Filtros */
.filters-v2 { display:flex; gap:.5rem; flex-wrap:wrap; margin-bottom:2rem; }
.filters-v2 input[type="text"] {
  flex:1; min-width:200px; padding:.55rem .75rem; border:1px solid var(--border); border-radius:var(--radius-sm);
  font-family:var(--font); font-size:.88rem;
}
.filters-v2 input[type="text"]:focus { outline:none; border-color:var(--primary); }
.filter-btn {
  padding:.45rem 1rem; border:1px solid var(--border); border-radius:20px; background:var(--white);
  color:var(--text); font-family:var(--font); font-size:.8rem; font-weight:500; cursor:pointer; transition:all .15s;
}
.filter-btn:hover, .filter-btn.active { background:var(--bg-green); border-color:var(--primary); color:var(--primary); }

/* Posts grid */
.posts-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(320px, 1fr)); gap:1.5rem; }
.blog-card {
  background:var(--white); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden;
  transition:box-shadow .2s;
}
.blog-card:hover { box-shadow:var(--shadow-md); }
.blog-card-img { position:relative; height:160px; display:flex; align-items:center; justify-content:center; }
.blog-card-img img { width:100%; height:100%; object-fit:cover; }
.blog-card-cat {
  position:absolute; top:8px; left:8px; background:var(--primary); color:white; padding:.2rem .6rem;
  border-radius:4px; font-size:.7rem; font-weight:600; text-transform:uppercase; letter-spacing:.03em;
}
.blog-card-body { padding:1.25rem; }
.blog-card-body h2 { font-size:1.05rem; font-weight:700; margin-bottom:.5rem; line-height:1.35; }
.blog-card-body h2 a { color:var(--text); text-decoration:none; }
.blog-card-body h2 a:hover { color:var(--primary); }
.blog-card-meta { display:flex; gap:1rem; font-size:.78rem; color:var(--text-lighter); margin-bottom:.5rem; }
.blog-card-desc { font-size:.85rem; color:var(--text-light); line-height:1.55; margin-bottom:.75rem; }
.blog-card-link { color:var(--primary); font-weight:600; font-size:.85rem; text-decoration:none; }
.blog-card-link:hover { text-decoration:underline; }
.arrow { margin-left:.15rem; }

/* ====== POST SINGLE ====== */
.post-single { max-width:800px; margin:0 auto 3rem; padding:0 2rem; }
.post-header-v2 { margin-bottom:1.5rem; }
.post-cat-v2 {
  display:inline-block; background:var(--primary); color:white; padding:.25rem .75rem;
  border-radius:4px; font-size:.75rem; font-weight:600; text-transform:uppercase; letter-spacing:.03em; margin-bottom:.75rem;
}
.post-header-v2 h1 { font-size:2rem; font-weight:700; line-height:1.25; margin-bottom:.5rem; color:var(--text); }
.post-meta-v2 { display:flex; gap:1.5rem; font-size:.85rem; color:var(--text-lighter); }
.post-hero-img { width:100%; height:280px; object-fit:cover; border-radius:var(--radius); margin-bottom:2rem; }
.post-content { font-size:.95rem; line-height:1.75; color:var(--text); }
.post-content h2 { font-size:1.4rem; font-weight:700; margin:2rem 0 .75rem; color:var(--text); }
.post-content h3 { font-size:1.15rem; font-weight:700; margin:1.5rem 0 .5rem; }
.post-content p { margin-bottom:1rem; color:var(--text-light); }
.post-content ul, .post-content ol { margin:.5rem 0 1rem 1.5rem; color:var(--text-light); }
.post-content li { margin-bottom:.35rem; }
.post-content a { color:var(--primary); text-decoration:none; }
.post-content a:hover { text-decoration:underline; }
.post-content strong { color:var(--text); }

@media (max-width:600px) {
  .post-header-v2 h1 { font-size:1.5rem; }
  .post-hero-img { height:200px; }
}

@media (max-width:600px) {
  .posts-grid { grid-template-columns:1fr; }
  .filters-v2 { flex-direction:column; }
}
