/* ==========================================================================
   TamilGuru WordPress Theme - Main Stylesheet
   Designed for TamilGuru.in
   ========================================================================== */

:root {
  /* Color Palette */
  --tg-primary: #dc2626;
  --tg-primary-hover: #b91c1c;
  --tg-primary-light: #fef2f2;
  --tg-secondary: #f59e0b;
  --tg-secondary-hover: #d97706;
  --tg-accent: #8b5cf6;
  --tg-success: #10b981;
  --tg-dark: #0f172a;
  --tg-surface: #ffffff;
  --tg-surface-subtle: #f8fafc;
  --tg-surface-card: #ffffff;
  --tg-border: #e2e8f0;
  --tg-border-light: #f1f5f9;
  --tg-text: #1e293b;
  --tg-text-muted: #64748b;
  --tg-text-light: #94a3b8;
  --tg-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --tg-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --tg-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --tg-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.04);
  --tg-radius-sm: 8px;
  --tg-radius: 12px;
  --tg-radius-lg: 18px;
  --tg-radius-full: 9999px;
  
  /* Fonts */
  --tg-font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --tg-font-tamil: 'Noto Sans Tamil', 'Mukta Malar', -apple-system, sans-serif;
  
  /* Layout */
  --tg-container-max: 1280px;
  --tg-header-height: 72px;
  --tg-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --tg-surface: #0f172a;
  --tg-surface-subtle: #1e293b;
  --tg-surface-card: #1e293b;
  --tg-border: #334155;
  --tg-border-light: #1e293b;
  --tg-text: #f1f5f9;
  --tg-text-muted: #94a3b8;
  --tg-text-light: #64748b;
  --tg-primary-light: rgba(220, 38, 38, 0.18);
  --tg-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.35);
  --tg-shadow-lg: 0 10px 25px 0 rgba(0, 0, 0, 0.45);
}

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

html {
  font-family: var(--tg-font-tamil), var(--tg-font-sans);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--tg-surface-subtle);
  color: var(--tg-text);
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

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

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* ==========================================================================
   Header & Top Bar
   ========================================================================== */
.tg-topbar {
  background: var(--tg-dark);
  color: #e2e8f0;
  font-size: 0.825rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tg-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.tg-topbar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
}

.tg-date-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  color: #cbd5e1;
  white-space: nowrap;
}

.tg-ticker-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
  min-width: 0;
}

.tg-ticker-label {
  background: var(--tg-primary);
  color: #fff;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--tg-radius-full);
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tg-ticker-text {
  white-space: nowrap;
  animation: tickerSlide 30s linear infinite;
  color: #e2e8f0;
  font-size: 0.85rem;
}

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

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

.tg-topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.tg-theme-toggle {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #e2e8f0;
  padding: 0.3rem 0.65rem;
  border-radius: var(--tg-radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.775rem;
  transition: var(--tg-transition);
}

.tg-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Main Header */
.tg-main-header {
  background: var(--tg-surface);
  border-bottom: 1px solid var(--tg-border);
  padding: 1.15rem 0;
  transition: var(--tg-transition);
}

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

.tg-brand-wrap {
  flex-shrink: 0;
}

.tg-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.tg-logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--tg-primary), #ff6b35);
  border-radius: var(--tg-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
  flex-shrink: 0;
}

.tg-brand-text {
  display: flex;
  flex-direction: column;
}

.tg-site-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--tg-text);
  line-height: 1.1;
  display: block;
}

.tg-site-title span {
  color: var(--tg-primary);
}

.tg-tagline {
  font-size: 0.825rem;
  color: var(--tg-text-muted);
  font-weight: 500;
  display: block;
  margin-top: 0.2rem;
}

.tg-header-banner {
  flex: 1;
  max-width: 580px;
  display: flex;
  justify-content: flex-end;
}

