/* TechTigi homepage — Modern Technology News / Digital Magazine.
   Scoped under .tt-home / .tt-header so it never leaks into other pages. */

:root{
  --tt-bg:#ffffff;
  --tt-bg-soft:#f6f7f9;
  --tt-text:#14161a;
  --tt-text-muted:#5b6472;
  --tt-border:#e5e8ee;
  --tt-accent:#1d6fe0;
  --tt-accent-dark:#134f9e;
  --tt-accent-soft:#eaf2fe;
  --tt-radius:10px;
  --tt-maxw:1180px;
}

.tt-home,.tt-header{color:var(--tt-text)}
.tt-home *,.tt-header *{box-sizing:border-box}

.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}

/* ── Header ─────────────────────────────────────────────── */
.tt-header{background:var(--tt-bg);border-bottom:1px solid var(--tt-border)}
.tt-header-inner{max-width:var(--tt-maxw);margin:0 auto;padding:0 16px;min-height:68px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.tt-brand{display:flex;align-items:center;gap:10px;text-decoration:none;min-width:0}
.tt-brand .site-logo-img{max-height:38px;width:auto;display:block}
.tt-brand-name{color:var(--tt-text);font-size:20px;font-weight:800;white-space:nowrap}
.tt-brand-tagline{color:var(--tt-text-muted);font-size:12.5px;font-weight:700;padding-left:10px;border-left:1px solid var(--tt-border);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tt-header-search{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;flex:0 0 auto;border-radius:50%;color:var(--tt-text-muted);text-decoration:none}
.tt-header-search:hover{background:var(--tt-bg-soft);color:var(--tt-accent)}
.tt-header-search svg{width:20px;height:20px}
@media(max-width:480px){.tt-header-inner{min-height:60px;padding:0 14px}.tt-brand .site-logo-img{max-height:32px}.tt-brand-name{font-size:18px}.tt-brand-tagline{display:none}}

/* ── Layout shell ───────────────────────────────────────── */
.tt-home{background:var(--tt-bg);padding:24px 0 56px}
.tt-home section+section{margin-top:40px}
.tt-section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:16px}
.tt-section-title{margin:0;font-size:22px;font-weight:800;color:var(--tt-text);letter-spacing:-.01em}
.tt-section-title::before{content:'';display:inline-block;width:4px;height:18px;background:var(--tt-accent);border-radius:2px;margin-right:10px;vertical-align:-2px}

/* ── Category tag & meta ────────────────────────────────── */
.tt-tag{display:inline-block;color:var(--tt-accent);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;text-decoration:none}
.tt-meta{color:var(--tt-text-muted);font-size:13px}
.tt-dot{margin:0 6px;color:var(--tt-border)}

/* ── Thumbnails ─────────────────────────────────────────── */
.tt-thumb{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;background:var(--tt-bg-soft);border-radius:var(--tt-radius)}

/* ── Hero (Section 1) ───────────────────────────────────── */
.tt-hero{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:24px;align-items:start}
.tt-hero.tt-hero--solo{grid-template-columns:1fr}
.tt-hero-main{display:block;text-decoration:none;color:inherit}
.tt-hero-main .tt-thumb{aspect-ratio:16/9}
.tt-hero-main .tt-tag{margin-top:14px}
.tt-hero-main h3{margin:8px 0 8px;font-size:30px;line-height:1.22;font-weight:850;color:var(--tt-text)}
.tt-hero-main p{margin:0 0 8px;color:var(--tt-text-muted);font-size:15px;line-height:1.6}
.tt-hero-side{display:flex;flex-direction:column;gap:16px}
.tt-hero-side-item{display:grid;grid-template-columns:96px 1fr;gap:12px;text-decoration:none;color:inherit;padding-bottom:16px;border-bottom:1px solid var(--tt-border)}
.tt-hero-side-item:last-child{border-bottom:0;padding-bottom:0}
.tt-hero-side-item .tt-thumb{aspect-ratio:1/1;width:96px}
.tt-hero-side-item h3{margin:0 0 4px;font-size:14.5px;line-height:1.4;font-weight:700;color:var(--tt-text)}
@media(max-width:900px){.tt-hero{grid-template-columns:1fr}.tt-hero-main h3{font-size:25px}}

/* ── Card grid (Tin mới nhất / topic sections) ─────────────── */
.tt-feed-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:22px}
.tt-card{display:block;text-decoration:none;color:inherit;min-width:0}
.tt-card h3{margin:10px 0 6px;font-size:16px;line-height:1.35;font-weight:750;color:var(--tt-text)}
.tt-card p{margin:0 0 6px;font-size:13.5px;line-height:1.55;color:var(--tt-text-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tt-card .tt-tag{margin-top:2px}

/* ── Trending (Section 3) ──────────────────────────────────── */
.tt-trending{background:var(--tt-bg-soft);border:1px solid var(--tt-border);border-radius:var(--tt-radius);padding:20px}
.tt-trending .tt-section-head{margin-bottom:8px}
.tt-trending-list{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.tt-trending-item{display:grid;grid-template-columns:34px 1fr;gap:12px;align-items:start;padding:14px 0;border-bottom:1px solid var(--tt-border)}
.tt-trending-item:last-child{border-bottom:0}
.tt-trending-rank{font-size:22px;font-weight:850;color:var(--tt-accent-soft);-webkit-text-stroke:1.5px var(--tt-accent);line-height:1}
.tt-trending-link{display:block;text-decoration:none;color:inherit}
.tt-trending-link h3{margin:0 0 4px;font-size:15px;line-height:1.4;font-weight:700;color:var(--tt-text)}
@media(min-width:640px){.tt-trending-list{grid-template-columns:1fr 1fr;column-gap:28px}}

/* ── Topic sections (AI, Smartphone, PC, Internet, How-to) ─── */
.tt-topic-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}
.tt-topic-featured{display:block;text-decoration:none;color:inherit}
.tt-topic-featured .tt-thumb{aspect-ratio:16/10}
.tt-topic-featured h3{margin:10px 0 6px;font-size:19px;line-height:1.32;font-weight:800;color:var(--tt-text)}
.tt-topic-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px 18px}
.tt-topic-grid .tt-card h3{font-size:14.5px;margin:8px 0 4px}
.tt-topic-grid .tt-card p{display:none}
@media(max-width:760px){.tt-topic-layout{grid-template-columns:1fr}.tt-topic-grid{grid-template-columns:1fr 1fr}}
@media(max-width:460px){.tt-topic-grid{grid-template-columns:1fr}}

/* ── Alternate visual rhythm per section (avoid same look repeating) ── */
.tt-topic--tint{background:var(--tt-bg-soft);border-radius:var(--tt-radius);padding:22px}
.tt-topic--tint .tt-topic-grid .tt-card{background:var(--tt-bg);border:1px solid var(--tt-border);border-radius:var(--tt-radius);padding:10px}

@media(max-width:480px){
  .tt-home section+section{margin-top:32px}
  .tt-section-title{font-size:19px}
  .tt-feed-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:16px}
  .tt-topic-featured h3{font-size:17px}
}
