/* ============================================
   TAMIL NEWS - MAIN STYLESHEET
   Color Theme: Red-Orange-Amber (from logo)
   ============================================ */

:root {
  --primary: #C94040;      /* deep red from logo */
  --secondary: #E8892A;    /* amber/orange */
  --accent: #F5B942;       /* golden yellow */
  --dark: #1A0A0A;
  --dark2: #2C1212;
  --text: #1f1f1f;
  --text-light: #555;
  --border: #e8d5c4;
  --bg: #FFF9F4;
  --bg2: #FFF3E8;
  --white: #ffffff;
  --shadow: 0 2px 12px rgba(201,64,64,0.12);
  --shadow-hover: 0 8px 30px rgba(201,64,64,0.25);
  --radius: 8px;
  --radius-lg: 14px;
  --font-tamil: 'Noto Sans Tamil', sans-serif;
  --font-serif: 'Noto Serif Tamil', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-tamil);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== BREAKING NEWS ===== */
.breaking-bar {
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 38px;
}
.breaking-label {
  background: var(--dark);
  padding: 0 18px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-wrap { flex: 1; overflow: hidden; }
.ticker {
  display: flex;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}
.ticker-item {
  padding: 0 40px;
  font-size: 14px;
}
.ticker-item a { color: white; }
.ticker-item::after { content: ' ◆ '; opacity: 0.5; }
@keyframes ticker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* ===== HEADER ===== */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--primary);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.site-logo a { display: flex; align-items: center; gap: 14px; }
.site-logo img { height: 60px; width: auto; }
.logo-main {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}
.logo-text-fallback { display: flex; align-items: center; }
.tagline { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.header-right { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.header-date { font-size: 13px; color: var(--text-light); display: flex; align-items: center; gap: 6px; }

.header-search { position: relative; }
.header-search form { display: flex; }
.header-search input {
  border: 2px solid var(--border);
  border-radius: 25px 0 0 25px;
  padding: 8px 16px;
  font-family: var(--font-tamil);
  font-size: 14px;
  width: 220px;
  outline: none;
  background: var(--bg2);
}
.header-search input:focus { border-color: var(--primary); }
.header-search button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0 25px 25px 0;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.header-search button:hover { background: var(--dark2); }

/* ===== NAVIGATION ===== */
.main-nav {
  background: var(--dark2);
  position: sticky;
  top: 91px;
  z-index: 99;
}
.main-nav .container { display: flex; align-items: center; }
.nav-list {
  display: flex;
  flex-wrap: wrap;
}
.nav-list li a {
  display: block;
  color: rgba(255,255,255,0.88);
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
}
.nav-list li a:hover,
.nav-list li a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(255,255,255,0.05);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  padding: 13px;
  cursor: pointer;
}

/* ===== MAIN CONTENT ===== */
.site-main { padding: 30px 0; }

/* ===== CONTENT GRID ===== */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
}

/* ===== FEATURED / HERO POSTS ===== */
.hero-section { margin-bottom: 30px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}
.hero-main { grid-column: 1; grid-row: 1 / 3; }
.hero-side { }

.post-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.post-card .card-image {
  position: relative;
  overflow: hidden;
}
.post-card .card-image img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.4s;
}
.post-card:hover .card-image img { transform: scale(1.04); }
.hero-main .card-image img { height: 380px; }

.card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: white;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.card-breaking {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--secondary);
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }

.card-body { padding: 16px 18px 20px; flex: 1; }
.card-meta { display: flex; gap: 14px; font-size: 12px; color: var(--text-light); margin-bottom: 10px; align-items: center; flex-wrap: wrap; }
.card-meta i { color: var(--secondary); }
.card-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-main .card-title { font-size: 22px; -webkit-line-clamp: 4; }
.card-excerpt { font-size: 14px; color: var(--text-light); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-size: 13px; font-weight: 600; margin-top: 12px; }
.read-more:hover { gap: 10px; }

