/* ============================================================
   PulsePro — Dark Premium Blog
   Mobile-First | iOS-Safe | International
   ============================================================ */

/* ── Reset & Box Model ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0a0a12;
  --bg2:        #12121e;
  --bg3:        #1a1a28;
  --bg4:        #22223a;
  --text:       #f0f0f8;
  --text2:      #a0a0c0;
  --text3:      #60607a;
  --accent:     #e74c3c;
  --accent2:    #c0392b;
  --purple:     #8e44ad;
  --border:     #2a2a40;
  --shadow:     rgba(0,0,0,.6);
  --radius:     10px;
  --radius-lg:  16px;
  --font:       'Inter', system-ui, -apple-system, sans-serif;
  --transition: .2s ease;
  --max-w:      1200px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  direction: ltr;
}

body.rtl { direction: rtl; text-align: right; }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent2); }

/* ── Typography ─────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  color: var(--text);
  line-height: 1.3;
  font-weight: 700;
}
h1 { font-size: clamp(1.6rem,4vw,2.4rem); }
h2 { font-size: clamp(1.3rem,3vw,1.9rem); }
h3 { font-size: clamp(1.1rem,2.5vw,1.4rem); }
p  { color: var(--text2); margin-bottom: .9rem; }

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

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }

@media (min-width: 600px) {
  .grid-2 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3,1fr); }
  .grid-4 { grid-template-columns: repeat(4,1fr); }
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  background: rgba(10,10,18,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
  padding: .75rem 0;
}

.header-inner {
  display: flex; align-items: center; gap: 1rem;
  justify-content: space-between;
}

.logo { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.logo-text { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.logo-text span { color: var(--accent); }

/* Desktop Nav */
.main-nav { display: none; align-items: center; gap: .2rem; }
.main-nav a {
  color: var(--text2); font-size: .9rem; font-weight: 500;
  padding: .4rem .75rem; border-radius: 6px;
  transition: all var(--transition);
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active { color: var(--text); background: var(--bg3); }

.header-actions { display: flex; align-items: center; gap: .5rem; }

/* Search button */
.btn-search {
  background: none; border: none; cursor: pointer;
  color: var(--text2); padding: .4rem; border-radius: 6px;
  transition: color var(--transition);
  display: flex; align-items: center;
}
.btn-search:hover { color: var(--text); }

/* Lang picker */
.lang-picker { position: relative; }
.lang-btn {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text2);
  padding: .35rem .65rem; border-radius: 6px; cursor: pointer;
  font-size: .8rem; font-weight: 600; display: flex; align-items: center; gap: .3rem;
  transition: all var(--transition);
}
.lang-btn:hover { border-color: var(--accent); color: var(--text); }
.lang-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
  min-width: 220px; max-height: 360px; overflow-y: auto;
  box-shadow: 0 8px 32px var(--shadow); z-index: 300;
  padding: .5rem;
  display: none;
}
.lang-dropdown.open { display: block; }
.lang-search-input {
  width: 100%; background: var(--bg4); border: 1px solid var(--border);
  color: var(--text); padding: .4rem .6rem; border-radius: 6px;
  font-size: 1rem; /* 16px — prevent iOS zoom */ margin-bottom: .4rem;
}
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.lang-option {
  padding: .4rem .5rem; border-radius: 5px; cursor: pointer;
  font-size: .8rem; color: var(--text2); transition: all var(--transition);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block; background: none; border: none; text-align: left; width: 100%;
}
.lang-option:hover, .lang-option.active { background: var(--bg4); color: var(--text); }
.lang-option.active { color: var(--accent); font-weight: 600; }

/* Hamburger */
.hamburger {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: .4rem;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text2); border-radius: 2px; transition: all .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav */
.mobile-nav {
  display: none; flex-direction: column; gap: .25rem;
  padding: .75rem 0 1rem; border-top: 1px solid var(--border);
  background: var(--bg);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: var(--text2); padding: .55rem 1rem; border-radius: 6px;
  font-size: .95rem; transition: all var(--transition);
}
.mobile-nav a:hover, .mobile-nav a.active { color: var(--text); background: var(--bg3); }

