/*
Theme Name: Penal Editorial — Kadence Child
Theme URI: https://abogadopenalistamadrid.com.es/
Description: Child theme editorial minimalista, tipográfico y ancho para un medio informativo de derecho penal. Requiere Kadence.
Author: Editorial
Template: kadence
Version: 1.2.0
Requires PHP: 7.4
Text Domain: penal-editorial
*/

:root{
  --pe-ink:#11110f;
  --pe-muted:#686860;
  --pe-paper:#fbfbf8;
  --pe-white:#fff;
  --pe-line:#d8d8d0;
  --pe-soft:#f1f1eb;
  --pe-max:1360px;
  --pe-serif:Georgia,"Times New Roman",serif;
  --pe-sans:Arial,Helvetica,sans-serif;
}

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

/* ----- Kadence shell --------------------------------------------------- */
body.pe-editorial-home{--global-content-width:1440px!important;--global-narrow-content-width:900px!important;--global-content-edge-padding:28px!important;background:var(--pe-paper)!important}
body.pe-editorial-home.site-layout-boxed,
body.pe-editorial-home.content-style-boxed{background:var(--pe-paper)!important}
body.pe-editorial-home #wrapper,
body.pe-editorial-home .site{max-width:none!important;width:100%!important;background:var(--pe-paper)!important;box-shadow:none!important}
body.pe-editorial-home .content-container.site-container{max-width:none!important;width:100%!important;padding:0!important;display:block!important}
body.pe-editorial-home .content-area,
body.pe-editorial-home #primary{max-width:none!important;width:100%!important;margin:0!important;padding:0!important}
body.pe-editorial-home .entry-content-wrap{padding:0!important}

.site-header{background:var(--pe-paper);border-bottom:1px solid var(--pe-ink)}
.site-header .site-header-row-layout-contained{max-width:1440px!important;padding-left:40px!important;padding-right:40px!important}
.site-header .site-branding .site-title,
.site-header .site-branding .site-title a{font-family:var(--pe-sans);font-weight:800;letter-spacing:-.045em;text-transform:uppercase}
.site-header .main-navigation a{font-family:var(--pe-sans);font-size:11px;letter-spacing:.12em;text-transform:uppercase;font-weight:700}
.site-footer{background:var(--pe-paper);border-top:1px solid var(--pe-ink)}
.site-footer .site-footer-row-layout-contained{max-width:1440px!important;padding-left:40px!important;padding-right:40px!important}

/* ----- Typography ----------------------------------------------------- */
h1,h2,h3,h4,.entry-title,.entry-title a{color:var(--pe-ink);font-family:var(--pe-serif);font-weight:400;letter-spacing:-.035em;line-height:1.05}
.entry-title a{text-decoration:none}
.entry-title a:hover{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
.entry-content p{line-height:1.75}
.entry-meta,.entry-meta a{color:var(--pe-muted);font-size:12px}
.wp-block-button__link,.button,button,input[type=submit]{border-radius:0!important}
.wp-block-quote{border-left:2px solid var(--pe-ink)}

/* ----- Editorial home ------------------------------------------------- */
.pe-home{background:var(--pe-paper);padding:0 0 72px}
.pe-shell{width:calc(100% - 80px);max-width:var(--pe-max);margin:0 auto;box-sizing:border-box}
.pe-kicker,.pe-section-label{font-size:10px;line-height:1.2;letter-spacing:.16em;font-weight:800;text-transform:uppercase;color:var(--pe-muted)}

.pe-masthead{padding:58px 0 34px;border-bottom:2px solid var(--pe-ink)}
.pe-masthead-top{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:28px}
.pe-date{font-size:10px;letter-spacing:.12em;color:var(--pe-muted)}
.pe-masthead h1{font-family:var(--pe-sans);font-size:clamp(62px,7.2vw,124px);font-weight:900;line-height:.82;letter-spacing:-.092em;text-transform:uppercase;margin:0;max-width:1320px;overflow-wrap:normal;word-break:normal;hyphens:none}
.pe-masthead-bottom{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr);gap:64px;align-items:end;margin-top:28px}
.pe-intro{font-family:var(--pe-serif);font-size:clamp(22px,2.1vw,32px);line-height:1.22;letter-spacing:-.025em;margin:0;max-width:760px}
.pe-disclosure{font-size:12px;line-height:1.55;color:var(--pe-muted);margin:0;max-width:470px;justify-self:end}

