/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  --primary-blue: #2c3e50;
  --secondary-blue: #34495e;
  --dark-blue: #1a252f;
  --light-blue: #ecf0f1;
  --accent-gold: #d4af37;
  --breaking-red: #8b0000;
  --text-dark: #2c3e50;
  --text-light: #555;
  --border-color: #bbb;
  --hover-bg: #f9f6f0;
  --cream-bg: #faf8f3;
  --cream-white: #fffef9;
  --old-paper: #f4f1e8;
}

body {
  font-family: 'Merriweather', 'Georgia', 'Times New Roman', serif;
  background-color: var(--old-paper);
  color: var(--text-dark);
  line-height: 1.7;
  font-size: 16px;
  font-display: swap;
}

/* Performance: Use transform for hover effects */
a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

/* Performance: Hardware acceleration for animations */
.spinner {
  will-change: transform;
}

/* Performance: Contain layout shifts */
.article-image {
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
  height: auto;
}

/* Top Bar */
.top-bar {
  background: #2c3e50;
  color: var(--cream-white);
  padding: 10px 0;
  font-size: 0.85em;
  border-bottom: 3px solid var(--accent-gold);
  font-family: 'Georgia', serif;
}

.top-bar .container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

.top-bar-left {
  display: flex;
  gap: 20px;
  font-weight: normal;
  font-family: 'Libre Baskerville', 'Georgia', serif;
  font-size: 0.9em;
}

.top-bar a {
  color: var(--cream-white);
  opacity: 0.9;
  text-decoration: none;
  font-family: 'Libre Baskerville', 'Georgia', serif;
}

.top-bar a:hover {
  opacity: 1;
  text-decoration: none;
}

/* Header */
.header {
  background: var(--cream-white);
  color: var(--text-dark);
  border-bottom: 4px double #2c3e50;
  border-top: 2px solid #2c3e50;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 35px 20px;
  text-align: center;
}

.logo-section {
  width: 100%;
}

.logo {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 8px;
  letter-spacing: 3px;
  text-transform: uppercase;
  border-top: 1px solid #2c3e50;
  border-bottom: 1px solid #2c3e50;
  padding: 15px 0;
}

.tagline {
  font-size: 0.95rem;
  color: #555;
  font-style: italic;
  font-weight: normal;
  font-family: 'Libre Baskerville', 'Georgia', serif;
}

/* Breaking News Banner */
.breaking-news {
  background: #8b0000;
  color: var(--cream-white);
  padding: 15px 0;
  border-top: 2px solid #660000;
  border-bottom: 2px solid #660000;
}

.breaking-news-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.breaking-badge {
  background: var(--cream-white);
  color: #8b0000;
  padding: 5px 12px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  white-space: nowrap;
  border: 2px solid #8b0000;
  font-family: 'Libre Baskerville', 'Georgia', serif;
}

.breaking-text {
  flex: 1;
  font-weight: 600;
  font-size: 1em;
  font-family: 'Merriweather', 'Georgia', serif;
}

/* Navigation */
.main-nav {
  background: #2c3e50;
  padding: 0;
  border-bottom: 3px solid var(--accent-gold);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-btn {
  background: transparent;
  color: var(--cream-white);
  border: none;
  padding: 15px 22px;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: normal;
  font-family: 'Libre Baskerville', 'Georgia', serif;
  border-bottom: 3px solid transparent;
  border-right: 1px solid #1a252f;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1.5;
}

.nav-btn:last-child {
  border-right: none;
}

.nav-btn:hover,
.nav-btn.active {
  background: #34495e;
  border-bottom-color: var(--accent-gold);
  text-decoration: none;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Main Layout */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 30px;
  margin-top: 30px;
  align-items: start;
  position: relative;
}

.main-content {
  min-width: 0;
}

.sidebar {
  position: static;
  top: auto;
  height: auto;
  z-index: 1;
}

/* Search Bar */
.search-container {
  margin: 30px 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.search-bar {
  width: 100%;
  max-width: 500px;
  padding: 14px 20px;
  font-size: 1em;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  transition: all 0.3s ease;
  background: white;
}

.search-bar:focus {
  outline: none;
  border-color: var(--secondary-blue);
  box-shadow: 0 0 0 3px var(--light-blue);
}

.category-filter {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 8px 20px;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 600;
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--secondary-blue);
  color: white;
  border-color: var(--secondary-blue);
}

/* Featured Article */
.featured-article {
  background: var(--cream-white);
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  margin-bottom: 40px;
  cursor: pointer;
  border: 2px solid #2c3e50;
}

.featured-article:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.featured-article .article-image {
  width: 100%;
  height: 450px;
  object-fit: cover;
  border-bottom: 2px solid #2c3e50;
}

.featured-article .article-content {
  padding: 30px;
}

.featured-article .article-title {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 15px;
  color: #2c3e50;
}

.article-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  margin-right: 8px;
  border: 2px solid;
  font-family: 'Libre Baskerville', 'Georgia', serif;
}

