/*
Theme Name: NewsPortal
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A modern news portal theme with premium UI/UX
Version: 2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ============================================
   CSS VARIABLES - Modern Color Palette
   ============================================ */
:root {
  /* Primary Colors */
  --color-primary: #2563eb;
  --color-primary-dark: #1e40af;
  --color-primary-light: #3b82f6;
  
  /* Accent Colors */
  --color-accent: #f59e0b;
  --color-accent-dark: #d97706;
  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
  
  /* Neutral Colors */
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  --font-size: 16px;
  --brand-yellow: #f5b400;
  --brand-yellow-dark: #d99900;
  --brand-red: #c01624;
  --brand-red-dark: #9b121d;
  --brand-black: #0b0b0b;
  --brand-blue: #2563eb;
  --brand-blue-dark: #1d4ed8;
}

html {
  font-size: var(--font-size);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #ffffff;
  color: #1a1a1a;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: -0.02em;
  font-weight: 800;
  line-height: 1.2;
  color: #0a0a0a;
}

a {
  text-decoration: none;
}

/* Ticker animation for breaking news */
@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-scroll {
  animation: scroll 30s linear infinite;
}

/* Sidebar numbered list */
.sidebar-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #dc2626;
  color: white;
  font-weight: 700;
  font-size: 14px;
  border-radius: 6px;
  flex-shrink: 0;
}

/* News cards */
.news-card {
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.news-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #d1d5db;
}

/* Line clamp utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .max-w-7xl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  h1 {
    font-size: 2rem !important;
  }
}

/* Brand overrides for Tailwind utility colors used in templates */
.bg-yellow-500 { background-color: var(--brand-yellow) !important; }
.bg-yellow-600 { background-color: var(--brand-yellow-dark) !important; }
.text-yellow-500,
.text-yellow-600 { color: var(--brand-yellow-dark) !important; }
.hover\:bg-yellow-600:hover { background-color: var(--brand-yellow-dark) !important; }
.hover\:text-yellow-600:hover { color: var(--brand-yellow-dark) !important; }