.tg-ad-placeholder {
  width: 100%;
  max-width: 468px;
  height: 60px;
  background: linear-gradient(90deg, var(--tg-surface-subtle), var(--tg-border-light));
  border: 1px dashed var(--tg-border);
  border-radius: var(--tg-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--tg-text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==========================================================================
   Navigation Bar (WordPress Standard Menu & Dropdowns)
   ========================================================================== */
.tg-navbar {
  background: var(--tg-surface);
  border-bottom: 2px solid var(--tg-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--tg-shadow-sm);
}

.tg-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tg-nav-left {
  flex: 1;
  min-width: 0;
}

.tg-nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.tg-nav-menu > li {
  position: relative;
  list-style: none;
}

.tg-nav-menu > li > a, .tg-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.85rem 0.95rem;
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--tg-text);
  border-radius: var(--tg-radius-sm);
  white-space: nowrap;
}

.tg-nav-menu > li:hover > a,
.tg-nav-menu > li.current-menu-item > a,
.tg-nav-menu > li.current_page_item > a {
  color: var(--tg-primary);
  background: var(--tg-primary-light);
}

.tg-nav-menu li.menu-item-has-children > a::after {
  content: '▾';
  font-size: 0.75rem;
  margin-left: 0.25rem;
  color: var(--tg-text-muted);
  transition: transform 0.2s ease;
}

.tg-nav-menu li.menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
  color: var(--tg-primary);
}

/* Dropdown Sub-menu */
.tg-nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--tg-surface);
  border: 1px solid var(--tg-border);
  border-radius: var(--tg-radius);
  box-shadow: var(--tg-shadow-lg);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: var(--tg-transition);
  z-index: 120;
  list-style: none;
}

.tg-nav-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tg-nav-menu .sub-menu li {
  list-style: none;
  position: relative;
}

.tg-nav-menu .sub-menu li a {
  display: block;
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--tg-radius-sm);
  color: var(--tg-text);
  transition: var(--tg-transition);
}

.tg-nav-menu .sub-menu li a:hover {
  background: var(--tg-surface-subtle);
  color: var(--tg-primary);
  padding-left: 1.05rem;
}

/* Secondary nested sub-menu */
.tg-nav-menu .sub-menu .sub-menu {
  top: 0;
  left: 100%;
  margin-left: 0.25rem;
}

.tg-nav-badge {
  background: var(--tg-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: var(--tg-radius-full);
}

.tg-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.tg-search-btn {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  color: var(--tg-text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--tg-radius-full);
  display: flex;
  align-items: center;
  transition: var(--tg-transition);
}

.tg-search-btn:hover {
  color: var(--tg-primary);
  background: var(--tg-surface-subtle);
}

.tg-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: var(--tg-text);
  cursor: pointer;
  padding: 0.4rem;
  line-height: 1;
}

/* ==========================================================================
   Mobile Slide-out Drawer Menu
   ========================================================================== */
.tg-mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: none;
}

.tg-mobile-drawer.active {
  display: block;
}

.tg-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease;
}

.tg-drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 85%;
  max-width: 320px;
  background: var(--tg-surface);
  box-shadow: var(--tg-shadow-xl);
  padding: 1.5rem 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.tg-mobile-drawer.active .tg-drawer-panel {
  transform: translateX(0);
}

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

.tg-drawer-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--tg-text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.5rem;
}

.tg-drawer-search {
  margin-bottom: 1.25rem;
}

.tg-mobile-menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}

.tg-mobile-menu-list li {
  list-style: none;
}

.tg-mobile-menu-list a {
  display: block;
  padding: 0.65rem 0.85rem;
  font-weight: 600;
  color: var(--tg-text);
  border-radius: var(--tg-radius-sm);
  font-size: 0.95rem;
  transition: var(--tg-transition);
}

.tg-mobile-menu-list a:hover {
  background: var(--tg-primary-light);
  color: var(--tg-primary);
}

.tg-mobile-menu-list .sub-menu {
  list-style: none;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0.25rem 0 0.5rem;
  border-left: 2px solid var(--tg-border);
}