.badge-breaking {
  background: #8b0000;
  color: var(--cream-white);
  border-color: #660000;
}

.badge-featured {
  background: #2c3e50;
  color: var(--cream-white);
  border-color: #1a252f;
}

.badge-category {
  background: var(--cream-white);
  color: #2c3e50;
  border-color: #2c3e50;
}

.badge-category.politics {
  background: var(--cream-white);
  color: #5a3e8b;
  border-color: #5a3e8b;
}

.badge-category.sports {
  background: var(--cream-white);
  color: #8b6914;
  border-color: #8b6914;
}

.badge-category.business {
  background: var(--cream-white);
  color: #8b2e2e;
  border-color: #8b2e2e;
}

.badge-category.opinion {
  background: var(--cream-white);
  color: #2e6b4a;
  border-color: #2e6b4a;
}

.badge-category.lifestyle {
  background: var(--cream-white);
  color: #8b4570;
  border-color: #8b4570;
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  margin-top: 30px;
  justify-items: center;
}

.articles-grid .article-card {
  max-width: 600px;
  width: 100%;
}

/* Article Card */
.article-card {
  background-color: var(--cream-white);
  overflow: hidden;
  border: 2px solid #2c3e50;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.article-card:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.article-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--old-paper);
  border-bottom: 2px solid #2c3e50;
}

.article-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-title {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 1.35em;
  font-weight: 700;
  margin-bottom: 12px;
  color: #2c3e50;
  line-height: 1.4;
}