.bg-red-600 { background-color: var(--brand-red) !important; }
.bg-red-700 { background-color: var(--brand-red-dark) !important; }
.hover\:bg-red-700:hover { background-color: var(--brand-red-dark) !important; }
.hover\:text-red-600:hover { color: var(--brand-red) !important; }
.hover\:text-red-700:hover { color: var(--brand-red-dark) !important; }
.hover\:text-red-800:hover { color: #991b1b !important; }
.hover\:text-red-900:hover { color: #7f1d1d !important; }

.bg-gray-900 { background-color: var(--brand-black) !important; }
.dark .bg-gray-900 { background-color: #000000 !important; }
.dark .bg-black { background-color: #000000 !important; }
.dark .text-gray-300,
.dark .text-gray-400 { color: #c7c7c7 !important; }

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-scroll {
  animation: scroll 30s linear infinite;
}

.news-card {
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

.news-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Image Captions - Custom Style */
.wp-caption,
figure {
  margin: 1.5rem 0;
}

.wp-caption-text,
figcaption {
  font-size: 0.75rem !important; /* 12px - small font size */
  line-height: 1.4 !important;
  color: #6b7280 !important; /* Gray-500 */
  font-style: italic !important;
  text-align: center !important;
  margin-top: 0.5rem !important;
  padding: 0.25rem 0.5rem !important;
  background-color: #f9fafb !important; /* Gray-50 */
  border-left: 3px solid var(--brand-red) !important;
  border-radius: 0 0.25rem 0.25rem 0 !important;
}

/* Dark mode caption styles */
.dark .wp-caption-text,
.dark figcaption {
  color: #9ca3af !important; /* Gray-400 */
  background-color: #1f2937 !important; /* Gray-800 */
  border-left-color: var(--brand-red) !important;
}

/* WordPress specific caption styles */
.wp-caption.aligncenter,
.wp-caption.alignleft,
.wp-caption.alignright {
  margin-bottom: 1.5rem;
}

.wp-caption img {
  margin-bottom: 0.5rem;
}

.wp-caption .wp-caption-text {
  margin-bottom: 0;
}

/* Gallery caption styles */
.gallery-item .gallery-caption {
  font-size: 0.7rem !important; /* 11px - even smaller for galleries */
  color: #6b7280 !important;
  font-style: italic;
  text-align: center;
  margin-top: 0.25rem;
  padding: 0.25rem;
  background-color: rgba(249, 250, 251, 0.8);
  border-radius: 0.25rem;
}

.dark .gallery-item .gallery-caption {
  color: #9ca3af !important;
  background-color: rgba(31, 41, 55, 0.8);
}

/* Article content specific caption styles */
.prose figcaption,
.prose .wp-caption-text {
  font-size: 0.75rem !important; /* 12px */
  line-height: 1.4 !important;
  color: #6b7280 !important; /* Gray-500 */
  font-style: italic !important;
  text-align: center !important;
  margin: 0.75rem 0 !important;
  padding: 0.5rem !important;
  background-color: #f9fafb !important; /* Gray-50 */
  border-left: 3px solid var(--brand-red) !important;
  border-radius: 0 0.375rem 0.375rem 0 !important;
  font-weight: 400 !important;
  letter-spacing: 0.025em !important;
}

.dark .prose figcaption,
.dark .prose .wp-caption-text {
  color: #9ca3af !important; /* Gray-400 */
  background-color: #1f2937 !important; /* Gray-800 */
  border-left-color: var(--brand-red) !important;
}

/* Featured image caption */
.post-thumbnail-caption {
  font-size: 0.875rem !important; /* 14px - slightly larger for featured */
  color: #6b7280 !important;
  font-style: italic;
  text-align: center;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background-color: #f3f4f6;
  border-left: 4px solid var(--brand-red);
  border-radius: 0 0.5rem 0.5rem 0;
}

.dark .post-thumbnail-caption {
  color: #9ca3af !important;
  background-color: #1f2937 !important;
  border-left-color: var(--brand-red) !important;
}

.section-underline {
  height: 3px;
  width: 48px;
  background: var(--brand-blue-dark);
  border-radius: 999px;
}

.sidebar-number {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  flex-shrink: 0;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}


::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ============================================
   DARK MODE - COMPREHENSIVE STYLES
   Covers ALL layers of the site
   ============================================ */
.dark {
  color-scheme: dark;
}

/* --- Base --- */
.dark body,
html.dark body {
  background: #111827 !important;
  color: #e2e8f0;
}

/* --- Backgrounds --- */
.dark .bg-white {
  background: #1f2937 !important;
}

.dark .bg-gray-50 {
  background: #1f2937 !important;
}

.dark .bg-gray-100 {
  background: #374151 !important;
}

.dark .bg-gray-200 {
  background: #4b5563 !important;
}

.dark .bg-gray-900 {
  background: #000000 !important;
}

.dark .bg-black {
  background: #000000 !important;
}

/* --- Text Colors --- */
.dark .text-gray-900,
.dark .text-black {
  color: #f1f5f9 !important;
}

.dark .text-gray-800 {
  color: #e2e8f0 !important;
}

.dark .text-gray-700 {
  color: #cbd5e1 !important;
}

.dark .text-gray-600 {
  color: #94a3b8 !important;
}

.dark .text-gray-500 {
  color: #64748b !important;
}

.dark .text-gray-400 {
  color: #9ca3af !important;
}

.dark .text-gray-300 {
  color: #d1d5db !important;
}

/* --- Borders --- */
.dark .border-gray-100,
.dark .border-gray-200,
.dark .border-gray-300 {
  border-color: #374151 !important;
}

.dark .border-gray-900 {
  border-color: #6b7280 !important;
}

.dark .border-b-4 {
  border-color: inherit;
}

/* --- Header --- */
.dark header {
  background: #111827 !important;
  border-color: #374151;
}

/* --- Cards (front-page, category, latest news) --- */
.dark .shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2) !important;
}

.dark .shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3) !important;
}

.dark .shadow-xl {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2) !important;
}

.dark .news-card {
  border-color: #374151;
  background: #1f2937;
}

/* --- Sidebar: Trending --- */
.dark .bg-yellow-50 {
  background: #1f2937 !important;
}

.dark .border-yellow-200 {
  border-color: #374151 !important;
}

/* --- Sidebar: Social Media --- */
.dark .bg-white.rounded-2xl {
  background: #1f2937 !important;
}

/* --- Sidebar: Newsletter (keep red) --- */

/* --- Opinion Section --- */
.dark .text-sm.text-gray-600 {
  color: #94a3b8 !important;
}

/* --- Hover States --- */
.dark .hover\:bg-gray-100:hover {
  background: #374151 !important;
}

.dark .hover\:bg-gray-50:hover {
  background: #374151 !important;
}

.dark .hover\:bg-gray-200:hover {
  background: #4b5563 !important;
}

/* --- Tags --- */
.dark .bg-gray-100.hover\:bg-gray-200 {
  background: #374151 !important;
  color: #d1d5db !important;
}

.dark .bg-gray-100.hover\:bg-gray-200:hover {
  background: #4b5563 !important;
}

/* --- Footer (already dark, keep as is) --- */

/* --- Ad Spaces --- */
.dark .ad-content {
  opacity: 0.9;
}

/* --- Search Form --- */
.dark #search-form-container {
  background: #1f2937 !important;
  border-color: #374151 !important;
}

