/* ============================================================
   TEKNOSAKU - Public Frontend CSS
   Modern News Portal — 2026 Design
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Playfair+Display:wght@700;900&display=swap');

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  --bg:         #08090d;
  --bg-card:    #0f1018;
  --bg-glass:   rgba(15,16,24,.75);
  --bg-input:   #13141e;
  --border:     rgba(255,255,255,.07);
  --border-h:   rgba(255,255,255,.14);

  --text:       #eef0f8;
  --text-muted: #7b839a;
  --text-dim:   #3c4152;

  --accent:     #6366f1;
  --accent-2:   #06b6d4;
  --accent-3:   #f472b6;
  --gold:       #f59e0b;

  --grad-brand: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --grad-hero:  linear-gradient(180deg, #08090d 0%, rgba(8,9,13,0) 100%);
  --grad-card:  linear-gradient(180deg, transparent 50%, rgba(8,9,13,.97) 100%);

  --radius:     .875rem;
  --radius-sm:  .5rem;
  --radius-xs:  .25rem;

  --shadow:     0 4px 24px rgba(0,0,0,.55);
  --shadow-lg:  0 16px 64px rgba(0,0,0,.7);

  --topbar-h:   64px;
  --max-w:      1240px;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
body {
  font-family:'Inter', system-ui, sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
a { color:inherit; text-decoration:none; }
img, video { max-width:100%; display:block; }
ul { list-style:none; }

/* ── Container ───────────────────────────────────────────── */
.container { width:100%; max-width:var(--max-w); margin:0 auto; padding:0 1.25rem; }

/* ── Header / Navbar ─────────────────────────────────────── */
.site-header {
  position:sticky; top:0; z-index:200;
  height:var(--topbar-h);
  background:rgba(8,9,13,.85);
  backdrop-filter:blur(20px);
  border-bottom:1px solid var(--border);
}
.header-inner {
  display:flex; align-items:center; justify-content:space-between;
  height:100%;
}
.site-logo {
  font-size:1.5rem; font-weight:900; letter-spacing:-.03em;
  background:var(--grad-brand); -webkit-background-clip:text; -webkit-text-fill-color:transparent;
}
.site-logo span { -webkit-text-fill-color:var(--accent-2); }

.main-nav { display:flex; align-items:center; gap:.25rem; }
.nav-item {
  padding:.4rem .75rem; border-radius:var(--radius-sm);
  font-size:.875rem; font-weight:500; color:var(--text-muted);
  transition:color .15s, background .15s;
}
.nav-item:hover, .nav-item.active { color:var(--text); background:rgba(255,255,255,.06); }
.nav-item.active { color:var(--accent); }

.header-right { display:flex; align-items:center; gap:.75rem; }
.search-btn {
  background:none; border:1px solid var(--border); border-radius:var(--radius-sm);
  color:var(--text-muted); padding:.4rem .65rem; cursor:pointer; font-size:.875rem;
  transition:all .15s;
}
.search-btn:hover { border-color:var(--border-h); color:var(--text); }

