/* ==========================================================================
   Vartman News - Modern Portal Stylesheet
   Supports Gujarati Typography & Responsive Layout
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Mukta+Vaani:wght@400;500;600;700&family=Baloo+Bhai+2:wght@500;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #c41e24;
  --primary-dark: #9f1318;
  --secondary: #1a202c;
  --accent: #d97706;
  --bg-light: #f8fafc;
  --text-main: #1f2937;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Mukta Vaani', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-main);
  background-color: #f1f5f9;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6, .heading-font {
  font-family: 'Baloo Bhai 2', 'Mukta Vaani', sans-serif;
  color: #111827;
  font-weight: 700;
  line-height: 1.3;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--primary);
}

.site-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  background-color: #ffffff;
  box-shadow: 0 0 25px rgba(0,0,0,0.06);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Header & Top Bar
   ========================================================================== */
.top-bar {
  background-color: #0f172a;
  color: #cbd5e1;
  padding: 6px 16px;
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.top-bar-date {
  font-weight: 600;
  color: #f8fafc;
}

.top-bar-cities {
  letter-spacing: 0.5px;
  font-weight: 600;
  color: #fbbf24;
}

.header-main {
  padding: 16px 20px;
  border-bottom: 2px solid var(--border-color);
  background: #ffffff;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.site-logo {
  max-height: 80px;
  width: auto;
  object-fit: contain;
}

.header-ads-row {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
}

.header-ad-box {
  flex: 1;
  max-width: 360px;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: #f8fafc;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-ad-box img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.2s ease;
}

.header-ad-box img:hover {
  transform: scale(1.02);
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.main-nav-wrapper {
  background-color: var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.nav-links li a {
  display: block;
  padding: 12px 16px;
  color: #ffffff;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: background-color 0.2s, border-color 0.2s;
}

.nav-links li a:hover,
.nav-links li.active a {
  background-color: var(--primary-dark);
  border-bottom-color: #fbbf24;
  color: #ffffff;
}

.nav-toggle-btn {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

/* ==========================================================================
   Breaking News Ticker
   ========================================================================== */
.ticker-bar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 44px;
}

.ticker-badge {
  background-color: var(--primary);
  color: #ffffff;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  letter-spacing: 0.5px;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  z-index: 2;
}

.ticker-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-marquee {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: marqueeTicker 35s linear infinite;
}

.ticker-marquee:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
}

.ticker-item:hover {
  color: var(--primary);
  text-decoration: underline;
}

.ticker-item::before {
  content: "•";
  margin-right: 12px;
  color: var(--primary);
  font-size: 1.2rem;
}

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

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.site-content {
  flex: 1;
  padding: 24px 20px;
}

.section-header {
  border-bottom: 2px solid var(--primary);
  margin-bottom: 24px;
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  margin: 0;
  font-size: 1.6rem;
  color: var(--primary);
  display: inline-block;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--primary-dark);
}

/* ==========================================================================
   News Card & List Styles
   ========================================================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.news-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-hover-shadow);
}

.news-card-img-wrap {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: #f1f5f9;
  position: relative;
}

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

.news-card:hover .news-card-img {
  transform: scale(1.04);
}

.news-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-title {
  font-size: 1.25rem;
  margin: 0 0 10px 0;
  line-height: 1.4;
  color: #111827;
}

.news-card-title a:hover {
  color: var(--primary);
}

.news-card-desc {
  font-size: 0.95rem;
  color: #4b5563;
  margin-bottom: 14px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-read-more {
  display: inline-block;
  background-color: var(--primary);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.btn-read-more:hover {
  background-color: var(--primary-dark);
  color: #ffffff;
}

/* Horizontal News List View (like legacy index.php) */
.news-horizontal-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-list-item {
  display: flex;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
  transition: background-color 0.2s ease;
}

.news-list-item:last-child {
  border-bottom: none;
}

.news-list-thumb {
  width: 240px;
  height: 160px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #f1f5f9;
}

.news-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.news-list-thumb:hover img {
  transform: scale(1.05);
}

.news-list-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-list-title {
  font-size: 1.35rem;
  margin: 0 0 10px 0;
  line-height: 1.35;
}

.news-list-snippet {
  font-size: 1rem;
  color: #4b5563;
  margin-bottom: 12px;
  flex: 1;
}

.news-list-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Article Detail Page (page.php)
   ========================================================================== */
.article-container {
  display: flex;
  gap: 30px;
}

.article-main {
  flex: 1;
  min-width: 0;
}

.article-sidebar {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-title {
  font-size: 2.2rem;
  line-height: 1.3;
  margin: 0 0 15px 0;
  color: #0f172a;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 10px;
}

.article-views-badge {
  background-color: #e2e8f0;
  color: #334155;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
}

/* Social Share Bar */
.social-share-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 24px;
}

.social-share-title {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: #475569;
  letter-spacing: 0.5px;
}

.social-buttons-grid {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.9rem;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.share-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.share-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn-whatsapp { background-color: #25D366; }
.btn-facebook { background-color: #1877F2; }
.btn-twitter  { background-color: #1DA1F2; }
.btn-linkedin { background-color: #0A66C2; }

/* Article Lead / Summary */
.article-lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #334155;
  background-color: #f8fafc;
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 24px;
  font-weight: 500;
}

.article-featured-image {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

.article-video-wrap {
  margin-bottom: 24px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.article-video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

.article-body {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #1e293b;
  margin-bottom: 40px;
}

.article-body p {
  margin-bottom: 1.5em;
}

.article-body h1, .article-body h2, .article-body h3, .article-body h4 {
  color: #0f172a;
  margin: 1.4em 0 0.6em;
  font-weight: 700;
  line-height: 1.35;
}

.article-body blockquote {
  border-left: 4px solid var(--primary-color);
  background: #f8fafc;
  padding: 14px 20px;
  margin: 1.5em 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #334155;
}

.article-body ul, .article-body ol {
  margin: 1em 0 1.5em 1.5em;
  padding-left: 10px;
}

.article-body li {
  margin-bottom: 0.5em;
}

.article-body hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 2em 0;
}

.article-body a {
  color: var(--primary-color);
  text-decoration: underline;
}

.article-body img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 6px;
  margin: 16px 0;
}

/* Sidebar Ads */
.sidebar-ad-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease;
}

.sidebar-ad-card:hover {
  transform: translateY(-2px);
}

.sidebar-ad-card img {
  width: 100%;
  height: auto;
  display: block;
}

/* Related News */
.related-news-section {
  margin-top: 40px;
  border-top: 2px solid var(--border-color);
  padding-top: 24px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: #0f172a;
  color: #cbd5e1;
  margin-top: auto;
  border-top: 4px solid var(--primary);
}

.footer-nav {
  padding: 24px 20px;
  border-bottom: 1px solid #1e293b;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.footer-links li a {
  color: #94a3b8;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-links li a:hover {
  color: #f8fafc;
}

.footer-bottom {
  padding: 16px 20px;
  text-align: center;
  font-size: 0.9rem;
  color: #64748b;
}

.footer-bottom a {
  color: #94a3b8;
  font-weight: 600;
}

.footer-bottom a:hover {
  color: var(--primary);
}

/* Load More Button */
.load-more-container {
  text-align: center;
  margin: 30px 0;
}

.btn-load-more {
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  padding: 12px 30px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.btn-load-more:hover {
  background-color: var(--primary-dark);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 991px) {
  .article-container {
    flex-direction: column;
  }
  .article-sidebar {
    width: 100%;
  }
  .header-ads-row {
    flex-direction: column;
    margin-top: 15px;
  }
}

@media (max-width: 768px) {
  .nav-toggle-btn {
    display: block;
  }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links li a {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .news-list-item {
    flex-direction: column;
  }
  .news-list-thumb {
    width: 100%;
    height: 220px;
  }
  .article-title {
    font-size: 1.6rem;
  }
}
