/* ==========================================================================
   TRT TAMIL OLI — EDITORIAL DESIGN SYSTEM & STYLESHEET
   Professional News Publication Theme CSS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+Tamil:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Brand Palette */
  --brand-red: #DC2626;
  --brand-red-dark: #B91C1C;
  --brand-red-light: #FEE2E2;
  --brand-navy: #0F172A;
  --brand-navy-light: #1E293B;
  --brand-gold: #D97706;
  --brand-gold-light: #FEF3C7;
  
  /* Surface & Neutrals */
  --bg-body: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-muted: #F1F5F9;
  --border-color: #E2E8F0;
  --border-dark: #334155;

  /* Typography Colors */
  --text-main: #0F172A;
  --text-body: #334155;
  --text-muted: #64748B;
  --text-white: #FFFFFF;

  /* Fonts */
  --font-tamil: 'Noto Sans Tamil', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Spacing & Layout */
  --container-max: 1280px;
  --header-sticky-height: 64px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Shadows & Elevation */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.05);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-tamil);
  background-color: var(--bg-body);
  color: var(--text-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-red);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.trt-container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--brand-navy);
  color: #FFF;
  padding: 0.75rem 1.25rem;
  z-index: 9999;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: 1rem;
}

/* ==========================================================================
   HEADER COMPONENT
   ========================================================================== */

/* Top Utility Bar */
.trt-top-bar {
  background-color: var(--brand-navy);
  color: #94A3B8;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-dark);
}

.trt-top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
}

.trt-top-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.trt-top-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.trt-top-links a:hover {
  color: #FFFFFF;
}

.trt-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--brand-red);
  color: #FFF;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.5px;
}
.trt-live-dot {
  width: 6px;
  height: 6px;
  background: #FFF;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

/* Main Header Logo Bar */
.trt-main-header {
  background: var(--bg-surface);
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-color);
}

.trt-header-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.trt-logo-img {
  height: 68px;
  width: auto;
}

.trt-header-banner-ad {
  display: none;
}
@media (min-width: 992px) {
  .trt-header-banner-ad {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 728px;
    height: 90px;
    background: var(--bg-muted);
    border: 1px dashed #CBD5E1;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: 1px;
  }
}

/* Navigation Bar */
.trt-nav-bar {
  background-color: var(--brand-navy);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.trt-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
}

.trt-nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.25rem;
  height: 100%;
}

.trt-nav-item {
  height: 100%;
  display: flex;
  align-items: center;
}

.trt-nav-link {
  color: #E2E8F0;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0 0.85rem;
  height: 100%;
  display: flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  transition: all var(--transition-fast);
}

.trt-nav-link:hover,
.trt-nav-link.active {
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.08);
  border-bottom-color: var(--brand-red);
}

/* Search Bar Toggle */
.trt-search-trigger {
  background: none;
  border: none;
  color: #E2E8F0;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}
.trt-search-trigger:hover {
  color: var(--brand-red);
}

/* Mobile Menu Button */
.trt-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #FFF;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Breaking News Ticker */
.trt-breaking-bar {
  background: var(--brand-navy-light);
  border-bottom: 2px solid var(--brand-red);
  color: #FFF;
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 42px;
}

.trt-breaking-label {
  background: var(--brand-red);
  color: #FFF;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  letter-spacing: 0.5px;
  z-index: 2;
  box-shadow: 2px 0 6px rgba(0,0,0,0.2);
}

.trt-breaking-ticker {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 1rem;
}

.trt-breaking-content {
  white-space: nowrap;
  display: inline-block;
  animation: ticker 35s linear infinite;
  font-weight: 500;
  font-size: 0.92rem;
}
.trt-breaking-content:hover {
  animation-play-state: paused;
}
.trt-breaking-item {
  margin-right: 2.5rem;
  color: #F1F5F9;
}
.trt-breaking-item:hover {
  color: #F87171;
  text-decoration: underline;
}

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

/* ==========================================================================
   HOMEPAGE LAYOUT & EDITORIAL GRIDS
   ========================================================================== */

.trt-main-layout {
  padding: 1.75rem 0 3rem 0;
}

/* 2-Column Main Content & Sidebar Grid */
.trt-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 992px) {
  .trt-content-grid {
    grid-template-columns: 8fr 4fr;
  }
}

/* Section Titles */
.trt-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 1.25rem;
  position: relative;
}

.trt-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand-navy);
  padding-bottom: 0.5rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.trt-section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--brand-red);
}

.trt-section-more {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-red);
}

/* Lead News Grid */
.trt-lead-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2.25rem;
}
@media (min-width: 768px) {
  .trt-lead-hero-grid {
    grid-template-columns: 7fr 5fr;
  }
}

/* Main Primary Lead Story Card */
.trt-card-primary {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.trt-card-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.trt-card-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #CBD5E1;
}

.trt-card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.trt-card-primary:hover .trt-card-thumb-wrap img {
  transform: scale(1.04);
}

.trt-cat-pill {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--brand-red);
  color: #FFF;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.trt-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.trt-card-title-lg {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--brand-navy);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.trt-card-excerpt {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.trt-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* Secondary Stories Column Grid */
.trt-secondary-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.trt-card-horizontal {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  gap: 0.85rem;
  align-items: center;
  transition: background-color var(--transition-fast);
}
.trt-card-horizontal:hover {
  background-color: #FFF;
  border-color: #CBD5E1;
}

.trt-card-horizontal .trt-thumb {
  width: 110px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: #CBD5E1;
}
.trt-card-horizontal .trt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trt-card-horizontal-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--brand-navy);
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

