/* TC News România — demo static (HTML/CSS/JS) */

:root{
  --bg: #f7f7f8;           /* gray-50-ish */
  --card: #ffffff;
  --text: #101114;
  --muted: #6b7280;        /* gray-500 */
  --border: #e5e7eb;       /* gray-200 */
  --accent: #f5b800;       /* yellow */
  --accent2: #ffd54a;
  --shadow: 0 10px 30px rgba(0,0,0,.08);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --container: 1440px;
  --px: 80px;
}


/* Dark theme (activat din butonul de temă) */
[data-theme="dark"]{
  --bg: #0b0f14;
  --card: #101826;
  --text: #eef2f7;
  --muted: #9aa4b2;
  --border: rgba(255,255,255,.10);
  --shadow: 0 14px 40px rgba(0,0,0,.55);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.5;
}

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: none; }

img{ max-width: 100%; display: block; }
button, input, select, textarea{ font: inherit; }

h1,h2,h3,h4{ margin:0; }
h1{ font-size: 40px; line-height: 1.1; }
h2{ font-size: 24px; line-height: 1.2; }
h3{ font-size: 18px; }
h4{ font-size: 16px; }

.small{ font-size: 13px; }
.muted{ color: var(--muted); }
.sr-only{
  position:absolute!important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

.skip-link{
  position:absolute; left: 12px; top: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 999px;
  transform: translateY(-200%);
  z-index: 999;
}
.skip-link:focus{ transform: translateY(0); }

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--px);
}

