/* Voice Article Unique Styling - Modern Horizontal Author Panel */

.speech-author-panel-modern {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 16px;
  padding: 1.5rem 2rem;
  margin: 0 auto 2rem;
  max-width: 600px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  text-decoration: none;
  transition: all 0.3s ease;
}

.speech-author-panel-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  border-color: #374151;
}

.author-panel-image-wrapper {
  flex-shrink: 0;
}

.author-panel-image {
  width: 90px;
  height: 100px;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.author-panel-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.author-panel-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}

.author-panel-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #8b5cf6;
}

.article-meta-tags-modern {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.article-meta-pill-modern {
  background: #1f2937;
  color: #d1d5db;
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ============================================
MALAYALAM FONT OPTIMIZATION
============================================ */

/* Import Malayalam fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Malayalam:wght@300;400;500;600;700;800&family=Manjari:wght@400;700&family=Chilanka&display=swap');

/* Root variables for Malayalam typography */
:root {
  --malayalam-font: 'Noto Sans Malayalam', 'Manjari', 'Chilanka', sans-serif;
  --malayalam-heading: 'Noto Sans Malayalam', 'Manjari', serif;
  --malayalam-body: 'Noto Sans Malayalam', 'Manjari', sans-serif;
  --malayalam-accent: 'Chilanka', 'Noto Sans Malayalam', cursive;

  /* Font sizes optimized for Malayalam readability */
  --malayalam-body-size: 1.05rem;
  --malayalam-heading-size: 1.8rem;
  --malayalam-subheading-size: 1.3rem;
  --malayalam-small-size: 0.9rem;

  /* Line heights for better readability */
  --malayalam-line-height: 1.9;
  --malayalam-heading-line-height: 1.4;

  /* Letter spacing for Malayalam */
  --malayalam-letter-spacing: 0.02em;
}

/* ============================================
MALAYALAM SPECIFIC STYLES
============================================ */

/* Apply Malayalam fonts to all content */
.article-content,
.article-content p,
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6,
.article-content ul,
.article-content ol,
.article-content li,
.article-content span,
.article-content div,
.article-content a,
.speech-card-title,
.speech-card-author,
.speech-card-kicker,
.article-title,
.article-meta,
.article-date,
.article-type,
.speech-author-name,
.speech-author-label,
.page-hero h1,
.page-hero .lede,
.page-meta,
.notice-content,
.notice-title {
  font-family: var(--malayalam-body) !important;
}

/* Headings with Malayalam font */
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6,
.speech-card-title,
.article-title,
.page-hero h1,
.notice-title {
  font-family: var(--malayalam-heading) !important;
  font-weight: 700;
  letter-spacing: var(--malayalam-letter-spacing);
}

/* Decorative/accent text */
.brand-name,
.subtitle,
.quote-text,
.testimonial-text {
  font-family: var(--malayalam-accent) !important;
}

/* ============================================
ARTICLE CONTENT SPECIFIC STYLES
============================================ */

.article-content {
  font-family: var(--malayalam-body);
  font-size: var(--malayalam-body-size);
  line-height: var(--malayalam-line-height);
  letter-spacing: var(--malayalam-letter-spacing);
  color: #e8e8e8;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Malayalam paragraphs */
.article-content p {
  font-family: var(--malayalam-body);
  font-size: var(--malayalam-body-size);
  line-height: var(--malayalam-line-height);
  letter-spacing: var(--malayalam-letter-spacing);
  margin-bottom: 1.2em;
  color: #e0e0e0;
  font-weight: 400;
  text-align: justify;
  word-spacing: 0.05em;
}

/* Malayalam headings */
.article-content h3 {
  font-family: var(--malayalam-heading);
  font-size: var(--malayalam-heading-size);
  line-height: var(--malayalam-heading-line-height);
  font-weight: 700;
  color: var(--accent-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
  letter-spacing: var(--malayalam-letter-spacing);
  border-left: 4px solid var(--accent-primary);
  padding-left: 1rem;
}

.article-content h4 {
  font-family: var(--malayalam-heading);
  font-size: var(--malayalam-subheading-size);
  line-height: var(--malayalam-heading-line-height);
  font-weight: 600;
  color: var(--accent-secondary);
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
  letter-spacing: var(--malayalam-letter-spacing);
}

.article-content h5 {
  font-family: var(--malayalam-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
  letter-spacing: var(--malayalam-letter-spacing);
}

/* Malayalam lists */
.article-content ul,
.article-content ol {
  font-family: var(--malayalam-body);
  font-size: var(--malayalam-body-size);
  line-height: var(--malayalam-line-height);
  color: #d1d1d1;
  margin: 1.2rem 0 1.5rem 1.5rem;
  padding-left: 0.5rem;
  list-style-type: none;
}

.article-content ul li,
.article-content ol li {
  font-family: var(--malayalam-body);
  font-size: var(--malayalam-body-size);
  line-height: var(--malayalam-line-height);
  margin-bottom: 0.8rem;
  padding-left: 1.8rem;
  position: relative;
  color: #d1d1d1;
}

.article-content ul li::before {
  content: '✦';
  color: var(--accent-primary);
  position: absolute;
  left: 0;
  font-size: 1rem;
}

.article-content ol {
  counter-reset: list-counter;
}

.article-content ol li {
  padding-left: 2.2rem;
  counter-increment: list-counter;
}

.article-content ol li::before {
  content: counter(list-counter) '.';
  color: var(--accent-secondary);
  position: absolute;
  left: 0;
  font-weight: 600;
}

/* Malayalam bold text */
.article-content strong,
.article-content b {
  font-family: var(--malayalam-body);
  font-weight: 700;
  color: #ffffff;
}

/* Malayalam links */
.article-content a {
  font-family: var(--malayalam-body);
  color: var(--accent-primary);
  text-decoration: none;
  border-bottom: 2px solid rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
  font-weight: 500;
}

.article-content a:hover {
  color: var(--accent-secondary);
  border-bottom-color: var(--accent-secondary);
}

/* Malayalam blockquotes */
.article-content blockquote {
  font-family: var(--malayalam-accent);
  font-size: 1.1rem;
  line-height: var(--malayalam-line-height);
  color: #d1d1d1;
  border-left: 4px solid var(--accent-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(99, 102, 241, 0.05);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

/* ============================================
CODE BLOCKS & INLINE CODE RESPONSIVENESS
============================================ */
.article-content pre,
.article-content .ql-syntax {
  background: rgba(255, 255, 255, 0.03) !important;
  color: #e0e0e0 !important;
  padding: 0.8rem 1rem !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-family: var(--malayalam-body) !important;
  /* Force Malayalam font */
  font-size: var(--malayalam-body-size) !important;
  /* Normal size like other text */
  line-height: var(--malayalam-line-height) !important;
  /* Match line height of paragraphs */
  margin: 1.2rem 0 !important;
  white-space: pre-wrap !important;
  /* Wrap the text content instead of keeping it single line */
  word-wrap: break-word !important;
  word-break: break-word !important;
  max-width: 100% !important;
  display: block !important;
}

/* Inline code style */
.article-content code {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #e0e0e0 !important;
  padding: 0.2rem 0.4rem !important;
  border-radius: 4px !important;
  font-family: var(--malayalam-body) !important;
  font-size: var(--malayalam-body-size) !important;
  /* Normal size like other text */
  word-break: break-word !important;
  display: inline-block !important;
}

/* ============================================
CARD STYLES FOR MALAYALAM
============================================ */

.speech-card-title {
  font-family: var(--malayalam-heading);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: var(--malayalam-heading-line-height);
  color: #fff;
  letter-spacing: var(--malayalam-letter-spacing);
}

.speech-card-kicker {
  font-family: var(--malayalam-body);
  font-size: var(--malayalam-small-size);
  font-weight: 600;
  color: var(--accent-primary);
  letter-spacing: var(--malayalam-letter-spacing);
  text-transform: uppercase;
}

.speech-card-author {
  font-family: var(--malayalam-body);
  font-size: var(--malayalam-small-size);
  color: var(--text-muted);
}

/* ============================================
AUTHOR PANEL MALAYALAM
============================================ */

.speech-author-name {
  font-family: var(--malayalam-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: var(--malayalam-letter-spacing);
}

.speech-author-label {
  font-family: var(--malayalam-body);
  font-size: var(--malayalam-small-size);
  color: var(--text-muted);
  letter-spacing: var(--malayalam-letter-spacing);
}

/* ============================================
META INFORMATION MALAYALAM
============================================ */

.article-date,
.article-type {
  font-family: var(--malayalam-body);
  font-size: var(--malayalam-small-size);
  color: var(--text-muted);
  letter-spacing: var(--malayalam-letter-spacing);
}

/* ============================================
PAGE HERO MALAYALAM
============================================ */

.page-hero h1 {
  font-family: var(--malayalam-heading);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: var(--malayalam-heading-line-height);
  letter-spacing: var(--malayalam-letter-spacing);
  color: #fff;
}

.page-hero .lede {
  font-family: var(--malayalam-body);
  font-size: 1.2rem;
  line-height: var(--malayalam-line-height);
  color: var(--text-muted);
  letter-spacing: var(--malayalam-letter-spacing);
}

/* ============================================
RESPONSIVE BUTTONS
============================================ */

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.hero-buttons .btn {
  padding: 0.7rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 30px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  min-width: 160px;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
}

.hero-buttons .btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border-color: #6366f1;
}

.hero-buttons .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, #818cf8, #a78bfa);
}

.hero-buttons .btn-secondary {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.hero-buttons .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* ============================================
WHATSAPP BUTTON
============================================ */

.whatsapp-community .btn {
  padding: 0.7rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 30px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  min-width: 200px;
  text-align: center;
  border: none;
  cursor: pointer;
}

.whatsapp-community .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

/* ============================================
RESPONSIVE ADJUSTMENTS FOR MALAYALAM
============================================ */

@media (max-width: 768px) {
  :root {
    --malayalam-body-size: 0.95rem;
    --malayalam-heading-size: 1.5rem;
    --malayalam-subheading-size: 1.1rem;
    --malayalam-small-size: 0.8rem;
    --malayalam-line-height: 1.8;
  }

  .page-hero h1 {
    font-size: 2.2rem;
  }

  .page-hero .lede {
    font-size: 1rem;
  }

  .article-content p {
    text-align: left;
  }

  .article-content ul li,
  .article-content ol li {
    padding-left: 1.5rem;
  }

  .article-content ul li::before {
    font-size: 0.8rem;
  }

  .article-content ol li::before {
    font-size: 0.9rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 300px;
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    min-width: unset;
  }

  .whatsapp-community .btn {
    width: 100%;
    max-width: 300px;
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    min-width: unset;
  }

  .article-actions {
    flex-direction: column;
    align-items: center;
  }

  .article-actions .btn {
    width: 100%;
    max-width: 300px;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  :root {
    --malayalam-body-size: 0.9rem;
    --malayalam-heading-size: 1.3rem;
    --malayalam-subheading-size: 1rem;
    --malayalam-small-size: 0.75rem;
    --malayalam-line-height: 1.7;
  }

  .page-hero h1 {
    font-size: 1.8rem;
  }

  .page-hero .lede {
    font-size: 0.9rem;
  }

  .speech-card-title {
    font-size: 1rem;
  }

  .speech-author-name {
    font-size: 1rem;
  }

  .article-content h3 {
    font-size: 1.2rem;
    padding-left: 0.8rem;
  }

  .article-content h4 {
    font-size: 1rem;
  }

  .article-content ul,
  .article-content ol {
    margin-left: 0.5rem;
  }

  .article-content ul li,
  .article-content ol li {
    padding-left: 1.2rem;
  }

  .hero-buttons .btn {
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
    max-width: 280px;
  }

  .whatsapp-community .btn {
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
    max-width: 280px;
  }

  .article-actions .btn {
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
    max-width: 280px;
  }
}

@media (max-width: 380px) {
  .hero-buttons .btn {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    max-width: 260px;
  }

  .whatsapp-community .btn {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    max-width: 260px;
  }

  .article-actions .btn {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    max-width: 260px;
  }
}

/* ============================================
PRINT STYLES FOR MALAYALAM
============================================ */

@media print {
  .article-content {
    font-size: 12pt;
    line-height: 1.6;
    color: #000;
  }

  .article-content p {
    color: #000;
    font-size: 11pt;
  }

  .article-content h3 {
    color: #1a1a1a;
    border-left-color: #1a1a1a;
  }

  .article-content h4 {
    color: #333;
  }

  .article-content strong,
  .article-content b {
    color: #000;
  }

  .article-content ul li,
  .article-content ol li {
    color: #000;
  }

  .article-content ul li::before {
    color: #1a1a1a;
  }

  .article-content ol li::before {
    color: #333;
  }

  .speech-card-title {
    color: #000;
  }

  .speech-author-name {
    color: #1a1a1a;
  }

  .page-hero h1 {
    color: #000;
  }

  .page-hero .lede {
    color: #333;
  }

  .hero-buttons .btn,
  .whatsapp-community .btn,
  .article-actions .btn {
    border: 1px solid #ccc !important;
    background: #f9f9f9 !important;
    color: #000 !important;
  }
}

/* ============================================
MALAYALAM FONT FALLBACKS
============================================ */

/* If Google Fonts fail to load */
.article-content,
.article-content p,
.article-content h3,
.article-content h4,
.speech-card-title,
.speech-author-name,
.page-hero h1 {
  font-family: 'Noto Sans Malayalam', 'Manjari', 'Chilanka', 'Arial Unicode MS', 'Segoe UI', sans-serif;
}

/* ============================================
ANIMATION FOR MALAYALAM TEXT
============================================ */

@keyframes malayalamFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-content {
  animation: malayalamFadeIn 0.6s ease-out;
}

/* ============================================
RTL SUPPORT (if needed)
============================================ */

[dir="rtl"] .article-content h3 {
  border-left: none;
  border-right: 4px solid var(--accent-primary);
  padding-left: 0;
  padding-right: 1rem;
}

[dir="rtl"] .article-content ul li {
  padding-left: 0;
  padding-right: 1.8rem;
}

[dir="rtl"] .article-content ul li::before {
  left: auto;
  right: 0;
}

[dir="rtl"] .article-content blockquote {
  border-left: none;
  border-right: 4px solid var(--accent-primary);
}

/* ============================================
SPEECH AUTHOR PANEL
============================================ */

.speech-author-panel {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.speech-author-panel:hover {
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.06);
}

.speech-author-panel img {
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

/* ============================================
ARTICLE ACTIONS
============================================ */

.article-actions {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

.article-actions .btn {
  padding: 0.7rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 30px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  min-width: 160px;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
}

.article-actions .btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border-color: #6366f1;
}

.article-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.article-actions .btn-secondary {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.article-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* ============================================
ERROR MESSAGE
============================================ */

.error-message {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.error-message a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
}

.error-message a:hover {
  text-decoration: underline;
}

/* ============================================
BRAND HIGHLIGHT
============================================ */

.brand-highlight {
  color: var(--accent-primary);
  font-weight: 600;
}

/* ============================================
INNER IMAGE
============================================ */

.float-inner-image {
  margin: 1.5rem 0;
  text-align: center;
}

.float-inner-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  cursor: pointer;
}

.float-inner-image-caption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* ============================================
IMAGE MODAL
============================================ */

.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.image-modal.active {
  display: flex;
}

.image-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.image-modal-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}

.image-modal-caption {
  margin-top: 15px;
  color: #ccc;
  font-size: 1rem;
  text-align: center;
  font-style: italic;
}