/*
Theme Name: Penal Madrid — Kadence Child Rank & Rent
Theme URI: https://abogadopenalistamadrid.com.es/
Description: Child theme minimalista para un medio informativo de derecho penal en Madrid. Arquitectura editorial, SEO local y CRO para patrocinio exclusivo, sin presentarse como despacho de abogados.
Author: NexoPress / TrailSEO
Template: kadence
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: penal-madrid
*/

:root {
  --pm-ink: #151515;
  --pm-muted: #666760;
  --pm-paper: #f7f7f2;
  --pm-white: #ffffff;
  --pm-line: #d7d7cf;
  --pm-soft: #eeeeE7;
  --pm-accent: #17465a;
  --pm-accent-hover: #0e3343;
  --pm-max: 1240px;
  --pm-reading: 760px;
  --pm-serif: Georgia, "Times New Roman", serif;
  --pm-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

html { background: var(--pm-paper); }
body { background: var(--pm-paper); color: var(--pm-ink); font-family: var(--pm-sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
a:hover { color: var(--pm-accent); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--pm-accent); outline-offset: 3px; }

/* Kadence shell */
body.pm-home { --global-content-width: 1320px !important; --global-narrow-content-width: 820px !important; --global-content-edge-padding: 24px !important; }
body.pm-home #wrapper,
body.pm-home .site,
body.pm-home .site-main,
body.pm-home .content-area,
body.pm-home #primary,
body.pm-home .content-container.site-container { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; box-shadow: none !important; }
body.pm-home .content-container.site-container { display: block !important; }
body.pm-home .entry-content-wrap { padding: 0 !important; }

/* Header: compact, neutral and editorial */
.site-header { background: var(--pm-paper) !important; border-bottom: 1px solid var(--pm-ink); }
.site-header .site-header-row-layout-contained { max-width: 1320px !important; padding-left: 28px !important; padding-right: 28px !important; }
.site-header .site-main-header-inner-wrap { min-height: 78px; }
.site-header .site-branding { gap: 12px; }
.site-header .site-branding img,
.site-header .custom-logo { max-height: 48px !important; width: auto !important; object-fit: contain; }
.site-header .site-title,
.site-header .site-title a { font-size: 14px !important; line-height: 1.05 !important; font-weight: 800 !important; letter-spacing: -.025em !important; text-transform: uppercase; font-family: var(--pm-sans) !important; }
.site-header .site-description { display: none !important; }
.site-header .main-navigation a { font-size: 11px !important; font-weight: 700 !important; letter-spacing: .10em !important; text-transform: uppercase; }
.site-header .main-navigation .menu-item > a { padding-left: 10px !important; padding-right: 10px !important; }

.site-footer { background: var(--pm-paper) !important; border-top: 1px solid var(--pm-ink); }
.site-footer .site-footer-row-layout-contained { max-width: 1320px !important; padding-left: 28px !important; padding-right: 28px !important; }

/* Home */
.pm-home-main { background: var(--pm-paper); padding-bottom: 72px; }
.pm-shell { width: calc(100% - 56px); max-width: var(--pm-max); margin: 0 auto; }
.pm-eyebrow { margin: 0; font-size: 10px; line-height: 1.3; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; color: var(--pm-muted); }
.pm-rule { border: 0; border-top: 1px solid var(--pm-line); margin: 0; }

.pm-hero { padding: 54px 0 44px; border-bottom: 1px solid var(--pm-ink); }
.pm-hero__meta { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.pm-hero__meta time { font-size: 10px; color: var(--pm-muted); letter-spacing: .08em; }
.pm-hero h1 { margin: 0; max-width: 1050px; font-family: var(--pm-sans); font-weight: 900; text-transform: uppercase; font-size: clamp(52px, 6.4vw, 94px); line-height: .92; letter-spacing: -.065em; text-wrap: balance; }
.pm-hero__bottom { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr); gap: 72px; align-items: end; margin-top: 30px; }
.pm-hero__lead { max-width: 720px; margin: 0; font-family: var(--pm-serif); font-size: clamp(23px, 2.15vw, 31px); line-height: 1.19; letter-spacing: -.025em; }
.pm-hero__disclosure { max-width: 430px; margin: 0; color: var(--pm-muted); font-size: 12px; line-height: 1.55; justify-self: end; }

/* Search intent shortcuts */
.pm-intents { padding: 28px 0 34px; border-bottom: 1px solid var(--pm-line); }
.pm-intents__head { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 17px; }
.pm-intents__head p:last-child { margin: 0; color: var(--pm-muted); font-size: 12px; }
.pm-intent-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--pm-ink); border-left: 1px solid var(--pm-line); }
.pm-intent { min-height: 145px; padding: 18px 18px 20px; border-right: 1px solid var(--pm-line); border-bottom: 1px solid var(--pm-line); display: flex; flex-direction: column; text-decoration: none; transition: background .18s ease, color .18s ease; }
.pm-intent:hover { background: var(--pm-ink); color: var(--pm-white); }
.pm-intent__num { font-size: 9px; letter-spacing: .12em; color: var(--pm-muted); }
.pm-intent:hover .pm-intent__num { color: #bcbcb6; }
.pm-intent strong { margin-top: 28px; font-family: var(--pm-serif); font-size: 23px; font-weight: 400; line-height: 1.04; }
.pm-intent span:last-child { margin-top: auto; padding-top: 18px; font-size: 11px; }

/* Sponsor / rent conversion */
.pm-sponsor { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 34px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--pm-ink); }
.pm-sponsor__label { font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--pm-muted); }
.pm-sponsor__copy strong { display: block; margin-bottom: 5px; font-family: var(--pm-serif); font-size: 24px; font-weight: 400; line-height: 1.08; }
.pm-sponsor__copy p { margin: 0; max-width: 620px; color: var(--pm-muted); font-size: 12px; line-height: 1.5; }
.pm-sponsor__actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pm-btn { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 10px 16px; border: 1px solid var(--pm-ink); background: transparent; color: var(--pm-ink); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.pm-btn:hover { background: var(--pm-ink); color: var(--pm-white); }
.pm-btn--primary { border-color: var(--pm-accent); background: var(--pm-accent); color: var(--pm-white); }
.pm-btn--primary:hover { background: var(--pm-accent-hover); border-color: var(--pm-accent-hover); }

/* Editorial lead */
.pm-featured { padding: 42px 0 48px; border-bottom: 1px solid var(--pm-line); }
.pm-featured__label { margin-bottom: 17px; }
.pm-featured__grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .72fr); gap: 52px; }
.pm-featured__lead { padding-right: 22px; }
.pm-featured__side { border-left: 1px solid var(--pm-line); padding-left: 30px; display: grid; gap: 24px; align-content: start; }
.pm-card { min-width: 0; }
.pm-card__cat { font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--pm-muted); }
.pm-card h2, .pm-card h3 { margin: 7px 0 11px; font-family: var(--pm-serif); font-weight: 400; letter-spacing: -.035em; line-height: 1.01; }
.pm-card h2 a, .pm-card h3 a { color: inherit; text-decoration: none; }
.pm-card h2 a:hover, .pm-card h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.pm-card--lead h2 { font-size: clamp(44px, 5.1vw, 72px); max-width: 850px; }
.pm-card--lead .pm-card__excerpt { max-width: 710px; font-size: 15px; }
.pm-card--side { padding-bottom: 24px; border-bottom: 1px solid var(--pm-line); }
.pm-card--side:last-child { padding-bottom: 0; border-bottom: 0; }
.pm-card--side h3 { font-size: clamp(26px, 2.5vw, 35px); }
.pm-card__excerpt { margin: 0 0 12px; color: #4f504b; font-size: 13px; line-height: 1.55; }
.pm-card__date { font-size: 9px; color: var(--pm-muted); letter-spacing: .06em; }

/* Guides */
.pm-guides { padding: 45px 0 50px; border-bottom: 1px solid var(--pm-line); }
.pm-section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .55fr); gap: 54px; align-items: end; margin-bottom: 24px; }
.pm-section-head h2 { margin: 6px 0 0; font-family: var(--pm-serif); font-weight: 400; font-size: clamp(38px, 4vw, 58px); line-height: .98; letter-spacing: -.04em; }
.pm-section-head > p { margin: 0; max-width: 430px; justify-self: end; color: var(--pm-muted); font-size: 13px; line-height: 1.55; }
.pm-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--pm-ink); border-left: 1px solid var(--pm-line); }
.pm-guide { min-height: 190px; padding: 21px 22px; border-right: 1px solid var(--pm-line); border-bottom: 1px solid var(--pm-line); display: flex; flex-direction: column; }
.pm-guide__number { color: var(--pm-muted); font-size: 9px; letter-spacing: .12em; }
.pm-guide h3 { margin: 22px 0 10px; font-family: var(--pm-serif); font-size: 28px; font-weight: 400; line-height: 1.03; letter-spacing: -.03em; }
.pm-guide p { margin: 0 0 18px; max-width: 34ch; color: var(--pm-muted); font-size: 12px; line-height: 1.48; }
.pm-guide a { margin-top: auto; align-self: flex-start; font-size: 11px; text-decoration: none; border-bottom: 1px solid transparent; }
.pm-guide a:hover { border-color: currentColor; }