.article-meta {
  font-size: 0.8em;
  color: #555;
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-family: 'Libre Baskerville', 'Georgia', serif;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.article-excerpt {
  font-size: 0.95em;
  color: #555;
  line-height: 1.7;
  margin-bottom: 15px;
  flex: 1;
  font-family: 'Merriweather', 'Georgia', serif;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #2c3e50;
  font-weight: 700;
  font-size: 0.85em;
  margin-top: auto;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'Libre Baskerville', 'Georgia', serif;
}

.read-more:hover {
  text-decoration: underline;
}

/* Sidebar */
.sidebar-section {
  background: var(--cream-white);
  padding: 25px;
  margin-bottom: 25px;
  border: 2px solid #2c3e50;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-title {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px double #2c3e50;
  color: #2c3e50;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-article {
  padding: 15px 0;
  border-bottom: 1px solid #bbb;
  cursor: pointer;
}

.sidebar-article:last-child {
  border-bottom: none;
}

.sidebar-article:hover .article-title {
  color: #555;
  text-decoration: underline;
}

.sidebar-article .article-title {
  font-family: 'Merriweather', 'Georgia', serif;
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.4;
  color: #2c3e50;
  font-weight: 700;
}

.sidebar-article .article-meta {
  font-size: 0.75em;
  color: #555;
  font-family: 'Libre Baskerville', 'Georgia', serif;
}

/* Full Article View */
.article-full {
  max-width: 850px;
  margin: 40px auto;
  padding: 40px;
  background-color: var(--cream-white);
  border: 3px solid #2c3e50;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.article-full .article-title {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 2.8em;
  margin-bottom: 20px;
  color: #2c3e50;
  line-height: 1.2;
  font-weight: 700;
}

.article-full .article-meta {
  font-size: 0.95em;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 2px solid #bbb;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  color: #555;
  font-family: 'Libre Baskerville', 'Georgia', serif;
}

.article-full .article-image {
  width: 100%;
  height: auto;
  max-height: 550px;
  object-fit: cover;
  margin-bottom: 30px;
  border: 2px solid #2c3e50;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Enhanced Image Styling */
.image-container {
  margin: 30px 0;
  text-align: center;
}

.image-container img {
  width: 100%;
  height: auto;
  border: 2px solid #2c3e50;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

.image-caption {
  font-size: 0.9em;
  color: #666;
  font-style: italic;
  margin-top: 10px;
  padding: 10px 20px;
  background: #f8f8f8;
  border-left: 4px solid var(--accent-gold);
  text-align: left;
  font-family: 'Libre Baskerville', 'Georgia', serif;
}

.image-caption .caption-title {
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 5px;
}

.article-full .article-body {
  font-size: 1.15em;
  line-height: 1.8;
  color: #2c3e50;
  font-family: 'Merriweather', 'Georgia', serif;
}

.article-full .article-body p {
  margin-bottom: 22px;
  text-align: justify;
  text-indent: 1.5em;
}

.article-full .article-body p:first-child {
  text-indent: 0;
  font-size: 1.1em;
  font-weight: 500;
}

.article-full .article-body h2 {
  font-family: 'Playfair Display', 'Georgia', serif;
  margin-top: 35px;
  margin-bottom: 18px;
  font-size: 1.8em;
  color: #2c3e50;
  font-weight: 700;
  border-bottom: 2px solid var(--accent-gold);
  padding-bottom: 8px;
}

.article-full .article-body h3 {
  font-family: 'Playfair Display', 'Georgia', serif;
  margin-top: 25px;
  margin-bottom: 15px;
  font-size: 1.4em;
  color: #2c3e50;
  font-weight: 700;
}

.article-full .article-body img {
  max-width: 100%;
  height: auto;
  margin: 25px 0;
  border: 2px solid #2c3e50;
}

/* Quote Styling */
.article-quote {
  margin: 30px 0;
  padding: 25px 30px 25px 50px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-left: 6px solid var(--accent-gold);
  border-radius: 0 8px 8px 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article-quote::before {
  content: '"';
  font-size: 3.5em;
  color: var(--accent-gold);
  position: absolute;
  top: 10px;
  left: 15px;
  font-family: 'Playfair Display', serif;
  line-height: 1;
  opacity: 0.7;
}

.article-quote::after {
  content: '"';
  font-size: 2em;
  color: var(--accent-gold);
  position: absolute;
  bottom: 5px;
  right: 20px;
  font-family: 'Playfair Display', serif;
  line-height: 1;
  opacity: 0.5;
}

.article-quote .quote-text {
  font-size: 1.1em;
  font-style: italic;
  color: #2c3e50;
  margin-bottom: 15px;
  line-height: 1.6;
  font-family: 'Playfair Display', 'Georgia', serif;
  position: relative;
  z-index: 1;
}

.article-quote .quote-attribution {
  font-size: 0.9em;
  color: #666;
  font-weight: 700;
  text-align: right;
  font-family: 'Libre Baskerville', 'Georgia', serif;
  text-transform: capitalize;
  position: relative;
  z-index: 1;
}

.article-quote .quote-attribution::before {
  content: '— ';
  opacity: 0.7;
}

/* Pull Quote Styling */
.pull-quote {
  float: right;
  width: 280px;
  margin: 0 0 20px 30px;
  padding: 20px;
  background: var(--cream-white);
  border: 3px solid var(--accent-gold);
  border-radius: 8px;
  font-size: 1.1em;
  font-style: italic;
  color: #2c3e50;
  font-family: 'Playfair Display', 'Georgia', serif;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
}

.pull-quote::before {
  content: '"';
  font-size: 3em;
  color: var(--accent-gold);
  position: absolute;
  top: -5px;
  left: 10px;
  line-height: 1;
}

/* Google Ads Spaces */
.ad-space {
  margin: 40px 0;
  padding: 20px;
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  text-align: center;
  color: #6c757d;
  font-family: 'Libre Baskerville', 'Georgia', serif;
  border-radius: 8px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: static;
  z-index: auto;
  clear: both;
}

.ad-space.large {
  min-height: 250px;
  width: 100%;
  max-width: 100%;
}

.ad-space.sidebar {
  min-height: 300px;
  margin: 20px 0;
  width: 100%;
  max-width: 100%;
  position: static;
}

.ad-placeholder {
  font-size: 0.9em;
  opacity: 0.7;
}

/* Drop Caps */
.drop-cap {
  float: left;
  font-family: 'Playfair Display', serif;
  font-size: 4.5em;
  line-height: 0.8;
  padding-right: 8px;
  padding-top: 4px;
  color: var(--accent-gold);
  font-weight: 700;
}

/* Highlight Boxes */
.highlight-box {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border-left: 5px solid var(--accent-gold);
  padding: 20px 25px;
  margin: 25px 0;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.highlight-box h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #2c3e50;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
}

/* Fact Box */
.fact-box {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border: 2px solid #2196F3;
  padding: 20px;
  margin: 25px 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.fact-box h4 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #1976D2;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.fact-box ul {
  margin: 0;
  padding-left: 20px;
}

.fact-box li {
  margin-bottom: 8px;
  color: #2c3e50;
}

/* Breaking News Box */
.breaking-box {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  border: 2px solid #f44336;
  padding: 20px;
  margin: 25px 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.2);
}

.breaking-box h4 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #c62828;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.breaking-box::before {
  content: '🔴 ';
  font-size: 1.2em;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 25px;
  color: #2c3e50;
  font-weight: 700;
  padding: 10px 0;
  text-transform: uppercase;
  font-size: 0.9em;
  letter-spacing: 1px;
  font-family: 'Libre Baskerville', 'Georgia', serif;
}

.back-link:hover {
  text-decoration: underline;
}

.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-light);
  font-size: 0.9em;
}

