@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Oswald:wght@500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f4f4f5;
  --bg-elev: #ececed;
  --surface: #ffffff;
  --surface2: #f0f0f2;
  --surface3: #e8e8ea;
  --border: #e0e0e3;
  --border-light: #d0d0d4;
  --accent: #e63535;
  --accent-hover: #cc2222;
  --accent-dim: rgba(230, 53, 53, 0.08);
  --text: #111111;
  --text-muted: #666666;
  --text-dim: #aaaaaa;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Oswald', 'Inter', sans-serif;
  --shadow-accent: 0 8px 32px rgba(230, 53, 53, 0.18);
  --header-bg: rgba(255,255,255,0.88);
  --card-gradient: rgba(255,255,255,0.55);
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-elev: #0f0f0f;
  --surface: #141414;
  --surface2: #1e1e1e;
  --surface3: #252525;
  --border: #2a2a2a;
  --border-light: #333;
  --accent: #e63535;
  --accent-hover: #ff4444;
  --accent-dim: rgba(230, 53, 53, 0.1);
  --text: #f0f0f0;
  --text-muted: #888;
  --text-dim: #555;
  --shadow-accent: 0 8px 32px rgba(230, 53, 53, 0.15);
  --header-bg: rgba(20, 20, 20, 0.88);
  --card-gradient: rgba(20,20,20,0.6);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(230, 53, 53, 0.05), transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* ─── HEADER ──────────────────────────────────────────────────────────────── */
header {
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--accent);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  transition: background 0.3s;
}

.header-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.7rem; font-weight: 700; letter-spacing: 0.5px;
  color: var(--text);
  text-transform: uppercase;
}

.logo span { color: var(--accent); }

.logo-icon {
  width: 40px; height: 40px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(230, 53, 53, 0.35);
  flex-shrink: 0;
}

.logo-icon svg { width: 22px; height: 22px; fill: #fff; }

.header-right {
  display: flex; align-items: center; gap: 16px;
}

.header-tag {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-muted);
}

.live-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.theme-toggle {
  width: 40px; height: 40px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  color: var(--text-muted);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ─── TICKER ──────────────────────────────────────────────────────────────── */
.ticker {
  background: var(--accent);
  overflow: hidden; height: 36px;
  display: flex; align-items: center;
  position: relative;
}

.ticker-label {
  background: #b32020;
  padding: 0 18px; height: 100%;
  display: flex; align-items: center; gap: 8px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase; white-space: nowrap; color: #fff;
  flex-shrink: 0; z-index: 2;
  box-shadow: 4px 0 10px rgba(0,0,0,0.25);
}

.ticker-label svg { width: 10px; height: 10px; fill: #fff; opacity: 0.8; }

.ticker-track {
  display: flex; align-items: center;
  animation: scroll-ticker 60s linear infinite;
  white-space: nowrap;
  color: #fff;
}

.ticker-item {
  padding: 0 40px;
  font-size: 0.82rem; font-weight: 600;
}

.ticker-item::after { content: '●'; margin-left: 40px; opacity: .5; }

@keyframes scroll-ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── PAGE LAYOUT WITH SIDE BANNERS ──────────────────────────────────────── */
.page-with-sides {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 160px;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  align-items: start;
}

.side-banner {
  position: sticky;
  top: 92px;
  padding-top: 24px;
}

.side-banner-slot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 160 / 600;
  position: relative;
  transition: border-color 0.2s;
}

.side-banner-slot:hover { border-color: var(--accent); }

.side-banner-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.side-banner-img.is-active { opacity: 1; }

.side-banner-link {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.side-banner-label {
  position: absolute; top: 8px; left: 8px;
  font-size: 0.6rem; letter-spacing: 1.5px;
  text-transform: uppercase; font-weight: 700;
  color: rgba(255,255,255,0.75);
  background: rgba(0,0,0,0.45);
  padding: 2px 8px; border-radius: 4px;
  z-index: 2;
  backdrop-filter: blur(4px);
}

.side-banner-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; padding: 18px; text-align: center;
  background: linear-gradient(180deg, var(--surface2), var(--surface3));
  color: var(--text-dim);
  font-size: 0.72rem; letter-spacing: 1px;
  text-transform: uppercase; font-weight: 700;
}

.side-banner-empty svg { width: 28px; height: 28px; opacity: 0.6; }

@media (max-width: 1080px) {
  .page-with-sides { grid-template-columns: minmax(0, 1fr); padding: 0 16px; }
  .side-banner { display: none; }
}

/* ─── MAIN LAYOUT ─────────────────────────────────────────────────────────── */
main {
  padding: 40px 0 80px;
  min-width: 0;
}

.section-heading {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 32px;
}

.section-heading h2 {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--text);
}