.tg-mobile-menu-list .sub-menu a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--tg-text-muted);
  padding: 0.45rem 0.75rem;
}

.tg-drawer-tools {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--tg-border);
}

/* ==========================================================================
   Search Modal Overlay
   ========================================================================== */
.tg-search-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.tg-search-modal.active {
  display: flex;
}

.tg-search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
}

.tg-search-modal-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 600px;
  background: var(--tg-surface);
  padding: 2.25rem;
  border-radius: var(--tg-radius-lg);
  border: 1px solid var(--tg-border);
  box-shadow: var(--tg-shadow-xl);
  animation: popIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.tg-search-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--tg-text-muted);
  cursor: pointer;
  line-height: 1;
}

.tg-modal-search-form {
  display: flex;
  gap: 0.65rem;
  margin-top: 1rem;
}

.tg-modal-search-field {
  flex: 1;
  padding: 0.85rem 1.15rem;
  font-size: 1.05rem;
  border: 2px solid var(--tg-border);
  border-radius: var(--tg-radius);
  background: var(--tg-surface-subtle);
  color: var(--tg-text);
  outline: none;
  transition: var(--tg-transition);
}

.tg-modal-search-field:focus {
  border-color: var(--tg-primary);
  background: var(--tg-surface);
}

.tg-modal-search-submit {
  background: var(--tg-primary);
  color: #fff;
  border: none;
  padding: 0.85rem 1.75rem;
  border-radius: var(--tg-radius);
  font-weight: 700;
  cursor: pointer;
  transition: var(--tg-transition);
}

.tg-modal-search-submit:hover {
  background: var(--tg-primary-hover);
}

/* ==========================================================================
   Home Hero Section (Featured Stories Grid)
   ========================================================================== */
.tg-hero-section {
  padding: 1.75rem 0 1.25rem;
}

.tg-hero-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 1.5rem;
}

.tg-card-hero {
  position: relative;
  border-radius: var(--tg-radius-lg);
  overflow: hidden;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--tg-shadow-lg);
  background: var(--tg-dark);
}

.tg-card-hero img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tg-card-hero:hover img {
  transform: scale(1.05);
}

.tg-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 25%, rgba(15, 23, 42, 0.7) 60%, rgba(15, 23, 42, 0.95) 100%);
}

.tg-hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  color: #fff;
}

.tg-badge {
  display: inline-block;
  background: var(--tg-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: var(--tg-radius-full);
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
}

.tg-hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: #fff;
}

.tg-hero-title a:hover {
  color: #fca5a5;
}

.tg-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.825rem;
  color: #cbd5e1;
}

.tg-side-stories {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tg-card-side {
  display: flex;
  gap: 1rem;
  background: var(--tg-surface-card);
  padding: 1rem;
  border-radius: var(--tg-radius);
  border: 1px solid var(--tg-border);
  box-shadow: var(--tg-shadow-sm);
  transition: var(--tg-transition);
}

.tg-card-side:hover {
  transform: translateY(-3px);
  box-shadow: var(--tg-shadow);
  border-color: rgba(220, 38, 38, 0.3);
}

.tg-card-side-img {
  width: 120px;
  height: 95px;
  flex-shrink: 0;
  border-radius: var(--tg-radius-sm);
  overflow: hidden;
}

.tg-card-side-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--tg-transition);
}

.tg-card-side:hover .tg-card-side-img img {
  transform: scale(1.08);
}

.tg-card-side-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tg-card-side-title {
  font-size: 0.975rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.4rem;
  color: var(--tg-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Rasi Palan (Astrology) Quick Widget
   ========================================================================== */
.tg-rasi-section {
  padding: 1.5rem 0;
}

.tg-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--tg-border);
}

.tg-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--tg-text);
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tg-section-title::after {
  content: '';
  position: absolute;
  bottom: -0.75rem;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--tg-primary);
  border-radius: var(--tg-radius-full);
}

.tg-view-all {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--tg-primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.tg-view-all:hover {
  text-decoration: underline;
}

.tg-rasi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.85rem;
}

