/* ============================================
   PRASARAN INDIA - Main Stylesheet
   ============================================ */

:root {
    --pi-red: #e63946;
    --pi-dark-red: #c1121f;
    --pi-navy: #0d1b2a;
    --pi-dark: #1a1a2e;
    --pi-blue: #457b9d;
    --pi-light-blue: #a8dadc;
    --pi-cream: #f8f9fa;
    --pi-text: #212529;
    --pi-text-muted: #6c757d;
    --pi-border: #e9ecef;
    --pi-card-bg: #ffffff;
    --pi-body-bg: #f4f5f7;
    --pi-header-bg: #ffffff;
    --pi-nav-bg: #0d1b2a;
    --pi-footer-bg: #0d1b2a;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', sans-serif;
    --font-label: 'Oswald', sans-serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,.10);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
    --radius: 8px;
    --transition: all 0.25s ease;
}

[data-theme="dark"] {
    --pi-text: #e8e8e8;
    --pi-text-muted: #adb5bd;
    --pi-border: #2d3748;
    --pi-card-bg: #1e2a38;
    --pi-body-bg: #131e2b;
    --pi-header-bg: #0d1b2a;
    --pi-cream: #1e2a38;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background-color: var(--pi-body-bg);
    color: var(--pi-text);
    transition: background-color 0.3s, color 0.3s;
    font-size: 16px;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--pi-red); }
img { max-width: 100%; }

/* ============================================
   BREAKING NEWS TICKER
   ============================================ */
.breaking-bar {
    background: var(--pi-red);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-label);
    height: 36px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.breaking-label {
    background: #fff;
    color: var(--pi-red);
    padding: 2px 12px;
    white-space: nowrap;
    font-size: 12px;
    letter-spacing: 1px;
    flex-shrink: 0;
    margin-right: 12px;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
    padding-right: 22px;
}

.ticker-wrap {
    overflow: hidden;
    flex: 1;
}

.ticker-content {
    display: flex;
    animation: ticker 30s linear infinite;
    white-space: nowrap;
}

.ticker-item a { color: #fff; }
.ticker-item a:hover { text-decoration: underline; }
.ticker-sep { margin: 0 16px; opacity: 0.5; }

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

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: var(--pi-header-bg);
    border-bottom: 1px solid var(--pi-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.logo-img {
    height: 54px;
    object-fit: contain;
}

.date-display {
    font-size: 13px;
    color: var(--pi-text-muted);
}

.search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    background: var(--pi-body-bg);
    border: 1px solid var(--pi-border);
    border-radius: 20px;
    padding: 6px 36px 6px 14px;
    font-size: 13px;
    width: 200px;
    color: var(--pi-text);
    outline: none;
    transition: var(--transition);
}

.search-input:focus { width: 260px; border-color: var(--pi-red); }
.search-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--pi-text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

.theme-toggle {
    background: var(--pi-body-bg);
    border: 1px solid var(--pi-border);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    color: var(--pi-text);
    transition: var(--transition);
}
.theme-toggle:hover { background: var(--pi-red); color: #fff; border-color: var(--pi-red); }

/* ============================================
   NAVIGATION
   ============================================ */
.main-nav {
    background: var(--pi-nav-bg);
    border-top: 3px solid var(--pi-red);
}

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

.main-nav .nav-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 14px;
    color: rgba(255,255,255,0.85);
    font-family: var(--font-label);
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: var(--transition);
    position: relative;
}

.main-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--cat-color, var(--pi-red));
    transition: var(--transition);
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    color: #fff;
}

.main-nav .nav-link:hover::after,
.main-nav .nav-link.active::after {
    width: 100%;
}

.nav-special { color: var(--pi-light-blue) !important; }

/* ============================================
   ARTICLE CARDS
   ============================================ */
.article-card {
    background: var(--pi-card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--pi-border);
}

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

.article-card .card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

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

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

.cat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--cat-color, var(--pi-red));
    color: #fff;
    font-family: var(--font-label);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 3px;
}

.breaking-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--pi-red);
    color: #fff;
    font-family: var(--font-label);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 3px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

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

.article-card .card-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .card-title a:hover { color: var(--pi-red); }

.article-card .card-excerpt {
    font-size: 14px;
    color: var(--pi-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--pi-text-muted);
    margin-top: auto;
}

.article-meta .meta-author { font-weight: 600; }
.article-meta i { color: var(--pi-red); }

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    padding: 20px 0;
}