/* No image placeholder */
.no-img-placeholder {
  width: 100%; background: linear-gradient(135deg, var(--bg2), var(--border));
  display: flex; align-items: center; justify-content: center; color: var(--text-light);
  font-size: 40px;
}
.hero-main .no-img-placeholder { height: 380px; }
.no-img-placeholder { height: 240px; }

/* ===== SECTION TITLE ===== */
.section-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  padding-bottom: 10px;
  margin-bottom: 20px;
  border-bottom: 3px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 5px; height: 24px;
  background: var(--secondary);
  border-radius: 3px;
}

/* ===== NEWS LIST (small cards) ===== */
.news-list { display: flex; flex-direction: column; gap: 14px; }
.news-item {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  gap: 0;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.news-item:hover { box-shadow: var(--shadow-hover); transform: translateX(4px); }
.news-item .ni-image { width: 110px; flex-shrink: 0; }
.news-item .ni-image img { width: 110px; height: 85px; object-fit: cover; }
.news-item .ni-image .no-img-placeholder { width: 110px; height: 85px; font-size: 24px; }
.news-item .ni-body { padding: 10px 14px; display: flex; flex-direction: column; justify-content: center; }
.news-item .ni-cat { font-size: 11px; color: var(--primary); font-weight: 600; text-transform: uppercase; margin-bottom: 4px; }
.news-item .ni-title { font-size: 14px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-item .ni-time { font-size: 11px; color: var(--text-light); margin-top: 5px; }

/* ===== SIDEBAR ===== */
.sidebar {}
.widget {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.widget-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bg2);
  display: flex; align-items: center; gap: 8px;
}
.widget-title i { color: var(--primary); }

/* Popular posts widget */
.popular-post {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--bg2);
}
.popular-post:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.pp-num {
  width: 30px; height: 30px;
  background: var(--bg2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--primary);
  flex-shrink: 0;
}
.pp-title { font-size: 13px; font-weight: 600; line-height: 1.5; }
.pp-time { font-size: 11px; color: var(--text-light); }

/* Categories widget */
.cat-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg2);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
}
.cat-link:last-child { border-bottom: none; }
.cat-link:hover { color: var(--primary); }
.cat-count {
  background: var(--bg2);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
}

/* Tags widget */
.tags-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
  background: var(--bg2);
  color: var(--text);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.tag-pill:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* ===== SINGLE POST ===== */
.post-single {}
.post-header { margin-bottom: 24px; }
.post-title-main {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 16px;
  color: var(--dark);
}
.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-light);
}
.post-meta-bar .meta-item { display: flex; align-items: center; gap: 6px; }
.post-meta-bar .meta-item i { color: var(--secondary); }
.post-featured-img { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px; }
.post-featured-img img { width: 100%; max-height: 480px; object-fit: cover; }

.post-content {
  font-size: 17px;
  line-height: 1.9;
  color: var(--text);
}
.post-content p { margin-bottom: 20px; }
.post-content h2 { font-family: var(--font-serif); font-size: 22px; color: var(--dark); margin: 28px 0 14px; padding-left: 14px; border-left: 4px solid var(--primary); }
.post-content h3 { font-family: var(--font-serif); font-size: 19px; color: var(--dark); margin: 22px 0 12px; }
.post-content blockquote {
  background: var(--bg2);
  border-left: 5px solid var(--secondary);
  padding: 18px 22px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  margin: 24px 0;
  font-size: 18px;
}
.post-content img { border-radius: var(--radius); margin: 20px auto; }
.post-content ul, .post-content ol { padding-left: 24px; margin-bottom: 20px; }
.post-content li { margin-bottom: 8px; }