.tg-rasi-card {
  background: var(--tg-surface-card);
  border: 1px solid var(--tg-border);
  border-radius: var(--tg-radius);
  padding: 1rem 0.75rem;
  text-align: center;
  transition: var(--tg-transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  overflow: hidden;
}

.tg-rasi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  opacity: 0;
  transition: var(--tg-transition);
}

.tg-rasi-card:hover {
  transform: translateY(-4px);
  border-color: #f59e0b;
  box-shadow: 0 8px 16px rgba(245, 158, 11, 0.15);
}

.tg-rasi-card:hover::before {
  opacity: 1;
}

.tg-rasi-symbol {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.tg-rasi-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--tg-text);
}

.tg-rasi-eng {
  font-size: 0.725rem;
  color: var(--tg-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   Tamil Utility Tools Bar (EB Calculator, Age, Typing)
   ========================================================================== */
.tg-tools-strip {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #fff;
  border-radius: var(--tg-radius-lg);
  padding: 1.75rem;
  margin: 1.5rem 0;
  box-shadow: var(--tg-shadow-lg);
}

.tg-tools-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.tg-tools-header h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.25rem;
}

.tg-tools-header p {
  color: #94a3b8;
  font-size: 0.875rem;
}

.tg-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.tg-tool-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--tg-radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--tg-transition);
}

.tg-tool-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
}

.tg-tool-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--tg-radius);
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.tg-tool-info h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.tg-tool-info p {
  font-size: 0.775rem;
  color: #cbd5e1;
  line-height: 1.4;
}

/* ==========================================================================
   Main Content Layout (2-Column Magazine + Sidebar)
   ========================================================================== */
.tg-layout-wrap {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 2rem;
  padding: 1.5rem 0 3rem;
}

.tg-main-content {
  min-width: 0;
}

.tg-sidebar {
  min-width: 0;
}

/* Post Cards Grid */
.tg-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.tg-post-card {
  background: var(--tg-surface-card);
  border-radius: var(--tg-radius);
  border: 1px solid var(--tg-border);
  overflow: hidden;
  box-shadow: var(--tg-shadow-sm);
  transition: var(--tg-transition);
  display: flex;
  flex-direction: column;
}

.tg-post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tg-shadow-lg);
  border-color: rgba(220, 38, 38, 0.3);
}

.tg-post-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--tg-dark);
}

.tg-post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tg-post-card:hover .tg-post-card-thumb img {
  transform: scale(1.06);
}

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

.tg-post-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.65rem;
  color: var(--tg-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tg-post-card-excerpt {
  font-size: 0.875rem;
  color: var(--tg-text-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tg-post-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--tg-border-light);
  font-size: 0.775rem;
  color: var(--tg-text-light);
}

/* ==========================================================================
   Tamil Kavithaigal & Quotes Cards
   ========================================================================== */
.tg-kavithai-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.tg-kavithai-card {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.04), rgba(245, 158, 11, 0.08));
  border: 1px solid var(--tg-border);
  border-left: 4px solid var(--tg-primary);
  border-radius: var(--tg-radius);
  padding: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--tg-shadow-sm);
  transition: var(--tg-transition);
}

.tg-kavithai-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--tg-shadow);
  border-color: var(--tg-primary);
}

.tg-kavithai-quote-mark {
  font-size: 3rem;
  line-height: 1;
  color: rgba(220, 38, 38, 0.2);
  font-family: serif;
  margin-bottom: -0.5rem;
}

.tg-kavithai-text {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.7;
  color: var(--tg-text);
  white-space: pre-line;
  margin-bottom: 1.25rem;
}

.tg-kavithai-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--tg-border);
}

.tg-kavithai-tag {
  font-size: 0.775rem;
  color: var(--tg-primary);
  font-weight: 700;
}

.tg-kavithai-actions {
  display: flex;
  gap: 0.5rem;
}

