/* ===========================================
   MODERN NEWS ARTICLE PAGES - INSPIRED REDESIGN
   Based on BBC, Washington Post, New Yorker Design Patterns
   =========================================== */

/* ===========================================
   GLOBAL ARTICLE PAGE STYLES
   =========================================== */

body.article-page {
  font-family: var(--font-primary) !important;
  line-height: 1.6 !important;
  color: var(--secondary-700) !important;
  background: var(--white) !important;
  margin: 0 !important;
  padding: 0 !important;
}

.article-main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ===========================================
   ARTICLE HERO SECTION - NEWSPAPER INSPIRED
   =========================================== */

.article-hero {
  position: relative;
  width: 100%;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--gray-900);
}

.article-hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.article-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.8) 100%
  );
  z-index: 2;
}

.article-hero-content {
  position: relative;
  z-index: 3;
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--white) !important;
  width: 100%;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.article-category {
  background: var(--primary-500);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(0, 174, 202, 0.3);
}

.article-date {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.article-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0;
  margin-top: 0;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  color: var(--white);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 100%;
  width: 100%;
}

.article-subtitle {
  font-size: 1.3rem;
  opacity: 0.95;
  margin-bottom: 2rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--white) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Ensure all paragraph elements in hero are white */
.article-hero-content p {
  color: var(--white) !important;
}

/* Ensure all subtitles in hero are white */
.article-hero .article-subtitle,
.article-hero-content .article-subtitle,
.article-hero p.article-subtitle {
  color: var(--white) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Ensure all text elements in hero are white */
.article-hero * {
  color: var(--white) !important;
}

/* Override any conflicting styles for hero text */
.article-hero-content * {
  color: var(--white) !important;
}

/* Force white color for all possible subtitle selectors */
.article-hero p.article-subtitle,
.article-hero-content p.article-subtitle,
.article-hero .article-hero-content p.article-subtitle,
body.article-page .article-hero p.article-subtitle,
body.article-page .article-hero-content p.article-subtitle {
  color: #ffffff !important;
  color: var(--white) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Force white color for any paragraph in hero */
.article-hero p,
.article-hero-content p,
.article-hero .article-hero-content p,
body.article-page .article-hero p,
body.article-page .article-hero-content p {
  color: #ffffff !important;
  color: var(--white) !important;
}

.article-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.15);
  padding: 1.5rem 2rem;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  min-width: 120px;
}

.stat-item:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--white);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--white);
}

.article-meta-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.byline {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
  font-weight: 500;
  color: var(--white);
}

.editor-note {
  font-size: 0.9rem;
  opacity: 0.8;
  margin: 0;
  font-style: italic;
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  color: var(--white);
}

/* ===========================================
   ARTICLE CONTENT - NEWSPAPER LAYOUT
   =========================================== */

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
  background: var(--white);
  position: relative;
}

.article-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.article-body {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--secondary-700);
  font-family: var(--font-primary);
}

.article-body h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary-700);
  margin: 3rem 0 1.5rem 0;
  line-height: 1.3;
  position: relative;
  padding-bottom: 0.5rem;
}

.article-body h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.article-body h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--secondary-700);
  margin: 2.5rem 0 1rem 0;
  line-height: 1.4;
}

.article-body p {
  margin-bottom: 1.5rem;
  color: var(--gray-700);
  text-align: justify;
  hyphens: auto;
}

.article-body ul,
.article-body ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.article-body li {
  margin-bottom: 0.75rem;
  color: var(--gray-700);
}

.article-body strong {
  color: var(--secondary-700);
  font-weight: 600;
}

.article-body blockquote {
  background: var(--primary-50);
  border-left: 4px solid var(--primary-500);
  padding: 2rem;
  margin: 2rem 0;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--secondary-600);
  position: relative;
  font-size: 1.1rem;
  line-height: 1.6;
}

.article-body blockquote::before {
  content: '"';
  position: absolute;
  top: -0.5rem;
  left: 1rem;
  font-size: 4rem;
  color: var(--primary-500);
  opacity: 0.3;
  font-family: serif;
}

