/* =========================================================
   PROLYCO · Piezas propias de WordPress
   (blog, entradas, páginas de texto, formulario, accesibilidad)
   ========================================================= */

/* ---------- Accesibilidad ---------- */
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 300;
  background: var(--orange); color: #fff; padding: 12px 18px; text-decoration: none; font-weight: 500;
}
.skip-link:focus { top: 16px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* ---------- Pie ---------- */
.site-footer .footer-title { font-family: var(--font-body); font-size: .74rem; font-weight: 400; letter-spacing: .16em; text-transform: uppercase; color: #7E8080; margin-bottom: 18px; }
.eyebrow a { color: var(--orange); text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

/* ---------- Formulario ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-notice { margin: 0 0 4px; padding: 14px 18px; font-size: .95rem; border-left: 3px solid; }
.form-notice.is-ok { background: #EAF5EC; border-color: #2E7D46; color: #1E5631; }
.form-notice.is-error { background: var(--orange-100); border-color: var(--orange-700); color: #7A2E14; }
.check span { line-height: 1.5; }

/* ---------- Ficha de proyecto: nº de columnas según los campos rellenos ---------- */
.project-facts { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }

/* ---------- Bloques de texto (páginas, entradas, especialidades) ---------- */
.section-tight { padding-block: clamp(48px, 6vw, 88px); }
.prose-wrap { max-width: calc(760px + var(--gutter) * 2); }
.prose { font-size: 1.06rem; line-height: 1.75; color: #3A3B3B; }
.prose > * + * { margin-top: 1.1em; }
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { font-family: var(--font-display); color: var(--text); line-height: 1.15; margin-top: 2em; margin-bottom: .2em; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.prose h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
.prose h4 { font-size: 1.15rem; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose a { color: var(--orange-700); text-underline-offset: 3px; }
.prose a:hover { color: var(--orange); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose ul li::marker { color: var(--orange); }
.prose img { height: auto; }
.prose figure, .prose .wp-caption { margin: 2em 0; max-width: 100%; }
.prose figcaption, .prose .wp-caption-text { font-size: .85rem; color: var(--text-soft); margin-top: 8px; }
.prose blockquote { margin: 2em 0; padding-left: 24px; border-left: 2px solid var(--orange); font-family: var(--font-display); font-size: 1.3rem; line-height: 1.35; color: var(--text); }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }
.prose .alignleft { float: left; margin: .3em 1.6em 1em 0; max-width: 50%; }
.prose .alignright { float: right; margin: .3em 0 1em 1.6em; max-width: 50%; }
.prose .aligncenter { margin-inline: auto; display: block; }
.prose::after { content: ""; display: table; clear: both; }

/* ---------- Páginas sencillas (legales) ---------- */
.page-hero-simple { padding-bottom: 0; }
.page-hero-simple .page-title { font-size: clamp(2.2rem, 5vw, 4.4rem); max-width: 18ch; }
.page-body { padding-top: clamp(32px, 4vw, 56px); padding-bottom: var(--section); }

/* ---------- Especialidad ---------- */
.service-hero { padding-bottom: 0; }
.service-hero .lead { max-width: 640px; color: var(--text-soft); }
.service-cover { margin-top: clamp(32px, 4vw, 56px); }
.service-cover img { width: 100%; height: clamp(300px, 46vw, 620px); object-fit: cover; }

/* ---------- Blog ---------- */
.blog-archive { background: var(--bg-alt); padding-bottom: var(--section); }
.filter-link {
  display: inline-block; font: 500 .86rem var(--font-body); color: var(--text-soft); text-decoration: none;
  border: 1px solid var(--rule); border-radius: 100px; padding: 10px 18px; transition: all .3s var(--ease);
}
.filter-link:hover { color: var(--text); border-color: var(--text); }
.filter-link[aria-current="page"] { background: var(--text); color: var(--bg-alt); border-color: var(--text); }
.post-grid-archive { row-gap: clamp(40px, 5vw, 64px); }
.post-grid-archive .post-type { min-height: 340px; }

.pagination { margin-top: clamp(48px, 6vw, 80px); }
.pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 0; margin: 0; }
.pagination a, .pagination span {
  display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 14px;
  border: 1px solid var(--rule); text-decoration: none; font-weight: 500; font-size: .9rem;
}
.pagination a:hover { border-color: var(--text); }
.pagination .current { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ---------- Entrada ---------- */
.post-head { padding-top: clamp(140px, 16vw, 190px); max-width: calc(980px + var(--gutter) * 2); }
.post-title { font-family: var(--font-display); font-size: clamp(2rem, 4.6vw, 4rem); line-height: 1.05; letter-spacing: -.01em; margin: 0 0 20px; text-wrap: balance; }
.post-meta { color: var(--text-soft); font-size: .9rem; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.post-cover { max-width: calc(1100px + var(--gutter) * 2); margin: clamp(32px, 4vw, 56px) auto 0; padding-inline: var(--gutter); }
.post-cover img { width: 100%; height: auto; max-height: 640px; object-fit: cover; }
.post-single .blog { background: var(--bg-alt); }

/* ---------- 404 ---------- */
.not-found { padding-bottom: var(--section); }
.not-found .page-title { font-size: clamp(2.4rem, min(5vw, 10vh), 5rem); }
.not-found .hero-actions { margin-top: 32px; }

@media (max-width: 640px) {
  .project-facts { grid-template-columns: 1fr; }
  .prose .alignleft, .prose .alignright { float: none; max-width: 100%; margin: 1.5em 0; }
}

/* ---------- Mapa que se carga al pulsar ---------- */
.map-load {
  position: absolute; inset: 0; width: 100%; display: grid; place-content: center; justify-items: center; gap: 6px;
  border: 0; cursor: pointer; color: var(--text); font-family: var(--font-body);
  background:
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(34,35,35,.07) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(34,35,35,.07) 39px 40px),
    #ECEAE6;
  transition: background-color .3s;
}
.map-load svg { width: 40px; height: 40px; fill: var(--orange); margin-bottom: 6px; transition: transform .4s var(--ease); }
.map-load:hover svg { transform: translateY(-4px); }
.map-load-title { font-family: var(--font-display); font-size: 1.4rem; }
.map-load-note { font-size: .8rem; color: var(--text-soft); }
.map-load:focus-visible { outline: 2px solid var(--orange); outline-offset: -4px; }