.section-heading .accent-bar {
  width: 4px; height: 24px; background: var(--accent);
  border-radius: 2px;
}

.section-heading .line {
  flex: 1; height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

/* ─── NEWS GRID ───────────────────────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.news-grid .news-card:first-child {
  grid-column: span 2;
}

@media (max-width: 760px) {
  .news-grid .news-card:first-child { grid-column: span 1; }
  .news-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ─── NEWS CARD ───────────────────────────────────────────────────────────── */
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.25s, box-shadow 0.25s, background 0.3s;
  text-decoration: none;
  display: block;
  position: relative;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}

.card-image-wrap {
  position: relative;
  overflow: hidden;
}

.card-image {
  width: 100%; aspect-ratio: 16/9;
  object-fit: cover; display: block;
  background: var(--surface2);
  transition: transform 0.5s ease;
}

.news-card:hover .card-image { transform: scale(1.04); }

.news-grid .news-card:first-child .card-image {
  aspect-ratio: 21/9;
}

.card-image-placeholder {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--surface2) 0%, var(--border) 100%);
  display: flex; align-items: center; justify-content: center;
}

.card-image-placeholder svg {
  width: 48px; height: 48px;
  fill: var(--text-dim);
  opacity: 0.5;
}

.news-grid .news-card:first-child .card-image-placeholder svg {
  width: 64px; height: 64px;
}

.card-image-gradient {
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(to top, var(--card-gradient), transparent);
  pointer-events: none;
}

.card-gallery-badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.55);
  color: #fff; font-size: 0.72rem; font-weight: 700;
  padding: 4px 9px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 5px;
  backdrop-filter: blur(6px);
  z-index: 2;
}

.card-gallery-badge svg {
  width: 13px; height: 13px;
  stroke: #fff; fill: none;
  stroke-width: 2;
}

.card-body { padding: 20px 22px 22px; }

.card-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}

.card-tag {
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem; font-weight: 800;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 4px;
}

.card-time {
  font-size: 0.75rem; color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 5px;
}

.card-time svg { width: 13px; height: 13px; stroke: currentColor; fill: none; flex-shrink: 0; }

.card-title {
  font-size: 1.05rem; font-weight: 700; line-height: 1.4;
  color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.news-card:hover .card-title { color: var(--accent); }

.news-grid .news-card:first-child .card-title {
  font-size: 1.5rem; -webkit-line-clamp: 2;
  font-weight: 800;
}

.card-excerpt {
  margin-top: 10px;
  font-size: 0.88rem; color: var(--text-muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── LOADING / EMPTY ─────────────────────────────────────────────────────── */
.loading, .empty-state {
  text-align: center; padding: 80px 20px;
  color: var(--text-muted);
}

.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-icon { margin-bottom: 16px; display: flex; justify-content: center; }
.empty-icon svg { width: 48px; height: 48px; stroke: var(--text-dim); fill: none; }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.empty-state p { font-size: 0.9rem; }

/* ─── SINGLE NEWS PAGE ────────────────────────────────────────────────────── */
.article-wrap {
  max-width: 820px; margin: 0 auto;
  padding: 40px 0 80px;
  min-width: 0;
}

.back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-muted); text-decoration: none;
  font-size: 0.85rem; font-weight: 500;
  margin-bottom: 28px;
  transition: color 0.2s, background 0.2s;
  padding: 8px 14px; margin-left: -14px;
  border-radius: 6px;
}

.back-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }
.back-btn:hover { color: var(--accent); background: var(--surface); }