/* ===========================================
   REGION GRID - SIMPLE LAYOUT
   =========================================== */

.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.region-card {
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
}

.region-card h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--secondary-700);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-500);
  display: inline-block;
}

.region-card p {
  color: var(--gray-700);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.region-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.region-card li {
  color: var(--gray-700);
  padding: 0.25rem 0;
  font-size: 0.95rem;
  position: relative;
  padding-left: 1.5rem;
}

.region-card li::before {
  content: '•';
  color: var(--primary-500);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* ===========================================
   TECH FEATURES - SIMPLE LAYOUT
   =========================================== */

.tech-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.tech-item {
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
}

.tech-item h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--secondary-700);
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--primary-300);
  display: inline-block;
}

.tech-item p {
  color: var(--gray-700);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

/* ===========================================
   SHARE SECTION - MODERN DESIGN
   =========================================== */

.share-section {
  background: var(--gray-50);
  padding: 3rem 0;
  margin: 4rem 0;
  border-radius: 20px;
  text-align: center;
  position: relative;
}

.share-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.share-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--secondary-700);
  margin-bottom: 2rem;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.share-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  min-width: 140px;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.share-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.share-button:hover::before {
  left: 100%;
}

.share-button.facebook {
  background: #1877f2;
  color: var(--white);
}

.share-button.facebook:hover {
  background: #166fe5;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(24, 119, 242, 0.3);
}

.share-button.whatsapp {
  background: #25d366;
  color: var(--white);
}

.share-button.whatsapp:hover {
  background: #20ba5a;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.share-button.linkedin {
  background: #0077b5;
  color: var(--white);
}

.share-button.linkedin:hover {
  background: #006ba1;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 119, 181, 0.3);
}

.share-button.copy {
  background: var(--primary-500);
  color: var(--white);
}

.share-button.copy:hover {
  background: var(--primary-600);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 174, 202, 0.3);
}

.share-button.print {
  background: var(--gray-600);
  color: var(--white);
}

.share-button.print:hover {
  background: var(--gray-700);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

/* ===========================================
   RELATED ARTICLES - MAGAZINE STYLE
   =========================================== */

.related-articles {
  background: var(--gray-50);
  padding: 4rem 0;
  margin-top: 4rem;
  position: relative;
}

.related-articles::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.related-articles .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.related-articles h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary-700);
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.related-articles h3::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.related-card {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  transition: none;
  text-decoration: none;
  color: inherit;
  position: relative;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 1.5rem;
}

.related-card:hover {
  transform: none;
  box-shadow: none;
}

.related-image {
  height: 150px;
  overflow: hidden;
  position: relative;
  margin-bottom: 1rem;
}

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

.related-content {
  padding: 0;
}

.related-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.related-date {
  color: var(--gray-600);
  font-size: 0.85rem;
  font-weight: 500;
}

.related-category {
  background: var(--primary-100);
  color: var(--primary-700);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.related-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--secondary-700);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.related-content h4 a {
  color: inherit;
  text-decoration: none;
}

.related-content h4 a:hover {
  color: var(--primary-500);
}