.pe-opening{padding:34px 0 44px;border-bottom:1px solid var(--pe-line)}
.pe-opening>.pe-section-label{margin-bottom:18px}
.pe-opening-grid{display:grid;grid-template-columns:minmax(0,1.72fr) minmax(330px,.78fr);gap:64px}
.pe-opening-main{padding-right:10px}
.pe-opening-side{border-left:1px solid var(--pe-line);padding-left:34px;display:grid;align-content:start;gap:26px}
.pe-story{min-width:0}
.pe-story h3{margin:8px 0 12px}
.pe-story h3 a{text-decoration:none}
.pe-story h3 a:hover{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:5px}
.pe-story p{font-family:var(--pe-sans);font-size:14px;line-height:1.58;color:#484843;margin:0 0 14px;max-width:66ch}
.pe-meta{font-size:10px;letter-spacing:.06em;color:var(--pe-muted)}
.pe-story--lead h3{font-size:clamp(46px,5.1vw,78px);line-height:.98;max-width:960px}
.pe-story--lead p{font-size:16px;max-width:760px}
.pe-story--side{padding-bottom:25px;border-bottom:1px solid var(--pe-line)}
.pe-story--side:last-child{padding-bottom:0;border-bottom:0}
.pe-story--side h3{font-size:clamp(26px,2.25vw,36px);line-height:1.02}

.pe-ad{padding:28px 0 30px;border-bottom:1px solid var(--pe-line);text-align:center}
.pe-ad-label{display:block;font-size:9px;letter-spacing:.16em;text-transform:uppercase;color:#85857e;margin-bottom:12px}
.pe-ad-unit>*{margin-left:auto!important;margin-right:auto!important}
.pe-ad img{display:block;max-width:100%;height:auto;margin:auto}

.pe-understand,.pe-latest{padding:44px 0 50px;border-bottom:1px solid var(--pe-line)}
.pe-section-header{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,.65fr);gap:64px;align-items:end;margin-bottom:28px}
.pe-section-header h2{font-size:clamp(40px,4.2vw,66px);margin:7px 0 0;line-height:.98}
.pe-section-header>p{font-size:14px;line-height:1.58;color:var(--pe-muted);margin:0;max-width:500px;justify-self:end}
.pe-section-header--compact{grid-template-columns:1fr auto;align-items:end}
.pe-all-link{font-size:11px;text-decoration:none;border-bottom:1px solid currentColor;padding-bottom:2px;margin-bottom:5px}

.pe-topic-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid var(--pe-ink);border-left:1px solid var(--pe-line)}
.pe-topic{position:relative;min-height:210px;padding:22px 24px 24px;border-right:1px solid var(--pe-line);border-bottom:1px solid var(--pe-line);display:flex;flex-direction:column}
.pe-topic:nth-last-child(-n+3){border-bottom:0}
.pe-topic-number{font-size:10px;letter-spacing:.12em;color:var(--pe-muted)}
.pe-topic h3{font-size:31px;line-height:1.02;margin:20px 0 12px}
.pe-topic h3 a{text-decoration:none}
.pe-topic p{font-size:13px;line-height:1.48;color:var(--pe-muted);margin:0 0 18px;max-width:34ch}
.pe-arrow{font-size:11px;text-decoration:none;margin-top:auto;align-self:flex-start;border-bottom:1px solid transparent}
.pe-arrow:hover{border-color:currentColor}

.pe-feed{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;border-top:1px solid var(--pe-ink);border-left:1px solid var(--pe-line)}
.pe-story--feed{padding:24px 26px 28px;border-right:1px solid var(--pe-line);border-bottom:1px solid var(--pe-line)}
.pe-story--feed h3{font-size:clamp(27px,2.3vw,37px);line-height:1.01}
.pe-story--feed p{font-size:13px}

