/*
Theme Name: Diario Torredonjimeno Editorial
Author: Diario Torredonjimeno
Description: Portada editorial, noticias y archivo con el diseño aprobado del diario.
Version: 1.0.4
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: diario-editorial
License: GPL-2.0-or-later
*/

    :root {
      --paper: #eeece5;
      --ink: #24251f;
      --muted: #585a50;
      --rule: #c9c9bc;
      --rust: #943820;
      --display: 'Barlow Condensed', Impact, 'Arial Narrow', sans-serif;
      --serif: 'Source Serif 4', Georgia, serif;
      --sans: 'Source Sans 3', Arial, sans-serif;
    }
    * { box-sizing: border-box; }
    body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); }
    .sheet { max-width: 1440px; margin: auto; padding: 0 clamp(18px,4.5vw,72px); }
    a { color: inherit; text-decoration: none; }
    a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .14em; }
    :focus-visible { outline: 2px solid var(--rust); outline-offset: 4px; }
    h1,h2,h3,p,figure { margin: 0; }
    h1,h2,h3 { font-family: var(--serif); }
    .skip { position: absolute; top: -90px; padding: 12px; background: white; z-index: 2; }
    .skip:focus { top: 4px; }
    .folio, footer { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; font-size: 13px; }
    .folio { padding: 14px 0 10px; border-bottom: 1px solid var(--rule); }
    .folio time { color: var(--muted); }
    .nameplate { display: flex; align-items: baseline; gap: .8vw; width: fit-content; margin: 18px auto 22px; line-height: 1; }
    .nameplate:hover { text-decoration: none; }
    .diario { font: italic clamp(17px,2.8vw,43px)/1 var(--serif); color: var(--rust); letter-spacing: -.07em; }
    .town { font: 700 clamp(32px,7.8vw,113px)/.95 var(--display); letter-spacing: -.012em; font-synthesis: none; text-transform: uppercase; }
    nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
    .sections { display: flex; gap: clamp(14px,2.4vw,38px); white-space: nowrap; overflow: auto; scrollbar-width: thin; }
    .sections a { display: block; padding: 12px 1px; font-size: 15px; }
    .current { color: var(--rust); font-weight: 600; }
    details { position: relative; flex: none; }
    summary { cursor: pointer; font-size: 14px; padding: 12px 4px; }
    form { display: flex; gap: 6px; position: absolute; right: 0; top: 100%; width: min(320px,86vw); background: var(--paper); border: 1px solid var(--ink); padding: 12px; z-index: 3; }
    input,button { font: inherit; padding: 8px; border: 1px solid var(--rule); }
    input { min-width: 0; flex: 1; }
    button { color: white; background: var(--ink); cursor: pointer; }
    main { padding-top: clamp(26px,3.5vw,52px); }
    .front { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(215px, .85fr); gap: clamp(23px,3vw,48px); align-items: start; }
    .lead { display: grid; grid-template-columns: minmax(0,1.12fr) minmax(0,.88fr); gap: clamp(18px,2vw,32px); align-items: center; }
    .section-name { display: block; color: var(--rust); font-size: 14px; font-weight: 600; }
    h1 { margin: 15px 0; font-size: clamp(37px,4.05vw,62px); line-height: 1.025; letter-spacing: -.049em; font-weight: 600; text-wrap: pretty; }
    .standfirst { margin-top: 20px; font: 18px/1.48 var(--serif); }
    .credit { margin-top: 21px; font-size: 13px; color: var(--muted); }
    .literary-plate { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: clamp(340px,32vw,470px); padding: clamp(18px,2vw,32px); background: #903e2c; color: #fff1d6; overflow: hidden; isolation: isolate; }
    .literary-plate::before { content: ''; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(93deg, transparent 0 3px, #2c18060d 4px 5px),linear-gradient(90deg, #3b231c60 0,transparent 3%,#fff1d62a 4%,transparent 5%); }
    .literary-plate small { font: 15px/1.2 var(--sans); padding-bottom: 10px; border-bottom: 1px solid #f1ceab88; }
    .work-title { padding: 26px 0; font: italic clamp(38px,3.95vw,62px)/.99 var(--serif); letter-spacing: -.06em; }
    .literary-plate .genre { align-self: flex-end; font: italic 14px var(--serif); }
    .caption { font-size: 11px; margin-top: 6px; color: var(--muted); }
    .rail { border-left: 1px solid var(--rule); padding-left: clamp(18px,2vw,30px); }
    .rail h2 { font: 600 23px/1.1 var(--serif); border-bottom: 1px solid var(--ink); padding-bottom: 11px; }
    .rail article { padding: 16px 0; border-bottom: 1px solid var(--rule); }
    .rail article:last-child { padding-bottom: 0; border: 0; }
    time { font-variant-numeric: tabular-nums; }
    .rail time { color: var(--muted); font-size: 12px; }
    .rail h3 { font-size: clamp(20px,1.65vw,25px); font-weight: 600; line-height: 1.13; letter-spacing: -.028em; margin-top: 5px; }
    .archive { margin-top: 42px; border-top: 2px solid var(--ink); }
    .archive-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 15px 0 22px; }
    .archive-head h2 { font: 600 clamp(27px,2.65vw,40px)/1.1 var(--serif); letter-spacing: -.04em; }
    .archive-head a { font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
    .archive-grid { display: grid; grid-template-columns: 1.45fr 1fr 1fr; gap: clamp(20px,3vw,45px); }
    .archive-grid article { border-top: 1px solid var(--rule); padding-top: 12px; }
    .archive-grid h3 { font-size: clamp(23px,2.05vw,32px); font-weight: 600; line-height: 1.12; letter-spacing: -.035em; margin: 8px 0; }
    .archive-grid time { font-size: 12px; color: var(--muted); }
    .archive-grid p { font: 16px/1.5 var(--serif); margin-top: 10px; }
    footer { margin-top: 40px; border-top: 1px solid var(--ink); padding: 18px 0 25px; color: var(--muted); }
    .footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
    @media(max-width: 980px) {
      .front { grid-template-columns: 1fr; }
      .rail { border-left: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 22px; }
      .rail h2 { grid-column: 1/-1; }
      .rail article { border: 0; }
      .lead { grid-template-columns: 1.2fr 1fr; }
      .literary-plate { min-height: 320px; }
      .archive { margin-top: 20px; }
    }
    @media(max-width: 640px) {
      .folio { font-size: 11px; }
      .nameplate { gap: 6px; margin-block: 22px 17px; }
      .diario { font-size: clamp(17px,4vw,25px); }
      .town { font-size: clamp(25px,7.65vw,47px); }
      nav { gap: 7px; }
      .sections { gap: 14px; }
      .sections a,summary { font-size: 13px; }
      .lead { grid-template-columns: 1fr; gap: 20px; }
      h1 { font-size: clamp(38px,8.6vw,52px); margin-block: 8px; }
      .standfirst { margin-top: 12px; }
      .credit { margin-top: 12px; }
      .literary-plate { min-height: 0; padding: 15px 21px 16px; }
      .literary-plate small { border: 0; padding: 0; font-size: 13px; }
      .work-title { padding: 12px 0; font-size: 36px; }
      .work-title br { display: none; }
      .rail { display: block; }
      .rail article { border-bottom: 1px solid var(--rule); padding-block: 12px; }
      .archive-grid { display: block; }
      .archive-grid article { padding-block: 14px; }
      .archive-head { margin-bottom: 8px; }
      footer { align-items: flex-start; flex-direction: column; margin-top: 22px; }
    }
      .nameplate { width: 100%; justify-content: space-between; align-items: center; gap: 22px; margin: 27px auto 30px; }
    .diario { writing-mode: vertical-rl; transform: rotate(180deg); font: 700 26px/1 var(--display); letter-spacing: 0; color: var(--ink); }
    .town { font-size: clamp(30px,7.8vw,113px); letter-spacing: -.018em; }
    .brand-dot { color: var(--rust); }
    .seal { width: 60px; height: 60px; flex: 0 0 60px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; font: italic 32px var(--serif); transform: rotate(-12deg); }
    nav { border-top: 3px solid var(--ink); }
    .sections a { position: relative; transition: color .18s ease; }
    .sections a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 5px; height: 1px; background: var(--rust); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
    .sections a:hover { color: var(--rust); text-decoration: none; }
    .sections a:hover::after { transform: scaleX(1); }
    h1 a, h3 a { transition: color .2s ease; }
    h1 a:hover, h3 a:hover { color: var(--rust); text-decoration: none; }
    .literary-plate { transition: transform .3s ease, box-shadow .3s ease; }
    figure:hover .literary-plate { transform: translateY(-3px); box-shadow: 0 7px 14px #24251f15; }
    summary { transition: color .2s ease; }
    summary:hover, footer a:hover { color: var(--rust); }
    @media (max-width:640px) {
      .nameplate { gap: 8px; margin: 23px 0; }
      .diario { font-size: 16px; }
      .town { font-size: clamp(24px,7.1vw,45px); }
      .seal { width: 30px; height: 30px; flex-basis: 30px; font-size: 18px; }
    }
    @media (prefers-reduced-motion:reduce) {
      *, *::after { transition: none !important; }
      figure:hover .literary-plate { transform: none; }
    }    .nameplate .town, .nameplate .diario, .nameplate .seal {
      transition: color .22s ease, border-color .22s ease;
    }
    .nameplate:hover .town, .nameplate:hover .diario, .nameplate:hover .seal {
      color: var(--rust);
    }
    .nameplate:hover .seal {
      border-color: var(--rust);
    }    .extended-section { margin-top: 44px; border-top: 2px solid var(--ink); }
    .business-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
    .business-grid article + article { border-left: 1px solid var(--rule); padding-left: 28px; }
    .extended-section h3 { font-size: clamp(24px,2.1vw,33px); line-height: 1.13; letter-spacing: -.035em; margin: 10px 0; }
    .extended-section p { font: 17px/1.5 var(--serif); color: var(--muted); margin-top: 12px; }
    .extended-section time { display: block; font-size: 12px; color: var(--muted); margin-top: 15px; }
    .culture-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 42px; }
    .editorial-photo { display: block; aspect-ratio: 1.8; overflow: hidden; margin-bottom: 18px; background: #d5d3c8; }
    .editorial-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, filter .4s ease; filter: saturate(.75); }
    .editorial-photo:hover img { transform: scale(1.025); filter: saturate(1); }
    .culture-grid article:last-child { padding-top: 42px; }
    .culture-grid article:last-child .editorial-photo { aspect-ratio: 1.6; }
    @media (max-width:640px) {
      .extended-section { margin-top: 30px; }
      .business-grid, .culture-grid { grid-template-columns: 1fr; gap: 24px; }
      .business-grid article + article { border-left: 0; padding-left: 0; padding-top: 18px; border-top: 1px solid var(--rule); }
      .culture-grid article:last-child { padding-top: 0; }
    }    .south-banner { margin: 48px calc(-1 * clamp(18px,4.5vw,72px)) 0; padding: 34px clamp(18px,4.5vw,72px) 36px; background: var(--ink); color: var(--paper); }
    .south-banner h2 { font: 700 clamp(50px,8.5vw,124px)/1 var(--display); text-transform: uppercase; letter-spacing: -.025em; }
    .south-banner h2 em { font: italic .65em var(--serif); text-transform: none; }
    .south-banner h2 span { color: #ce795c; }
    .south-links { display: grid; grid-template-columns: repeat(3,1fr); gap: 30px; margin-top: 28px; }
    .south-links a { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #eeece566; font-size: 16px; transition: color .2s ease; }
    .south-links a:hover { color: #e8a18a; text-decoration: none; }
    footer.site-footer { display: block; margin-top: 0; border: 0; padding: 38px 0 20px; }
    .footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 35px; }
    .footer-brand { display: inline-block; color: var(--ink); font: 700 30px/1 var(--display); text-transform: uppercase; }
    .footer-brand small { display: block; font: italic 18px var(--serif); text-transform: none; color: var(--rust); margin-bottom: 8px; }
    .footer-brand:hover { color: var(--rust); text-decoration: none; }
    .footer-location { font-size: 13px; margin-top: 16px; }
    .footer-column h2 { font: 600 16px var(--serif); margin-bottom: 14px; color: var(--ink); }
    .footer-column a { display: block; width: fit-content; padding: 4px 0; font-size: 13px; }
    .footer-bottom { display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid var(--rule); margin-top: 30px; padding-top: 15px; font-size: 12px; }
    @media(max-width:640px) {
      .south-banner { margin-top: 30px; padding-block: 25px; }
      .south-banner h2 { font-size: clamp(39px,9vw,58px); }
      .south-links { grid-template-columns: 1fr; gap: 8px; margin-top: 18px; }
      .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
      .footer-identity { grid-column: 1/-1; }
      .footer-bottom { flex-wrap: wrap; }
    }
img { max-width: 100%; height: auto; }
.lead-media img { width:100%; height:clamp(280px,30vw,460px); object-fit:cover; }
.section-nav, .footer-nav { list-style:none; margin:0; padding:0; }
.section-nav { display:flex; gap:clamp(14px,2.4vw,38px); }
.footer-nav a { display:block; padding:4px 0; }
.entry-header { max-width:900px; margin:0 auto 28px; }
.entry-header h1 { font-size:clamp(36px,4.4vw,66px); }
.entry-image { margin:26px auto 36px; max-width:1000px; }
.entry-image img { width:100%; max-height:650px; object-fit:cover; }
.entry-image figcaption { font-size:12px; color:var(--muted); margin-top:8px; }
.entry-content { max-width:760px; margin:0 auto; font:19px/1.75 var(--serif); overflow-wrap:anywhere; }
.entry-content p, .entry-content ul, .entry-content ol, .entry-content figure { margin:0 0 1.3em; }
.entry-content h2 { font-size:32px; line-height:1.2; margin:1.5em 0 .6em; }
.entry-content h3 { font-size:26px; line-height:1.25; margin:1.4em 0 .6em; }
.entry-content a { text-decoration:underline; text-underline-offset:3px; color:var(--rust); }
.entry-content iframe, .entry-content video { max-width:100%; }
.entry-content blockquote { border-left:3px solid var(--rust); padding-left:22px; margin-left:0; font-style:italic; }
.entry-content table { border-collapse:collapse; width:100%; display:block; overflow-x:auto; }
.entry-content td, .entry-content th { border:1px solid var(--rule); padding:10px; }
.entry-content .alignwide { width:100%; }
.entry-end { max-width:760px; margin:32px auto; padding-top:20px; border-top:1px solid var(--rule); }
.post-navigation .nav-links { display:flex; gap:30px; justify-content:space-between; margin:35px 0; }
.comments-area { max-width:760px; margin:35px auto; }
.comments-area textarea { width:100%; background:var(--paper); border:1px solid var(--rule); padding:12px; }
.comments-area input { max-width:100%; }
.comment-list { padding-left:22px; }
.comment-list li { margin-block:24px; }
.listing-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:32px; }
.listing-grid article { border-top:1px solid var(--rule); padding-top:15px; }
.listing-grid h2 { font-size:29px; line-height:1.16; letter-spacing:-.03em; margin:12px 0; }
.listing-grid time { font-size:12px; color:var(--muted); }
.listing-grid .editorial-photo img { width:100%; height:100%; object-fit:cover; }
.pagination { margin:36px 0; }
.pagination .nav-links { display:flex; gap:16px; flex-wrap:wrap; }
.pagination .current { font-weight:600; }
.listing-heading { margin-bottom:28px; }
.listing-heading h1 { font-size:clamp(34px,4vw,55px); }
.screen-reader-text { clip:rect(1px,1px,1px,1px); clip-path:inset(50%); position:absolute!important; width:1px; height:1px; overflow:hidden; }
@media(max-width:640px) { .listing-grid { grid-template-columns:1fr; } .entry-content { font-size:18px; } .entry-content h2 { font-size:28px; } }

.inline-search { position:static; width:100%; max-width:500px; margin:20px 0; }
.comment-form { position:static; display:block; width:100%; background:transparent; border:0; padding:0; }
.comment-form p { margin:15px 0; }
.comment-form label { display:block; }
.comment-form .comment-form-cookies-consent label { display:inline; }
.comment-form .submit { background:var(--ink); color:var(--paper); padding:10px 20px; cursor:pointer; }
a.literary-plate:hover, .literary-plate a:hover { text-decoration:none; }

/* Interacciones editoriales en todas las vistas. */
.sheet a, .entry-header h1, .listing-heading h1 {
  transition: color .2s ease;
}
.sheet a:hover, .sheet a:focus-visible,
.sheet h1 a:hover, .sheet h2 a:hover, .sheet h3 a:hover,
.entry-header h1:hover, .listing-heading h1:hover,
.nameplate:hover .town, .nameplate:hover .diario, .nameplate:hover .seal {
  color: var(--rust);
}
.nameplate:hover .seal { border-color: var(--rust); }
.south-banner a:hover, .south-banner a:focus-visible { color: #e8a18a; }
@media(prefers-reduced-motion:reduce) {
  .sheet a, .entry-header h1, .listing-heading h1 { transition:none; }
}

.nameplate .seal,
.nameplate:hover .seal,
.nameplate:focus-visible .seal {
  color: var(--rust);
  border-color: var(--rust);
}