.social-share {
  margin-top: 30px;
  padding-top: 25px;
  border-top: 2px solid var(--border-color);
}

.social-share h3 {
  font-size: 1.1em;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.share-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.share-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  font-size: 0.9em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.share-facebook { 
  background: #1877f2;
}

.share-facebook:hover {
  background: #0c63d4;
}

.share-twitter { 
  background: #1da1f2;
}

.share-twitter:hover {
  background: #0d8bd9;
}

.share-linkedin { 
  background: #0077b5;
}

.share-linkedin:hover {
  background: #005e8d;
}

.share-email { 
  background: #666;
}

.share-email:hover {
  background: #444;
}

/* Admin Styles */
.admin-container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 40px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.admin-title {
  font-size: 2.2em;
  margin-bottom: 35px;
  text-align: center;
  color: var(--primary-blue);
  font-weight: 700;
  padding-bottom: 20px;
  border-bottom: 3px solid var(--secondary-blue);
}

.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--border-color);
}

.admin-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-light);
  transition: all 0.3s ease;
}

.admin-tab:hover {
  color: var(--secondary-blue);
}

.admin-tab.active {
  color: var(--secondary-blue);
  border-bottom-color: var(--secondary-blue);
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-dark);
  font-size: 0.95em;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1em;
  transition: all 0.3s ease;
  background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-blue);
  box-shadow: 0 0 0 3px var(--light-blue);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.checkbox-group label {
  margin: 0;
  cursor: pointer;
}

.editor-toolbar {
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 10px;
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.editor-btn {
  padding: 8px 12px;
  background-color: #fff;
  border: 1px solid #ccc;
  cursor: pointer;
  font-size: 0.9em;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.editor-btn:hover {
  background-color: #f0f0f0;
}

.editor-content {
  width: 100%;
  min-height: 300px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  font-family: Georgia, serif;
  font-size: 1em;
  line-height: 1.6;
}

.editor-content:focus {
  outline: none;
  border-color: #000;
}

.btn {
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--primary-blue) 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--text-light);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--text-dark);
}

.btn-danger {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.message {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
  text-align: center;
}

.message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.login-form {
  max-width: 450px;
  margin: 100px auto;
  padding: 50px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.login-form h2 {
  color: var(--primary-blue);
  font-size: 2em;
  margin-bottom: 10px;
}

.login-form .tagline {
  margin-bottom: 30px;
}

/* Article Management Table */
.articles-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.articles-table th,
.articles-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.articles-table th {
  background: var(--light-blue);
  color: var(--primary-blue);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85em;
  letter-spacing: 0.5px;
}

.articles-table tr:hover {
  background: var(--hover-bg);
}

.articles-table .actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85em;
  font-weight: 600;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  transform: scale(1.05);
}

.btn-edit {
  background: var(--secondary-blue);
  color: white;
}

.btn-delete {
  background: var(--breaking-red);
  color: white;
}

/* Footer */
.footer {
  background: #2c3e50;
  color: var(--cream-white);
  margin-top: 60px;
  border-top: 4px solid var(--accent-gold);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  padding: 50px 20px;
}

.footer-section h3,
.footer-section h4 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  border-bottom: 2px solid var(--accent-gold);
  padding-bottom: 10px;
}

.footer-section p,
.footer-section a {
  color: #d4d4d4;
  margin-bottom: 10px;
  line-height: 1.7;
  text-decoration: none;
  font-family: 'Merriweather', 'Georgia', serif;
  opacity: 0.95;
}

.footer-section a:hover {
  color: var(--accent-gold);
  text-decoration: none;
  opacity: 1;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-bottom {
  text-align: center;
  padding: 20px;
  border-top: 2px solid #1a252f;
  color: #d4d4d4;
  font-size: 0.9em;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  font-family: 'Libre Baskerville', 'Georgia', serif;
  opacity: 0.95;
}

.footer-bottom a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-bottom a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Loading Spinner */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--light-blue);
  border-top-color: var(--secondary-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
  width: 100%;
  grid-column: 1 / -1;
  margin: 0 auto;
}