.pe-editorial-note{display:grid;grid-template-columns:220px minmax(0,1fr);gap:50px;padding:26px 0 0;color:var(--pe-muted)}
.pe-editorial-note strong{font-size:10px;letter-spacing:.16em;text-transform:uppercase;color:var(--pe-ink)}
.pe-editorial-note p{font-size:11px;line-height:1.55;margin:0;max-width:760px}

/* Manual home is disabled by default. When deliberately enabled it remains wide. */
.pe-manual-home{padding:36px 0;border-bottom:1px solid var(--pe-line)}
.pe-manual-home>.alignwide,.pe-manual-home>.alignfull,.pe-manual-home>.wp-block-group,.pe-manual-home>.wp-block-columns{max-width:none!important;width:100%!important}

/* ----- Interior reading ---------------------------------------------- */
.single-post .entry-title,.page:not(.home) .entry-title{font-size:clamp(42px,5vw,74px)}
.single-post .entry-content{font-family:var(--pe-serif);font-size:19px;line-height:1.75;max-width:800px}
.single-post .entry-content h2,.single-post .entry-content h3{margin-top:1.6em}
.archive .loop-entry{border-bottom:1px solid var(--pe-line);padding-bottom:30px}
.archive .post-thumbnail,.single-post .post-thumbnail{border-radius:0}

@media (max-width:1100px){
  .pe-shell{width:calc(100% - 56px)}
  .pe-masthead h1{font-size:clamp(58px,8.6vw,96px)}
  .pe-masthead-bottom,.pe-section-header{gap:38px}
  .pe-opening-grid{grid-template-columns:minmax(0,1.45fr) minmax(300px,.8fr);gap:38px}
  .pe-opening-side{padding-left:26px}
  .pe-topic h3{font-size:28px}
}

@media (max-width:820px){
  .site-header .site-header-row-layout-contained,.site-footer .site-footer-row-layout-contained{padding-left:22px!important;padding-right:22px!important}
  .pe-shell{width:calc(100% - 36px)}
  .pe-masthead{padding-top:42px}
  .pe-masthead-top{margin-bottom:22px}
  .pe-masthead-bottom{grid-template-columns:1fr;gap:18px}
  .pe-disclosure{justify-self:start}
  .pe-opening-grid{grid-template-columns:1fr;gap:28px}
  .pe-opening-side{border-left:0;border-top:1px solid var(--pe-line);padding:26px 0 0;grid-template-columns:1fr 1fr;gap:26px}
  .pe-story--side{border-bottom:0;padding:0}
  .pe-story--side+ .pe-story--side{border-left:1px solid var(--pe-line);padding-left:26px}
  .pe-section-header{grid-template-columns:1fr;gap:14px}
  .pe-section-header>p{justify-self:start}
  .pe-topic-grid,.pe-feed{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pe-topic:nth-last-child(-n+3){border-bottom:1px solid var(--pe-line)}
  .pe-topic:nth-last-child(-n+2){border-bottom:0}
  .pe-editorial-note{grid-template-columns:1fr;gap:10px}
}

@media (max-width:560px){
  .pe-shell{width:calc(100% - 28px)}
  .pe-masthead{padding:30px 0 25px}
  .pe-date{display:none}
  .pe-masthead h1{font-size:clamp(43px,13.3vw,66px);line-height:.86;letter-spacing:-.075em}
  .pe-intro{font-size:22px}
  .pe-opening{padding:26px 0 32px}
  .pe-story--lead h3{font-size:39px}
  .pe-opening-side{grid-template-columns:1fr}
  .pe-story--side+ .pe-story--side{border-left:0;border-top:1px solid var(--pe-line);padding:22px 0 0}
  .pe-understand,.pe-latest{padding:32px 0 36px}
  .pe-section-header h2{font-size:41px}
  .pe-topic-grid,.pe-feed{grid-template-columns:1fr}
  .pe-topic,.pe-story--feed{border-right:0}
  .pe-topic:nth-last-child(-n+2){border-bottom:1px solid var(--pe-line)}
  .pe-topic:last-child{border-bottom:0}
  .pe-story--feed:last-child{border-bottom:0}
  .single-post .entry-content{font-size:18px}
}

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