/* ==========================================================================
   SocialPacer - Modern High-Converting Editorial Finance Theme
   Inspired by GeneratePress (rajnews.in layout architecture)
   Clean, Fast, Responsive, 100/100 Core Web Vitals, Google AdSense Ready
   ========================================================================== */

:root {
  --primary-navy: #0f172a;
  --primary-blue: #1e40af;
  --accent-green: #059669;
  --accent-green-hover: #047857;
  --accent-gold: #d97706;
  --bg-body: #f1f5f9;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, Cambria, "Times New Roman", Times, serif;
  --container-width: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-green);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* --- Top Utility Bar --- */
.top-bar {
  background-color: var(--primary-navy);
  color: #cbd5e1;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 38px;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-bar-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticker-badge {
  background-color: var(--accent-green);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-bar-right a {
  color: #94a3b8;
}

.top-bar-right a:hover {
  color: #ffffff;
}

/* --- Site Header --- */
.site-header {
  background-color: #ffffff;
  padding: 22px 0;
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #059669 0%, #1e40af 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 22px;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.3);
}

.brand-text h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: var(--primary-navy);
}

.brand-text h1 span {
  color: var(--accent-green);
}

.brand-tagline {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin-top: 3px;
}

.header-ad-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 468px;
  height: 60px;
  background-color: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  color: #94a3b8;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* --- Navigation Bar --- */
.main-navigation {
  background-color: #ffffff;
  border-bottom: 2px solid #e2e8f0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 4px;
}

.nav-menu li a {
  display: block;
  padding: 14px 18px;
  color: var(--text-main);
  font-weight: 600;
  font-size: 15px;
  border-bottom: 3px solid transparent;
  transition: all 0.15s ease;
}

.nav-menu li a:hover,
.nav-menu li.active a {
  color: var(--accent-green);
  border-bottom-color: var(--accent-green);
  background-color: #f8fafc;
}

.nav-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-search-btn:hover {
  background-color: #e2e8f0;
  color: var(--primary-navy);
}

/* --- Layout Grid (Separate Containers) --- */
.site-content {
  padding: 32px 0 60px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 30px;
  align-items: start;
}

.main-column {
  min-width: 0;
}

.sidebar-column {
  min-width: 0;
}

/* --- GeneratePress Style Cards --- */
.card-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-box:hover {
  box-shadow: var(--shadow-md);
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--accent-green);
}

.breadcrumbs .sep {
  color: var(--text-light);
}

.breadcrumbs .current {
  color: var(--primary-navy);
  font-weight: 600;
}

/* --- Article Page Typography --- */
.article-header {
  margin-bottom: 24px;
}

.category-badge {
  display: inline-block;
  background-color: #ecfdf5;
  color: var(--accent-green);
  border: 1px solid #a7f3d0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.article-title {
  font-size: 34px;
  line-height: 1.25;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.article-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.author-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--primary-navy);
}

.author-chip img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.e-e-a-t-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #eff6ff;
  color: var(--primary-blue);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.article-featured-image {
  margin: 24px 0 28px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.article-featured-image img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.image-caption {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 8px;
  background-color: #f8fafc;
  border-top: 1px solid var(--border-color);
}

/* --- Article Content Layout --- */
.article-body {
  font-size: 17px;
  line-height: 1.8;
  color: #334155;
}

.article-body p {
  margin-bottom: 22px;
}

.article-body h2 {
  font-size: 25px;
  font-weight: 700;
  color: var(--primary-navy);
  margin: 36px 0 16px;
  line-height: 1.3;
  padding-bottom: 8px;
  border-bottom: 2px solid #f1f5f9;
}

.article-body h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 28px 0 12px;
  line-height: 1.35;
}

.article-body ul, .article-body ol {
  margin-bottom: 24px;
  padding-left: 28px;
}

.article-body li {
  margin-bottom: 10px;
}

/* --- Callout & Takeaways Box --- */
.article-key-takeaways {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
  border-left: 4px solid var(--accent-green);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin: 24px 0 30px;
}

.takeaways-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-green);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

.article-key-takeaways ul {
  margin-bottom: 0;
  padding-left: 20px;
}

.article-key-takeaways li {
  margin-bottom: 8px;
  color: #166534;
  font-size: 15px;
}

/* --- Financial Tables --- */
.table-responsive {
  overflow-x: auto;
  margin: 28px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.financial-data-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  font-size: 15px;
  text-align: left;
}

.financial-data-table th {
  background-color: var(--primary-navy);
  color: #ffffff;
  padding: 14px 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.financial-data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: #334155;
}

.financial-data-table tr:nth-child(even) {
  background-color: #f8fafc;
}

.table-caption {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: -16px;
  margin-bottom: 24px;
}

/* --- Comparison Grids --- */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 28px 0;
}

