/* Classical & Eye-Catching Design - Daily Grant Digest */
:root {
  /* Elegant Classical Color Palette */
  --primary-color: #3a5a40;      /* Deep forest green */
  --primary-dark: #344e41;       /* Darker green */
  --primary-light: #588157;      /* Lighter green */
  --secondary-color: #a3b18a;    /* Sage green */
  --accent-color: #bc6c25;       /* Warm terracotta */
  --gold-color: #dda15e;         /* Antique gold */
  --cream-color: #fefae0;        /* Soft cream */

  /* Text Colors */
  --text-dark: #333333;          /* Softer black for better readability */
  --text-medium: #4a5568;        /* Medium gray */
  --text-light: #718096;         /* Light gray */
  --text-white: #ffffff;         /* Pure white */

  /* Background Colors */
  --bg-primary: #fefae0;         /* Cream background */
  --bg-secondary: #f8f5eb;       /* Slightly darker cream */
  --bg-tertiary: #e9e2d0;        /* Even darker cream */
  --bg-dark: #283618;            /* Dark green */
  --bg-card: #ffffff;            /* White */



  /* Classical Shadows & Effects */
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 8px 20px rgba(0, 0, 0, 0.08);
  --shadow-strong: 0 12px 28px rgba(0, 0, 0, 0.10);
  --shadow-colored: 0 8px 24px rgba(58, 90, 64, 0.15);

  /* Border Radius - More subtle for classical look */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Transitions */
  --transition-quick: all 0.2s ease;
  --transition-smooth: all 0.4s ease;
  --transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Typography - Classical fonts */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.75rem;
  --font-size-4xl: 2rem;
  --font-size-5xl: 2.5rem;

  /* Border styles */
  --border-light: rgba(0, 0, 0, 0.1);
}

.highlight-box {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
  color: var(--text-white);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  margin: 2.5rem 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.highlight-box h3 {
  color: white;
  margin-bottom: 1.5rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
}

.highlight-box p {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.highlight-box ul {
  color: white;
  margin: 0;
  padding-left: 1.5rem;
}

.highlight-box ul li {
  color: white;
  margin-bottom: 0.5rem;
}

.highlight-icon-overlay {
  position: absolute;
  top: -15px;
  right: -15px;
  opacity: 0.1;
  font-size: 8rem;
}

.flex-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  margin: 2rem 0;
}

.card {
  flex: 1;
  min-width: 280px;
  margin: 0.5rem;
  padding: 1.25rem;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
}

.card h4 {
  color: white;
  margin-bottom: 0.75rem;
}

.card p {
  color: white;
  font-size: 0.95rem;
}

.large-text {
  color: white;
  font-weight: bold;
  margin-top: 0.5rem;
}

.button-secondary {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  transition: all 0.2s ease;
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.text-center {
  text-align: center;
}

.mt-3 {
  margin-top: 3rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.mr-0_75 {
  margin-right: 0.75rem;
}

.return-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--primary-dark);
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  transition: all 0.2s ease;
}

.return-link:hover {
  color: var(--accent-color);
  transform: translateX(-5px);
}

.footer-small-text {
  margin-top: 0.5rem;
  display: block;
  opacity: 0.7;
}

.article-quote-text {
  font-size: var(--font-size-lg);
  margin: 2rem 0;
}

.article-button-container {
  margin: 3rem 0 1rem;
}

.highlight-box h2,
.highlight-box h3 {
  color: var(--text-white);
  margin-bottom: 1rem;
  font-size: var(--font-size-2xl);
}

.highlight-box p,
.highlight-box ul li {
  color: var(--text-white);
  margin-bottom: 1.5rem;
  font-size: var(--font-size-lg);
}

.highlight-box ul {
  margin: 0;
  padding-left: 1.5rem;
  text-align: left;
  max-width: 450px;
  margin: 0 auto;
}

.highlight-box ul li {
  margin-bottom: 0.5rem;
}

.button-primary {
  display: inline-block;
  background: var(--primary-color);
  color: var(--text-white);
  padding: 0.75rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-quick);
  border: none;
  cursor: pointer;
}

.button-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Libre Baskerville", Georgia, serif;
  line-height: 1.8;
  color: var(--text-dark);
  background: var(--bg-secondary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: var(--font-size-base);
  overflow-x: hidden;
}