/* Share buttons */
.share-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  margin-top: 30px;
}
.share-label { font-weight: 600; font-size: 14px; }
.share-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 25px;
  font-size: 13px; font-weight: 500; color: white;
  transition: opacity 0.2s;
}
.share-btn:hover { opacity: 0.85; color: white; }
.share-fb { background: #1877f2; }
.share-tw { background: #000; }
.share-wa { background: #25d366; }
.share-tg { background: #0088cc; }

/* Tags bar */
.post-tags { margin-top: 20px; }
.post-tags-label { font-weight: 600; margin-bottom: 10px; font-size: 14px; }

/* ===== COMMENTS ===== */
.comments-section { margin-top: 40px; }
.comment-card {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  border-left: 4px solid var(--secondary);
}
.comment-author { font-weight: 600; color: var(--dark); }
.comment-date { font-size: 12px; color: var(--text-light); margin-bottom: 8px; }
.comment-text { font-size: 15px; }

.comment-form { background: white; padding: 24px; border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-top: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.form-group input, .form-group textarea {
  width: 100%; padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-tamil); font-size: 15px;
  outline: none; transition: border-color 0.2s;
  background: var(--bg);
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.btn-submit {
  background: var(--primary); color: white;
  border: none; padding: 12px 28px; border-radius: 25px;
  font-family: var(--font-tamil); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
}
.btn-submit:hover { background: var(--dark2); }

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 30px 0; flex-wrap: wrap; }
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 14px; font-weight: 500;
  background: white; box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: all 0.2s;
}
.page-btn:hover, .page-btn.active {
  background: var(--primary); color: white; border-color: var(--primary);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.75);
  padding: 50px 0 0;
  margin-top: 50px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-logo img { height: 45px;  }
.footer-logo h3 { color: white; font-size: 18px; font-family: var(--font-serif); }
.footer-about p { font-size: 14px; line-height: 1.7; }
.social-links { display: flex; gap: 10px; margin-top: 16px; }
.social-links a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 16px; transition: background 0.2s;
}
.social-links a:hover { background: var(--primary); }
.footer-cats h4, .footer-recent h4, .footer-info h4 {
  color: white; font-size: 16px; margin-bottom: 16px;
  padding-bottom: 10px; border-bottom: 2px solid var(--primary);
  font-family: var(--font-serif);
}
.footer-cats ul li a {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.7);
}
.footer-cats ul li a:hover { color: var(--accent); }
.footer-post { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.07); }
.footer-post a { font-size: 13px; display: block; margin-bottom: 3px; color: rgba(255,255,255,0.75); line-height: 1.5; }
.footer-post a:hover { color: var(--accent); }
.footer-post small { font-size: 11px; color: rgba(255,255,255,0.4); }
.footer-info p { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 10px; }
.footer-info p i { color: var(--secondary); }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.footer-links a { font-size: 12px; color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  text-align: center;
  padding: 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* ===== ALERTS ===== */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ===== SEARCH PAGE ===== */
.search-header { padding: 24px 0; margin-bottom: 20px; border-bottom: 2px solid var(--border); }
.search-header h1 { font-size: 22px; }
.search-header span { color: var(--primary); }

/* ===== 404 ===== */
.error-page { text-align: center; padding: 80px 20px; }
.error-page .err-num { font-size: 100px; font-weight: 800; color: var(--primary); opacity: 0.15; line-height: 1; }
.error-page h2 { font-size: 26px; margin-bottom: 12px; }
.error-page p { color: var(--text-light); margin-bottom: 24px; }
.btn-home { display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: white; padding: 12px 28px; border-radius: 25px; font-weight: 600; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .content-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .header-right { width: 100%; }
  .header-search input { width: 100%; flex: 1; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-main { grid-row: auto; }
  .post-title-main { font-size: 22px; }
  .nav-toggle { display: block; }
  .nav-list { display: none; flex-direction: column; width: 100%; }
  .nav-list.open { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .main-nav { top: 0; position: relative; }
  .site-header { position: relative; }
}
@media (max-width: 480px) {
  .hero-main .card-image img { height: 220px; }
  .post-meta-bar { gap: 10px; }
}