.dark #search-input {
  background: #374151 !important;
  border-color: #4b5563 !important;
  color: #f1f5f9 !important;
}

/* --- Prose (Article Content) --- */
.dark .prose {
  color: #cbd5e1;
}

.dark .prose h1,
.dark .prose h2,
.dark .prose h3,
.dark .prose h4,
.dark .prose h5,
.dark .prose h6 {
  color: #f1f5f9 !important;
}

.dark .prose p {
  color: #cbd5e1;
}

.dark .prose strong {
  color: #f1f5f9 !important;
}

.dark .prose a {
  color: #60a5fa;
}

.dark .prose a:hover {
  color: #93bbfd;
}

.dark .prose blockquote {
  border-color: #4b5563;
  color: #94a3b8;
}

.dark .prose code {
  color: #e2e8f0;
  background: #374151;
}

.dark .prose pre {
  background: #1e293b;
}

/* --- Headings (global) --- */
.dark h1, .dark h2, .dark h3 {
  color: #f1f5f9;
}

/* --- Pagination --- */
.dark .pagination a,
.dark .pagination span {
  border-color: #374151;
  color: #cbd5e1;
}

.dark .pagination a:hover {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

/* --- Scrollbar --- */
.dark ::-webkit-scrollbar-track {
  background: #1f2937;
}

.dark ::-webkit-scrollbar-thumb {
  background: #4b5563;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* --- Forms --- */
.dark input[type="text"],
.dark input[type="email"],
.dark input[type="search"],
.dark textarea {
  background: #374151 !important;
  border-color: #4b5563 !important;
  color: #f1f5f9 !important;
}

/* --- Comments --- */
.dark .comment-body {
  background: #1f2937;
  border-color: #374151;
}

/* --- Transition for smooth dark mode toggle --- */
body,
header,
main,
article,
section,
div,
footer,
nav,
aside {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Widget spacing */
.widget {
  margin-bottom: 2rem;
}

#secondary .widget:last-child {
  margin-bottom: 0;
}

/* Reaction buttons */
.reaction-btn {
  cursor: pointer;
  user-select: none;
}

.reaction-btn:active {
  transform: scale(0.95);
}

/* Lightbox for images */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.pagination a,
.pagination span {
  padding: 0.5rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  color: #374151;
  text-decoration: none;
  transition: all 0.2s;
}

.pagination a:hover {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.pagination .current {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

/* Prose styling for post content */
.prose {
  color: #374151;
  max-width: 65ch;
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose h2 {
  font-size: 1.5em;
  margin-top: 2em;
  margin-bottom: 1em;
}

.prose h3 {
  font-size: 1.25em;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
}

.prose ul, .prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.625em;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose img {
  margin-top: 2em;
  margin-bottom: 2em;
  border-radius: 0.5rem;
}

.prose a {
  color: var(--brand-blue);
  text-decoration: underline;
}

.prose a:hover {
  color: var(--brand-blue-dark);
}

.prose strong {
  font-weight: 600;
  color: #111827;
}

.prose-lg {
  font-size: 1.125rem;
  line-height: 1.8;
}