@media (min-width: 768px) {
  .main-nav { display: flex; }
  .hamburger { display: none; }
  .mobile-nav { display: none !important; }
}

/* Search bar overlay */
.search-overlay {
  display: none; position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,.85); backdrop-filter: blur(4px);
  align-items: flex-start; justify-content: center; padding-top: 6rem;
}
.search-overlay.open { display: flex; }
.search-box {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem; width: 100%;
  max-width: 640px; margin: 0 1rem;
}
.search-form { display: flex; gap: .5rem; }
.search-input {
  flex: 1; background: var(--bg4); border: 1px solid var(--border);
  color: var(--text); padding: .75rem 1rem; border-radius: 8px;
  font-size: 1rem; outline: none;
  transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text3); }
.btn-close-search {
  background: var(--bg4); border: 1px solid var(--border);
  color: var(--text2); padding: .75rem; border-radius: 8px; cursor: pointer;
  transition: all var(--transition);
}
.btn-close-search:hover { color: var(--text); border-color: var(--accent); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem 1.2rem; border-radius: 8px; font-weight: 600;
  font-size: .9rem; cursor: pointer; transition: all var(--transition);
  border: none; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text2); }
.btn-outline:hover { border-color: var(--accent); color: var(--text); }
.btn-sm { padding: .4rem .85rem; font-size: .82rem; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px var(--shadow); border-color: var(--bg4); }

.card-img { aspect-ratio: 16/9; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-img img { transform: scale(1.05); }

.card-body { padding: 1rem 1.1rem 1.2rem; }
.card-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.card-cat {
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: rgba(231,76,60,.12); padding: .2rem .5rem; border-radius: 4px;
}
.card-date { font-size: .78rem; color: var(--text3); }
.card-title { font-size: 1rem; margin-bottom: .4rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }
.card-desc { font-size: .85rem; color: var(--text2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: .7rem; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.card-views { font-size: .78rem; color: var(--text3); }

/* Featured hero card */
.hero-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; position: relative;
}
.hero-img { aspect-ratio: 4/3; overflow: hidden; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 600px) { .hero-img { aspect-ratio: 16/7; } }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,18,.95) 0%, rgba(10,10,18,.5) 50%, transparent 100%);
}
.hero-body {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 1.5rem;
}
.hero-cat { display: inline-block; margin-bottom: .5rem; }
.hero-title { font-size: clamp(1.2rem,3vw,1.8rem); margin-bottom: .5rem; }
.hero-title a { color: var(--text); }
.hero-title a:hover { color: var(--accent); }
.hero-meta { display: flex; align-items: center; gap: .75rem; font-size: .82rem; color: var(--text2); }

/* ── Section labels ─────────────────────────────────────────── */
.section-label {
  display: flex; align-items: center; gap: .6rem; margin-bottom: 1.25rem;
}
.section-label h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .1em; }
.section-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.label-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; flex-shrink: 0; }

/* ── Page sections ──────────────────────────────────────────── */
.section { padding: 2.5rem 0; }
.section + .section { border-top: 1px solid var(--border); }

/* ── Article page ───────────────────────────────────────────── */
.article-wrap { display: grid; grid-template-columns: 1fr; gap: 2rem; padding: 2rem 0; }
@media (min-width: 900px) { .article-wrap { grid-template-columns: 1fr 320px; } }

.article-main {}
.article-header { margin-bottom: 1.5rem; }
.article-cat { display: inline-block; margin-bottom: .75rem; }
.article-title { margin-bottom: .75rem; }
.article-meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; color: var(--text2); font-size: .85rem; margin-bottom: 1.25rem; }
.article-meta-item { display: flex; align-items: center; gap: .3rem; }
.article-featured-img { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 1.75rem; aspect-ratio: 16/9; }
.article-featured-img img { width: 100%; height: 100%; object-fit: cover; }

