/* ============================================
   REVERSE AGING - Main Stylesheet
   Modern, scientific, anti-aging theme
   ============================================ */

/* === CSS Variables === */
:root {
  --primary: #0a6e5c;
  --primary-light: #12a88a;
  --primary-dark: #064d40;
  --secondary: #1a237e;
  --secondary-light: #3949ab;
  --accent: #00bcd4;
  --accent-glow: rgba(0, 188, 212, 0.3);

  --bg-dark: #0a1628;
  --bg-card: #111d35;
  --bg-card-hover: #162442;
  --bg-light: #f5f7fa;
  --bg-white: #ffffff;

  --text-primary: #e0e6ed;
  --text-secondary: #8899a6;
  --text-dark: #1a1a2e;
  --text-on-dark: #ffffff;

  --gradient-primary: linear-gradient(135deg, #0a6e5c 0%, #00bcd4 100%);
  --gradient-hero: linear-gradient(135deg, #0a1628 0%, #1a237e 50%, #0a6e5c 100%);
  --gradient-card: linear-gradient(180deg, rgba(18,168,138,0.05) 0%, rgba(0,188,212,0.02) 100%);
  --gradient-accent: linear-gradient(135deg, #00bcd4 0%, #12a88a 100%);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.2);
  --shadow-glow: 0 0 20px rgba(0,188,212,0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;

  --font-he: 'Heebo', sans-serif;
  --font-en: 'Inter', sans-serif;

  --nav-height: 70px;
  --top-bar-height: 36px;
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-he);
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
}

body.ltr {
  font-family: var(--font-en);
  direction: ltr;
}

body.rtl {
  direction: rtl;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s;
}

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

/* === Top Bar === */
.top-bar {
  background: var(--bg-dark);
  color: var(--text-primary);
  height: var(--top-bar-height);
  font-size: 0.8rem;
  position: relative;
  z-index: 100;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dna-icon {
  font-size: 1rem;
  animation: dna-spin 3s ease-in-out infinite;
}

@keyframes dna-spin {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(180deg); }
}

.tagline {
  opacity: 0.8;
  font-size: 0.75rem;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Language Selector */
.lang-selector {
  position: relative;
}

.lang-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-primary);
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-family: inherit;
  transition: all 0.3s;
}

.lang-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--accent);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 8px 0;
  min-width: 160px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
}

.rtl .lang-dropdown {
  left: auto;
  right: 0;
}

.lang-dropdown.open {
  display: block;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  color: var(--text-primary);
  font-size: 0.8rem;
  transition: background 0.2s;
}

.lang-option:hover {
  background: rgba(255,255,255,0.1);
  color: var(--accent);
}

/* === Main Navigation === */
.main-nav {
  background: var(--bg-white);
  height: var(--nav-height);
  position: sticky;
  top: 0;
  z-index: 99;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s;
}

.main-nav.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  height: 45px;
  width: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-main {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: 2px;
}

.logo-accent {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 4px;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-link {
  padding: 8px 16px;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: all 0.3s;
  position: relative;
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(10,110,92,0.05);
}

.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

/* Nav Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown .dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 8px 0;
  min-width: 180px;
  z-index: 100;
}

.ltr .nav-dropdown .dropdown-content {
  right: auto;
  left: 0;
}

.nav-dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-content a {
  display: block;
  padding: 8px 20px;
  color: var(--text-dark);
  font-size: 0.85rem;
  transition: all 0.2s;
}

.dropdown-content a:hover {
  background: rgba(10,110,92,0.05);
  color: var(--primary);
}

.nav-search-btn {
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s;
  display: flex;
  align-items: center;
}

.nav-search-btn:hover {
  background: rgba(10,110,92,0.1);
  color: var(--primary);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  transition: all 0.3s;
  border-radius: 2px;
}

/* === Hero Section === */
.hero {
  background: var(--gradient-hero);
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(0,188,212,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.5;
}

.hero::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,188,212,0.1) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  animation: float-glow 6s ease-in-out infinite;
}

@keyframes float-glow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 20px); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,188,212,0.15);
  border: 1px solid rgba(0,188,212,0.3);
  padding: 6px 16px;
  border-radius: 50px;
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 24px;
  animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
  0%, 100% { border-color: rgba(0,188,212,0.3); }
  50% { border-color: rgba(0,188,212,0.6); }
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-on-dark);
  margin-bottom: 20px;
  line-height: 1.3;
}