.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-row{
  display:flex;
  align-items:center;
  gap: 18px;
  padding: 14px 0;
}
.header-subrow{
  padding: 10px 0 14px 0;
}
.quick-search{
  display:none;
  gap: 10px;
  align-items:center;
}
.quick-search input{
  width: min(560px, 100%);
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #bdbdbd;
  background: rgba(204,202,202,0.09);
  outline: none;
}
.quick-search input:focus{ border-color: var(--accent); }

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 220px;
}
.brand-badge{
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--accent);
  display:grid; place-items:center;
  font-weight: 800;
  letter-spacing: .02em;
}
.brand-text{
  display:flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-text strong{ font-weight: 800; }
.brand-text .muted{ font-size: 12px; }

.nav{ flex: 1; min-width: 0; }
.nav-toggle{
  display:none;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 12px;
  width: 44px; height: 44px;
}
.nav-links{
  display:flex;
  align-items:center;
  gap: 10px;
  list-style: none;
  padding:0; margin:0;
  flex-wrap: wrap;
}
.nav-links a{
  font-family: "PT Serif", serif;
  color: #111827;
  padding: 10px 14px;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease, border .15s ease;
  border: 1px solid transparent;
}
.nav-links a:hover{
  border-color: rgba(245,184,0,.4);
  background: rgba(245,184,0,.08);
}
.nav-links a.active{
  background: var(--accent);
  border-color: var(--accent);
}

.header-actions{
  display:flex;
  align-items:center;
  gap: 10px;
}
.icon{
  width: 20px; height: 20px;
}
.icon-btn{
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  display:grid; place-items:center;
  cursor:pointer;
  transition: background .15s ease, transform .05s ease;
}
.icon-btn:hover{ background: #f3f4f6; }
.icon-btn:active{ transform: translateY(1px); }

.btn{
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  cursor:pointer;
  transition: background .15s ease, border .15s ease, transform .05s ease;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
  font-weight: 800;
  font-family: "PT Serif", serif;
}
.btn-primary:hover{ background: var(--accent2); }
.btn-outline{
  background: var(--card);
  border-color: var(--accent);
  color: #111;
  font-family: "PT Serif", serif;
  font-weight: 700;
}
.btn-outline:hover{ background: rgba(245,184,0,.08); }

.app{ min-height: 70vh; padding: 40px 0; }
.section{ margin-bottom: 60px; }

/* Layout helpers */
.grid{ display:grid; gap: 24px; }
.row{ display:flex; gap: 16px; align-items:center; }
.between{ justify-content: space-between; }
.center{ justify-content:center; }
.wrap{ flex-wrap: wrap; }
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.shadow-hover{
  transition: box-shadow .2s ease, transform .05s ease;
}
.shadow-hover:hover{
  box-shadow: var(--shadow);
}
.p16{ padding: 16px; }
.p24{ padding: 24px; }
.p40{ padding: 40px; }

/* Badges */
.badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: "PT Serif", serif;
  font-weight: 700;
  color: #111;
  background: rgba(245,184,0,.25);
}
.badge.small{ padding: 4px 10px; font-size: 13px; }

/* Article cards */
.article-card{ overflow: hidden; }
.article-card .thumb{
  height: 170px;
  background: #d9d9d9;
  position: relative;
}
.article-card .thumb img{
  width:100%; height:100%;
  object-fit: cover;
}
.article-card .body{
  padding: 16px;
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.article-card h3, .article-card h4{
  font-family: "PT Serif", serif;
}
.article-card .excerpt{
  font-family: "PT Serif", serif;
  color: var(--muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.meta{
  display:flex;
  align-items:center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-family: "PT Serif", serif;
}
.meta .dot{ opacity:.6; }

/* Featured article (hero) */
.featured{
  position: relative;
  border-radius: var(--radius-lg);
  overflow:hidden;
  min-height: 500px;
  cursor: pointer;
}
.featured .thumb{
  position:absolute; inset:0;
  height: 100%;
}
.featured .thumb img{ width:100%; height:100%; object-fit: cover; }
.featured .overlay{
  position:absolute; inset:0;
  background: linear-gradient(to top, rgba(0,0,0,.9), rgba(0,0,0,.4), rgba(0,0,0,0));
}
.featured .content{
  position:absolute; left:0; right:0; bottom:0;
  padding: 40px;
  color: white;
  display:flex;
  flex-direction: column;
  gap: 12px;
}
.featured h1{
  font-family: "PT Serif", serif;
  font-size: 40px;
}
.featured .content p{
  margin:0;
  font-family: "PT Serif", serif;
  opacity: .92;
}

/* Horizontal article row (trending) */
.article-row{
  display:flex;
  gap: 14px;
  align-items:flex-start;
}
.article-row .mini{
  width: 90px; height: 70px;
  border-radius: 12px;
  overflow:hidden;
  background: #d9d9d9;
  flex: 0 0 auto;
}
.article-row .mini img{ width:100%; height:100%; object-fit: cover; }
.article-row .title{
  font-family: "PT Serif", serif;
  font-weight: 700;
  margin: 0 0 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}
.article-row .sub{
  font-family: "PT Serif", serif;
  color: var(--muted);
  font-size: 13px;
}
.rank-bubble{
  width: 40px; height: 40px;
  border-radius: 999px;
  background: var(--accent);
  display:grid; place-items:center;
  font-weight: 800;
  flex: 0 0 auto;
}

/* Sections */
.section-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-head h2{ font-family: "PT Serif", serif; }

/* Grids like in Figma */
.hero-grid{
  grid-template-columns: 640px 1fr;
  gap: 40px;
}
.grid-6{ grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-4{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-article{
  grid-template-columns: 1fr 350px;
  gap: 60px;
}

/* Search CTA */
.search-cta{
  text-align:center;
  padding: 60px 0;
}
.search-cta h2{ margin-bottom: 32px; font-family: "PT Serif", serif; }
.search-cta .searchbar{
  display:flex;
  gap: 16px;
  justify-content:center;
  flex-wrap: wrap;
}
.search-cta input{
  width: 399px;
  height: 45px;
  padding: 0 50px 0 24px;
  border-radius: 999px;
  border: 1px solid #bdbdbd;
  background: rgba(204,202,202,0.09);
  outline: none;
}
.search-cta input:focus{ border-color: var(--accent); }
.search-cta .search-wrap{ position: relative; }
.search-cta .search-icon{
  position:absolute; right: 16px; top: 50%;
  transform: translateY(-50%);
  opacity:.7;
}

/* Breadcrumb */
.breadcrumb{
  display:flex;
  align-items:center;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  font-family: "PT Serif", serif;
}
.breadcrumb a{ color: var(--muted); }
.breadcrumb a:hover{ color: var(--accent); }
.breadcrumb .sep{ opacity:.45; }
.breadcrumb .current{
  color: #9ca3af;
  max-width: 420px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Article page */
.article-title{
  font-family: "PT Serif", serif;
  font-size: 40px;
  margin: 0 0 18px 0;
}
.article-meta{
  display:flex;
  align-items:center;
  gap: 18px;
  color: var(--muted);
  font-family: "PT Serif", serif;
  padding-bottom: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.article-actions{ margin-left:auto; display:flex; gap: 10px; }
.round-btn{
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor:pointer;
  display:grid; place-items:center;
}
.round-btn.active{ background: var(--accent); border-color: var(--accent); }
.share-menu{
  position:absolute;
  right:0; top: calc(100% + 8px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 8px;
  min-width: 200px;
}
.share-item{
  width:100%;
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border:0;
  background: transparent;
  cursor:pointer;
}
.share-item:hover{ background: #f3f4f6; }

.hero-image{
  height: 500px;
  border-radius: var(--radius-lg);
  overflow:hidden;
  margin: 0 0 40px 0;
  background: #d9d9d9;
}
.hero-image img{ width:100%; height:100%; object-fit: cover; }

.author-box{
  display:flex;
  align-items:center;
  gap: 16px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 40px;
}
.author-avatar{
  width: 60px; height: 60px;
  border-radius: 999px;
  background: var(--accent);
  display:grid; place-items:center;
  font-weight: 800;
}
.tags{ display:flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 40px; }
.tag{
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  font-family: "PT Serif", serif;
  color: #374151;
  cursor: pointer;
}
.tag:hover{ border-color: var(--accent); }

.prose{
  font-family: "PT Serif", serif;
  font-size: 18px;
  color: #111827;
}
.prose p{ margin: 0 0 16px 0; }
.prose h2{
  font-size: 22px;
  margin: 28px 0 12px;
  font-family: "PT Serif", serif;
}
.prose ul{ margin: 0 0 16px 22px; }
.prose li{ margin: 6px 0; }
.prose blockquote{
  margin: 20px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--accent);
  background: rgba(245,184,0,.08);
  border-radius: 12px;
  color: #111;
}

/* Sidebar */
.sticky{ position: sticky; top: 100px; }
.related a:hover h4{ color: var(--accent); }
.related h4{
  font-family: "PT Serif", serif;
  margin: 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}

/* Editor */
.editor-grid{
  grid-template-columns: 1fr 350px;
  gap: 40px;
}
.field{ margin-bottom: 18px; }
.label{
  display:block;
  margin-bottom: 10px;
  font-family: "PT Serif", serif;
  font-weight: 700;
}
input[type="text"], input[type="url"], textarea, select{
  width: 100%;
  border-radius: 16px;
  border: 2px solid var(--border);
  padding: 14px 16px;
  outline: none;
  background: var(--card);
}
textarea{ resize: vertical; min-height: 160px; }
input:focus, textarea:focus, select:focus{ border-color: var(--accent); }

.toolbar{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: var(--card);
  border: 2px solid var(--border);
  border-bottom: 0;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}
.tool{
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  cursor:pointer;
}
.tool:hover{ background: #f3f4f6; }

.editor-textarea{
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  min-height: 260px;
}
.dropzone{
  height: 300px;
  border: 2px dashed #d1d5db;
  border-radius: 16px;
  background: var(--card);
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: 16px;
  cursor: pointer;
}
.dropzone:hover{ border-color: var(--accent); }
.cover-preview{
  height: 300px;
  border-radius: 16px;
  overflow:hidden;
  position: relative;
  background: #d9d9d9;
}
.cover-preview img{ width:100%; height:100%; object-fit: cover; }
.cover-remove{
  position:absolute; top: 12px; right: 12px;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,.55);
  color: white;
  cursor:pointer;
}

.chips{ display:flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 0 0; }
.chip{
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor:pointer;
  font-family: "PT Serif", serif;
}
.chip.active{ border-color: var(--accent); background: rgba(245,184,0,.12); }

/* Footer */
.site-footer{
  border-top: 1px solid var(--border);
  background: white;
  padding: 40px 0 18px;
}
.footer-grid{
  display:grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 24px;
  align-items:start;
}
.footer-brand{ display:flex; gap: 12px; align-items:center; margin-bottom: 12px; }
.footer-title{ display:block; margin-bottom: 10px; }
.footer-links{ list-style:none; padding:0; margin:0; }
.footer-links li{ margin: 8px 0; }
.footer-links a{ color: #374151; font-family: "PT Serif", serif; }
.footer-links a:hover{ color: var(--accent); }
.footer-bottom{
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
}

/* Modal */
.modal{ position: fixed; inset: 0; z-index: 100; }
.modal-backdrop{ position:absolute; inset:0; background: rgba(0,0,0,.5); }
.modal-card{
  position: relative;
  width: min(560px, calc(100% - 32px));
  margin: 8vh auto 0;
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.modal-head{
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 16px 16px 0;
}
.modal-body{ padding: 16px; }
.modal-actions{
  display:flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 16px 16px;
}

/* Toast */
.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 200;
}
.toast-card{
  background: #111827;
  color: white;
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 1100px){
  :root{ --px: 24px; }
  .hero-grid{ grid-template-columns: 1fr; }
  .grid-6{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-article{ grid-template-columns: 1fr; }
  .editor-grid{ grid-template-columns: 1fr; }
  .sticky{ position: static; }
  .brand{ min-width: auto; }
}

@media (max-width: 720px){
  h1{ font-size: 30px; }
  .nav-toggle{ display: grid; place-items: center; }
  .nav-links{
    display:none;
    position:absolute;
    left: var(--px);
    right: var(--px);
    top: 64px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 10px;
    box-shadow: var(--shadow);
  }
  .nav-links.open{ display:flex; }
  .nav-links a{ width: 100%; }
  .header-subrow{ display:none; }
  .quick-search{ display:none; }
  .featured .content{ padding: 20px; }
  .featured h1{ font-size: 28px; }
  .search-cta input{ width: min(399px, 100%); }
  .footer-grid{ grid-template-columns: 1fr; }
}

/* Views chip (sus dreapta pe imagine) */
.view-chip{
  position:absolute;
  top: 12px; right: 12px;
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  background: rgba(255,255,255,.88);
  color: #111827;
  border: 1px solid rgba(17,24,39,.12);
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none; /* click-ul rămâne pe card */
}
.view-chip .icon{ width: 16px; height: 16px; }

[data-theme="dark"] .view-chip{
  background: rgba(16,24,38,.65);
  color: #f1f5f9;
  border-color: rgba(255,255,255,.12);
  box-shadow: 0 12px 28px rgba(0,0,0,.55);
}

.featured .view-chip{ top: 18px; right: 18px; }
.mini{ position: relative; } /* ca chip-ul să stea pe poză */

/* Ultimele știri / Cele mai citite (tabs) */
.hot-tabs{
  display:inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
}
.hot-tab{
  border: 0;
  background: transparent;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.hot-tab:hover{ transform: translateY(-1px); }
.hot-tab.active{
  background: var(--accent);
  color: #111827;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
[data-theme="dark"] .hot-tab.active{
  color: #0b0f14;
}

/* Listă hot (auto-hover) */
.hot-list{
  margin-top: 14px;
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.hot-item .article-row{
  padding: 10px;
  border-radius: var(--radius);
  transition: background .2s ease, transform .25s ease, box-shadow .25s ease;
}
.hot-item:hover .article-row{
  background: rgba(17,24,39,.04);
  box-shadow: 0 12px 26px rgba(0,0,0,.06);
}
[data-theme="dark"] .hot-item:hover .article-row{
  background: rgba(255,255,255,.06);
  box-shadow: 0 14px 30px rgba(0,0,0,.45);
}
.hot-item.active .article-row{
  background: rgba(245,184,0,.10);
  transform: translateY(2px);
  box-shadow: 0 14px 30px rgba(0,0,0,.08);
}


/* Editor: image preview */
.img-preview{
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(17,24,39,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.6);
}
.img-preview img{
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.img-preview-actions{
  margin-top: 10px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}


/* View chip icon size (fix big eye) */
.view-chip svg{width:16px;height:16px;display:block;}

.card-media{position:relative;}

/* Comments */
.comments { margin-top: 28px; }
.comment-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: 0; }
.comment-head { display:flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 6px; font-family: "PT Serif", serif; }
.comment-body { font-family: "PT Serif", serif; color: color-mix(in srgb, var(--text) 92%, transparent); }

/* Newsletter */
.newsletterBox input[type="text"]{
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 60%, #bdbdbd);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  outline: none;
}
.newsletterBox input[type="text"]:focus{ border-color: var(--accent); }

/* Newsletter modal polish */
#newsletterModal .modal-card { border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
#newsletterModal input[type="email"]{
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 60%, #bdbdbd);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  outline: none;
}
#newsletterModal input[type="email"]:focus{ border-color: var(--accent); }