.comparison-card {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.card-positive {
  background-color: #f0fdf4;
  border-color: #bbf7d0;
}

.card-positive h3 {
  color: #166534;
  margin-top: 0;
}

.card-warning {
  background-color: #fffbeb;
  border-color: #fde68a;
}

.card-warning h3 {
  color: #92400e;
  margin-top: 0;
}

.comparison-card ul {
  padding-left: 20px;
  margin-bottom: 0;
  font-size: 14px;
}

/* --- FAQ Accordion --- */
.faq-accordion {
  margin: 30px 0;
}

.faq-item {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  padding: 18px 20px;
}

.faq-item h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-navy);
  margin-top: 0;
  margin-bottom: 8px;
}

.faq-answer p {
  margin-bottom: 0;
  font-size: 15px;
  color: #475569;
}

/* --- Author Review Box --- */
.author-review-badge {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  margin: 32px 0;
  font-size: 14px;
  color: #475569;
}

.author-box-full {
  display: flex;
  gap: 20px;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 40px 0;
  box-shadow: var(--shadow-sm);
}

.author-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-info h4 {
  font-size: 18px;
  color: var(--primary-navy);
  margin-bottom: 4px;
}

.author-title {
  font-size: 13px;
  color: var(--accent-green);
  font-weight: 600;
  margin-bottom: 8px;
}

.author-bio {
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
}

/* --- In-Feed AdSense Slots --- */
.adsense-slot-wrapper {
  margin: 30px 0;
  text-align: center;
}

.adsense-box {
  background-color: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 20px;
  color: #94a3b8;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Related Articles --- */
.related-posts-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid var(--border-color);
}

.section-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.post-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-img-wrap {
  height: 160px;
  overflow: hidden;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card:hover .card-img-wrap img {
  transform: scale(1.05);
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-green);
  margin-bottom: 6px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--primary-navy);
  margin-bottom: 10px;
}

.card-title a {
  color: inherit;
}

.card-title a:hover {
  color: var(--accent-green);
}

.card-meta {
  margin-top: auto;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

/* --- Sidebar Widgets --- */
.sidebar-widget {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trending-list {
  list-style: none;
}

.trending-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.trending-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.trending-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.trending-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trending-info h4 {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  margin-bottom: 4px;
}

.trending-info h4 a {
  color: var(--primary-navy);
}

.trending-info h4 a:hover {
  color: var(--accent-green);
}

.trending-date {
  font-size: 11px;
  color: var(--text-light);
}

.category-list {
  list-style: none;
}

.category-item a {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  color: var(--text-main);
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.category-item a:hover {
  color: var(--accent-green);
  padding-left: 4px;
}

.category-count {
  background-color: #f1f5f9;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

/* --- E-E-A-T Sidebar Trust Card --- */
.trust-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
}

.trust-card h3 {
  font-size: 16px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.trust-card p {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 14px;
}

.trust-badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.trust-pill {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
}

/* --- Sticky Sidebar Ad --- */
.sticky-sidebar-ad {
  position: sticky;
  top: 80px;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  color: #94a3b8;
  font-size: 12px;
  text-transform: uppercase;
}

/* --- Footer --- */
.site-footer {
  background-color: var(--primary-navy);
  color: #cbd5e1;
  padding-top: 50px;
  border-top: 4px solid var(--accent-green);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h3 {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 8px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background-color: var(--accent-green);
}

.footer-col p {
  font-size: 14px;
  line-height: 1.6;
  color: #94a3b8;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #94a3b8;
  font-size: 14px;
  transition: all 0.15s ease;
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.footer-disclaimer-box {
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 30px;
  font-size: 12px;
  line-height: 1.6;
  color: #94a3b8;
}

.footer-disclaimer-box strong {
  color: #cbd5e1;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
  font-size: 13px;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom-links {
  display: flex;
  gap: 18px;
}

.footer-bottom-links a {
  color: #94a3b8;
}

.footer-bottom-links a:hover {
  color: #ffffff;
}

/* --- Search Modal --- */
.search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  justify-content: center;
  align-items: flex-start;
  padding-top: 80px;
}

.search-modal.active {
  display: flex;
}

.search-modal-box {
  background-color: #ffffff;
  width: 100%;
  max-width: 680px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.search-input-wrap input {
  width: 100%;
  border: none;
  font-size: 18px;
  outline: none;
  padding-left: 12px;
  color: var(--primary-navy);
}

.search-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}

.search-results-list {
  max-height: 420px;
  overflow-y: auto;
  padding: 10px 0;
}

.search-result-item {
  padding: 12px 20px;
  border-bottom: 1px solid #f1f5f9;
  display: block;
}

.search-result-item:hover {
  background-color: #f8fafc;
}

.search-result-item h4 {
  font-size: 15px;
  color: var(--primary-navy);
  margin-bottom: 4px;
}

.search-result-item span {
  font-size: 12px;
  color: var(--accent-green);
  font-weight: 600;
  text-transform: uppercase;
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .header-ad-zone {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .top-bar-inner {
    flex-direction: column;
    height: auto;
    padding: 8px 0;
    gap: 4px;
  }
  .nav-inner {
    overflow-x: auto;
  }
  .nav-menu {
    white-space: nowrap;
  }
  .article-title {
    font-size: 26px;
  }
  .article-featured-image img {
    height: 260px;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .author-box-full {
    flex-direction: column;
    text-align: center;
  }
}
