/*
Theme Name: Deccan Chronicle Clone
Theme URI: https://example.com
Author: Your Name
Description: A news portal theme inspired by Deccan Chronicle, fully AMP compatible
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: dc-theme
Tags: news, magazine, amp, responsive, grid
*/

/* =========================================
   CSS VARIABLES
   ========================================= */
:root {
  --red: #cc0000;
  --dark-red: #a30000;
  --black: #111111;
  --dark-gray: #222222;
  --mid-gray: #555555;
  --light-gray: #f0f0f0;
  --border: #dddddd;
  --white: #ffffff;
  --font-headline: 'Georgia', 'Times New Roman', serif;
  --font-body: 'Arial', 'Helvetica Neue', sans-serif;
  --font-ui: 'Arial', sans-serif;
  --max-width: 1200px;
  --sidebar-width: 300px;
}

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--dark-gray);
  background: var(--white);
  line-height: 1.5;
  font-size: 14px;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* =========================================
   TOP BAR
   ========================================= */
.top-bar {
  background: var(--black);
  color: #ccc;
  font-size: 11px;
  padding: 5px 0;
  border-bottom: 2px solid var(--red);
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar a { color: #ccc; }
.top-bar a:hover { color: var(--white); }
.top-bar .date { font-style: italic; }
.top-bar .links { display: flex; gap: 15px; }

/* =========================================
   HEADER
   ========================================= */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--red);
  padding: 12px 0 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
}
.site-logo img { height: 55px; width: auto; }
.site-logo .logo-text {
  font-family: var(--font-headline);
  font-size: 36px;
  font-weight: bold;
  color: var(--red);
  letter-spacing: -1px;
}
.site-logo .logo-tagline {
  font-size: 11px;
  color: var(--mid-gray);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.header-ad { text-align: right; }
.header-ad img { max-height: 80px; }

/* Search */
.header-search { display: flex; align-items: center; gap: 8px; }
.header-search input {
  border: 1px solid var(--border);
  padding: 6px 12px;
  font-size: 13px;
  width: 200px;
  outline: none;
}
.header-search button {
  background: var(--red);
  color: white;
  border: none;
  padding: 7px 14px;
  cursor: pointer;
  font-size: 13px;
}

/* =========================================
   NAVIGATION
   ========================================= */
.main-nav {
  background: var(--red);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.main-nav ul {
  display: flex;
  flex-wrap: wrap;
}
.main-nav > ul > li {
  position: relative;
}
.main-nav > ul > li > a {
  display: block;
  color: var(--white);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.2s;
  white-space: nowrap;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.current-menu-item > a {
  background: var(--dark-red);
  color: var(--white);
}

/* Dropdown */
.main-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--dark-gray);
  min-width: 180px;
  z-index: 200;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.main-nav li:hover > .sub-menu { display: block; }
.main-nav .sub-menu a {
  display: block;
  color: #ddd;
  padding: 9px 16px;
  font-size: 12px;
  border-bottom: 1px solid #333;
}
.main-nav .sub-menu a:hover { background: var(--red); color: white; }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  padding: 8px 14px;
}

/* =========================================
   BREAKING NEWS TICKER
   ========================================= */
.breaking-news {
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  overflow: hidden;
  font-size: 12px;
}
.breaking-label {
  background: var(--red);
  color: white;
  padding: 6px 12px;
  font-weight: bold;
  text-transform: uppercase;
  white-space: nowrap;
  font-size: 11px;
  flex-shrink: 0;
}
.ticker-wrapper { overflow: hidden; flex: 1; }
.ticker-content {
  display: inline-block;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
  padding-left: 100%;
}
.ticker-content a { margin-right: 40px; color: var(--dark-gray); }
.ticker-content a:hover { color: var(--red); }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* =========================================
   LAYOUT / CONTAINER
   ========================================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 15px;
}
.content-area {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 20px;
  padding: 20px 0;
}
.main-content { min-width: 0; }
.sidebar { min-width: 0; }

/* =========================================
   SECTION HEADINGS
   ========================================= */