/* Local Madrid / entity relevance without pretending to be a local business */
.pm-local { display: grid; grid-template-columns: .72fr 1.28fr; gap: 68px; padding: 42px 0 46px; border-bottom: 1px solid var(--pm-line); }
.pm-local h2 { margin: 6px 0 0; font-family: var(--pm-serif); font-size: clamp(38px, 4vw, 57px); font-weight: 400; line-height: 1; letter-spacing: -.04em; }
.pm-local__body { columns: 2; column-gap: 42px; color: #494a45; font-family: var(--pm-serif); font-size: 16px; line-height: 1.68; }
.pm-local__body p { margin-top: 0; }
.pm-local__body a { font-family: var(--pm-sans); font-size: 11px; font-weight: 700; letter-spacing: .03em; }

/* Latest */
.pm-latest { padding: 44px 0 16px; }
.pm-latest__head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 23px; }
.pm-latest__head h2 { margin: 6px 0 0; font-family: var(--pm-serif); font-size: clamp(37px, 3.8vw, 54px); font-weight: 400; letter-spacing: -.04em; }
.pm-latest__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--pm-ink); border-left: 1px solid var(--pm-line); }
.pm-card--feed { padding: 22px 22px 25px; border-right: 1px solid var(--pm-line); border-bottom: 1px solid var(--pm-line); }
.pm-card--feed h3 { font-size: 29px; }
.pm-all { font-size: 11px; font-weight: 700; text-decoration: none; border-bottom: 1px solid currentColor; }

