/* ========================================
   FREAKLORE - Paranormal & Strange News
   Dark Theme with Masonry Grid
   ======================================== */

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

:root {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-card: #111111;
  --bg-card-hover: #1a1a1a;
  --bg-elevated: #1c1c1c;
  --bg-input: #0d0d0d;
  --text-primary: #e8e8e8;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --accent-red: #cc0000;
  --accent-red-dark: #8b0000;
  --accent-red-glow: rgba(204, 0, 0, 0.3);
  --accent-green: #00cc44;
  --accent-purple: #8b00ff;
  --accent-orange: #ff6600;
  --accent-cyan: #00cccc;
  --border-color: #222222;
  --border-light: #333333;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.6);
  --shadow-elevated: 0 4px 24px rgba(0, 0, 0, 0.8);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --max-width: 1400px;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-red);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #ff3333;
}

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

/* === HEADER === */
.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  height: 40px;
  width: auto;
  border-radius: var(--radius-sm);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  min-width: 280px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-elevated);
  z-index: 1001;
  padding: 0.5rem 0;
}

.nav-dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.dropdown-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 1.25rem;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* === MAIN CONTENT === */
.site-main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1rem;
  width: 100%;
}

/* === HERO SECTION === */
.hero {
  text-align: center;
  padding: 2rem 0 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hero-logo {
  max-width: 500px;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

.hero-tagline {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-style: italic;
}

.hero-categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.cat-pill:hover {
  background: var(--accent-red-dark);
  border-color: var(--accent-red);
  color: var(--text-primary);
}

/* === SECTION TITLES === */
.section-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-red);
  display: inline-block;
}

/* === FEATURED SECTION === */
.featured-section {
  margin-bottom: 2.5rem;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.featured-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-card);
}

.featured-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-red-dark);
  box-shadow: var(--shadow-elevated), 0 0 20px var(--accent-red-glow);
}

.featured-img-wrap {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.featured-card:hover .featured-img-wrap img {
  transform: scale(1.05);
}

.featured-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, var(--bg-elevated), var(--accent-red-dark));
}

.featured-info {
  padding: 1rem 1.25rem 1.25rem;
}

.featured-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 0.375rem 0 0.5rem;
  line-height: 1.3;
}

.featured-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* === MASONRY GRID === */
.masonry-section {
  margin-bottom: 2.5rem;
}

.masonry-grid {
  column-count: 3;
  column-gap: 1.25rem;
}

.article-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  break-inside: avoid;
  margin-bottom: 1.25rem;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-card);
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-red-dark);
  box-shadow: var(--shadow-elevated), 0 0 15px var(--accent-red-glow);
}

.card-img-wrap {
  width: 100%;
  overflow: hidden;
}

.card-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-normal);
}

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

.card-placeholder {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--bg-elevated), #1a0000);
}

.card-body {
  padding: 1rem;
}