/* ── Breaking ticker ─────────────────────────────────────── */
.breaking-bar {
  background:rgba(99,102,241,.12);
  border-bottom:1px solid rgba(99,102,241,.2);
  padding:.4rem 0; overflow:hidden; display:flex; align-items:center;
}
.breaking-label {
  background:var(--accent); color:#fff; font-size:.7rem; font-weight:700;
  letter-spacing:.08em; padding:.2rem .6rem; border-radius:var(--radius-xs);
  white-space:nowrap; margin-right:1rem; flex-shrink:0;
}
.ticker-wrap { flex:1; overflow:hidden; }
.ticker {
  display:flex; gap:3rem; white-space:nowrap;
  animation:ticker 30s linear infinite;
}
.ticker a { font-size:.8rem; color:var(--text-muted); transition:color .15s; }
.ticker a:hover { color:var(--text); }
@keyframes ticker { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* ── Hero Section ────────────────────────────────────────── */
.hero { padding:2rem 0 3rem; }
.hero-grid {
  display:grid;
  grid-template-columns:1.6fr 1fr;
  gap:1.5rem;
}

/* Hero Main Card */
.hero-main {
  position:relative; border-radius:var(--radius); overflow:hidden;
  min-height:480px; display:flex; flex-direction:column; justify-content:flex-end;
  cursor:pointer; transition:transform .3s ease;
  background:var(--bg-card);
}
.hero-main:hover { transform:scale(1.01); }
.hero-main img {
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  transition:transform .5s ease; transform:scale(1);
}
.hero-main:hover img { transform:scale(1.04); }
.hero-main-overlay {
  position:relative; z-index:2;
  background:linear-gradient(to top, rgba(8,9,13,.98) 0%, rgba(8,9,13,.6) 55%, transparent 100%);
  padding:2rem 1.75rem 1.75rem;
}
.hero-main-cat { margin-bottom:.75rem; }

/* Hero Sub Cards */
.hero-side { display:flex; flex-direction:column; gap:1rem; }
.hero-sub {
  position:relative; border-radius:var(--radius); overflow:hidden;
  height:calc((480px - 1rem)/2); display:flex; flex-direction:column; justify-content:flex-end;
  cursor:pointer; background:var(--bg-card); transition:transform .25s ease;
}
.hero-sub:hover { transform:translateY(-2px); }
.hero-sub img {
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  transition:transform .5s ease;
}
.hero-sub:hover img { transform:scale(1.05); }
.hero-sub-overlay {
  position:relative; z-index:2;
  background:var(--grad-card);
  padding:1.25rem;
}

/* ── Typography helpers ──────────────────────────────────── */
.headline-xl { font-family:'Playfair Display', serif; font-size:1.9rem; font-weight:900; line-height:1.15; }
.headline-lg { font-family:'Playfair Display', serif; font-size:1.35rem; font-weight:700; line-height:1.25; }
.headline-md { font-size:1.05rem; font-weight:600; line-height:1.35; }
.headline-sm { font-size:.9rem; font-weight:600; line-height:1.4; }
.meta { display:flex; align-items:center; gap:.5rem; font-size:.75rem; color:var(--text-muted); }
.meta-dot { width:3px; height:3px; border-radius:50%; background:var(--text-dim); }

/* ── Category Badge ──────────────────────────────────────── */
.cat-badge {
  display:inline-flex; align-items:center;
  padding:.2rem .65rem; border-radius:999px;
  font-size:.7rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  background:var(--accent); color:#fff;
  transition:opacity .15s;
}
.cat-badge:hover { opacity:.85; }

/* ── Section heading ─────────────────────────────────────── */
.section-head {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:1.25rem; padding-bottom:.75rem;
  border-bottom:1px solid var(--border);
}
.section-title {
  font-size:1.1rem; font-weight:800; letter-spacing:-.02em;
  display:flex; align-items:center; gap:.5rem;
}
.section-title::before {
  content:''; display:inline-block; width:3px; height:1.1em;
  background:var(--grad-brand); border-radius:2px;
}
.view-all {
  font-size:.8rem; color:var(--accent); font-weight:500;
  padding:.3rem .6rem; border:1px solid rgba(99,102,241,.3);
  border-radius:var(--radius-sm); transition:all .15s;
}
.view-all:hover { background:rgba(99,102,241,.12); }

/* ── Article Cards ───────────────────────────────────────── */
.articles-grid {
  display:grid; gap:1.25rem;
  grid-template-columns:repeat(auto-fill, minmax(280px,1fr));
}
.article-card {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); overflow:hidden;
  transition:transform .25s, box-shadow .25s, border-color .25s;
  cursor:pointer;
}
.article-card:hover {
  transform:translateY(-3px);
  box-shadow:var(--shadow-lg);
  border-color:var(--border-h);
}
.article-card-img {
  height:180px; overflow:hidden; background:var(--bg-input);
  position:relative;
}
.article-card-img img { width:100%; height:100%; object-fit:cover; transition:transform .5s ease; }
.article-card:hover .article-card-img img { transform:scale(1.06); }
.article-card-body { padding:1rem 1.1rem 1.25rem; }
.article-card-title {
  font-size:.95rem; font-weight:600; line-height:1.4;
  margin:.5rem 0; color:var(--text);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.article-card-excerpt {
  font-size:.82rem; color:var(--text-muted); line-height:1.55;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  margin-bottom:.75rem;
}

/* ── List Articles (horizontal) ─────────────────────────── */
.article-list { display:flex; flex-direction:column; gap:.85rem; }
.article-list-item {
  display:flex; gap:1rem; align-items:flex-start;
  padding:.85rem; border-radius:var(--radius-sm);
  border:1px solid var(--border); background:var(--bg-card);
  transition:all .2s;
}
.article-list-item:hover { border-color:var(--border-h); background:var(--bg-glass); }
.list-thumb {
  width:88px; height:66px; border-radius:var(--radius-xs);
  object-fit:cover; flex-shrink:0; background:var(--bg-input);
}
.list-thumb-placeholder {
  width:88px; height:66px; border-radius:var(--radius-xs);
  background:var(--bg-input); flex-shrink:0; display:flex;
  align-items:center; justify-content:center; font-size:1.5rem;
}

/* ── Featured Badge ──────────────────────────────────────── */
.featured-badge {
  position:absolute; top:.65rem; left:.65rem; z-index:3;
  background:var(--gold); color:#000; padding:.2rem .5rem;
  border-radius:var(--radius-xs); font-size:.65rem; font-weight:800; letter-spacing:.06em;
}

/* ── Sidebar Widgets ─────────────────────────────────────── */
.sidebar-widget {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); padding:1.25rem; margin-bottom:1.25rem;
}
.widget-title { font-size:.85rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-muted); margin-bottom:1rem; padding-bottom:.5rem; border-bottom:1px solid var(--border); }