.hero h1 .highlight {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 35px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-xl);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient-accent);
  color: white;
  box-shadow: 0 4px 15px rgba(0,188,212,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0,188,212,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-on-dark);
  border: 2px solid rgba(255,255,255,0.3);
}

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

.btn-secondary {
  background: var(--primary);
  color: white;
}

.btn-secondary:hover {
  background: var(--primary-light);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

/* === Section Styles === */
.section {
  padding: 70px 0;
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-primary);
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.section-dark .section-title h2 {
  color: var(--text-on-dark);
}

.section-title .subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.section-title .accent-line {
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gradient-accent);
  margin: 15px auto 0;
  border-radius: 2px;
}

/* === Article Cards === */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.article-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.article-card .card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.article-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.article-card:hover .card-image img {
  transform: scale(1.05);
}

.article-card .card-category {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--gradient-accent);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.ltr .article-card .card-category {
  right: auto;
  left: 12px;
}

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

.article-card .card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card .card-excerpt {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 15px;
}

.article-card .card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid rgba(0,0,0,0.05);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.article-card .read-more {
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.3s;
}

.article-card:hover .read-more {
  gap: 10px;
  color: var(--accent);
}

/* === Featured Article === */
.featured-article {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 50px;
}

.featured-article .featured-image {
  height: 100%;
  min-height: 350px;
}

.featured-article .featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-article .featured-content {
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-article .featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(10,110,92,0.1);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 15px;
  width: fit-content;
}

.featured-article h2 {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 15px;
}

.featured-article p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

/* === Categories Section === */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.category-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 30px;
  text-align: center;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
}

.category-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.category-card .cat-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.category-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.category-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* === Forum Styles === */
.forum-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.forum-cat-card {
  display: flex;
  align-items: center;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 20px 25px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
  gap: 20px;
}

.forum-cat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(5px);
}

.rtl .forum-cat-card:hover {
  transform: translateX(-5px);
}

.forum-cat-icon {
  font-size: 2rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,110,92,0.08);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.forum-cat-info {
  flex: 1;
}