.article-tag {
  background: var(--accent);
  color: #fff; display: inline-block;
  font-size: 0.7rem; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 5px 12px; border-radius: 4px;
  margin-bottom: 18px;
}

.article-title {
  font-family: var(--font-display);
  font-size: 2.3rem; font-weight: 700;
  line-height: 1.15; margin-bottom: 18px;
  letter-spacing: 0;
}

.article-meta {
  display: flex; align-items: center; gap: 18px;
  color: var(--text-muted); font-size: 0.88rem;
  margin-bottom: 32px; padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.article-meta span { display: flex; align-items: center; gap: 6px; }
.article-meta svg { width: 15px; height: 15px; stroke: currentColor; fill: none; }

.article-image {
  width: 100%; border-radius: var(--radius);
  margin-bottom: 20px; display: block;
  background: var(--surface2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Article gallery */
.article-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 32px;
}

.gallery-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.2s;
  background: var(--surface2);
  padding: 0;
}

.gallery-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb:hover { transform: translateY(-2px); border-color: var(--accent); }
.gallery-thumb.is-active { border-color: var(--accent); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 999;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s;
}

.lightbox.is-open { display: flex; }

.lightbox img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

.lightbox-close {
  position: absolute; top: 20px; right: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff; font-size: 24px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.lightbox-close:hover { background: rgba(255,255,255,0.2); }

.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }
.lightbox-nav svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 2; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.article-body {
  font-size: 1.08rem; line-height: 1.85;
  color: var(--text-muted); white-space: pre-wrap;
}

.article-ig-link {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 36px; padding: 14px 22px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); text-decoration: none;
  color: var(--text-muted); font-size: 0.88rem; font-weight: 500;
  transition: all 0.2s;
}
.article-ig-link:hover {
  border-color: var(--accent); color: var(--text);
  background: var(--accent-dim);
}

/* ─── ADMIN PANEL ─────────────────────────────────────────────────────────── */
.admin-wrap {
  max-width: 920px; margin: 0 auto;
  padding: 40px 24px 80px;
}

.admin-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.admin-header h1 {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 700;
}

.admin-badge {
  background: var(--accent); color: #fff;
  font-size: 0.7rem; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 5px 12px; border-radius: 4px;
}

/* Tabs */
.tabs {
  display: flex; gap: 4px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.tab {
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font); font-size: 0.9rem; font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  margin-bottom: -1px;
  white-space: nowrap;
}

.tab:hover { color: var(--text); }

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 40px;
  max-width: 420px; margin: 80px auto 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.login-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700;
  margin-bottom: 6px;
}

.login-card p {
  color: var(--text-muted); font-size: 0.9rem;
  margin-bottom: 28px;
}

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block; font-size: 0.78rem;
  font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 0.95rem; font-family: var(--font);
  transition: border-color 0.2s, background 0.3s;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
  font-family: var(--font);
  line-height: 1.5;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--accent);
}

.form-group .hint {
  font-size: 0.75rem; color: var(--text-dim);
  margin-top: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 520px) {
  .form-row { grid-template-columns: 1fr; }
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 0.9rem; font-weight: 700;
  cursor: pointer; border: none; transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent); color: #fff;
  justify-content: center; font-size: 0.95rem;
}

.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary.full { width: 100%; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: var(--surface2); color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 18px; font-size: 0.85rem;
}
.btn-secondary:hover { border-color: var(--accent); }

.btn-danger {
  background: transparent; color: #e63535;
  border: 1px solid #e63535;
  padding: 8px 16px; font-size: 0.8rem;
}

.btn-danger:hover { background: rgba(230,53,53,0.1); }

.btn-logout {
  background: var(--surface2); color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 9px 18px; font-size: 0.82rem;
  margin-left: auto;
}

.btn-logout:hover { border-color: var(--accent); color: var(--text); }

.error-msg, .success-msg {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 0.88rem; margin-top: 14px;
  display: none;
}

.error-msg {
  background: rgba(230, 53, 53, 0.08);
  border: 1px solid rgba(230, 53, 53, 0.25);
  color: #c0392b;
}

.success-msg {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #16a34a;
}