/* Typography - More classical styling */
h1, h2, h3, h4, h5, h6 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
}

h1 {
  font-size: var(--font-size-5xl);
  font-weight: 800;
  letter-spacing: -0.025em;
  position: relative;
  display: inline-block;
}

h1:after {
  content: "";
  position: absolute;
  width: 60px;
  height: 4px;
  background: var(--accent-color);
  bottom: -12px;
  left: 0;
}

h2 {
  font-size: var(--font-size-4xl);
  margin-top: 2.5rem;
}

h3 {
  font-size: var(--font-size-3xl);
  margin-top: 2rem;
}

h4 {
  font-size: var(--font-size-2xl);
}

p {
  color: var(--text-medium);
  margin-bottom: 1.75rem;
  font-weight: 400;
  line-height: 1.9;
  font-size: var(--font-size-lg);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-quick);
  font-weight: 500;
  border-bottom: 1px solid transparent;
}

a:hover {
  color: var(--accent-color);
  border-bottom: 1px solid var(--accent-color);
}

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

/* Lists - Enhanced for better readability */
ul, ol {
  margin-bottom: 1.75rem;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.75rem;
  line-height: 1.8;
  color: var(--text-medium);
}

/* Header - More classical styling */
.main-header {
  background: var(--bg-primary);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-light);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  flex-shrink: 0;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: var(--font-size-xl);
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: 0.05em;
  border-bottom: none;
}

.logo a:hover {
  transform: translateY(-1px);
  text-decoration: none;
  border-bottom: none;
}

.logo-image {
  height: 48px;
  width: auto;
  border-radius: var(--radius-sm);
  transition: var(--transition-quick);
  box-shadow: var(--shadow-soft);
}

.logo-small {
  height: 40px !important;
}

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

.main-nav a {
  color: var(--text-medium);
  font-weight: 500;
  font-size: var(--font-size-base);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-quick);
  position: relative;
  font-family: "Libre Baskerville", Georgia, serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--font-size-sm);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary-color);
  background-color: var(--bg-tertiary);
  text-decoration: none;
}

/* Content Layout - Improved for classical look */
.content-wrapper {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3.5rem;
  flex: 1;
}

.main-content {
  min-width: 0;
}

/* Full Article Styling - Enhanced for readability */
.full-article {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-medium);
  overflow: hidden;
  border: 1px solid var(--border-light);
  padding-bottom: 2rem;
}

.article-header {
  padding: 2.5rem 3rem 1.5rem;
  text-align: center;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
}

.article-category {
  display: inline-block;
  background: var(--primary-color);
  color: var(--text-white);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: "Montserrat", sans-serif;
}

.article-header h1 {
  margin: 0 auto 1.5rem;
  max-width: 800px;
  text-align: center;
  font-size: var(--font-size-4xl);
  line-height: 1.3;
  color: var(--text-dark);
}

.article-header h1:after {
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 3px;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  color: var(--text-light);
  font-size: var(--font-size-sm);
  font-style: italic;
}

.article-image-hero {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) inset;
}

.article-image-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease;
}

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

/* Image overlay with classical design */
.image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  padding: 3rem 2rem 1.5rem;
  color: white;
}

.overlay-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.article-author {
  display: inline-block;
  font-family: "Montserrat", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

.article-quote {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.5;
  position: relative;
  display: inline-block;
  max-width: 80%;
}

.article-content {
  padding: 2.5rem 3rem;
  font-size: var(--font-size-lg);
  line-height: 1.9;
  max-width: 800px;
  margin: 0 auto;
}

/* Add drop cap for first paragraph */
.article-content > p:first-of-type:first-letter {
  float: left;
  font-family: "Playfair Display", serif;
  font-size: 3.5em;
  line-height: 0.8;
  padding-right: 0.1em;
  padding-top: 0.1em;
  margin-bottom: -0.1em;
  color: var(--primary-dark);
}

/* Fancy dividers */
.section-divider {
  display: flex;
  align-items: center;
  margin: 2.5rem 0;
  opacity: 0.6;
}

.section-divider::before,
.section-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-light);
}

.section-divider::before {
  margin-right: 1rem;
}

.section-divider::after {
  margin-left: 1rem;
}

.section-divider i {
  color: var(--accent-color);
  font-size: 0.8rem;
}