.tg-btn-copy, .tg-btn-whatsapp {
  border: none;
  background: var(--tg-surface);
  border: 1px solid var(--tg-border);
  padding: 0.35rem 0.65rem;
  border-radius: var(--tg-radius-full);
  font-size: 0.775rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--tg-text);
  transition: var(--tg-transition);
}

.tg-btn-copy:hover {
  background: var(--tg-primary);
  color: #fff;
  border-color: var(--tg-primary);
}

.tg-btn-whatsapp {
  background: #25d366;
  color: #fff;
  border-color: #25d366;
}

.tg-btn-whatsapp:hover {
  background: #1ebc59;
}

/* ==========================================================================
   Song Lyrics List Item
   ========================================================================== */
.tg-lyrics-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.tg-lyrics-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--tg-surface-card);
  padding: 1rem 1.25rem;
  border-radius: var(--tg-radius);
  border: 1px solid var(--tg-border);
  box-shadow: var(--tg-shadow-sm);
  transition: var(--tg-transition);
}

.tg-lyrics-item:hover {
  border-color: var(--tg-primary);
  transform: translateX(4px);
  box-shadow: var(--tg-shadow);
}

.tg-lyrics-title-group h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--tg-text);
  margin-bottom: 0.2rem;
}

.tg-lyrics-meta {
  font-size: 0.825rem;
  color: var(--tg-text-muted);
}

.tg-lyrics-view-btn {
  background: var(--tg-primary-light);
  color: var(--tg-primary);
  font-size: 0.825rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: var(--tg-radius-full);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tg-lyrics-item:hover .tg-lyrics-view-btn {
  background: var(--tg-primary);
  color: #fff;
}

/* ==========================================================================
   Sidebar Widgets
   ========================================================================== */
.tg-widget {
  background: var(--tg-surface-card);
  border-radius: var(--tg-radius);
  border: 1px solid var(--tg-border);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--tg-shadow-sm);
}

.tg-widget-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--tg-text);
  margin-bottom: 1.15rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--tg-border);
  position: relative;
}

.tg-widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--tg-primary);
}

/* Panchangam / Nalla Neram Widget */
.tg-panchangam-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tg-panchangam-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  background: var(--tg-surface-subtle);
  border-radius: var(--tg-radius-sm);
  font-size: 0.875rem;
}

.tg-panchangam-label {
  font-weight: 600;
  color: var(--tg-text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tg-panchangam-val {
  font-weight: 700;
  color: var(--tg-primary);
}

/* Trending Posts Widget */
.tg-trending-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tg-trending-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tg-trending-num {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--tg-text-light);
  line-height: 1;
  min-width: 28px;
}

.tg-trending-item:nth-child(1) .tg-trending-num { color: #ef4444; }
.tg-trending-item:nth-child(2) .tg-trending-num { color: #f97316; }
.tg-trending-item:nth-child(3) .tg-trending-num { color: #f59e0b; }

.tg-trending-title {
  font-size: 0.925rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--tg-text);
}

.tg-trending-title:hover {
  color: var(--tg-primary);
}

/* Social Count Widget */
.tg-social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.tg-social-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: var(--tg-radius-sm);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--tg-transition);
}

.tg-social-box:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  color: #fff;
}