.empty-state h3 {
  font-size: 1.5em;
  margin-bottom: 10px;
  color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .sidebar {
    position: static;
    top: auto;
    height: auto;
    order: 2;
  }

  .main-content {
    order: 1;
  }

  .pull-quote {
    float: none;
    width: 100%;
    margin: 25px 0;
  }

  .ad-space.sidebar {
    max-width: 100%;
    margin: 15px 0;
  }
}

@media (max-width: 768px) {
  .logo {
    font-size: 1.8em;
    letter-spacing: 1px;
  }

  .header-content {
    flex-direction: column;
    gap: 15px;
    padding: 25px 15px;
  }

  .tagline {
    font-size: 0.85rem;
  }

  .nav ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 10px;
  }

  .nav a {
    white-space: nowrap;
    padding: 12px 18px;
    font-size: 0.85em;
  }

  .breaking-news-content {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding: 0 15px;
  }

  .container {
    padding: 15px;
  }

  .search-bar {
    font-size: 0.9em;
    padding: 12px 18px;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .featured-article .article-image {
    height: 250px;
  }

  .featured-article .article-title {
    font-size: 1.4em;
    line-height: 1.3;
  }

  .featured-article .article-content {
    padding: 20px;
  }

  .featured-article .article-excerpt {
    font-size: 0.9em;
  }

  .article-card .article-title {
    font-size: 1.1em;
    line-height: 1.3;
  }

  .article-card .article-excerpt {
    font-size: 0.85em;
    line-height: 1.5;
  }

  .article-meta {
    font-size: 0.75em;
    gap: 8px;
  }

  .article-full {
    padding: 20px 15px;
    margin: 20px auto;
  }

  .article-full .article-title {
    font-size: 1.6em;
    line-height: 1.2;
  }

  .article-full .article-body {
    font-size: 1em;
    line-height: 1.6;
  }

  .article-full .article-body p {
    text-indent: 0;
    margin-bottom: 18px;
  }

  .drop-cap {
    font-size: 2.8em;
    padding-right: 5px;
  }

  .article-quote {
    padding: 15px 10px 15px 30px;
    margin: 20px 0;
  }

  .article-quote::before {
    font-size: 2.2em;
    top: 5px;
    left: 8px;
  }

  .article-quote::after {
    font-size: 1.3em;
    bottom: 2px;
    right: 12px;
  }

  .article-quote .quote-text {
    font-size: 0.95em;
    margin-bottom: 12px;
  }

  .article-quote .quote-attribution {
    font-size: 0.8em;
  }

  .pull-quote {
    width: 100%;
    margin: 20px 0;
    padding: 15px;
  }

  .sidebar-title {
    font-size: 1.2rem;
  }

  .sidebar-article .article-title {
    font-size: 0.9rem;
    line-height: 1.3;
  }

  .sidebar-article .article-meta {
    font-size: 0.7em;
  }

  .admin-container {
    padding: 20px;
    margin: 20px 10px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .editor-toolbar {
    gap: 8px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  /* Mobile Navigation */
  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-btn {
    padding: 12px 16px;
    font-size: 0.85em;
    flex: 1;
    min-width: 80px;
    max-width: 120px;
  }

  .nav-icon {
    font-size: 1em;
    margin-right: 4px;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.6em;
    letter-spacing: 0;
  }

  .container {
    padding: 15px;
  }

  .article-title {
    font-size: 1.2em;
  }

  .search-bar {
    border-radius: 8px;
  }

  .featured-article .article-content {
    padding: 20px;
  }

  .category-filter {
    justify-content: flex-start;
  }

  .btn {
    width: 100%;
  }

  .btn-group {
    flex-direction: column;
  }

  /* Mobile Navigation - Smaller Screens */
  .nav-btn {
    padding: 10px 12px;
    font-size: 0.8em;
    min-width: 70px;
  }

  .nav-icon {
    font-size: 0.9em;
    margin-right: 3px;
  }
}

/* Hidden class */
.hidden {
  display: none !important;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

/* Navigation Icons */
.nav-icon {
    font-size: 0.9em;
    font-weight: normal;
    margin-right: 5px;
    opacity: 0.85;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

.nav-btn.active .nav-icon {
    opacity: 1;
    color: var(--accent-gold);
}

/* Sidebar Title Icons */
.sidebar-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
}

/* Badge Icons */
.badge-breaking {
    background: linear-gradient(135deg, #ff4757, #ff3838);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Clean Weather Icon */
.weather-icon {
    font-size: 2em;
    margin-bottom: 10px;
    color: #ffd700;
}