[data-theme="dark"] .error-msg { color: #ff7a7a; }
[data-theme="dark"] .success-msg { color: #4ade80; }

/* Admin news list */
.admin-news-list { margin-top: 24px; }

.admin-news-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 10px;
  transition: all 0.2s;
}

.admin-news-item:hover { border-color: var(--border-light); }

.admin-news-thumb {
  width: 64px; height: 48px; border-radius: 6px;
  object-fit: cover; flex-shrink: 0;
  background: var(--surface2);
}

.admin-news-info { flex: 1; min-width: 0; }

.admin-news-title {
  font-size: 0.9rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.admin-news-time {
  font-size: 0.75rem; color: var(--text-muted); margin-top: 3px;
}

.admin-news-actions {
  display: flex; gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.admin-view-btn, .admin-edit-btn {
  color: var(--text-muted); font-size: .78rem;
  text-decoration: none;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.2s;
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
}

.admin-view-btn:hover, .admin-edit-btn:hover { border-color: var(--accent); color: var(--text); }

.admin-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px; text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.2rem; font-weight: 700; color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px; margin-top: 6px;
}

.add-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 4px;
}

.add-form-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 700;
  margin-bottom: 4px;
}

.add-form-card .subtitle {
  color: var(--text-muted); font-size: 0.88rem;
  margin-bottom: 22px;
}

/* Upload area */
.upload-area {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--surface2);
}

.upload-area:hover, .upload-area.dragover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.upload-area svg {
  width: 36px; height: 36px;
  stroke: var(--text-muted); fill: none;
  margin-bottom: 8px;
}

.upload-area strong { display: block; font-size: 0.95rem; margin-bottom: 3px; }
.upload-area span { font-size: 0.8rem; color: var(--text-muted); }

.upload-area input[type=file] { display: none; }

/* Image gallery manager */
.img-manager {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.img-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--surface2);
}

.img-tile.is-main {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.img-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.img-tile-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 6px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 4px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.img-tile-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 0.7rem; font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
  line-height: 1;
  transition: all 0.15s;
}

.img-tile-btn:hover { background: rgba(255,255,255,0.28); }
.img-tile-btn.is-main { background: var(--accent); border-color: var(--accent); }

.img-tile-main-flag {
  position: absolute; top: 6px; left: 6px;
  background: var(--accent); color: #fff;
  font-size: 0.6rem; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 3px 6px; border-radius: 4px;
}

/* ─── CONTACT SECTION ─────────────────────────────────────────────────────── */
.contact-bar {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 28px;
  margin-top: 48px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.contact-bar-text {
  display: flex; align-items: center; gap: 14px;
}

.contact-bar-icon {
  width: 44px; height: 44px;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.contact-bar-icon svg { width: 24px; height: 24px; }

.contact-bar h4 {
  font-size: 1rem; font-weight: 700;
  margin-bottom: 2px;
}

.contact-bar p {
  font-size: 0.85rem; color: var(--text-muted);
}

.btn-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #fff;
  padding: 11px 22px;
  font-weight: 700;
}

.btn-instagram:hover { transform: translateY(-1px); filter: brightness(1.1); }

/* ─── FOOTER ──────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  background: var(--surface);
  margin-top: 40px;
  transition: background 0.3s;
}

.footer-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}

.footer-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
}

.footer-brand .logo-icon {
  width: 30px; height: 30px;
  border-radius: 7px;
}

.footer-brand .logo-icon svg { width: 16px; height: 16px; }

.footer-brand span { color: var(--accent); }

.footer-copy {
  color: var(--text-dim); font-size: 0.82rem;
  text-align: center;
}

.footer-credit {
  display: block;
  color: var(--text-muted); font-size: 0.78rem;
  margin-top: 4px;
}

.footer-credit a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.footer-credit a:hover { opacity: 0.8; text-decoration: underline; }

.footer-socials {
  display: flex; gap: 10px;
}

.footer-socials a {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  color: var(--text-muted);
  transition: all 0.2s;
}

.footer-socials a svg { width: 18px; height: 18px; }

.footer-socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ─── ADMIN-ONLY: Instagram import card ───────────────────────────────────── */
.ig-import-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px 20px;
  margin-bottom: 24px;
}

