/*
Theme Name: Tony Medeiros — Aggregator
Author: Tony Medeiros
Description: A flexible editorial portal framework that aggregates Sandbox World, Grubbits and MTLRestoRap, with curated outside feeds and Gutenberg builders throughout.
Version: 1.04
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: tony-medeiros-aggregator
*/

html { scroll-behavior:smooth; }
body { margin:0; background:#f5f7fa; color:#111827; font-family:Arial,Helvetica,sans-serif; line-height:1.5; }
a { color:inherit; }

.tm-site-header { background:#fff; border-bottom:1px solid #d9dee5; }
.tm-header-inner { max-width:1320px; margin:0 auto; padding:22px 30px; }
.tm-site-title { display:block; font:800 42px/1 Arial,Helvetica,sans-serif; text-decoration:none; letter-spacing:-.04em; }
.tm-site-description { margin:7px 0 0; color:#667085; font-size:14px; }
.tm-header-blocks { margin-top:16px; }
.tm-header-blocks:empty { display:none; }
.tm-primary-nav { border-top:1px solid #e5e7eb; }
.tm-primary-nav ul { list-style:none; max-width:1320px; margin:0 auto; padding:0 30px; display:flex; flex-wrap:wrap; gap:24px; min-height:48px; align-items:center; }
.tm-primary-nav li { margin:0; }
.tm-primary-nav a { text-decoration:none; font-weight:700; font-size:14px; }
.tm-primary-nav a:hover { color:#c1121f; }

.tm-main-wrap { max-width:1320px; margin:0 auto; padding:30px 30px 70px; }
.tm-section { background:#fff; border:1px solid #e3e7ed; border-radius:18px; box-shadow:0 3px 14px rgba(16,24,40,.05); margin-bottom:22px; overflow:hidden; }
.tm-section-head { padding:22px 24px 16px; border-bottom:1px solid #e5e7eb; display:flex; justify-content:space-between; align-items:end; gap:20px; }
.tm-section-head h2 { margin:0; font-size:25px; line-height:1.15; letter-spacing:-.02em; }
.tm-section-head p { margin:0; color:#667085; font-size:14px; }
.tm-section-link { font-size:13px; font-weight:800; text-decoration:none; white-space:nowrap; }
.tm-section-link:hover { text-decoration:underline; }

/* Top Stories */
.tm-top-stories { padding:20px; }
.tm-top-grid { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(360px,1fr); gap:22px; }
.tm-hero { min-width:0; }
.tm-hero-image { width:100%; aspect-ratio:16/9; object-fit:cover; display:block; border-radius:14px; }
.tm-source { display:inline-block; margin:14px 0 7px; font-size:12px; line-height:1; font-weight:800; text-transform:uppercase; letter-spacing:.07em; }
.tm-source-sandbox { color:#1757a6; }
.tm-source-grubbits { color:#e45c00; }
.tm-source-mtl { color:#6a22a8; }
.tm-source-tony { color:#c1121f; }
.tm-hero h1 { margin:0 0 10px; font-size:39px; line-height:1.06; letter-spacing:-.035em; }
.tm-hero h1 a,.tm-side-story h3 a,.tm-card h3 a { text-decoration:none; }
.tm-hero-excerpt { margin:0; color:#475467; font-size:17px; max-width:850px; }
.tm-side-list { display:flex; flex-direction:column; }
.tm-side-story { display:grid; grid-template-columns:145px minmax(0,1fr); gap:15px; padding:0 0 16px; margin:0 0 16px; border-bottom:1px solid #e5e7eb; }
.tm-side-story:last-child { margin-bottom:0; padding-bottom:0; border-bottom:0; }
.tm-side-image { width:145px; height:104px; object-fit:cover; border-radius:11px; display:block; }
.tm-side-story h3 { margin:0 0 7px; font-size:19px; line-height:1.15; }
.tm-side-story p { margin:0; color:#667085; font-size:14px; line-height:1.35; }
.tm-empty { color:#667085; padding:20px 0; }

/* Site showcase */
.tm-site-feed { padding:20px; }
.tm-feed-grid { display:grid; grid-template-columns:1.45fr repeat(4,minmax(0,1fr)); gap:12px; }
.tm-card { min-width:0; border:1px solid #e3e7ed; border-radius:13px; overflow:hidden; background:#fff; }
.tm-card-feature { grid-column:span 1; }
.tm-card-image { width:100%; aspect-ratio:16/9; object-fit:cover; display:block; }
.tm-card-body { padding:12px 13px 14px; }
.tm-card h3 { margin:0; font-size:16px; line-height:1.18; letter-spacing:-.01em; }
.tm-card p { display:block; margin:8px 0 0; color:#667085; font-size:13px; line-height:1.35; min-height:2.7em; }
.tm-card-feature h3 { font-size:21px; }

/* Curated outside feeds */
.tm-curated { padding:16px 20px 20px; }
.tm-curated-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; }
.tm-curated-card { min-width:0; border:1px solid #e6e9ee; border-radius:12px; padding:12px; background:#fafbfc; }
.tm-curated-card h3 { margin:0; font-size:15px; line-height:1.2; }
.tm-curated-card p { margin:6px 0 0; color:#667085; font-size:12px; line-height:1.35; }
.tm-curated-card a { text-decoration:none; }
.tm-curated-label { display:block; margin-bottom:9px; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.07em; }
.tm-curated-thumb { width:54px; height:54px; border-radius:9px; object-fit:cover; float:right; margin:0 0 7px 8px; }

/* Builders */
.tm-builder-output { width:100%; box-sizing:border-box; }
.tm-builder-output > * { box-sizing:border-box; }
.tm-builder-output img { max-width:100%; height:auto; }
.tm-builder-output > .wp-block-group.alignfull,.tm-builder-output > .wp-block-columns.alignfull,.tm-builder-output > .wp-block-cover.alignfull { width:100%; max-width:none; }
.tm-builder-slot { background:#fff; border:1px solid #e3e7ed; border-radius:18px; padding:20px 24px; margin-bottom:22px; box-shadow:0 3px 14px rgba(16,24,40,.04); }
.tm-builder-slot:empty { display:none; }
.tm-builder-slot > *:first-child { margin-top:0; }
.tm-builder-slot > *:last-child { margin-bottom:0; }

/* Posts */
.tm-single-grid { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:30px; align-items:start; }
.tm-single { background:#fff; border:1px solid #e3e7ed; border-radius:18px; padding:28px; box-shadow:0 3px 14px rgba(16,24,40,.04); }
.tm-single-title { font-size:48px; line-height:1.08; letter-spacing:-.035em; margin:0 0 22px; }
.tm-single-featured img { width:100%; height:auto; display:block; border-radius:14px; margin-bottom:25px; }
.tm-entry-content { font-size:18px; }
.tm-entry-content img { max-width:100%; height:auto; border-radius:12px; }
.tm-sidebar { background:#fff; border:1px solid #e3e7ed; border-radius:18px; padding:20px; }
.tm-sidebar h2 { margin:0 0 18px; font-size:21px; }
.tm-sidebar-story { margin-bottom:22px; padding-bottom:22px; border-bottom:1px solid #e5e7eb; }
.tm-sidebar-story:last-child { margin-bottom:0; padding-bottom:0; border-bottom:0; }
.tm-sidebar-story img { width:100%; aspect-ratio:16/10; object-fit:cover; border-radius:10px; display:block; margin-bottom:10px; }
.tm-sidebar-story h3 { margin:0; font-size:17px; line-height:1.2; }

/* Footer */
.tm-site-footer { background:#111827; color:#fff; margin-top:0; }
.tm-footer-inner { max-width:1320px; margin:0 auto; padding:34px 30px; }
.tm-footer-bottom { border-top:1px solid rgba(255,255,255,.15); max-width:1320px; margin:0 auto; padding:15px 30px; font-size:13px; color:#cbd5e1; }

/* Builder admin */
.tm-builder-admin .tm-builder-card { max-width:900px; background:#fff; border:1px solid #dcdcde; border-radius:12px; padding:24px; box-sizing:border-box; }

@media(max-width:1050px){
 .tm-top-grid{grid-template-columns:1fr;}
 .tm-feed-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
 .tm-card-feature{grid-column:span 3;}
 .tm-curated-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
 .tm-single-grid{grid-template-columns:1fr;}
}
@media(max-width:700px){
 .tm-header-inner,.tm-main-wrap,.tm-footer-inner,.tm-footer-bottom{padding-left:16px;padding-right:16px;}
 .tm-primary-nav ul{padding-left:16px;padding-right:16px;gap:16px;}
 .tm-section-head{display:block;}
 .tm-section-head p{margin-top:7px;}
 .tm-section-link{display:inline-block;margin-top:10px;}
 .tm-top-stories,.tm-site-feed{padding:14px;}
 .tm-hero h1{font-size:32px;}
 .tm-side-story{grid-template-columns:100px minmax(0,1fr);}
 .tm-side-image{width:100px;height:80px;}
 .tm-feed-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
 .tm-card-feature{grid-column:span 2;}
 .tm-curated-grid{grid-template-columns:1fr 1fr;}
 .tm-single{padding:20px;}
 .tm-single-title{font-size:36px;}
}
@media(max-width:460px){
 .tm-feed-grid,.tm-curated-grid{grid-template-columns:1fr;}
 .tm-card-feature{grid-column:span 1;}
 .tm-side-story{grid-template-columns:90px minmax(0,1fr);}
 .tm-side-image{width:90px;height:72px;}
}