/* Latest News Stream Grid */
.trt-news-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
@media (min-width: 640px) {
  .trt-news-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .trt-news-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.trt-card-standard {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.trt-card-standard:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.trt-card-standard .trt-thumb-box {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #E2E8F0;
}
.trt-card-standard .trt-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.trt-card-standard:hover .trt-thumb-box img {
  transform: scale(1.05);
}

.trt-card-standard-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.trt-card-standard-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--brand-navy);
  line-height: 1.45;
  margin-bottom: 0.6rem;
}

/* ==========================================================================
   SIDEBAR WIDGETS
   ========================================================================== */

.trt-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.trt-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.trt-widget-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-navy);
  border-bottom: 2px solid var(--brand-red);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Popular Posts Widget */
.trt-popular-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  list-style: none;
}

.trt-popular-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--bg-muted);
}
.trt-popular-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.trt-popular-num {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--brand-red);
  min-width: 24px;
}

.trt-popular-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand-navy);
  line-height: 1.4;
}

/* Sidebar Ad Banner Box */
.trt-sidebar-ad {
  width: 100%;
  height: 250px;
  background: var(--bg-muted);
  border: 1px dashed #CBD5E1;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-ui);
  letter-spacing: 1px;
}

/* Radio Live Stream Widget */
.trt-radio-widget {
  background: linear-gradient(135deg, var(--brand-navy), #1E293B);
  color: #FFF;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
}
.trt-radio-widget h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  color: #FFF;
}
.trt-radio-widget p {
  font-size: 0.82rem;
  color: #94A3B8;
  margin-bottom: 1rem;
}
.trt-audio-player {
  width: 100%;
  margin-top: 0.5rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   SINGLE ARTICLE PAGE
   ========================================================================== */

.trt-article-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.trt-breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.trt-article-header {
  margin-bottom: 1.5rem;
}

.trt-article-headline {
  font-size: 2rem;
  font-weight: 900;
  color: var(--brand-navy);
  line-height: 1.35;
  margin: 0.75rem 0;
}
@media (max-width: 768px) {
  .trt-article-headline {
    font-size: 1.55rem;
  }
}

.trt-article-sub {
  font-size: 1.1rem;
  color: var(--text-body);
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

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

.trt-author-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--brand-navy);
}

.trt-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.trt-share-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trt-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-muted);
  color: var(--text-body);
  transition: all var(--transition-fast);
}
.trt-share-btn:hover {
  background: var(--brand-red);
  color: #FFF;
}

.trt-featured-media {
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #E2E8F0;
}
.trt-featured-media img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}
.trt-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.5rem 0.25rem;
  font-style: italic;
}

.trt-article-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #1E293B;
  max-width: 68ch;
}

.trt-article-body p {
  margin-bottom: 1.35rem;
}

.trt-article-body h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--brand-navy);
  margin: 1.75rem 0 0.85rem 0;
}

.trt-article-body blockquote {
  border-left: 4px solid var(--brand-red);
  padding: 0.85rem 1.25rem;
  background: var(--brand-red-light);
  font-style: italic;
  font-weight: 600;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ==========================================================================
   CATEGORY & ARCHIVE PAGES
   ========================================================================== */

.trt-archive-header {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  border-left: 5px solid var(--brand-red);
}

.trt-archive-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--brand-navy);
}

.trt-archive-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Pagination */
.trt-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2.25rem;
}

.trt-pagination a,
.trt-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.9rem;
}
.trt-pagination .current {
  background: var(--brand-red);
  color: #FFF;
  border-color: var(--brand-red);
}

/* ==========================================================================
   FOOTER COMPONENT
   ========================================================================== */

.trt-footer {
  background: var(--brand-navy);
  color: #94A3B8;
  padding-top: 3rem;
  border-top: 4px solid var(--brand-red);
}

.trt-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
  .trt-footer-grid {
    grid-template-columns: 4fr 3fr 2fr 3fr;
  }
}

.trt-footer-col h5 {
  color: #FFF;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.4rem;
}
.trt-footer-col h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--brand-red);
}

.trt-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.9rem;
}
.trt-footer-links a {
  color: #CBD5E1;
}
.trt-footer-links a:hover {
  color: #FFF;
  padding-left: 4px;
}

.trt-footer-bottom {
  background: #090D16;
  padding: 1.25rem 0;
  font-size: 0.82rem;
  color: #64748B;
  border-top: 1px solid var(--border-dark);
}

.trt-footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Mobile Navigation Off-Canvas Drawer */
.trt-mobile-drawer {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background: var(--brand-navy);
  z-index: 99999;
  transition: left 0.3s ease;
  box-shadow: 4px 0 15px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
}
.trt-mobile-drawer.active {
  left: 0;
}

.trt-drawer-header {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-dark);
}

.trt-drawer-close {
  background: none;
  border: none;
  color: #FFF;
  font-size: 1.5rem;
  cursor: pointer;
}

.trt-drawer-menu {
  list-style: none;
  padding: 1rem;
  overflow-y: auto;
}
.trt-drawer-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: #E2E8F0;
  font-weight: 600;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.trt-drawer-menu a:hover {
  color: #FFF;
  background: rgba(255,255,255,0.08);
}

.trt-drawer-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  z-index: 99990;
}
.trt-drawer-overlay.active {
  display: block;
}

/* Responsive Overrides */
@media (max-width: 991px) {
  .trt-nav-menu {
    display: none;
  }
  .trt-mobile-toggle {
    display: block;
  }
  .trt-logo-img {
    height: 52px;
  }
}