/* ── Single Article ──────────────────────────────────────── */
.article-hero-img {
  width:100%; max-height:520px; object-fit:cover;
  border-radius:var(--radius); margin-bottom:1.5rem;
}
.article-content {
  font-size:1.05rem; line-height:1.85; color:#cdd0e0;
}
.article-content h2 { font-family:'Playfair Display',serif; font-size:1.4rem; font-weight:700;
  color:var(--text); margin:2rem 0 .75rem; }
.article-content h3 { font-size:1.1rem; font-weight:600; color:var(--text); margin:1.5rem 0 .5rem; }
.article-content p  { margin-bottom:1.1rem; }
.article-content a  { color:var(--accent); border-bottom:1px solid rgba(99,102,241,.35);
  transition:border-color .15s; }
.article-content a:hover { border-color:var(--accent); }
.article-content blockquote {
  border-left:3px solid var(--accent); margin:1.5rem 0; padding:.75rem 1.25rem;
  background:rgba(99,102,241,.07); border-radius:0 var(--radius-sm) var(--radius-sm) 0;
  color:var(--text-muted); font-style:italic;
}
.article-content img { border-radius:var(--radius-sm); margin:1rem 0; }
.article-content code { background:var(--bg-input); padding:.1rem .4rem; border-radius:4px;
  font-size:.88em; color:var(--accent-2); }
.article-content pre { background:var(--bg-input); padding:1rem 1.25rem; border-radius:var(--radius-sm);
  overflow-x:auto; margin:1rem 0; }

/* ── Tags ────────────────────────────────────────────────── */
.tag { display:inline-block; padding:.25rem .6rem; border-radius:var(--radius-xs);
  background:var(--bg-input); border:1px solid var(--border); font-size:.75rem;
  color:var(--text-muted); transition:all .15s; }
.tag:hover { border-color:var(--accent); color:var(--accent); }

