/* Articles page styles - Clean and Elegant Design */

/* Reset and base styles */
* {
  box-sizing: border-box;
}

/* Hero Section - Clean and Elegant */
.articles-hero {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 80px 0 100px;
  text-align: center;
  position: relative;
  margin: 0 !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.articles-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
  pointer-events: none;
}

.articles-hero h1 {
  font-size: clamp(36px, 6vw, 56px);
  margin: 0;
  font-weight: 700;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
  text-shadow: none;
}

.articles-hero .wrap {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  box-sizing: border-box;
}

/* Main Content */
.articles-main {
  background: #ffffff;
  min-height: 100vh;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Definitions Section - Elegant Card Design */
.definitions-section {
  margin: 60px 0;
  padding: 0;
  background: transparent;
}

.definitions-box {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 20px;
  padding: 48px 40px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.definitions-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.definition-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  transition: all 0.3s ease;
}

.definition-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border-color: rgba(102, 126, 234, 0.2);
}

.definition-item strong {
  color: #667eea;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.definition-item span {
  color: #64748b;
  font-size: 16px;
  line-height: 1.5;
}

/* Category Sections */
.category-section {
  margin-bottom: 80px;
}

.category-section h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 16px 0;
  text-align: center;
}

.category-section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  margin: 20px auto 0;
  border-radius: 2px;
}

.category-description {
  font-size: 18px;
  color: #64748b;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px;
  line-height: 1.6;
}

/* Articles Grid */
.articles-categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 32px;
  margin-bottom: 60px;
}

.subcategory-column {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 16px;
  padding: 32px 24px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.subcategory-column:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  border-color: rgba(102, 126, 234, 0.2);
}

.subcategory-title {
  margin: 0 0 20px 0;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
}

.subcategory-title a {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.3s ease;
}

.subcategory-title a:hover {
  color: #667eea;
}

.subcategory-title .arrow {
  color: #667eea;
  font-size: 16px;
  transition: transform 0.3s ease;
}

.subcategory-title a:hover .arrow {
  transform: translateX(4px);
}

.subcategory-articles {
  list-style: none;
  padding: 0;
  margin: 0;
}

.subcategory-articles li {
  margin-bottom: 12px;
}

