/* WordPress tuning: preserves the Horizons visual rhythm while keeping dynamic posts compact. */
@media (min-width: 1025px){
  .rail{width:calc(100% - 150px);max-width:1240px}
  .masthead{height:100px}
  .brand{width:275px}
  .main-nav{height:42px}
  .main-nav>a,.more-nav>button{font-size:10px}
  .breaking{height:42px}
  .ad-banner{height:64px;margin-top:18px}
  .front-page{padding-top:22px;padding-bottom:28px}
  .front-grid{grid-template-columns:minmax(0,1fr) 225px 205px;gap:20px}
  .lead-image-wrap{max-height:360px}
  .lead-image{width:100%;height:360px!important;aspect-ratio:auto!important;object-fit:cover;object-position:center;filter:grayscale(1)}
  .lead-copy{padding-top:14px}
  .lead-copy h1{font-size:clamp(30px,2.55vw,42px);line-height:1.05;margin-top:8px;margin-bottom:10px}
  .lead-copy p{font-size:12px;line-height:1.55;max-width:650px}
  .lead-meta{padding-top:13px;margin-top:13px}
  .secondary-column{padding-left:18px}
  .home-side-card{padding:0 0 16px;margin:0 0 16px;border-bottom:1px solid var(--line)}
  .home-side-card:last-child{border-bottom:0;margin-bottom:0}
  .home-side-card img{width:100%;height:125px!important;object-fit:cover;margin-bottom:10px}
  .home-side-card .eyebrow{font-size:7px;letter-spacing:.65px}
  .home-side-card h2{font-family:'Source Serif 4',Georgia,serif;font-size:17px;line-height:1.18;margin:6px 0}
  .home-side-card p{font-size:10px;line-height:1.45;color:var(--quiet);margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .latest-column{padding-left:18px}
  .ruled-title{font-size:10px;padding-bottom:9px}
  .latest-item{display:block;padding:11px 0;border-bottom:1px solid var(--line)}
  .latest-item .eyebrow{font-size:7px;letter-spacing:.5px}
  .latest-item h3{font-family:'Source Serif 4',Georgia,serif;font-size:14px;line-height:1.2;margin:5px 0 0}
  .rank-item{display:grid;grid-template-columns:34px 1fr;gap:8px;padding:10px 0;border-bottom:1px solid var(--line)}
  .rank-item>span{font-family:'Source Serif 4',Georgia,serif;font-size:24px;color:#c7cccf}
  .rank-item h3{font-family:'Source Serif 4',Georgia,serif;font-size:12px;line-height:1.25;margin:0}
  .reader-block{margin-top:22px}.tip-link{margin-top:14px;padding-top:14px}
  .regional{padding-top:18px;padding-bottom:28px}
  .province-links{display:flex;gap:17px;border-bottom:1px solid var(--line);padding:0 0 12px;margin:-4px 0 18px;font-size:9px;color:var(--quiet)}
  .region-grid{display:grid;grid-template-columns:minmax(0,1.55fr) .72fr .72fr;gap:22px;align-items:start}
  .region-main{position:relative;min-height:255px;overflow:hidden;display:block;color:white;background:var(--charcoal)}
  .region-main>img{width:100%;height:255px!important;object-fit:cover;filter:grayscale(1);opacity:.82}
  .region-main>div{position:absolute;inset:auto 20px 18px 20px}
  .region-main .eyebrow{color:white;font-size:8px}
  .region-main h3{font-family:'Source Serif 4',Georgia,serif;font-size:23px;line-height:1.15;margin:8px 35px 0 0;text-shadow:0 1px 8px #0008}
  .region-arrow{position:absolute;right:0;bottom:0;font-size:22px}
  .region-note{padding:10px 0 0}
  .region-note h3{font-family:'Source Serif 4',Georgia,serif;font-size:22px;line-height:1.15;margin:8px 0 10px}
  .region-note p{font-size:11px;line-height:1.55;color:var(--quiet);margin-bottom:13px}
  .region-note>a{font-size:10px;font-weight:700}
  .culture-preview{border-left:1px solid var(--line);padding-left:20px;display:block}
  .culture-preview img{width:100%;height:130px!important;object-fit:cover;margin-bottom:12px}
  .culture-preview h3{font-family:'Source Serif 4',Georgia,serif;font-size:18px;line-height:1.2;margin:7px 0 8px}
  .culture-preview .eyebrow{font-size:7px}.culture-preview .tiny-note{font-size:8px;color:var(--quiet)}
  .video-section{padding-top:26px;padding-bottom:32px}
  .video-feature{grid-template-columns:1.35fr .75fr;gap:42px}
  .video-image img{height:300px!important;object-fit:cover}
  .video-copy h2{font-size:34px}
}
@media (min-width:641px) and (max-width:1024px){
 .front-grid{grid-template-columns:minmax(0,1fr) 230px;gap:20px}.latest-column{grid-column:1/-1}
 .lead-image{height:320px!important;object-fit:cover}.home-side-card img{height:120px!important;object-fit:cover}
 .region-grid{grid-template-columns:1.4fr 1fr}.culture-preview{grid-column:1/-1}
}
@media (max-width:640px){
 .lead-image{height:230px!important;aspect-ratio:auto!important;object-fit:cover}
 .secondary-column{grid-template-columns:1fr 1fr}
 .home-side-card img{height:110px!important;object-fit:cover;margin-bottom:9px}
 .home-side-card h2{font-family:'Source Serif 4',Georgia,serif;font-size:18px;line-height:1.2;margin:6px 0}.home-side-card p{display:none}
 .latest-item{padding:12px 0;border-bottom:1px solid var(--line)}.latest-item h3{font-family:'Source Serif 4',Georgia,serif;font-size:18px;line-height:1.25;margin:5px 0}
 .province-links{display:flex;overflow:auto;gap:15px;padding-bottom:12px;margin-bottom:18px;font-size:9px;white-space:nowrap}
 .region-main>img{width:100%;height:240px!important;object-fit:cover}.region-main>div{position:absolute;left:18px;right:18px;bottom:16px}.region-main{position:relative;color:#fff;background:var(--charcoal)}.region-main h3{font-family:'Source Serif 4',Georgia,serif;font-size:24px;line-height:1.15;margin:7px 20px 0 0}.region-main .eyebrow{color:#fff}.region-note{padding:5px 0}.culture-preview img{height:125px!important;object-fit:cover}
}

@media (min-width: 1025px){
  .secondary-column{padding-left:20px}
  .latest-column{padding-left:20px}
  .agenda-visual{height:148px;margin-bottom:14px}
  .agenda-story h2{font-size:20px;line-height:1.15}
  .agenda-story p{font-size:11px;line-height:1.5}
  .agenda-story.small{margin-top:18px;padding-top:18px}
  .agenda-story.small h2{font-size:16px}
  .latest-empty h3{font-size:18px}
  .latest-empty p{font-size:10px}
  .section-heading{margin-bottom:16px}
  .editorial-columns .card img{height:110px;object-fit:cover}
}
@media (max-width: 640px){
  .agenda-visual{height:130px}
  .latest-empty h3{font-size:18px}
}


/* v1.3 article image fix: preserve original proportions, especially on mobile */
.article-figure img,
.reading-body img,
.reading-body figure img,
.reading-body .wp-block-image img,
.reading-body .wp-caption img {
  width: auto;
  max-width: 100%;
  height: auto !important;
  object-fit: contain !important;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.reading-body figure,
.reading-body .wp-block-image,
.reading-body .wp-caption {
  max-width: 100%;
  margin: 18px 0 24px;
}
.reading-body figcaption,
.reading-body .wp-caption-text {
  font-size: 11px;
  line-height: 1.5;
  color: var(--quiet);
  margin-top: 8px;
}
@media (max-width: 640px){
  .article-figure{margin:14px 0 20px}
  .article-figure img,
  .reading-body img,
  .reading-body figure img,
  .reading-body .wp-block-image img,
  .reading-body .wp-caption img {
    width: 100%;
    max-width: 100%;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
  }
  .reading-body figure,
  .reading-body .wp-block-image,
  .reading-body .wp-caption {
    margin: 14px 0 18px;
  }
}


/* v1.6: homepage uses real post imagery, compact editorial hierarchy */
.side-news-image{width:100%;height:138px!important;object-fit:cover;margin:0 0 10px;display:block}
.featured-side{display:block;padding-bottom:16px;margin-bottom:2px}
.side-news-small{display:grid!important;grid-template-columns:72px minmax(0,1fr) 12px;gap:11px!important;align-items:start!important}
.side-news-thumb{width:72px!important;height:58px!important;object-fit:cover;display:block}
.side-news-small h2{margin-top:4px!important;font-size:15px!important;line-height:1.18!important}
.side-arrow{font-size:20px;line-height:1;color:var(--quiet);align-self:center}
.latest-news-card{display:grid;grid-template-columns:70px minmax(0,1fr);gap:10px;padding:12px 0;border-bottom:1px solid var(--line);align-items:start}
.latest-news-thumb{width:70px!important;height:58px!important;object-fit:cover;display:block}
.latest-news-card .eyebrow{font-size:7px;letter-spacing:.5px}
.latest-news-card h3{font-family:'Source Serif 4',Georgia,serif;font-size:13px;line-height:1.2;margin:4px 0 0}
.province-links a{color:inherit;text-decoration:none;white-space:nowrap}
.province-links a:hover{color:var(--red)}
@media(max-width:640px){
  .side-news-image{height:165px!important}
  .side-news-small{grid-template-columns:86px minmax(0,1fr) 12px}
  .side-news-thumb{width:86px!important;height:66px!important}
  .latest-news-card{grid-template-columns:88px minmax(0,1fr)}
  .latest-news-thumb{width:88px!important;height:68px!important}
  .latest-news-card h3{font-size:16px}
}

/* v1.7 mobile editorial cleanup
   Fixes the v1.6 real-image cards on phones: the old mobile grid expected
   an .agenda-visual element spanning rows, so real thumbnails caused titles
   and excerpts to fall into tiny side-by-side columns. */
@media (max-width: 640px){
  /* Homepage secondary news: one clean vertical feed on mobile. */
  .secondary-column{
    display:block;
    padding-left:0;
    border-left:0;
    border-top:1px solid var(--line);
    padding-top:20px;
  }

  /* First secondary story becomes a proper full-width feature card. */
  .secondary-column > .agenda-story:first-child,
  .secondary-column > .agenda-story.featured-side:first-child{
    display:block;
    grid-template-columns:none;
    padding:0 0 18px;
    margin:0;
  }
  .featured-side .side-news-image,
  .secondary-column > .featured-side .side-news-image{
    width:100%;
    height:190px !important;
    margin:0 0 12px;
    object-fit:cover;
    border-radius:0;
  }
  .featured-side .eyebrow{font-size:8px;letter-spacing:.7px}
  .featured-side h2,
  .secondary-column > .featured-side h2{
    font-size:24px !important;
    line-height:1.12 !important;
    letter-spacing:-.35px;
    margin:7px 0 8px !important;
  }
  .featured-side p,
  .secondary-column > .featured-side p{
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
    font-size:13px;
    line-height:1.5;
    margin:0;
  }

  /* The next two stories stack as readable horizontal cards, not two columns. */
  .agenda-story.small.side-news-small,
  .secondary-column .side-news-small{
    display:grid !important;
    grid-template-columns:112px minmax(0,1fr) 16px !important;
    gap:13px !important;
    align-items:center !important;
    width:100%;
    margin:0 !important;
    padding:15px 0 !important;
    border-top:1px solid var(--line);
  }
  .secondary-column .side-news-thumb{
    width:112px !important;
    height:78px !important;
    object-fit:cover;
  }
  .secondary-column .side-news-small > div{min-width:0}
  .secondary-column .side-news-small .eyebrow{
    font-size:8px;
    letter-spacing:.65px;
  }
  .secondary-column .side-news-small h2{
    font-size:18px !important;
    line-height:1.18 !important;
    letter-spacing:-.2px;
    margin:5px 0 0 !important;
    overflow-wrap:normal;
    word-break:normal;
    hyphens:none;
  }
  .secondary-column .side-arrow{
    display:block;
    font-size:22px;
    align-self:center;
  }

  /* Las Miradas: never force two newspaper columns on a phone. */
  .editorial-columns{
    grid-template-columns:1fr !important;
    gap:30px !important;
  }
  .editorial-columns > div,
  .editorial-columns > div:nth-child(2){
    border-right:0 !important;
    padding-right:0 !important;
    padding-bottom:26px;
    border-bottom:1px solid var(--line) !important;
  }
  .editorial-columns > div:last-child{
    border-bottom:0 !important;
    padding-bottom:0;
  }
  .editorial-column-title{margin-bottom:14px}
  .editorial-columns .article-card h3{
    font-size:22px;
    line-height:1.18;
  }
  .editorial-columns .article-card p{
    font-size:14px;
    line-height:1.5;
  }

  /* Keep every homepage card inside the viewport even with very long headlines. */
  .front-grid,
  .lead-column,
  .secondary-column,
  .latest-column,
  .agenda-story,
  .latest-news-card,
  .editorial-columns,
  .editorial-columns > div,
  .article-card,
  .article-card > a{
    min-width:0;
    max-width:100%;
  }
}

@media (max-width: 380px){
  .featured-side .side-news-image,
  .secondary-column > .featured-side .side-news-image{height:170px !important}
  .featured-side h2,
  .secondary-column > .featured-side h2{font-size:22px !important}
  .agenda-story.small.side-news-small,
  .secondary-column .side-news-small{
    grid-template-columns:96px minmax(0,1fr) 14px !important;
    gap:11px !important;
  }
  .secondary-column .side-news-thumb{
    width:96px !important;
    height:72px !important;
  }
  .secondary-column .side-news-small h2{font-size:17px !important}
}


/* v1.8 — functional + responsive audit */

/* Keep automatic/imported posts visually stable before a Featured Image is set. */
.tlp-image-placeholder{
  background:var(--charcoal);
  color:#fff;
  display:flex;
  align-items:flex-end;
  justify-content:flex-start;
  overflow:hidden;
  position:relative;
}
.tlp-image-placeholder:before{
  content:'';
  position:absolute;
  width:54px;
  height:54px;
  right:14px;
  top:14px;
  border-top:3px solid var(--red);
  border-right:3px solid var(--red);
  opacity:.9;
}
.tlp-image-placeholder>span{
  position:relative;
  z-index:1;
  padding:12px 14px;
  font-size:8px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:1.2px;
}
.article-card .article-card-image{
  width:100%;
  aspect-ratio:1.7;
  margin-bottom:15px;
}
.side-news-image.tlp-image-placeholder{height:138px!important;margin-bottom:10px}
.side-news-thumb.tlp-image-placeholder{width:72px!important;height:58px!important}
.latest-news-thumb.tlp-image-placeholder{width:70px!important;height:58px!important}

/* “Lo último” is now an independent chronological feed. */
.latest-news-card{color:inherit;text-decoration:none}
.latest-news-card>div{min-width:0}
.latest-news-card h3{
  overflow-wrap:normal;
  word-break:normal;
  hyphens:none;
}
.latest-news-card:hover h3,.article-card>a:hover h3,.agenda-story:hover h2{color:var(--red)}
.latest-no-posts,.category-empty{color:var(--quiet);font-size:12px;line-height:1.6;padding:15px 0;margin:0}

/* Current navigation state existed in the design but was not wired up. */
.more-nav>button.active,.more-dropdown a.active{color:var(--red)}
.more-dropdown a.active{font-weight:800}

/* Archive/search pagination: WordPress output was previously unstyled. */
.navigation.pagination{margin:36px 0 10px;border-top:1px solid var(--line);padding-top:20px}
.navigation.pagination .nav-links{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.navigation.pagination .page-numbers{
  min-width:38px;
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 11px;
  border:1px solid var(--line);
  font-size:11px;
  font-weight:700;
  text-decoration:none;
}
.navigation.pagination a.page-numbers:hover{border-color:var(--charcoal)}
.navigation.pagination .current{background:var(--charcoal);color:#fff;border-color:var(--charcoal)}
.navigation.pagination .prev,.navigation.pagination .next{padding-inline:14px}

/* Long-form article elements frequently produced by Gutenberg/n8n. */
.reading-body ul,.reading-body ol{
  font-family:'Source Serif 4',Georgia,serif;
  font-size:18px;
  line-height:1.75;
  padding-left:1.4em;
  margin:0 0 25px;
}
.reading-body li+li{margin-top:8px}
.reading-body h3{
  font-family:'Source Serif 4',Georgia,serif;
  font-size:23px;
  line-height:1.25;
  margin:28px 0 14px;
}
.reading-body blockquote{
  margin:28px 0;
  padding:4px 0 4px 22px;
  border-left:4px solid var(--red);
  font-family:'Source Serif 4',Georgia,serif;
  font-size:21px;
  line-height:1.55;
}
.reading-body blockquote p{margin:0}
.reading-body iframe,.reading-body video,.reading-body embed{max-width:100%}
.reading-body table{width:100%;border-collapse:collapse;display:block;overflow-x:auto;margin:24px 0;font-size:13px}
.reading-body th,.reading-body td{border:1px solid var(--line);padding:10px 12px;text-align:left;vertical-align:top}
.reading-body th{background:var(--gray)}
.reading-body pre{max-width:100%;overflow:auto;padding:16px;background:var(--gray);font-size:13px}
.reading-body code{overflow-wrap:anywhere}
.reading-body a:not(.solid-button){text-decoration:underline;text-underline-offset:2px}

/* Make cards resilient to unusually long imported headlines. */
.lead-copy h1,.agenda-story h2,.article-card h3,.region-main h3,.culture-preview h3,.rank-item h3{
  word-break:normal;
  overflow-wrap:break-word;
  hyphens:none;
}

/* Small interaction polish without changing the editorial layout. */
.article-card img,.side-news-image,.side-news-thumb,.latest-news-thumb,.region-main>img,.culture-preview img{transition:opacity .18s ease}
.article-card>a:hover img,.agenda-story:hover img,.latest-news-card:hover img,.region-main:hover>img,.culture-preview:hover img{opacity:.9}

@media (min-width:641px) and (max-width:900px){
  /* The original tablet rule placed all latest cards and Most Read in the same
     implicit grid. Keep the news feed grouped and easy to scan. */
  .latest-column{grid-template-columns:1fr 1fr}
  .latest-news-card{min-width:0}
  .reader-block{grid-column:1/-1;margin-top:8px}
}

@media (max-width:640px){
  /* Remove desktop sidebar indentation. It was wasting ~24px of phone width. */
  .latest-column{
    border-left:0!important;
    padding-left:0!important;
    border-top:2px solid var(--charcoal);
    padding-top:16px!important;
  }
  .latest-column>.ruled-title{border-bottom:1px solid var(--line)}
  .latest-news-card{
    grid-template-columns:104px minmax(0,1fr)!important;
    gap:13px;
    padding:14px 0;
  }
  .latest-news-thumb,
  .latest-news-thumb.tlp-image-placeholder{
    width:104px!important;
    height:76px!important;
  }
  .latest-news-card .eyebrow{font-size:8px;letter-spacing:.45px}
  .latest-news-card h3{font-size:18px;line-height:1.18;margin-top:5px}

  .side-news-image.tlp-image-placeholder{height:190px!important}
  .secondary-column .side-news-thumb.tlp-image-placeholder{width:112px!important;height:78px!important}

  /* Cleaner newspaper hierarchy on phones. */
  .lead-copy h1{font-size:clamp(30px,9.2vw,35px);line-height:1.07;letter-spacing:-.8px}
  .lead-copy p{font-size:13px;line-height:1.58}
  .article-card h3{font-size:23px;line-height:1.16}
  .article-card p{font-size:13px;line-height:1.5}

  /* Better handling of generated/imported article markup. */
  .reading-body ul,.reading-body ol{font-size:17px;line-height:1.7;padding-left:1.25em}
  .reading-body h3{font-size:22px}
  .reading-body blockquote{font-size:19px;padding-left:17px}

  .navigation.pagination{margin-top:28px}
  .navigation.pagination .page-numbers{min-width:42px;min-height:42px}

  /* Header remains usable down to narrow Android/iPhone screens. */
  .masthead{gap:8px}
  .brand{max-width:calc(100% - 86px)}
  .mobile-menu,.mobile-search{width:35px}
  .main-nav.is-open{grid-template-columns:1fr 1fr;padding:8px 0}
  .main-nav.is-open>a,.main-nav.is-open .more-nav>button{white-space:normal;line-height:1.2}
  .more-nav{min-width:0}
  .more-dropdown{z-index:50}

  .footer-links{grid-template-columns:1fr 1fr}
}

@media (max-width:380px){
  .brand{width:180px;max-width:calc(100% - 82px)}
  .utility-date{display:none}
  .latest-news-card{grid-template-columns:92px minmax(0,1fr)!important;gap:11px}
  .latest-news-thumb,.latest-news-thumb.tlp-image-placeholder{width:92px!important;height:70px!important}
  .latest-news-card h3{font-size:17px}
  .navigation.pagination .prev,.navigation.pagination .next{width:100%}
}