.related-content p {
  color: var(--gray-600);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* ===========================================
   RESPONSIVE DESIGN - MOBILE FIRST
   =========================================== */

/* Mobile Optimizations */
@media (max-width: 768px) {
  .article-hero {
    min-height: 60vh;
  }
  
  .article-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  
  .article-subtitle {
    font-size: 1.1rem;
  }
  
  .article-hero-content {
    padding: 3rem 1rem;
  }
  
  .article-meta {
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .article-stats {
    gap: 1.5rem;
    flex-direction: column;
    align-items: center;
  }
  
  .stat-item {
    padding: 1rem 1.5rem;
    min-width: 150px;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .article-content {
    padding: 3rem 1rem;
  }
  
  .article-body {
    font-size: 1rem;
  }
  
  .article-body h2 {
    font-size: 1.75rem;
    margin: 2.5rem 0 1rem 0;
  }
  
  .article-body h3 {
    font-size: 1.25rem;
    margin: 2rem 0 0.75rem 0;
  }
  
  .article-body blockquote {
    padding: 1.5rem;
    margin: 1.5rem 0;
  }
  
  .region-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .tech-features {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .share-section {
    padding: 2rem 0;
    margin: 3rem 0;
  }
  
  .share-buttons {
    gap: 0.75rem;
  }
  
  .share-button {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    min-width: 120px;
  }
  
  .related-articles {
    padding: 3rem 0;
    margin-top: 3rem;
  }
  
  .related-articles .container {
    padding: 0 1rem;
  }
  
  .related-articles h3 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .related-content {
    padding: 1.25rem;
  }
}

/* Small Mobile Optimizations */
@media (max-width: 480px) {
  .article-hero {
    min-height: 50vh;
  }
  
  .article-hero h1 {
    font-size: 2rem;
  }
  
  .article-subtitle {
    font-size: 1rem;
  }
  
  .article-meta {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .article-stats {
    gap: 1rem;
  }
  
  .stat-item {
    padding: 0.875rem 1.25rem;
    min-width: 120px;
  }
  
  .stat-number {
    font-size: 1.75rem;
  }
  
  .stat-label {
    font-size: 0.8rem;
  }
  
  .article-content {
    padding: 2rem 1rem;
  }
  
  .article-body {
    font-size: 0.95rem;
  }
  
  .article-body h2 {
    font-size: 1.5rem;
  }
  
  .article-body h3 {
    font-size: 1.125rem;
  }
  
  .article-body blockquote {
    padding: 1.25rem;
    margin: 1.25rem 0;
  }
  
  .share-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
  }
  
  .share-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  
  .share-button {
    width: 100%;
    max-width: 200px;
    padding: 0.875rem 1rem;
  }
  
  .related-articles h3 {
    font-size: 1.5rem;
  }
  
  .related-content h4 {
    font-size: 1rem;
  }
  
  .related-content p {
    font-size: 0.85rem;
  }
}

/* ===========================================
   NAVIGATION FIXES FOR ARTICLE PAGES - REMOVED CONFLICTING STYLES
   =========================================== */

/* ===========================================
   ANIMATIONS AND INTERACTIONS
   =========================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.related-card {
  animation: fadeInUp 0.6s ease-out;
}

.related-card:nth-child(2) {
  animation-delay: 0.1s;
}

.related-card:nth-child(3) {
  animation-delay: 0.2s;
}

/* ===========================================
   ACCESSIBILITY IMPROVEMENTS
   =========================================== */

@media (prefers-reduced-motion: reduce) {
  .related-card,
  .related-card:hover {
    transform: none;
    transition: none;
  }
  
  .related-image img {
    transform: none;
  }
  
  .share-button::before {
    display: none;
  }
}

/* Focus styles for better accessibility */
.share-button:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .related-card {
    border: 2px solid var(--secondary-300);
  }
  
  .share-button {
    border: 2px solid currentColor;
  }
}

/* ===========================================
   FORCE WHITE COLOR FOR HERO SUBTITLES - HIGHEST PRIORITY
   =========================================== */

/* Ultimate override for hero subtitles */
body.article-page .article-hero p.article-subtitle,
body.article-page .article-hero-content p.article-subtitle,
.article-hero p.article-subtitle,
.article-hero-content p.article-subtitle {
  color: #ffffff !important;
  color: white !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  opacity: 0.95 !important;
}

/* Force all hero text to be white */
body.article-page .article-hero *,
body.article-page .article-hero-content * {
  color: #ffffff !important;
  color: white !important;
}

/* Style article subtitle when in article body */
.article-body .article-subtitle {
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--secondary-600) !important;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  font-style: italic;
}

/* Responsive heading styles */
@media (max-width: 768px) {
  .article-hero h1 {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .article-hero-content {
    max-width: 100%;
    padding: 3rem 1rem;
  }
}

@media (max-width: 480px) {
  .article-hero h1 {
    font-size: 1.75rem;
    line-height: 1.2;
  }
  
  .article-hero-content {
    padding: 2rem 1rem;
  }
}