.subcategory-articles a {
  color: #475569;
  text-decoration: none;
  font-size: 15px;
  line-height: 1.4;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  background: linear-gradient(135deg, #f8fafc 0%, #f3f6fb 100%);
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.subcategory-articles a::after {
  content: '↗';
  font-size: 13px;
  color: #667eea;
  transition: transform 0.2s ease;
}

.subcategory-articles a:hover {
  color: #334155;
  border-color: rgba(102, 126, 234, 0.35);
  box-shadow: 0 8px 18px rgba(102, 126, 234, 0.12);
  transform: translateY(-1px);
  background: linear-gradient(135deg, #eef2ff 0%, #e2e8f0 100%);
}

.subcategory-articles a:hover::after {
  transform: translateX(3px);
}

/* CTA Banner Styles */
.cta-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  margin: 60px 0;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  pointer-events: none;
}

.cta-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.cta-text h3 {
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 16px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cta-text p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
}

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

.cta-action .btn {
  background: #ffffff;
  color: #667eea;
  border: none;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.cta-action .btn::after {
  content: '→';
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.cta-action .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.cta-action .btn:hover::after {
  transform: translateX(4px);
}

.cta-action small {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin-top: 12px;
  font-style: italic;
}

/* Specific CTA Variations */
.cards-cta {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.cards-cta .cta-action .btn {
  color: #f5576c;
}

/* Cards Section */
.cards-section .articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-bottom: 40px;
}

.article-card {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  border-color: rgba(102, 126, 234, 0.2);
}

.article-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

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

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

.article-content {
  padding: 24px;
}

.article-meta {
  margin-bottom: 12px;
}

.author-date {
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
}

.article-content h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.4;
}

.article-content h3 a {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.3s ease;
}

.article-content h3 a:hover {
  color: #667eea;
}

.article-content .arrow {
  color: #667eea;
  font-size: 16px;
  transition: transform 0.3s ease;
}

.article-content h3 a:hover .arrow {
  transform: translateX(4px);
}

.article-excerpt {
  color: #64748b;
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

/* Coming Soon */
.coming-soon {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .definitions-box {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .article-hero {
    padding: 72px 0 60px;
  }

  .article-hero-card {
    padding: 40px 42px;
  }
  
  .articles-categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 24px;
  }
  
  .cta-content {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .wrap {
    padding: 0 16px;
  }

  .article-hero {
    padding: 64px 0 52px;
  }

  .article-hero-card {
    padding: 32px 28px;
  }

  .article-title {
    font-size: clamp(30px, 7vw, 44px);
  }

  .article-body {
    margin-top: 24px;
  }
  
  .articles-categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 20px;
  }
  
  .definitions-box {
    padding: 32px 24px;
  }
  
  .definition-item {
    padding: 20px;
  }
  
  .cta-banner {
    padding: 32px 24px;
    margin: 40px 0;
  }
  
  .cta-text h3 {
    font-size: 24px;
  }
  
  .cta-text p {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .articles-categories-grid {
    grid-template-columns: 1fr;
  }
  
  .articles-hero h1 {
    font-size: 28px;
  }
  
  .category-section h2 {
    font-size: 24px;
  }
  
  .definitions-box {
    padding: 24px 20px;
  }
  
  .definition-item {
    padding: 16px;
  }
  
  .cta-banner {
    padding: 24px 20px;
  }
}

/* Single article page styles */
.article-single {
  padding: 0 0 80px;
  background: #ffffff;
}

.article-hero {
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 45%, #e0e7ff 100%);
  padding: 96px 0 72px;
  position: relative;
  overflow: hidden;
}

.article-hero::before,
.article-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(102, 126, 234, 0.12), transparent 55%);
  pointer-events: none;
}

.article-hero::before {
  width: 520px;
  height: 520px;
  top: -180px;
  left: -120px;
}

.article-hero::after {
  width: 420px;
  height: 420px;
  bottom: -140px;
  right: -80px;
}

.article-hero-card {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  box-shadow: 0 18px 60px rgba(102, 126, 234, 0.18);
  padding: 48px 56px;
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.article-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 24px 24px 0 0;
}

.article-header {
  text-align: left;
  margin: 0;
}

.article-hero .article-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  margin-bottom: 18px;
}

.article-hero .meta-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: inline-block;
  box-shadow: 0 0 0 6px rgba(102, 126, 234, 0.14);
}

.article-hero .meta-label {
  text-transform: uppercase;
  font-size: 12px;
  color: #64748b;
  letter-spacing: 0.08em;
}

.article-title {
  font-size: clamp(34px, 5.5vw, 56px);
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 18px 0;
  line-height: 1.15;
}

.article-header .article-excerpt {
  font-size: 18px;
  color: #475569;
  line-height: 1.7;
  margin: 0;
  max-width: 760px;
}

.article-body {
  max-width: 960px;
  margin: 32px auto 0;
  padding: 0;
  position: relative;
  z-index: 3;
}

.article-featured-image {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
  margin: 0 0 36px 0;
  background: #0f172a;
}

.article-featured-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.article-featured-image:hover img {
  transform: scale(1.02);
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.7;
  color: #374151;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  color: #1e293b;
  font-weight: 700;
  margin: 40px 0 20px 0;
}

.article-content h2 {
  font-size: 32px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 10px;
}

.article-content h3 {
  font-size: 24px;
}

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

.article-content ul,
.article-content ol {
  margin-bottom: 24px;
  padding-left: 30px;
}

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

.article-content blockquote {
  border-left: 4px solid #667eea;
  padding-left: 24px;
  margin: 32px 0;
  font-style: italic;
  color: #64748b;
  background: #f8fafc;
  padding: 24px;
  border-radius: 8px;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 32px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Support for CKEditor content with colors and formatting */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
}

.article-content table td,
.article-content table th {
  padding: 12px;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.article-content table th {
  background: #f8fafc;
  font-weight: 600;
}

.article-content a {
  color: #667eea;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.article-content a:hover {
  color: #764ba2;
}

/* Preserve inline styles from CKEditor (colors, fonts, etc.) */
.article-content * {
  max-width: 100%;
}

.article-content [style*="color"] {
  /* Preserve color styles */
}

.article-content [style*="background-color"] {
  /* Preserve background color styles */
  padding: 2px 4px;
  border-radius: 3px;
}

.article-content [style*="font-size"] {
  /* Preserve font size styles */
}

.article-content [style*="text-align"] {
  /* Preserve text alignment */
}