/*
Theme Name: Sleeklad Magazine Theme
Author: Sleeklad
Description: Responsive classic news magazine with dynamic posts and a light/dark switch.
Version: 1.0.3
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: newsroom
*/
:root{color-scheme:light;--bg:#f5f6f8;--surface:#fff;--text:#20242b;--muted:#626c79;--line:#dfe3e8;--accent:#e9a500;--link:#835d00}
:root[data-theme="dark"]{color-scheme:dark;--bg:#12161d;--surface:#1c222c;--text:#f0f2f5;--muted:#b2bbc7;--line:#343d49;--accent:#ffc342;--link:#ffd36b}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--text);font:16px/1.55 system-ui,-apple-system,Segoe UI,sans-serif}a{color:inherit;text-decoration:none}a:hover{color:var(--link)}img{display:block;max-width:100%;width:100%;object-fit:cover}button,input{font:inherit}button{cursor:pointer}.wrap{width:min(1160px,calc(100% - 32px));margin:auto}.top{background:var(--surface);border-bottom:1px solid var(--line)}.top-inner{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:20px 0}.logo{font-size:clamp(1.7rem,4vw,2.5rem);font-weight:900;letter-spacing:-.05em;text-transform:uppercase;line-height:1}.logo span{color:var(--accent)}.top-ad{width:min(700px,65%);max-height:70px;object-fit:contain}.nav-bar{background:var(--surface);border-bottom:1px solid var(--line)}.nav-inner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;flex-wrap:wrap}.links{display:flex;gap:20px;flex-wrap:wrap}.links a{font-weight:650}.controls{display:flex;align-items:center;gap:8px}.search{display:flex}.search input,.newsletter input{min-width:0;width:180px;padding:9px 11px;border:1px solid var(--line);border-radius:5px;background:var(--bg);color:var(--text)}.btn{border:1px solid var(--line);background:var(--surface);color:var(--text);padding:9px 13px;border-radius:5px}.btn:hover{border-color:var(--accent)}.btn-primary{background:var(--accent);color:#161616;border-color:var(--accent);font-weight:700}.section{margin:30px 0}.section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:2px solid var(--accent);padding-bottom:9px;margin:0 0 16px}.section-title h2{font-size:1.35rem;margin:0}.section-title a,.meta{color:var(--muted);font-size:.85rem}.grid{display:grid;gap:18px}.hero-grid{grid-template-columns:2fr 1fr}.two{grid-template-columns:repeat(2,minmax(0,1fr))}.four{grid-template-columns:repeat(4,minmax(0,1fr))}.content-grid{grid-template-columns:minmax(0,2fr) minmax(260px,1fr);align-items:start;gap:28px}.card{background:var(--surface);border:1px solid var(--line);border-radius:7px;overflow:hidden}.card img{aspect-ratio:16/9}.card-body{padding:15px}.card h3{font-size:1.08rem;line-height:1.35;margin:7px 0}.card p{margin:8px 0 0;color:var(--muted);font-size:.94rem}.hero{position:relative;min-height:360px;overflow:hidden;border-radius:7px;background:#20242b}.hero img{height:100%;position:absolute;inset:0}.hero-content{position:absolute;inset:auto 0 0;padding:24px;background:linear-gradient(transparent,rgba(0,0,0,.9));color:#fff}.hero-content h1{font-size:clamp(1.45rem,3vw,2.1rem);line-height:1.2;margin:8px 0 0}.hero-content .meta{color:#eee}.category-list{display:grid;gap:12px}.category{position:relative;height:110px;overflow:hidden;border-radius:6px;background:#303741}.category img{height:100%;filter:brightness(.5)}.category span{position:absolute;inset:0;display:grid;place-items:center;color:white;font-size:1.25rem;font-weight:750}.mini{display:flex;gap:12px;background:var(--surface);border:1px solid var(--line);border-radius:6px;overflow:hidden;margin-bottom:12px}.mini img{width:100px;height:100px;flex:none}.mini div{padding:9px 10px 9px 0;align-self:center}.mini h3{font-size:.95rem;line-height:1.3;margin:4px 0}.sidebar-block{margin-bottom:25px}.social,.tags{display:flex;flex-wrap:wrap;gap:8px}.social a,.tags a{border:1px solid var(--line);padding:7px 11px;border-radius:5px;background:var(--surface);font-size:.9rem}.newsletter{background:var(--surface);padding:18px;border:1px solid var(--line);border-radius:6px}.newsletter p{color:var(--muted);margin:0 0 12px}.newsletter form{display:flex;gap:7px;flex-wrap:wrap}.newsletter input{flex:1;width:140px}.ad{display:block;margin:24px 0}.ad img{max-height:90px;object-fit:contain}.footer{background:var(--surface);border-top:1px solid var(--line);padding:35px 0;margin-top:35px}.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:28px}.footer p{color:var(--muted)}.footer nav{display:grid;gap:7px}.footer h3{margin:0 0 10px}.copyright{border-top:1px solid var(--line);margin-top:24px;padding-top:15px;color:var(--muted);font-size:.85rem}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
@media(max-width:850px){.hero-grid,.content-grid{grid-template-columns:1fr}.four{grid-template-columns:repeat(2,minmax(0,1fr))}.top-ad{display:none}.hero{min-height:320px}}
@media(max-width:520px){.two,.four,.footer-grid{grid-template-columns:1fr}.nav-inner{align-items:flex-start}.links{gap:12px}.controls{width:100%;justify-content:space-between}.search{flex:1}.search input{width:100%}.hero{min-height:290px}.hero-content{padding:16px}.mini img{width:85px;height:85px}}

/* WordPress additions */
.wp-caption,.gallery-caption{max-width:100%}.aligncenter{display:block;margin-inline:auto}.alignleft{float:left;margin:0 1rem 1rem 0}.alignright{float:right;margin:0 0 1rem 1rem}.screen-reader-text{position:absolute;clip:rect(1px,1px,1px,1px);width:1px;height:1px;overflow:hidden}.screen-reader-text:focus{clip:auto;width:auto;height:auto}.pagination{display:flex;gap:12px;flex-wrap:wrap;margin:22px 0}.pagination a,.pagination span{padding:7px 12px;border:1px solid var(--line);border-radius:5px}.pagination .current{background:var(--accent);color:#161616}.entry-content img{height:auto}.entry-content a{text-decoration:underline;color:var(--link)}.entry-content{overflow-wrap:anywhere}.entry-content iframe{max-width:100%}.entry-content pre{overflow:auto}.post-title{font-size:clamp(1.8rem,4vw,2.8rem);line-height:1.2}.post-featured{width:100%;height:auto;border-radius:7px}.empty-state{padding:22px;background:var(--surface);border:1px solid var(--line);border-radius:7px}.site-description{font-size:.9rem;color:var(--muted)}.menu-links{display:flex;gap:20px;flex-wrap:wrap;list-style:none;margin:0;padding:0}.menu-links a{font-weight:650}.comments-area{margin:30px 0}.comments-area textarea{width:100%;max-width:100%;background:var(--surface);color:var(--text);border:1px solid var(--line)}.comments-area input{max-width:100%}.hero-content a:hover{color:#fff;text-decoration:underline}.card img,.mini img{background:var(--line)}.card-image-placeholder{aspect-ratio:16/9;background:var(--line)}.hero-image-placeholder{position:absolute;inset:0;background:linear-gradient(130deg,#343d49,#20242b)}

/* Sleeklad homepage layout corrections */
.content-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);align-items:start;gap:28px}
.content-grid>div,.content-grid>aside{min-width:0}
.content-grid .card img{width:100%;aspect-ratio:16/9;object-fit:cover}
.content-grid .card-body{padding:13px}
.content-grid .card h3{font-size:1rem}
.content-grid .card p{font-size:.88rem}
.footer .logo{font-size:clamp(1.5rem,3vw,2rem)}
@media(max-width:850px){.content-grid{grid-template-columns:1fr}}
@media(min-width:851px) and (max-width:1050px){.content-grid .two{grid-template-columns:1fr}}

/* v1.0.2 — compact magazine thumbnails and top-stories rail */
.hero-grid{grid-template-columns:minmax(0,2fr) minmax(280px,1fr);align-items:stretch}
.hero-grid .hero{height:460px;min-height:0}
.hero-grid .hero>img{width:100%;height:100%;object-fit:cover}
.hero-stories{min-width:0}
.hero-stories .section-title{margin-bottom:12px}
.hero-stories .mini{min-height:94px;margin-bottom:10px}
.hero-stories .mini>a{flex:0 0 94px;min-width:0}
.hero-stories .mini img{width:94px;height:94px;object-fit:cover}
.hero-stories .mini>div{min-width:0;padding:8px 10px 8px 0}
.hero-stories .mini h3{font-size:.91rem;line-height:1.32;margin:3px 0}
.hero-stories .mini .meta{font-size:.75rem}
/* The four Featured thumbnails are intentionally compact. */
#featured .card img{width:100%;height:170px;aspect-ratio:auto;object-fit:cover}
#featured .card-image-placeholder{height:170px;aspect-ratio:auto}
#featured .card-body{padding:11px 12px}
#featured .card h3{font-size:.95rem}
#featured .card p{font-size:.82rem;line-height:1.4}
/* Half-height previews for Popular and Latest, without stretching the cards. */
#popular .card img,#latest .card img{width:100%;height:210px;aspect-ratio:auto;object-fit:cover}
#popular .card-image-placeholder,#latest .card-image-placeholder{height:210px;aspect-ratio:auto}
#popular .card-body,#latest .card-body{padding:12px}
@media(max-width:850px){
  .hero-grid{grid-template-columns:1fr}
  .hero-grid .hero{height:360px}
  .hero-stories{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px}
  .hero-stories .section-title{grid-column:1/-1;margin-bottom:0}
  .hero-stories .mini{margin-bottom:0}
}
@media(max-width:520px){
  .hero-grid .hero{height:290px}
  .hero-stories{grid-template-columns:1fr}
  #featured .card img,#featured .card-image-placeholder{height:190px}
  #popular .card img,#latest .card img,#popular .card-image-placeholder,#latest .card-image-placeholder{height:190px}
}

/* v1.0.3 — align hero with top-story rail and add compact three-column news rows */
.hero-grid{align-items:stretch}
.hero-grid .hero{height:auto;min-height:100%;align-self:stretch}
.hero-stories{display:flex;flex-direction:column;min-width:0}
.hero-stories .mini{flex:1;min-height:104px}
.hero-stories .mini>a{display:block;align-self:stretch}
.hero-stories .mini img{height:100%;min-height:94px}
.three{grid-template-columns:repeat(3,minmax(0,1fr))}
#latest .card img,.category-news .card img{width:100%;height:155px;aspect-ratio:auto;object-fit:cover}
#latest .card-image-placeholder,.category-news .card-image-placeholder{height:155px;aspect-ratio:auto}
#latest .card-body,.category-news .card-body{padding:11px}
#latest .card h3,.category-news .card h3{font-size:.95rem}
#latest .card p,.category-news .card p{font-size:.83rem;line-height:1.4}
.category-tile{position:relative;display:block;height:145px;border-radius:7px;overflow:hidden;background:var(--surface);border:1px solid var(--line)}
.category-tile img,.category-tile-placeholder{display:block;width:100%;height:100%;object-fit:cover;background:var(--line)}
.category-tile:after{content:"";position:absolute;inset:0;background:linear-gradient(transparent,rgba(0,0,0,.78))}
.category-tile-label{position:absolute;bottom:12px;left:13px;right:13px;color:white;font-size:1.05rem;font-weight:750;z-index:1}
@media(max-width:850px){.hero-grid .hero{height:360px;min-height:0}.hero-stories{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.hero-stories .mini{min-height:94px}.three{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.hero-grid .hero{height:290px}.hero-stories,.three{grid-template-columns:1fr}.hero-stories .mini{min-height:94px}.category-tile{height:170px}}