.section-title {
  font-family: var(--font-headline);
  font-size: 18px;
  font-weight: bold;
  color: var(--black);
  border-top: 3px solid var(--red);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.section-title a { color: var(--black); }
.section-title a:hover { color: var(--red); }

/* =========================================
   TOP STORIES / HERO GRID
   ========================================= */
.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 2px;
  margin-bottom: 20px;
}
.hero-main {
  grid-column: 1;
  grid-row: 1 / 3;
  position: relative;
}
.hero-main .post-thumb { width: 100%; height: 320px; object-fit: cover; }
.hero-main .post-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 20px 12px 12px;
}
.hero-main .post-title {
  color: white;
  font-family: var(--font-headline);
  font-size: 20px;
  line-height: 1.3;
}
.hero-main .post-title:hover { color: #ffcccc; }
.hero-main .post-cat {
  background: var(--red);
  color: white;
  font-size: 10px;
  padding: 2px 7px;
  text-transform: uppercase;
  font-weight: bold;
  margin-bottom: 5px;
  display: inline-block;
}

.hero-secondary { position: relative; overflow: hidden; }
.hero-secondary .post-thumb { width: 100%; height: 157px; object-fit: cover; }
.hero-secondary .post-info { padding: 8px; border-bottom: 1px solid var(--border); }
.hero-secondary .post-title {
  font-family: var(--font-headline);
  font-size: 14px;
  font-weight: bold;
  line-height: 1.3;
  color: var(--black);
}
.hero-secondary .post-title:hover { color: var(--red); }
.hero-secondary .post-cat {
  font-size: 10px;
  color: var(--red);
  text-transform: uppercase;
  font-weight: bold;
  margin-bottom: 4px;
  display: block;
}

/* =========================================
   ARTICLE CARDS
   ========================================= */

/* List card (horizontal) */
.card-list {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.card-list:last-child { border-bottom: none; }
.card-list .card-thumb { width: 100px; height: 70px; object-fit: cover; flex-shrink: 0; }
.card-list .card-body { flex: 1; }
.card-list .card-cat {
  font-size: 10px;
  color: var(--red);
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.card-list .card-title {
  font-family: var(--font-headline);
  font-size: 14px;
  font-weight: bold;
  line-height: 1.3;
  color: var(--black);
  margin-bottom: 4px;
}
.card-list .card-title:hover { color: var(--red); }
.card-list .card-meta { font-size: 11px; color: var(--mid-gray); }

/* Grid card (vertical) */
.card-grid { border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 12px; }
.card-grid .card-thumb { width: 100%; height: 140px; object-fit: cover; margin-bottom: 8px; }
.card-grid .card-cat {
  font-size: 10px;
  color: var(--red);
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.card-grid .card-title {
  font-family: var(--font-headline);
  font-size: 15px;
  font-weight: bold;
  line-height: 1.3;
  color: var(--black);
  margin-bottom: 5px;
}
.card-grid .card-title:hover { color: var(--red); }
.card-grid .card-excerpt { font-size: 12px; color: var(--mid-gray); line-height: 1.4; }
.card-grid .card-meta { font-size: 11px; color: #999; margin-top: 5px; }

/* 3-column news grid */
.news-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}
.news-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

/* =========================================
   JUST IN / LATEST NEWS LIST
   ========================================= */
.just-in-box {
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.just-in-box .section-title { margin: 0; padding: 8px 12px; background: #f7f7f7; }
.just-in-list { padding: 0 12px; }
.just-in-item {
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
  line-height: 1.4;
}
.just-in-item:last-child { border-bottom: none; }
.just-in-item a { color: var(--dark-gray); }
.just-in-item a:hover { color: var(--red); }
.just-in-item .time { color: #999; font-size: 11px; display: block; margin-top: 2px; }

/* =========================================
   SIDEBAR WIDGETS
   ========================================= */
.widget {
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.widget-title {
  background: var(--red);
  color: white;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 8px 12px;
  letter-spacing: 0.5px;
}
.widget-content { padding: 10px 12px; }

/* Popular widget */
.popular-list { padding: 0; }
.popular-item {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.popular-item:last-child { border-bottom: none; }
.popular-rank {
  width: 24px;
  height: 24px;
  background: var(--red);
  color: white;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.popular-title {
  font-size: 12px;
  line-height: 1.35;
  color: var(--dark-gray);
}
.popular-title:hover { color: var(--red); }

/* Photo widget */
.photo-widget img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.photo-caption { font-size: 12px; padding: 8px; color: var(--mid-gray); }

/* Tags widget */
.tags-cloud { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; }
.tags-cloud a {
  background: var(--light-gray);
  color: var(--dark-gray);
  padding: 4px 10px;
  font-size: 11px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.tags-cloud a:hover { background: var(--red); color: white; border-color: var(--red); }

/* =========================================
   AD BANNER
   ========================================= */
.ad-banner {
  background: var(--light-gray);
  border: 1px dashed #ccc;
  text-align: center;
  padding: 15px;
  margin: 15px 0;
  font-size: 11px;
  color: #999;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-banner.leaderboard { min-height: 90px; }
.ad-banner.rectangle { min-height: 250px; }
.ad-banner.skyscraper { min-height: 600px; }

/* =========================================
   SINGLE POST / ARTICLE
   ========================================= */
.post-header { margin-bottom: 20px; }
.post-breadcrumb {
  font-size: 11px;
  color: var(--mid-gray);
  margin-bottom: 10px;
}
.post-breadcrumb a { color: var(--red); }
.post-header .post-cat-tag {
  background: var(--red);
  color: white;
  font-size: 11px;
  padding: 3px 10px;
  text-transform: uppercase;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 12px;
}
.entry-title {
  font-family: var(--font-headline);
  font-size: 28px;
  line-height: 1.25;
  color: var(--black);
  margin-bottom: 12px;
  font-weight: bold;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 12px;
  color: var(--mid-gray);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  margin-bottom: 15px;
}
.post-meta .author { color: var(--red); font-weight: bold; }
.post-meta .post-date { }
.post-meta .share-btns { margin-left: auto; display: flex; gap: 6px; }
.share-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  color: white;
}
.share-btn.fb { background: #1877f2; }
.share-btn.tw { background: #1da1f2; }
.share-btn.wa { background: #25d366; }

.post-featured-image { margin-bottom: 15px; }
.post-featured-image img { width: 100%; }
.post-featured-image figcaption { font-size: 11px; color: var(--mid-gray); padding: 5px 0; font-style: italic; }

.entry-content {
  font-size: 15px;
  line-height: 1.7;
  color: #333;
}
.entry-content p { margin-bottom: 16px; }
.entry-content h2, .entry-content h3 {
  font-family: var(--font-headline);
  margin: 20px 0 10px;
  color: var(--black);
}
.entry-content blockquote {
  border-left: 4px solid var(--red);
  padding: 10px 20px;
  background: #faf5f5;
  margin: 20px 0;
  font-style: italic;
  font-size: 16px;
}
.entry-content a { color: var(--red); text-decoration: underline; }

/* Tags */
.post-tags { margin-top: 20px; }
.post-tags span { font-weight: bold; font-size: 12px; }
.post-tags a {
  background: var(--light-gray);
  border: 1px solid var(--border);
  padding: 3px 9px;
  font-size: 11px;
  margin: 3px 2px;
  display: inline-block;
}
.post-tags a:hover { background: var(--red); color: white; }

/* Related posts */
.related-posts { margin: 30px 0; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: #1a1a1a;
  color: #aaa;
  margin-top: 30px;
}
.footer-top {
  padding: 30px 0 20px;
  border-bottom: 1px solid #333;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}
.footer-widget-title {
  color: white;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  border-bottom: 2px solid var(--red);
  padding-bottom: 8px;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}
.footer-links li { margin-bottom: 7px; }
.footer-links a {
  color: #aaa;
  font-size: 12px;
}
.footer-links a:hover { color: white; }
.footer-about { font-size: 12px; line-height: 1.6; }
.footer-social { display: flex; gap: 10px; margin-top: 12px; }
.footer-social a {
  width: 32px;
  height: 32px;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: bold;
}
.footer-social a:hover { background: var(--red); }

.footer-bottom {
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #666;
}
.footer-bottom a { color: #888; }
.footer-bottom a:hover { color: white; }
.footer-nav { display: flex; gap: 15px; }

/* =========================================
   PAGINATION
   ========================================= */
.pagination {
  display: flex;
  gap: 4px;
  margin: 20px 0;
  justify-content: center;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  display: inline-block;
  padding: 7px 13px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--dark-gray);
  background: white;
}
.pagination .page-numbers:hover,
.pagination .current {
  background: var(--red);
  color: white;
  border-color: var(--red);
}

/* =========================================
   ARCHIVE / CATEGORY PAGE
   ========================================= */
.archive-header {
  border-top: 3px solid var(--red);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  margin-bottom: 20px;
}
.archive-title {
  font-family: var(--font-headline);
  font-size: 22px;
  font-weight: bold;
  color: var(--black);
}
.archive-description { font-size: 13px; color: var(--mid-gray); margin-top: 4px; }

/* =========================================
   PHOTO GALLERY
   ========================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.gallery-item { position: relative; overflow: hidden; }
.gallery-item img { width: 100%; height: 120px; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item .overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.7); color: white;
  padding: 6px; font-size: 11px;
  transform: translateY(100%);
  transition: transform 0.3s;
}
.gallery-item:hover .overlay { transform: translateY(0); }

/* =========================================
   WEATHER WIDGET
   ========================================= */
.weather-widget { text-align: center; padding: 15px; }
.weather-city { font-size: 13px; font-weight: bold; color: var(--dark-gray); }
.weather-temp { font-size: 36px; font-weight: bold; color: var(--red); line-height: 1; margin: 5px 0; }
.weather-desc { font-size: 12px; color: var(--mid-gray); }

/* =========================================
   UTILITIES
   ========================================= */
.text-red { color: var(--red); }
.text-sm { font-size: 12px; }
.text-meta { font-size: 11px; color: #999; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.clearfix::after { content: ''; display: table; clear: both; }

/* Video embed */
.video-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; }
.video-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .content-area { grid-template-columns: 1fr 260px; }
  .footer-top { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .content-area { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-main { grid-row: auto; }
  .news-3col { grid-template-columns: repeat(2, 1fr); }
  .news-4col { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: repeat(2, 1fr); }
  .main-nav > ul { display: none; flex-direction: column; }
  .main-nav > ul.open { display: flex; }
  .nav-toggle { display: block; }
  .entry-title { font-size: 22px; }
}

@media (max-width: 480px) {
  .news-3col, .news-4col { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-main .post-thumb { height: 220px; }
}