.hero-main-article {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 480px;
    display: block;
    background: var(--pi-dark);
}

.hero-main-article img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.hero-main-article:hover img { opacity: 0.8; }

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #fff;
}

.hero-content .hero-cat { font-family: var(--font-label); font-size: 12px; letter-spacing: 1px; color: var(--pi-red); text-transform: uppercase; }
.hero-content .hero-title {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 8px 0;
    color: #fff;
}
.hero-content .hero-meta { font-size: 13px; opacity: 0.8; }

.hero-side-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 480px;
    overflow: hidden;
}

.hero-side-item {
    background: var(--pi-card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    gap: 0;
    border: 1px solid var(--pi-border);
    transition: var(--transition);
    flex: 1;
}

.hero-side-item:hover { box-shadow: var(--shadow-md); transform: translateX(3px); }

.hero-side-img {
    width: 110px;
    flex-shrink: 0;
    overflow: hidden;
}

.hero-side-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.hero-side-item:hover .hero-side-img img { transform: scale(1.08); }

.hero-side-content {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.hero-side-cat {
    font-family: var(--font-label);
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--pi-red);
    margin-bottom: 4px;
}

.hero-side-title {
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--pi-text);
}

.hero-side-item:hover .hero-side-title { color: var(--pi-red); }
.hero-side-meta { font-size: 11px; color: var(--pi-text-muted); margin-top: 6px; }

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--pi-border);
    position: relative;
}

.section-title {
    font-family: var(--font-label);
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--pi-text);
    margin: 0;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 22px;
    background: var(--pi-red);
    margin-right: 10px;
    border-radius: 2px;
    vertical-align: middle;
}

.section-link {
    font-size: 12px;
    font-family: var(--font-label);
    color: var(--pi-red);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ============================================
   TRENDING SIDEBAR
   ============================================ */
.trending-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--pi-border);
}

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

.trending-num {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--pi-border);
    line-height: 1;
    flex-shrink: 0;
    min-width: 36px;
}

.trending-item:first-child .trending-num { color: var(--pi-red); }
.trending-item:nth-child(2) .trending-num { color: #f4a261; }
.trending-item:nth-child(3) .trending-num { color: #457b9d; }

.trending-content .trending-cat {
    font-family: var(--font-label);
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--pi-red);
    text-transform: uppercase;
}

.trending-content .trending-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--pi-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-content .trending-title:hover { color: var(--pi-red); }

/* ============================================
   CATEGORY SECTION
   ============================================ */
.category-section {
    background: var(--pi-card-bg);
    border: 1px solid var(--pi-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.category-color-bar {
    height: 4px;
    border-radius: 2px;
    margin-bottom: 16px;
}

/* ============================================
   ARTICLE DETAIL PAGE
   ============================================ */
.article-detail {
    max-width: 780px;
}

.article-detail .article-header { margin-bottom: 24px; }

.article-detail .article-cat {
    font-family: var(--font-label);
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff;
    background: var(--pi-red);
    padding: 4px 12px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 12px;
}

.article-detail h1 {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--pi-text);
}

.article-detail .article-excerpt {
    font-size: 1.1rem;
    color: var(--pi-text-muted);
    font-weight: 400;
    line-height: 1.7;
    margin-bottom: 20px;
    border-left: 4px solid var(--pi-red);
    padding-left: 16px;
}

.article-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--pi-border);
    border-bottom: 1px solid var(--pi-border);
    margin-bottom: 24px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--pi-red);
}

.article-detail .featured-img {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
}

.article-detail .featured-img img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.article-detail .featured-img figcaption {
    font-size: 13px;
    color: var(--pi-text-muted);
    text-align: center;
    padding: 8px;
    background: var(--pi-cream);
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--pi-text);
}

.article-body p { margin-bottom: 1.2em; }
.article-body h2, .article-body h3 {
    font-family: var(--font-display);
    font-weight: 700;
    margin: 1.5em 0 0.7em;
    color: var(--pi-text);
}
.article-body blockquote {
    border-left: 4px solid var(--pi-red);
    margin: 1.5em 0;
    padding: 12px 20px;
    background: var(--pi-cream);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    font-size: 1.1rem;
}

.ai-summary-box {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
    border-left: 4px solid var(--pi-red);
}

.ai-summary-box .ai-label {
    font-family: var(--font-label);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--pi-light-blue);
    margin-bottom: 8px;
}