.article-content {
  font-size: 1.05rem; line-height: 1.85;
  color: var(--text2);
}
.article-content h2 { color: var(--text); margin: 2rem 0 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.article-content h3 { color: var(--text); margin: 1.5rem 0 .75rem; }
.article-content p { margin-bottom: 1.1rem; }
.article-content ul, .article-content ol { padding-left: 1.5rem; margin-bottom: 1.1rem; }
.article-content li { margin-bottom: .4rem; color: var(--text2); }
.article-content blockquote {
  border-left: 3px solid var(--accent); padding: 1rem 1.25rem;
  background: var(--bg3); border-radius: 0 var(--radius) var(--radius) 0; margin: 1.25rem 0;
}
.article-content blockquote p { color: var(--text); font-style: italic; }
.article-content a { color: var(--accent); }
.article-content img { border-radius: var(--radius); margin: 1rem 0; max-width: 100%; height: auto; }
/* Inline image alignment classes (inserted by editor) */
.article-content .img-center { display: block; margin: 1.5rem auto; }
.article-content .img-left   { float: left; margin: .25rem 1.5rem 1rem 0; max-width: 45%; }
.article-content .img-right  { float: right; margin: .25rem 0 1rem 1.5rem; max-width: 45%; }
.article-content::after      { content: ''; display: table; clear: both; }
@media (max-width: 600px) {
  .article-content .img-left,
  .article-content .img-right { float: none; max-width: 100%; margin: 1rem 0; }
}

/* Like button */
.like-bar { display:flex; justify-content:center; padding:2rem 0; }
.like-card {
  display:flex; flex-direction:column; align-items:center; gap:.75rem;
  background:var(--bg3); border:1px solid var(--border);
  border-radius:16px; padding:1.75rem 3rem;
  text-align:center;
}
.like-card-title { font-size:.9rem; color:var(--text2); margin:0; font-weight:500; }
.like-btn {
  display:flex; flex-direction:column; align-items:center; gap:.4rem;
  background:none; border:none; cursor:pointer;
  transition:transform .15s; user-select:none; padding:.25rem;
}
.like-btn:hover { transform:scale(1.08); }
.like-btn:active { transform:scale(.95); }
.like-icon {
  width:56px; height:56px;
  fill:none; stroke:var(--text3); stroke-width:1.8;
  stroke-linecap:round; stroke-linejoin:round;
  transition:fill .25s, stroke .25s, transform .25s;
  filter:drop-shadow(0 0 0 rgba(231,76,60,0));
}
.like-btn:hover .like-icon { stroke:#e74c3c; fill:rgba(231,76,60,.15); }
.like-btn.liked .like-icon {
  fill:#e74c3c; stroke:#e74c3c;
  filter:drop-shadow(0 0 8px rgba(231,76,60,.5));
}
.like-count {
  font-size:1.1rem; font-weight:700; color:var(--text);
  transition:color .25s;
}
.like-btn.liked .like-count { color:#e74c3c; }
.like-label { font-size:.82rem; color:var(--text3); }
@keyframes like-burst {
  0%   { transform:scale(1); }
  30%  { transform:scale(1.45); }
  55%  { transform:scale(.85); }
  75%  { transform:scale(1.15); }
  100% { transform:scale(1); }
}
.like-btn.like-pop .like-icon { animation:like-burst .55s cubic-bezier(.36,.07,.19,.97); }

/* Share bar */
.share-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: 1.25rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 1.75rem 0; }
.share-label { font-weight: 600; font-size: .9rem; color: var(--text2); }
.share-btn {
  padding: .45rem .9rem; border-radius: 6px; font-size: .82rem; font-weight: 600;
  cursor: pointer; border: none; transition: all var(--transition); color: #fff;
}
.share-copy { background: var(--bg3); border: 1px solid var(--border); color: var(--text2); }
.share-copy:hover { border-color: var(--accent); color: var(--text); }
.share-fb  { background: #1877f2; }
.share-tw  { background: #1da1f2; }
.share-wa  { background: #25d366; }
.share-tg  { background: #0088cc; }
.share-rd  { background: #ff4500; }
.share-pin { background: #e60023; }

/* Sidebar */
.article-sidebar {}
.sidebar-widget { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1.25rem; }
.widget-title { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text2); margin-bottom: 1rem; }
.sidebar-card { display: flex; gap: .75rem; margin-bottom: .9rem; }
.sidebar-card:last-child { margin-bottom: 0; }
.sidebar-img { width: 72px; height: 56px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.sidebar-title { font-size: .85rem; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sidebar-title a { color: var(--text); }
.sidebar-title a:hover { color: var(--accent); }
.sidebar-meta { font-size: .75rem; color: var(--text3); margin-top: .2rem; }

/* Ad slot placeholder */
.ad-slot {
  background: var(--bg3); border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 1rem; text-align: center;
  color: var(--text3); font-size: .78rem; margin: 1rem 0;
  min-height: 90px; display: flex; align-items: center; justify-content: center;
}

/* ── Category page ──────────────────────────────────────────── */
.cat-hero { background: var(--bg2); padding: 2rem 0; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.cat-name { font-size: clamp(1.4rem,4vw,2rem); margin-bottom: .4rem; }
.cat-desc { color: var(--text2); max-width: 600px; }
.cat-count { font-size: .85rem; color: var(--text3); margin-top: .5rem; }

/* ── Search page ────────────────────────────────────────────── */
.search-hero { padding: 2rem 0; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.search-hero-form { display: flex; gap: .5rem; max-width: 600px; }
.search-hero-input {
  flex: 1; background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); padding: .75rem 1rem; border-radius: 8px; font-size: 1rem;
  outline: none; transition: border-color var(--transition);
}
.search-hero-input:focus { border-color: var(--accent); }
.search-hero-input::placeholder { color: var(--text3); }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; margin: 2rem 0; }
.page-btn {
  min-width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text2); font-size: .88rem; font-weight: 600; cursor: pointer; transition: all var(--transition);
  text-decoration: none;
}
.page-btn:hover, .page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem; margin-top: 3rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 600px) { .footer-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer-brand .logo-text { font-size: 1.25rem; margin-bottom: .6rem; }
.footer-tagline { color: var(--text3); font-size: .85rem; margin-top: .4rem; }
.footer-h { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text2); margin-bottom: .85rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: .45rem; }
.footer-links a { color: var(--text3); font-size: .88rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 1.25rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: gap;
  flex-wrap: wrap; gap: .75rem;
}
.footer-copy { color: var(--text3); font-size: .82rem; }
.footer-badge {
  background: var(--accent); color: #fff; font-weight: 800; font-size: .8rem;
  padding: .2rem .55rem; border-radius: 5px; letter-spacing: .05em;
}

/* ── Cookie notice ──────────────────────────────────────────── */
.cookie-notice {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 500;
  background: var(--bg3); border-top: 1px solid var(--border);
  padding: .9rem 1rem; display: none;
}
.cookie-notice.show { display: block; }
.cookie-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.cookie-text { flex: 1; font-size: .85rem; color: var(--text2); }
.cookie-btns { display: flex; gap: .5rem; flex-shrink: 0; }

/* ── Age gate ───────────────────────────────────────────────── */
@keyframes ageFadeIn  { from { opacity:0 } to { opacity:1 } }
@keyframes ageFadeOut { from { opacity:1 } to { opacity:0 } }
@keyframes ageSlideUp { from { transform:translateY(28px);opacity:0 } to { transform:translateY(0);opacity:1 } }
@keyframes agePulse {
  0%   { box-shadow:0 0 0 0   rgba(220,38,38,.45); }
  70%  { box-shadow:0 0 0 18px rgba(220,38,38,0); }
  100% { box-shadow:0 0 0 0   rgba(220,38,38,0); }
}
.age-gate {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  animation: ageFadeIn .3s ease;
}
.age-gate.hiding { animation: ageFadeOut .3s ease forwards; }
.age-gate-box {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 1.25rem;
  padding: 2.75rem 2rem 2rem; max-width: 440px; width: 100%; text-align: center;
  box-shadow: 0 32px 80px rgba(0,0,0,.65); animation: ageSlideUp .35s ease;
}
.age-gate-badge {
  width: 82px; height: 82px; background: var(--accent); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 1.25rem;
  font-size: 2rem; font-weight: 900; color: #fff; animation: agePulse 2.2s infinite;
}
.age-gate-logo { font-size: 1.1rem; font-weight: 800; color: var(--text1); margin-bottom: .5rem; }
.age-gate-logo span { color: var(--accent); }
.age-gate-title { font-size: 1.3rem; font-weight: 700; margin-bottom: .85rem; }
.age-gate-text  { color: var(--text2); margin-bottom: 2rem; font-size: .95rem; line-height: 1.65; }
.age-gate-btns  { display: flex; flex-direction: column; gap: .75rem; }
@media (min-width: 400px) { .age-gate-btns { flex-direction: row; justify-content: center; } }
.btn-age-yes {
  background: var(--accent); color: #fff; border: none;
  padding: .75rem 1.75rem; border-radius: var(--radius);
  font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn-age-yes:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-age-no {
  background: transparent; color: var(--text3); border: 1px solid var(--border);
  padding: .75rem 1.75rem; border-radius: var(--radius);
  font-size: .95rem; cursor: pointer; transition: background .15s, color .15s;
}
.btn-age-no:hover { background: var(--bg4); color: var(--text2); }
.age-gate-legal { font-size: .73rem; color: var(--text4); margin-top: 1.75rem; }

/* ── Landing image (index only) ────────────────────────────── */
.landing-image-wrap {
  min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center;
  background: #000; overflow: hidden;
}
.landing-image {
  width: 100%; height: 100%; object-fit: cover;
  max-height: calc(100vh - 64px); display: block;
}

/* ── Admin panel ────────────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px; background: var(--bg2); border-right: 1px solid var(--border);
  flex-shrink: 0; display: flex; flex-direction: column;
}
.admin-logo { padding: 1.25rem; border-bottom: 1px solid var(--border); font-weight: 800; font-size: 1.1rem; }
.admin-logo span { color: var(--accent); }
.admin-menu { list-style: none; padding: .75rem 0; flex: 1; }
.admin-menu li a {
  display: flex; align-items: center; gap: .65rem; padding: .65rem 1.25rem;
  color: var(--text2); font-size: .9rem; transition: all var(--transition);
}
.admin-menu li a:hover, .admin-menu li a.active { color: var(--text); background: var(--bg3); border-left: 3px solid var(--accent); padding-left: calc(1.25rem - 3px); }
.admin-main { flex: 1; padding: 1.5rem; overflow-x: auto; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.admin-title { font-size: 1.3rem; }

.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th, .admin-table td { padding: .7rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--text2); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; background: var(--bg3); }
.admin-table td { color: var(--text); }
.admin-table tr:hover td { background: var(--bg3); }

.form-group { margin-bottom: 1.1rem; }
.form-label { display: block; font-size: .85rem; font-weight: 600; color: var(--text2); margin-bottom: .4rem; }
.form-control {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); padding: .65rem .85rem; border-radius: 8px;
  font-size: 1rem; /* 16px minimum — prevents iOS Safari from zooming on focus */
  outline: none; transition: border-color var(--transition);
}
.form-control:focus { border-color: var(--accent); }
.form-control::placeholder { color: var(--text3); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { cursor: pointer; }

.badge { display: inline-block; padding: .2rem .55rem; border-radius: 4px; font-size: .75rem; font-weight: 700; }
.badge-success { background: rgba(39,174,96,.15); color: #2ecc71; }
.badge-warning { background: rgba(241,196,15,.15); color: #f1c40f; }
.badge-danger  { background: rgba(231,76,60,.15);  color: var(--accent); }

.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: 1rem;
}
.login-box {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem 1.75rem; max-width: 380px; width: 100%;
}

/* ── Stat cards (admin dashboard) ───────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media (min-width: 768px) { .stat-grid { grid-template-columns: repeat(4,1fr); } }
.stat-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: .78rem; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; margin-top: .2rem; }

/* ── Misc utils ─────────────────────────────────────────────── */
.text-accent { color: var(--accent); }
.text-muted  { color: var(--text3); }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.alert { padding: .75rem 1rem; border-radius: 8px; font-size: .9rem; margin-bottom: 1rem; }
.alert-success { background: rgba(39,174,96,.12); color: #2ecc71; border: 1px solid rgba(39,174,96,.3); }
.alert-error   { background: rgba(231,76,60,.12);  color: var(--accent); border: 1px solid rgba(231,76,60,.3); }
.alert-info    { background: rgba(52,152,219,.12); color: #3498db; border: 1px solid rgba(52,152,219,.3); }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text3); }
.empty-state h3 { color: var(--text2); margin-bottom: .5rem; }

/* ── Loading skeleton ───────────────────────────────────────── */
@keyframes shimmer { 0%{background-position:-400px 0} 100%{background-position:400px 0} }
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
  background-size: 800px 100%; animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/* ── Scroll to top ──────────────────────────────────────────── */
.scroll-top {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 300;
  width: 42px; height: 42px; background: var(--accent); border: none;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
  box-shadow: 0 4px 16px rgba(231,76,60,.4);
}
.scroll-top.show { opacity: 1; pointer-events: all; }

/* ── iPhone / iOS safe area ─────────────────────────────────── */
@supports (padding: max(0px)) {
  .site-header { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
  .cookie-notice { padding-bottom: max(.9rem, env(safe-area-inset-bottom)); }
}

/* ── Responsive tweaks ──────────────────────────────────────── */
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .hero-body { padding: 1rem; }
  .article-content { font-size: .97rem; }
  .share-bar { gap: .4rem; }
  .share-btn { padding: .38rem .7rem; font-size: .78rem; }
}

/* ── Admin responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  /* Admin sidebar collapses on small screens */
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; flex-direction: row; align-items: center; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--border); }
  .admin-logo { padding: .75rem 1rem; }
  .admin-menu { display: flex; flex-wrap: wrap; gap: 0; padding: .25rem; }
  .admin-menu li a { padding: .4rem .65rem; font-size: .8rem; }
  .admin-main { padding: 1rem; }
  /* Edit article 2-col → 1-col */
  .admin-main form > div[style*="grid-template-columns:1fr 300px"] {
    display: block !important;
  }
  .admin-main form > div > div:last-child { margin-top: 1rem; }
}

/* ── Container always centered ───────────────────────────────── */
.container { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }

/* ── Touch targets minimum 44px ─────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
  .btn, .page-btn, .tb-btn, .align-btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }
}

/* ═══════════════════════════════════════════════════════════════
   Admin v2 — Shared Nav + Dashboard
   ═══════════════════════════════════════════════════════════════ */

/* Body class for admin pages */
.admin-body { background: var(--bg); }

/* Override sidebar to support new inner structure */
.admin-sidebar {
  width: 220px; min-width: 220px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  flex-shrink: 0; position: sticky; top: 0;
  height: 100vh; overflow-y: auto;
}

/* Logo row — logo link + hamburger */
.adm-logo-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1rem .75rem; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.adm-logo {
  display: flex; align-items: center; gap: .4rem;
  font-size: 1rem; font-weight: 800; color: var(--text);
  text-decoration: none; line-height: 1.2;
}
.adm-logo b { color: var(--accent); font-size: 1.15rem; }
.adm-logo:hover { color: var(--accent); }
.adm-tag {
  font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(231,76,60,.15); color: var(--accent);
  border: 1px solid rgba(231,76,60,.25); border-radius: 4px;
  padding: .1rem .35rem; flex-shrink: 0;
}

/* Nav links */
.adm-nav { display: flex; flex-direction: column; padding: .5rem 0; flex: 1; }
.adm-nav a {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem 1rem; font-size: .875rem; color: var(--text2);
  transition: all var(--transition); text-decoration: none;
  border-left: 3px solid transparent;
}
.adm-nav a:hover { color: var(--text); background: var(--bg3); border-left-color: var(--border); }
.adm-nav a.active { color: var(--text); background: var(--bg3); border-left-color: var(--accent); }
.adm-nav a span { font-size: 1rem; flex-shrink: 0; }

.adm-sep { height: 1px; background: var(--border); margin: .4rem .75rem; }
.adm-logout { color: rgba(231,76,60,.8) !important; }
.adm-logout:hover { color: var(--accent) !important; background: rgba(231,76,60,.08) !important; }

/* ── Dashboard stat cards ───────────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem; margin-bottom: 1.25rem;
}
@media (min-width: 600px) { .dash-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .dash-grid { grid-template-columns: repeat(4, 1fr); } }

.dash-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .9rem 1rem;
  transition: border-color var(--transition);
}
.dash-card:hover { border-color: var(--bg4); }
.dash-val {
  font-size: 1.65rem; font-weight: 800; line-height: 1;
  margin-bottom: .25rem; color: var(--text);
}
.dash-val.green { color: #27ae60; }
.dash-val.blue  { color: #3498db; }
.dash-val.red   { color: #e74c3c; }
.dash-lbl { font-size: .72rem; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; }
.dash-trend { font-size: .72rem; margin-top: .25rem; font-weight: 600; }
.dash-trend.up   { color: #27ae60; }
.dash-trend.down { color: #e74c3c; }

/* ── Period tabs ─────────────────────────────────────────────── */
.adm-tabs {
  display: flex; gap: .4rem; flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.adm-tab {
  padding: .35rem .8rem; border-radius: 6px; font-size: .8rem;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); text-decoration: none;
  transition: all var(--transition);
}
.adm-tab:hover, .adm-tab.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

/* ── Content boxes ───────────────────────────────────────────── */
.adm-box {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.adm-box-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem 1rem; border-bottom: 1px solid var(--border);
  font-size: .82rem; font-weight: 700; color: var(--text2);
}
.adm-box-body { overflow-x: auto; }

/* ── Two column grid ─────────────────────────────────────────── */
.dash-two-col {
  display: grid; grid-template-columns: 1fr;
  gap: 1rem; margin-bottom: 1.25rem;
}
@media (min-width: 800px) { .dash-two-col { grid-template-columns: 1fr 1fr; } }

/* ── Admin tables ────────────────────────────────────────────── */
.adm-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.adm-table th {
  padding: .5rem .75rem; text-align: left;
  font-size: .72rem; color: var(--text3);
  text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.adm-table td {
  padding: .5rem .75rem; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tr:hover td { background: rgba(255,255,255,.025); }
.adm-table-scroll { min-width: 480px; }

/* Mini bar in table */
.adm-bar-wrap {
  display: block; height: 3px; background: var(--bg4);
  border-radius: 2px; margin-top: .25rem; max-width: 100px;
}
.adm-bar { height: 3px; background: var(--accent); border-radius: 2px; display: block; }
.adm-cname { font-size: .82rem; }
.adm-pct { font-size: .72rem; color: var(--text3); }
.adm-empty { text-align: center; color: var(--text3); font-size: .82rem; padding: 1.5rem; }

/* Status badges in table */
.adm-badge-bot {
  background: rgba(231,76,60,.12); color: #e74c3c;
  border: 1px solid rgba(231,76,60,.25);
  font-size: .68rem; padding: .15rem .4rem; border-radius: 4px;
}
.adm-badge-real {
  background: rgba(39,174,96,.12); color: #27ae60;
  border: 1px solid rgba(39,174,96,.25);
  font-size: .68rem; padding: .15rem .4rem; border-radius: 4px;
}
.adm-btn-danger {
  background: rgba(231,76,60,.15); color: #e74c3c;
  border: 1px solid rgba(231,76,60,.3);
}
.adm-btn-danger:hover { background: rgba(231,76,60,.3); }

/* Column colour helpers */
.col-red    { color: #e74c3c; font-weight: 600; }
.col-orange { color: #e67e22; font-weight: 600; }
.col-green  { color: #27ae60; font-weight: 600; }

/* Info badge */
.badge-info { background: rgba(52,152,219,.15); color: #3498db; border: 1px solid rgba(52,152,219,.25); }

/* Admin header action row */
.admin-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* ── Admin v2 responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .admin-sidebar {
    width: 100%; min-width: 0; height: auto;
    position: static; flex-direction: column;
    border-right: none; border-bottom: 1px solid var(--border);
  }
  .adm-nav {
    flex-direction: row; flex-wrap: wrap;
    padding: .25rem .5rem .5rem;
    gap: .2rem;
  }
  .adm-nav a {
    padding: .45rem .7rem; font-size: .8rem;
    border-left: none; border-radius: 6px;
    border: 1px solid transparent;
  }
  .adm-nav a:hover { border-color: var(--border); }
  .adm-nav a.active {
    border-left: none; border-color: var(--accent);
    background: var(--bg3);
  }
  .adm-sep { display: none; }
  .dash-val { font-size: 1.35rem; }
}

@media (min-width: 901px) {
  .admin-main { min-height: 100vh; }
}