/* ── Pagination ──────────────────────────────────────────── */
.pub-pagination { display:flex; justify-content:center; gap:.5rem; padding:2rem 0; }
.pub-page-link {
  padding:.5rem .9rem; border-radius:var(--radius-sm);
  border:1px solid var(--border); color:var(--text-muted); background:var(--bg-card);
  font-size:.875rem; transition:all .15s;
}
.pub-page-link:hover { border-color:var(--accent); color:var(--accent); }
.pub-page-link.active { background:var(--accent); border-color:var(--accent); color:#fff; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  margin-top:4rem; border-top:1px solid var(--border);
  background:var(--bg-card); padding:3rem 0 1.5rem;
}
.footer-grid { display:grid; grid-template-columns:1.5fr 1fr 1fr 1fr; gap:2rem; margin-bottom:2.5rem; }
.footer-brand .logo { font-size:1.4rem; font-weight:900; background:var(--grad-brand);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; margin-bottom:.75rem; }
.footer-brand p { font-size:.85rem; color:var(--text-muted); line-height:1.7; }
.footer-col h4 { font-size:.8rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  color:var(--text-muted); margin-bottom:.75rem; }
.footer-col ul li { margin-bottom:.45rem; }
.footer-col ul li a { font-size:.85rem; color:var(--text-muted); transition:color .15s; }
.footer-col ul li a:hover { color:var(--text); }
.footer-bottom {
  border-top:1px solid var(--border); padding-top:1.25rem;
  display:flex; align-items:center; justify-content:space-between;
  font-size:.8rem; color:var(--text-dim);
}

/* ── Search Overlay ──────────────────────────────────────── */
.search-overlay {
  position:fixed; inset:0; z-index:1000;
  background:rgba(8,9,13,.92); backdrop-filter:blur(16px);
  display:flex; align-items:flex-start; justify-content:center;
  padding-top:15vh; opacity:0; pointer-events:none;
  transition:opacity .2s ease;
}
.search-overlay.open { opacity:1; pointer-events:all; }
.search-box {
  width:100%; max-width:620px; padding:0 1.25rem;
}
.search-input-wrap { position:relative; }
.search-input-wrap input {
  width:100%; padding:1rem 1.25rem 1rem 3.25rem;
  background:var(--bg-card); border:2px solid var(--accent);
  border-radius:var(--radius); color:var(--text); font-size:1.15rem;
  outline:none; font-family:inherit;
}
.search-input-wrap .search-ico {
  position:absolute; left:1rem; top:50%; transform:translateY(-50%);
  font-size:1.1rem; color:var(--text-muted);
}
.search-hint { margin-top:.75rem; font-size:.8rem; color:var(--text-dim); text-align:center; }

/* ── Skeleton Loader ─────────────────────────────────────── */
@keyframes shimmer { 0%{background-position:-500px 0} 100%{background-position:500px 0} }
.skeleton {
  background:linear-gradient(90deg, var(--bg-input) 25%, var(--bg-card) 50%, var(--bg-input) 75%);
  background-size:1000px 100%;
  animation:shimmer 1.5s infinite;
  border-radius:var(--radius-xs);
}

/* ── Scroll to top button ────────────────────────────────── */
.scroll-top {
  position:fixed; bottom:1.5rem; right:1.5rem; z-index:100;
  background:var(--accent); color:#fff; border:none; border-radius:50%;
  width:42px; height:42px; cursor:pointer; font-size:1.1rem;
  box-shadow:var(--shadow); transition:all .25s; opacity:0; transform:translateY(10px);
  display:flex; align-items:center; justify-content:center;
}
.scroll-top.show { opacity:1; transform:translateY(0); }
.scroll-top:hover { background:var(--accent-2); transform:translateY(-2px); }

/* ── Progress bar ────────────────────────────────────────── */
#read-progress {
  position:fixed; top:0; left:0; z-index:9999;
  height:3px; width:0; background:var(--grad-brand);
  transition:width .1s linear;
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width:1024px) {
  .footer-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:768px) {
  .hero-grid { grid-template-columns:1fr; }
  .hero-main { min-height:320px; }
  .hero-sub { height:200px; }
  .articles-grid { grid-template-columns:1fr 1fr; }
  .footer-grid { grid-template-columns:1fr; gap:1.5rem; }
  .main-nav { display:none; }
  .headline-xl { font-size:1.4rem; }
}
@media (max-width:480px) {
  .articles-grid { grid-template-columns:1fr; }
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
.fade-up { animation:fadeUp .5s ease forwards; opacity:0; }
.delay-1 { animation-delay:.1s; }
.delay-2 { animation-delay:.2s; }
.delay-3 { animation-delay:.3s; }

/* Scrollbar */
::-webkit-scrollbar { width:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border-h); border-radius:4px; }