.pm-editorial { display: grid; grid-template-columns: 200px minmax(0, 760px); gap: 36px; padding: 28px 0 0; color: var(--pm-muted); }
.pm-editorial strong { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--pm-ink); }
.pm-editorial p { margin: 0; font-size: 11px; line-height: 1.55; }

/* Interior pages and articles */
.single-post .content-container.site-container,
.page:not(.home) .content-container.site-container,
.archive .content-container.site-container { max-width: 1180px !important; }
.single-post .entry-content-wrap,
.page:not(.home) .entry-content-wrap { box-shadow: none !important; background: transparent !important; }
.single-post .entry-title,
.page:not(.home) .entry-title { font-family: var(--pm-serif) !important; font-weight: 400 !important; font-size: clamp(42px, 5vw, 70px) !important; line-height: 1 !important; letter-spacing: -.045em !important; }
.single-post .entry-content { max-width: var(--pm-reading); font-family: var(--pm-serif); font-size: 19px; line-height: 1.75; }
.single-post .entry-content h2,
.single-post .entry-content h3 { margin-top: 1.7em; font-family: var(--pm-serif); font-weight: 400; line-height: 1.08; }
.single-post .entry-content a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.archive .loop-entry { border-bottom: 1px solid var(--pm-line); box-shadow: none !important; background: transparent !important; }