/* Better heading spacing and decoration */
.article-content h2 {
  margin-top: 3rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

.article-content h2:after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 80px;
  height: 3px;
  background: var(--accent-color);
}

/* Enhanced blockquotes */
blockquote {
  margin: 2.5rem 0;
  padding: 1.5rem 2rem;
  border-left: 4px solid var(--accent-color);
  background: var(--bg-secondary);
  font-style: italic;
  color: var(--text-medium);
  position: relative;
}

blockquote:before {
  content: "\201C";
  font-size: 4rem;
  position: absolute;
  left: 10px;
  top: -10px;
  color: var(--accent-color);
  opacity: 0.2;
  font-family: Georgia, serif;
}

/* Article Tags - More elegant design */
.article-tags {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.article-tags span,
.tag-pill {
  background: var(--bg-tertiary) !important;
  color: var(--primary-dark) !important;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--border-light);
  display: inline-block;
  margin: 0.25rem;
}

/* Ensure tag pills are never white text on white background */
.article-tags .tag-pill,
.article-tags span.tag-pill {
  background-color: #e9e2d0 !important; /* Fallback color */
  color: #344e41 !important; /* Fallback color */
}

/* Sidebar - More classical design */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.sidebar-section {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-light);
  position: relative;
}

.sidebar-section h3 {
  font-size: var(--font-size-lg);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--bg-tertiary);
  color: var(--primary-dark);
}

/* Popular Posts - Enhanced design */
.popular-posts {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.popular-post {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.post-number {
  background: var(--primary-color);
  color: var(--text-white);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  font-family: "Montserrat", sans-serif;
}

.post-content {
  flex: 1;
  min-width: 0;
}

.post-content h4 {
  font-size: var(--font-size-base);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.post-content h4 a {
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition-quick);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  border-bottom: none;
}

.post-content h4 a:hover {
  color: var(--accent-color);
}

.post-date {
  font-size: var(--font-size-xs);
  color: var(--text-light);
  font-style: italic;
}

/* Category Tags - Enhanced design */
.category-tags {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.category-tag {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  color: var(--text-medium);
  text-decoration: none;
  transition: var(--transition-quick);
  border: 1px solid var(--border-light);
  font-size: var(--font-size-sm);
}

.category-tag:hover {
  background: var(--bg-tertiary);
  color: var(--primary-dark);
  transform: translateX(3px);
}

.category-tag i {
  color: var(--accent-color);
  margin-right: 0.75rem;
  font-size: 1rem;
}

.category-tag span {
  flex: 1;
}

.tag-count {
  background: var(--primary-light);
  color: var(--text-white);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
}

/* Footer - Enhanced classical design */
footer {
  background: var(--primary-dark);
  color: var(--text-white);
  padding: 3rem 0;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: var(--text-white);
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: var(--transition-quick);
  border-bottom: none;
}

.footer-links a:hover {
  color: var(--secondary-color);
  border-bottom: none;
}

.copyright {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.7);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    order: -1;
  }
  
  .article-content {
    padding: 2rem;
  }
  
  .article-header {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: var(--font-size-4xl);
  }
  
  h2 {
    font-size: var(--font-size-3xl);
  }
  
  .article-content {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .content-wrapper {
    padding: 1rem;
    margin: 1rem auto;
  }
  
  .article-header {
    padding: 1.5rem 1rem;
  }
  
  .article-content {
    padding: 1.25rem 1rem;
    font-size: var(--font-size-base);
  }
  
  h1 {
    font-size: var(--font-size-3xl);
  }
  
  h2 {
    font-size: var(--font-size-2xl);
  }
}

/* Utility Classes for Consistent Styling */
.text-center {
  text-align: center;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mr-0_75 {
  margin-right: 0.75rem;
}

.return-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-quick);
}

.return-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Additional fallback styles to prevent white text on white background */
body {
  background-color: var(--bg-primary);
  color: var(--text-dark);
}

/* Ensure all text elements have proper contrast */
* {
  color: inherit;
}

/* Override any potential white text issues */
.article-content p,
.article-content li,
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  color: var(--text-dark) !important;
}

/* Exception for elements that should have white text */
.highlight-box *,
.button-primary,
.button-secondary,
footer * {
  color: inherit !important;
}