.article-tags { margin: 20px 0; }
.tag-chip {
    display: inline-block;
    padding: 4px 12px;
    background: var(--pi-cream);
    border: 1px solid var(--pi-border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--pi-text);
    margin: 3px;
    transition: var(--transition);
}
.tag-chip:hover { background: var(--pi-red); color: #fff; border-color: var(--pi-red); }

.share-buttons { margin: 24px 0; }
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: var(--transition);
}
.share-btn.facebook { background: #1877f2; color: #fff; }
.share-btn.twitter { background: #000; color: #fff; }
.share-btn.whatsapp { background: #25d366; color: #fff; }
.share-btn:hover { opacity: 0.85; transform: translateY(-1px); }

/* ============================================
   COMMENTS
   ============================================ */
.comment-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--pi-border);
}
.comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--pi-border);
}
.comment-bubble {
    background: var(--pi-cream);
    border-radius: 0 var(--radius) var(--radius) var(--radius);
    padding: 12px 16px;
    font-size: 14px;
}

/* ============================================
   SIDEBAR WIDGETS
   ============================================ */
.widget {
    background: var(--pi-card-bg);
    border: 1px solid var(--pi-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.widget-title {
    font-family: var(--font-label);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--pi-red);
    color: var(--pi-text);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--pi-footer-bg);
    color: rgba(255,255,255,0.8);
    margin-top: 48px;
}

.footer-top { padding: 40px 0 30px; }
.footer-logo { height: 60px; object-fit: contain; margin-bottom: 12px; display: block; }
.footer-tagline { font-family: var(--font-label); font-size: 13px; letter-spacing: 1px; color: var(--pi-red); text-transform: uppercase; margin-bottom: 10px; }
.footer-desc { font-size: 13px; opacity: 0.7; line-height: 1.6; }

.footer-social { display: flex; gap: 10px; }
.social-link {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.8);
    font-size: 16px;
    transition: var(--transition);
}
.social-link:hover { background: var(--pi-red); color: #fff; transform: translateY(-2px); }

.footer-heading {
    font-family: var(--font-label);
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.65); transition: var(--transition); }
.footer-links a:hover { color: var(--pi-red); padding-left: 4px; }

.footer-bottom {
    background: rgba(0,0,0,0.3);
    padding: 16px 0;
    font-size: 13px;
}

.footer-bottom-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-bottom-links a { color: rgba(255,255,255,0.5); font-size: 12px; }
.footer-bottom-links a:hover { color: var(--pi-red); }

/* ============================================
   SEARCH PAGE
   ============================================ */
.search-hero {
    background: linear-gradient(135deg, var(--pi-navy) 0%, #1a2744 100%);
    padding: 40px 0;
    color: #fff;
    text-align: center;
}

.search-hero h1 { font-family: var(--font-display); font-weight: 800; }

.search-hero-form { max-width: 600px; margin: 0 auto; }
.search-hero-form .form-control {
    border-radius: 30px 0 0 30px;
    padding: 12px 20px;
    font-size: 16px;
    border: 0;
}
.search-hero-form .btn {
    border-radius: 0 30px 30px 0;
    padding: 12px 24px;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination .page-link {
    color: var(--pi-text);
    border-color: var(--pi-border);
    background: var(--pi-card-bg);
}
.pagination .page-item.active .page-link {
    background: var(--pi-red);
    border-color: var(--pi-red);
}
.pagination .page-link:hover { color: var(--pi-red); }

/* ============================================
   UTILITIES
   ============================================ */
.text-red { color: var(--pi-red) !important; }
.bg-red { background: var(--pi-red) !important; }
.border-red { border-color: var(--pi-red) !important; }
.font-display { font-family: var(--font-display) !important; }
.font-label { font-family: var(--font-label) !important; }

.news-grid { display: grid; gap: 20px; }
.news-grid-3 { grid-template-columns: repeat(3, 1fr); }
.news-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
    .news-grid-3, .news-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .hero-main-article { height: 360px; }
    .article-detail h1 { font-size: 1.8rem; }
}

@media (max-width: 576px) {
    .news-grid-3, .news-grid-4 { grid-template-columns: 1fr; }
    .hero-main-article { height: 280px; }
    .hero-content .hero-title { font-size: 1.2rem; }
    .article-detail h1 { font-size: 1.5rem; }
    .logo-img { height: 40px; }
}