.tg-social-fb { background: #1877f2; }
.tg-social-yt { background: #ff0000; }
.tg-social-tg { background: #229ed9; }
.tg-social-wa { background: #25d366; }

/* ==========================================================================
   Single Post, Pages & Typography
   ========================================================================== */
.tg-article-container {
  background: var(--tg-surface-card);
  border-radius: var(--tg-radius-lg);
  border: 1px solid var(--tg-border);
  padding: 2.25rem;
  box-shadow: var(--tg-shadow-sm);
  margin-bottom: 2rem;
}

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

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

.tg-article-title {
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--tg-text);
  margin-bottom: 1rem;
}

.tg-article-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  border-top: 1px solid var(--tg-border);
  border-bottom: 1px solid var(--tg-border);
  flex-wrap: wrap;
  gap: 1rem;
}

.tg-font-resizer {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tg-font-resizer button {
  background: var(--tg-surface-subtle);
  border: 1px solid var(--tg-border);
  border-radius: var(--tg-radius-sm);
  padding: 0.25rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--tg-text);
  transition: var(--tg-transition);
}

.tg-font-resizer button:hover {
  background: var(--tg-primary);
  color: #fff;
  border-color: var(--tg-primary);
}

.tg-share-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tg-share-link {
  width: 36px;
  height: 36px;
  border-radius: var(--tg-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.95rem;
  transition: var(--tg-transition);
}

.tg-share-link:hover {
  transform: translateY(-2px);
  color: #fff;
}

.tg-article-featured-image {
  margin-bottom: 1.75rem;
  border-radius: var(--tg-radius);
  overflow: hidden;
}

/* Article Content & Gutenberg Blocks */
.tg-article-content {
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--tg-text);
}

.tg-article-content p {
  margin-bottom: 1.4rem;
}

.tg-article-content ul,
.tg-article-content ol {
  margin: 1.25rem 0 1.5rem 1.75rem;
  padding-left: 0.5rem;
}

.tg-article-content ul {
  list-style-type: disc;
}

.tg-article-content ol {
  list-style-type: decimal;
}

.tg-article-content li {
  margin-bottom: 0.65rem;
  line-height: 1.7;
}

.tg-article-content h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--tg-text);
  margin: 2.25rem 0 1rem;
  line-height: 1.35;
  padding-left: 0.85rem;
  border-left: 4px solid var(--tg-primary);
}

.tg-article-content h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--tg-text);
  margin: 1.85rem 0 0.85rem;
  line-height: 1.35;
}

.tg-article-content h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--tg-text);
  margin: 1.4rem 0 0.65rem;
}

.tg-article-content blockquote {
  border-left: 4px solid var(--tg-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--tg-surface-subtle);
  border-radius: 0 var(--tg-radius) var(--tg-radius) 0;
  font-style: italic;
  font-weight: 500;
}

.tg-article-content figure {
  margin: 1.75rem 0;
}

.tg-article-content figcaption {
  font-size: 0.85rem;
  color: var(--tg-text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

/* Foxiz / Plugin Table of Contents */
.ruby-table-contents, .rbtoc {
  background: var(--tg-surface-subtle);
  border: 1px solid var(--tg-border);
  border-radius: var(--tg-radius);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

.ruby-table-contents .toc-header {
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--tg-border);
  padding-bottom: 0.5rem;
  font-size: 1.1rem;
}

.ruby-table-contents .toc-content a {
  display: block;
  padding: 0.35rem 0;
  color: var(--tg-text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s, padding-left 0.2s;
}

.ruby-table-contents .toc-content a:hover {
  color: var(--tg-primary);
  padding-left: 0.35rem;
}

.ruby-table-contents .depth-1 {
  padding-left: 1rem;
  font-size: 0.9rem;
}

/* AI Summarize Buttons Plugin */
.ayudawp-share-buttons {
  background: var(--tg-surface-subtle);
  border: 1px solid var(--tg-border);
  border-radius: var(--tg-radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.ayudawp-share-buttons .ayudawp-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--tg-text-muted);
  margin-bottom: 0.5rem;
  display: block;
}

.ayudawp-buttons-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ayudawp-share-btn {
  padding: 0.35rem 0.75rem;
  border-radius: var(--tg-radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--tg-border);
  background: var(--tg-surface);
  color: var(--tg-text);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--tg-transition);
}

.ayudawp-share-btn:hover {
  border-color: var(--tg-primary);
  color: var(--tg-primary);
}

/* ==========================================================================
   TNEB EB Calculator Specific Styles
   ========================================================================== */
.tg-calc-card {
  background: var(--tg-surface-card);
  border: 1px solid var(--tg-border);
  border-radius: var(--tg-radius-lg);
  padding: 2rem;
  box-shadow: var(--tg-shadow-lg);
  margin-bottom: 2rem;
}

.tg-calc-form-group {
  margin-bottom: 1.5rem;
}

.tg-calc-label {
  display: block;
  font-weight: 700;
  font-size: 0.975rem;
  color: var(--tg-text);
  margin-bottom: 0.5rem;
}

.tg-calc-input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1.15rem;
  font-weight: 600;
  border: 2px solid var(--tg-border);
  border-radius: var(--tg-radius);
  background: var(--tg-surface);
  color: var(--tg-text);
  transition: var(--tg-transition);
}

.tg-calc-input:focus {
  outline: none;
  border-color: var(--tg-primary);
  box-shadow: 0 0 0 4px var(--tg-primary-light);
}

.tg-calc-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--tg-primary), #ff6b35);
  color: #fff;
  border: none;
  padding: 1rem;
  border-radius: var(--tg-radius);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.35);
  transition: var(--tg-transition);
}