.ig-import-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}

.ig-import-header h3 {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700;
}

.ig-badge {
  font-size: 0.65rem; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase; padding: 3px 8px; border-radius: 4px;
  background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
  color: #fff;
}

.ig-input-row {
  display: flex; gap: 10px; align-items: flex-start;
}

.ig-input-row input {
  flex: 1; padding: 11px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 0.9rem;
  font-family: var(--font);
  transition: border-color 0.2s;
}

.ig-input-row input:focus {
  outline: none; border-color: #dc2743;
}

.btn-ig-fetch {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 18px; border-radius: var(--radius-sm);
  background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
  color: #fff; font-family: var(--font);
  font-size: 0.88rem; font-weight: 700;
  cursor: pointer; border: none;
  transition: filter 0.2s, transform 0.15s;
  white-space: nowrap; flex-shrink: 0;
}

.btn-ig-fetch:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-ig-fetch:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-ig-fetch svg { width: 15px; height: 15px; stroke: #fff; fill: none; }

.ig-status {
  margin-top: 10px;
  font-size: 0.82rem; padding: 9px 12px;
  border-radius: 6px; display: none;
  align-items: center; gap: 8px;
}

.ig-status.ok {
  background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.25);
  color: #16a34a; display: flex;
}

.ig-status.err {
  background: rgba(230,53,53,0.08); border: 1px solid rgba(230,53,53,0.2);
  color: #c0392b; display: flex;
}

[data-theme="dark"] .ig-status.ok { color: #4ade80; }
[data-theme="dark"] .ig-status.err { color: #ff7a7a; }

.form-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0 14px;
  color: var(--text-dim); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 1.5px;
}

.form-divider::before, .form-divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}

/* ─── ADMIN ADS MANAGER ─────────────────────────────────────────────────── */
.ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.ad-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.ad-card:hover { border-color: var(--border-light); }

.ad-card.is-inactive { opacity: 0.55; }

.ad-card-img {
  width: 100%;
  aspect-ratio: 160 / 240;
  object-fit: cover;
  background: var(--surface2);
  display: block;
}

.ad-card-body {
  padding: 12px 14px;
}

.ad-card-name {
  font-size: 0.92rem; font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.ad-card-meta {
  font-size: 0.76rem; color: var(--text-muted);
  display: flex; gap: 10px; align-items: center;
  margin-bottom: 10px;
}

.ad-position-tag {
  font-size: 0.66rem; font-weight: 800;
  letter-spacing: 1.2px; text-transform: uppercase;
  padding: 3px 7px; border-radius: 4px;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.ad-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e; display: inline-block;
}

.ad-status-dot.off { background: var(--text-dim); }

.ad-card-actions { display: flex; gap: 6px; }

.ad-card-actions button {
  flex: 1;
  padding: 6px 8px;
  font-size: 0.75rem; font-weight: 600;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font);
}

.ad-card-actions button:hover { border-color: var(--accent); color: var(--accent); }
.ad-card-actions .btn-del:hover { border-color: #e63535; color: #e63535; }

/* Ad subcard grouping */
.ad-position-group {
  margin-bottom: 36px;
}

.ad-position-group h4 {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text);
  margin-bottom: 4px;
}

.ad-position-group p {
  color: var(--text-muted); font-size: 0.82rem;
  margin-bottom: 8px;
}

/* ─── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .header-tag { display: none; }
  .logo { font-size: 1.3rem; }
  .logo-icon { width: 34px; height: 34px; }
  .logo-icon svg { width: 18px; height: 18px; }
  .article-title { font-size: 1.6rem; }
  .login-card { padding: 28px 22px; margin-top: 40px; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: 14px; }
  .stat-number { font-size: 1.7rem; }
  .contact-bar { padding: 18px; text-align: center; flex-direction: column; }
  main { padding: 28px 0 60px; }
  .admin-news-item { flex-wrap: wrap; }
  .admin-wrap { padding: 28px 16px 60px; }
  .article-wrap { padding: 28px 0 60px; }
}