.forum-cat-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.forum-cat-info p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.forum-cat-stats {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.forum-cat-stats span {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.forum-cat-stats .stat-num {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

/* Topic list */
.topic-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.topic-row {
  display: flex;
  align-items: center;
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  padding: 15px 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
  gap: 15px;
}

.topic-row:hover {
  box-shadow: var(--shadow-md);
}

.topic-row.pinned {
  border-right: 3px solid var(--accent);
}

.ltr .topic-row.pinned {
  border-right: none;
  border-left: 3px solid var(--accent);
}

.topic-title {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
}

.topic-stats {
  display: flex;
  gap: 15px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* === Search === */
.search-section {
  padding: 50px 0;
}

.search-box {
  max-width: 600px;
  margin: 0 auto 40px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 15px 25px;
  padding-left: 50px;
  border: 2px solid rgba(10,110,92,0.2);
  border-radius: var(--radius-xl);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s;
}

.rtl .search-input {
  padding-left: 25px;
  padding-right: 50px;
}

.search-input:focus {
  border-color: var(--primary);
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.rtl .search-icon {
  left: auto;
  right: 20px;
}

/* === Article Detail === */
.article-detail {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.article-detail .article-header {
  margin-bottom: 30px;
}

.article-detail .article-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 15px;
}

.article-detail .article-meta {
  display: flex;
  gap: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.article-detail .article-featured-img {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
}

.article-detail .article-content {
  font-size: 1.05rem;
  line-height: 1.9;
}

.article-detail .article-content h2 {
  font-size: 1.5rem;
  margin: 30px 0 15px;
  color: var(--primary-dark);
}

.article-detail .article-content h3 {
  font-size: 1.2rem;
  margin: 25px 0 10px;
}

.article-detail .article-content p {
  margin-bottom: 15px;
}

.article-detail .article-content ul,
.article-detail .article-content ol {
  margin: 15px 0;
  padding-right: 30px;
}

.ltr .article-detail .article-content ul,
.ltr .article-detail .article-content ol {
  padding-right: 0;
  padding-left: 30px;
}

.article-detail .article-content li {
  margin-bottom: 8px;
}

.article-detail .article-content blockquote {
  border-right: 4px solid var(--accent);
  padding: 15px 20px;
  margin: 20px 0;
  background: rgba(0,188,212,0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}

.ltr .article-detail .article-content blockquote {
  border-right: none;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.article-detail .source-info {
  margin-top: 30px;
  padding: 20px;
  background: rgba(10,110,92,0.05);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

/* Related articles */
.related-articles {
  margin-top: 50px;
  padding-top: 40px;
  border-top: 2px solid rgba(0,0,0,0.05);
}

/* === Admin Styles === */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 260px;
  background: var(--bg-dark);
  color: var(--text-primary);
  padding: 20px 0;
  flex-shrink: 0;
}

.admin-sidebar .admin-logo {
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 15px;
}

.admin-sidebar .admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: var(--text-secondary);
  transition: all 0.3s;
  font-size: 0.9rem;
}

.admin-sidebar .admin-nav a:hover,
.admin-sidebar .admin-nav a.active {
  background: rgba(255,255,255,0.08);
  color: var(--accent);
}

.admin-main {
  flex: 1;
  padding: 30px;
  background: var(--bg-light);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.admin-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 25px;
  box-shadow: var(--shadow-sm);
}

.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-card .stat-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 5px;
}

/* Data table */
.data-table {
  width: 100%;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: rgba(10,110,92,0.05);
  padding: 12px 15px;
  text-align: right;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-dark);
}

.ltr .data-table th {
  text-align: left;
}

.data-table td {
  padding: 12px 15px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 0.9rem;
}

.data-table tr:hover {
  background: rgba(10,110,92,0.02);
}

/* Form styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 10px 15px;
  border: 2px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s;
}

.form-control:focus {
  border-color: var(--primary);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

select.form-control {
  appearance: none;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2"><polyline points="6 9 12 15 18 9"/></svg>');
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 16px;
}

.rtl select.form-control {
  background-position: right 12px center;
}

/* Status badges */
.badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-published { background: rgba(76,175,80,0.15); color: #388e3c; }
.badge-draft { background: rgba(255,152,0,0.15); color: #e65100; }
.badge-archived { background: rgba(158,158,158,0.15); color: #616161; }

/* === Footer === */
.site-footer {
  background: var(--bg-dark);
  color: var(--text-primary);
  padding-top: 0;
  position: relative;
}

.footer-wave {
  color: var(--bg-dark);
  margin-bottom: -2px;
}

.footer-wave svg {
  display: block;
  width: 100%;
  height: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 50px 0;
}

.footer-logo {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.footer-logo .logo-main {
  font-size: 1.3rem;
  color: var(--text-on-dark);
}

.footer-logo .logo-accent {
  font-size: 1rem;
}

.footer-description {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

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

.social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all 0.3s;
}

.social-link:hover {
  background: var(--accent);
  color: white;
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-on-dark);
  margin-bottom: 15px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-contact-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 10px;
}

.footer-email {
  color: var(--accent);
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* === Pagination === */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination a, .pagination span {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: all 0.3s;
}

.pagination a {
  background: var(--bg-white);
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
}

.pagination a:hover {
  background: var(--primary);
  color: white;
}

.pagination .active {
  background: var(--gradient-accent);
  color: white;
}

/* === Error Page === */
.error-page {
  text-align: center;
  padding: 100px 0;
}

.error-page .error-code {
  font-size: 6rem;
  font-weight: 900;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === Loading animation === */
.loading-spinner {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid rgba(0,188,212,0.2);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* === Login Form === */
.login-container {
  max-width: 400px;
  margin: 80px auto;
  padding: 40px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.login-container h1 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.5rem;
}

.login-container .error-msg {
  background: rgba(244,67,54,0.1);
  color: #d32f2f;
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

/* === Responsive === */
@media (max-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-article {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-md);
  }

  .nav-links.open {
    display: flex;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .forum-cat-card {
    flex-wrap: wrap;
  }

  .admin-sidebar {
    width: 200px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tagline {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 50px 0 70px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
  }
}

/* === Animations === */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Print === */
@media print {
  .top-bar, .main-nav, .site-footer, .hero {
    display: none;
  }

  .article-detail {
    max-width: 100%;
  }
}