.tg-calc-btn:hover {
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.45);
}

.tg-calc-result-box {
  margin-top: 2rem;
  padding: 1.75rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 182, 212, 0.05));
  border: 1px solid var(--tg-success);
  border-radius: var(--tg-radius);
  display: none;
}

.tg-calc-result-box.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tg-calc-total-amount {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--tg-success);
  text-align: center;
  margin: 0.5rem 0 1rem;
}

.tg-calc-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.tg-calc-breakdown-table th, .tg-calc-breakdown-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--tg-border);
  font-size: 0.9rem;
}

.tg-calc-breakdown-table th {
  background: var(--tg-surface-subtle);
  font-weight: 700;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.tg-footer {
  background: var(--tg-dark);
  color: #e2e8f0;
  margin-top: auto;
  border-top: 4px solid var(--tg-primary);
  padding: 3.5rem 0 1.5rem;
}

.tg-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.tg-footer-col h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.tg-footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 2px;
  background: var(--tg-primary);
}

.tg-footer-about {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.tg-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.tg-footer-links a {
  color: #cbd5e1;
  font-size: 0.9rem;
  transition: var(--tg-transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tg-footer-links a:hover {
  color: var(--tg-secondary);
  padding-left: 0.4rem;
}

.tg-footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #94a3b8;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Mobile Sticky Bottom Bar */
.tg-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--tg-surface);
  border-top: 1px solid var(--tg-border);
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
  z-index: 999;
  padding: 0.4rem 0;
}

.tg-mobile-bar-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.tg-mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--tg-text-muted);
  gap: 0.15rem;
  padding: 0.2rem 0.5rem;
}

.tg-mobile-nav-item.active, .tg-mobile-nav-item:hover {
  color: var(--tg-primary);
}

/* Back to Top */
.tg-back-to-top {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  background: var(--tg-primary);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: var(--tg-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--tg-shadow-lg);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--tg-transition);
  z-index: 90;
  border: none;
}

.tg-back-to-top.active {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .tg-hero-grid {
    grid-template-columns: 1fr;
  }
  .tg-layout-wrap {
    grid-template-columns: 1fr;
  }
  .tg-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tg-rasi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .tg-topbar-left .tg-date-badge {
    display: none;
  }
  .tg-header-banner {
    display: none;
  }
  .tg-nav-menu {
    display: none;
  }
  .tg-menu-toggle {
    display: block;
  }
  .tg-posts-grid {
    grid-template-columns: 1fr;
  }
  .tg-kavithai-grid {
    grid-template-columns: 1fr;
  }
  .tg-tools-grid {
    grid-template-columns: 1fr;
  }
  .tg-rasi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .tg-mobile-bar {
    display: block;
  }
  body {
    padding-bottom: 60px;
  }
  .tg-footer-grid {
    grid-template-columns: 1fr;
  }
  .tg-article-container {
    padding: 1.5rem 1.25rem;
  }
  .tg-article-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .tg-rasi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tg-card-hero {
    min-height: 320px;
  }
  .tg-hero-title {
    font-size: 1.35rem;
  }
}