/* Mobile sticky sponsor CTA. Only printed when sponsor is configured. */
.pm-mobile-cta { display: none; }

@media (max-width: 1050px) {
  .pm-shell { width: calc(100% - 44px); }
  .pm-hero__bottom { gap: 44px; }
  .pm-intent-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pm-featured__grid { gap: 36px; }
  .pm-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pm-local { gap: 45px; }
}

@media (max-width: 780px) {
  .site-header .site-header-row-layout-contained,
  .site-footer .site-footer-row-layout-contained { padding-left: 18px !important; padding-right: 18px !important; }
  .site-header .site-main-header-inner-wrap { min-height: 66px; }
  .site-header .site-branding img,
  .site-header .custom-logo { max-height: 40px !important; }
  .pm-shell { width: calc(100% - 32px); }
  .pm-hero { padding: 36px 0 30px; }
  .pm-hero__bottom { grid-template-columns: 1fr; gap: 18px; }
  .pm-hero__disclosure { justify-self: start; }
  .pm-intents__head { display: block; }
  .pm-intents__head p:last-child { margin-top: 7px; }
  .pm-intent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pm-sponsor { grid-template-columns: 1fr; gap: 11px; }
  .pm-sponsor__actions { justify-content: flex-start; }
  .pm-featured__grid { grid-template-columns: 1fr; gap: 29px; }
  .pm-featured__lead { padding-right: 0; }
  .pm-featured__side { border-left: 0; border-top: 1px solid var(--pm-line); padding-left: 0; padding-top: 24px; grid-template-columns: 1fr 1fr; }
  .pm-section-head { grid-template-columns: 1fr; gap: 12px; }
  .pm-section-head > p { justify-self: start; }
  .pm-guide-grid, .pm-latest__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pm-local { grid-template-columns: 1fr; gap: 22px; }
  .pm-local__body { columns: 1; }
  .pm-editorial { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 560px) {
  .pm-home-main { padding-bottom: 88px; }
  .pm-shell { width: calc(100% - 26px); }
  .pm-hero__meta time { display: none; }
  .pm-hero h1 { font-size: clamp(44px, 14vw, 62px); line-height: .88; }
  .pm-hero__lead { font-size: 22px; }
  .pm-intent-grid { grid-template-columns: 1fr; }
  .pm-intent { min-height: 112px; }
  .pm-intent strong { margin-top: 16px; }
  .pm-featured__side { grid-template-columns: 1fr; }
  .pm-card--side + .pm-card--side { padding-top: 22px; }
  .pm-guide-grid, .pm-latest__grid { grid-template-columns: 1fr; }
  .pm-guide, .pm-card--feed { border-right: 0; }
  .pm-card--lead h2 { font-size: 40px; }
  .pm-section-head h2, .pm-local h2, .pm-latest__head h2 { font-size: 39px; }
  .pm-mobile-cta { position: fixed; z-index: 9999; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; padding: 8px; background: rgba(247,247,242,.97); border-top: 1px solid var(--pm-ink); backdrop-filter: blur(10px); }
  .pm-mobile-cta a { min-height: 46px; display: flex; align-items: center; justify-content: center; text-align: center; background: var(--pm-ink); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
  .pm-mobile-cta a:first-child { background: var(--pm-accent); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