.card-category {
  display: inline-block;
  font-size: 0.6875rem;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.card-excerpt {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* === CATEGORIES SECTION === */
.categories-section {
  margin-bottom: 2.5rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.category-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all var(--transition-normal);
}

.category-card:hover {
  border-color: var(--accent-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 0 15px var(--accent-red-glow);
  color: inherit;
}

.category-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.category-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.category-count {
  font-size: 0.75rem;
  color: var(--accent-red);
  margin-bottom: 0.375rem;
}

.category-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* === CATEGORY HERO === */
.category-hero {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.category-hero-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 0.75rem;
}

.category-hero-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.category-hero-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* === ARTICLE FULL PAGE === */
.article-full {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 2rem;
}

.article-breadcrumb {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.article-breadcrumb a {
  color: var(--text-secondary);
}

.article-breadcrumb a:hover {
  color: var(--accent-red);
}

.article-featured-img {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-elevated);
}

.article-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.article-category {
  color: var(--accent-red);
  font-weight: 600;
}

.article-share-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  margin-bottom: 1.5rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.article-share-bar span {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 700;
  color: white;
  transition: all var(--transition-fast);
}

.share-icon.facebook { background: #1877F2; }
.share-icon.twitter { background: #1DA1F2; }
.share-icon.tiktok { background: #000000; border: 1px solid #333; }
.share-icon.whatsapp { background: #25D366; }
.share-icon.pinterest { background: #E60023; }
.share-icon.telegram { background: #0088CC; }

.share-icon:hover {
  transform: scale(1.15);
  filter: brightness(1.2);
}

.article-body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-body p {
  margin-bottom: 1.25rem;
}

.article-excerpt {
  font-size: 1.125rem;
  font-style: italic;
  color: var(--text-primary);
  border-left: 3px solid var(--accent-red);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}

.article-inline-img {
  width: 100%;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-card);
}

/* === RELATED SECTION === */
.related-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

/* === SEARCH === */
.search-section {
  max-width: 800px;
  margin: 0 auto;
}

.search-form {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast);
}

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

.search-results-count {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.no-articles {
  color: var(--text-muted);
  font-style: italic;
  padding: 2rem;
  text-align: center;
  column-span: all;
}

/* === ADMIN STYLES === */
.admin-page {
  max-width: 1200px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.admin-toolbar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table th {
  background: var(--bg-elevated);
  padding: 0.75rem 1rem;
  text-align: left;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

.admin-table td {
  padding: 0.625rem 1rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.admin-table tr:hover td {
  background: var(--bg-card-hover);
}

.action-cell {
  display: flex;
  gap: 0.5rem;
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
}

.badge-published {
  background: rgba(0, 204, 68, 0.15);
  color: var(--accent-green);
}

.badge-draft {
  background: rgba(255, 102, 0, 0.15);
  color: var(--accent-orange);
}

/* === ARTICLE FORM === */
.article-form {
  max-width: 800px;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.375rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  border-color: var(--accent-red);
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

.form-file {
  display: block;
  width: 100%;
  padding: 0.5rem;
  background: var(--bg-input);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.image-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.image-upload-row .form-file {
  flex: 1;
  min-width: 200px;
}

.form-divider {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.form-input-url {
  flex: 1;
  min-width: 200px;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.current-image, .current-images {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
}

.current-image p, .current-images p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.preview-thumb {
  max-height: 80px;
  border-radius: var(--radius-sm);
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-red);
}

.form-check label {
  margin-bottom: 0;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* === BUTTONS === */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1.25rem;
  background: var(--accent-red);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  text-decoration: none;
}

.btn-primary:hover {
  background: #dd1111;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--accent-red-glow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1.25rem;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  text-decoration: none;
}

.btn-sm:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.btn-danger {
  border-color: var(--accent-red-dark);
  color: var(--accent-red);
}

.btn-danger:hover {
  background: var(--accent-red-dark);
  color: white;
}

/* === ADS MANAGER === */
.ads-manager {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.25rem;
}

.ad-slot-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.ad-slot-card h3 {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.ad-slot-card p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.ad-preview {
  margin-bottom: 1rem;
  background: var(--bg-input);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}

.ad-placeholder {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.ad-form textarea {
  width: 100%;
  padding: 0.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: monospace;
  font-size: 0.8125rem;
  resize: vertical;
  margin-bottom: 0.5rem;
}

.ad-form label {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

/* === FOOTER === */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1rem 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.footer-text {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

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

.footer-list li {
  margin-bottom: 0.375rem;
}

.footer-list a {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

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

.social-share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.375rem;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  color: white;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.social-btn:hover {
  transform: scale(1.05);
  color: white;
}

.social-btn.facebook { background: #1877F2; }
.social-btn.twitter { background: #14171A; border: 1px solid #333; }
.social-btn.tiktok { background: #000000; border: 1px solid #333; }
.social-btn.whatsapp { background: #25D366; }
.social-btn.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-btn.pinterest { background: #E60023; }
.social-btn.telegram { background: #0088CC; }
.social-btn.snapchat { background: #FFFC00; color: #000; }
.social-btn.wechat { background: #07C160; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.admin-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.admin-btn:hover {
  background: var(--accent-red-dark);
  border-color: var(--accent-red);
  color: white;
}

/* === MODAL === */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-elevated);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.25rem;
}

.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-action-btn {
  display: block;
  padding: 0.875rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  text-align: center;
}

.admin-action-btn:hover {
  background: var(--accent-red-dark);
  border-color: var(--accent-red);
  color: white;
}

/* === RESPONSIVE === */

/* Tablet */
@media (max-width: 1024px) {
  .masonry-grid {
    column-count: 2;
  }

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

  .featured-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* Mobile */
@media (max-width: 768px) {
  .masonry-grid {
    column-count: 1;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 0.5rem;
    box-shadow: var(--shadow-elevated);
  }

  .main-nav.mobile-open {
    display: flex;
  }

  .nav-dropdown.open .dropdown-menu {
    position: static;
    border: none;
    box-shadow: none;
    background: var(--bg-card);
    border-radius: 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero-logo {
    max-width: 300px;
  }

  .hero-tagline {
    font-size: 1rem;
  }

  .cat-pill {
    font-size: 0.6875rem;
    padding: 0.25rem 0.5rem;
  }

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

  .featured-img-wrap {
    height: 180px;
  }

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

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

  .social-share-grid {
    grid-template-columns: 1fr 1fr;
  }

  .article-title {
    font-size: 1.5rem;
  }

  .article-meta {
    flex-direction: column;
    gap: 0.375rem;
  }

  .search-form {
    flex-direction: column;
  }

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

  .ads-manager {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .section-title {
    font-size: 1.25rem;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .header-inner {
    padding: 0.5rem;
  }

  .logo-img {
    height: 32px;
  }

  .site-main {
    padding: 1rem 0.75rem;
  }

  .hero-logo {
    max-width: 220px;
  }

  .category-hero-title {
    font-size: 1.5rem;
  }

  .social-share-grid {
    grid-template-columns: 1fr;
  }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* === SELECTION === */
::selection {
  background: var(--accent-red);
  color: white;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.article-card, .featured-card, .category-card {
  animation: fadeIn 0.4s ease forwards;
}

/* === PRINT STYLES === */
@media print {
  .site-header, .site-footer, .article-share-bar, .admin-btn {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
}
