/*
 * DINAPUYAL NEWS - Production CSS
 * Tamil News Portal Styles
 * Version: 2.0.0
 */

/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Core Colors */
    --primary: #1e2a2f;
    --primary-dark: #151e22;
    --accent: #be9d7c;
    --accent-light: #d4b896;
    --panel: #fff;
    --bg: #f0f2f5;
    --muted: #6c757d;
    --text-dark: #1a1a1a;

    /* Category Colors */
    --world: #3a7ca5;
    --india: #ff9933;
    --tamilnadu: #d11d27;
    --cinema: #c424a3;
    --politics: #2e7d32;
    --business: #5d4037;
    --sports: #e65100;
    --technology: #0d47a1;
    --health: #00695c;
    --education: #6a1b9a;
    --crime: #b71c1c;
    --spirituality: #ff8f00;

    /* Breaking News */
    --breaking-red: #c62828;
    --breaking-gradient: linear-gradient(90deg, #c62828, #e53935);

    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #be9d7c 0%, #d4b896 50%, #c9a882 100%);
    --gradient-dark: linear-gradient(135deg, #1e2a2f 0%, #2d3e44 100%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);

    /* Layout */
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans Tamil', 'Segoe UI', Arial, sans-serif;
    background: var(--bg);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

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

a.no-deco:hover {
    color: var(--accent);
}

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

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 15px;
}

.muted {
    color: var(--muted);
    font-size: 0.85rem;
}

.hidden {
    display: none !important;
}

/* =========================================
   2. HEADER STYLES
   ========================================= */
header {
    background: var(--gradient-dark);
    padding: 8px 15px;
    border-radius: 0 0 30px 30px;
    z-index: 1000;
    color: #fff;
    box-shadow: var(--shadow-lg);
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: var(--gradient-gold);
    border-radius: 2px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#time {
    font-weight: bold;
    cursor: pointer;
    background: rgba(190, 157, 124, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    white-space: nowrap;
    border: 1px solid rgba(190, 157, 124, 0.3);
    transition: var(--transition);
    font-family: monospace;
    font-size: 1rem;
}

#time:hover {
    background: rgba(190, 157, 124, 0.3);
}

.date-container {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 0.8rem;
}

.date-container>div {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 15px;
    white-space: nowrap;
    backdrop-filter: blur(5px);
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 12px 0;
}

.header-logo {
    width: 350px;
    height: 180px;
    object-fit: contain;
    transition: var(--transition);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.header-logo:hover {
    transform: scale(1.03);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: var(--gradient-gold);
    color: var(--primary);
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    margin: 10px auto;
    width: 90%;
    max-width: 300px;
    transition: var(--transition);
    font-size: 1rem;
}

.mobile-menu-toggle:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

nav.main-nav {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    padding: 10px 0;
}

nav.main-nav a {
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 25px;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
}

nav.main-nav a:hover,
nav.main-nav a.active {
    background: var(--gradient-gold);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(190, 157, 124, 0.4);
}

/* =========================================
   3. BREAKING NEWS TICKER
   ========================================= */
.breaking-news {
    background: var(--breaking-gradient);
    color: #fff;
    padding: 10px 0;
    margin-top: 15px;
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.breaking-label {
    background: #fff;
    color: var(--breaking-red);
    padding: 6px 15px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-left: 10px;
    border-radius: 20px;
    white-space: nowrap;
    animation: pulse 2s infinite;
    display: flex;
    align-items: center;
    gap: 6px;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.breaking-ticker {
    flex: 1;
    overflow: hidden;
    margin: 0 15px;
}

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

.breaking-ticker-content:hover {
    animation-play-state: paused;
}

.breaking-ticker-item {
    padding: 0 40px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breaking-ticker-item::before {
    content: '●';
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.7);
}

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

    100% {
        transform: translateX(-50%);
    }
}

/* =========================================
   4. FEATURED GRID & LAYOUT
   ========================================= */
main {
    padding: 20px 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.featured-main {
    position: relative;
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    min-height: 450px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.featured-main:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.featured-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    inset: 0;
    transition: var(--transition);
}

.featured-main:hover img {
    transform: scale(1.05);
}

.featured-overlay {
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: #fff;
    padding: 60px 20px 20px;
}

.featured-title {
    margin: 0 0 8px;
    font-size: 1.6rem;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.featured-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.side-card {
    background: #fff;
    padding: 10px;
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.side-card img {
    height: 120px;
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: var(--transition);
}

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

/* =========================================
   5. SECTION TITLES & BOX
   ========================================= */
.section-title {
    font-size: 1.25rem;
    margin: 25px 0 12px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 22px;
    background: var(--gradient-gold);
    border-radius: 3px;
}

.section-title-link {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}

.section-title-link:hover {
    color: var(--primary);
}

.box {
    background: #fff;
    padding: 18px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.box:hover {
    box-shadow: var(--shadow-md);
}

/* =========================================
   6. SLIDER (Editor's Picks)
   ========================================= */
.slider-container {
    position: relative;
    margin-top: 15px;
}

.slider {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 5px 15px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
}

.slider::-webkit-scrollbar {
    height: 8px;
}

.slider::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 4px;
}

.slider::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

.slider-item {
    min-width: 260px;
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    scroll-snap-align: start;
    flex-shrink: 0;
}

.slider-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.slider-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.slider-item-content {
    padding: 12px;
}

.slider-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================
   7. TWO-COLUMN LAYOUT
   ========================================= */
.two-column {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 25px;
    margin-top: 25px;
}

/* =========================================
   8. NEWS ITEMS & CATEGORIES
   ========================================= */
.news-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

.news-item:hover {
    background: rgba(190, 157, 124, 0.05);
    margin-left: -10px;
    margin-right: -10px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 8px;
}

.news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.news-item img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    transition: var(--transition);
    flex-shrink: 0;
}

.news-item:hover img {
    transform: scale(1.03);
}

.news-item-content h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    line-height: 1.4;
}

.news-item-content h3 a:hover {
    color: var(--accent);
}

.category-section {
    margin-top: 30px;
}

.category-title {
    font-size: 1.15rem;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.category-title:hover {
    transform: translateX(5px);
}

/* Category color variations */
.world-title {
    background: linear-gradient(135deg, rgba(58, 124, 165, 0.15), rgba(58, 124, 165, 0.05));
    color: var(--world);
}

.world-item {
    border-left: 4px solid var(--world);
    padding-left: 12px;
}

.india-title {
    background: linear-gradient(135deg, rgba(255, 153, 51, 0.15), rgba(255, 153, 51, 0.05));
    color: var(--india);
}

.india-item {
    border-left: 4px solid var(--india);
    padding-left: 12px;
}

.tamilnadu-title {
    background: linear-gradient(135deg, rgba(209, 29, 39, 0.15), rgba(209, 29, 39, 0.05));
    color: var(--tamilnadu);
}

.tamilnadu-item {
    border-left: 4px solid var(--tamilnadu);
    padding-left: 12px;
}

.cinema-title {
    background: linear-gradient(135deg, rgba(196, 36, 163, 0.15), rgba(196, 36, 163, 0.05));
    color: var(--cinema);
}

.cinema-item {
    border-left: 4px solid var(--cinema);
    padding-left: 12px;
}

.politics-title {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.15), rgba(46, 125, 50, 0.05));
    color: var(--politics);
}

.politics-item {
    border-left: 4px solid var(--politics);
    padding-left: 12px;
}

.business-title {
    background: linear-gradient(135deg, rgba(93, 64, 55, 0.15), rgba(93, 64, 55, 0.05));
    color: var(--business);
}

.business-item {
    border-left: 4px solid var(--business);
    padding-left: 12px;
}

.sports-title {
    background: linear-gradient(135deg, rgba(230, 81, 0, 0.15), rgba(230, 81, 0, 0.05));
    color: var(--sports);
}

.sports-item {
    border-left: 4px solid var(--sports);
    padding-left: 12px;
}

.technology-title {
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.15), rgba(13, 71, 161, 0.05));
    color: var(--technology);
}

.technology-item {
    border-left: 4px solid var(--technology);
    padding-left: 12px;
}

.health-title {
    background: linear-gradient(135deg, rgba(0, 105, 92, 0.15), rgba(0, 105, 92, 0.05));
    color: var(--health);
}

.health-item {
    border-left: 4px solid var(--health);
    padding-left: 12px;
}

.education-title {
    background: linear-gradient(135deg, rgba(106, 27, 154, 0.15), rgba(106, 27, 154, 0.05));
    color: var(--education);
}

.education-item {
    border-left: 4px solid var(--education);
    padding-left: 12px;
}

/* =========================================
   9. TAGS
   ========================================= */
.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    transition: var(--transition);
}

.tag:hover {
    transform: scale(1.05);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.breaking-tag {
    background: var(--breaking-red);
}

.world-tag {
    background: var(--world);
}

.india-tag {
    background: var(--india);
}

.tamilnadu-tag {
    background: var(--tamilnadu);
}

.cinema-tag {
    background: var(--cinema);
}

.politics-tag {
    background: var(--politics);
}

.business-tag {
    background: var(--business);
}

.sports-tag {
    background: var(--sports);
}

.technology-tag {
    background: var(--technology);
}

.health-tag {
    background: var(--health);
}

.education-tag {
    background: var(--education);
}

/* =========================================
   10. VIDEO SECTION
   ========================================= */
.video-section {
    margin-top: 30px;
}

.video-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.video-main {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #000;
    aspect-ratio: 16/9;
}

.video-main iframe,
.video-main video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-playlist {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.video-playlist-item {
    display: flex;
    gap: 10px;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.video-playlist-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.video-playlist-item img {
    width: 100px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.video-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--breaking-red);
    color: #fff;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* =========================================
   11. SIDEBAR
   ========================================= */
aside .box {
    margin-bottom: 15px;
}

aside h3 {
    margin: 0 0 15px;
    color: var(--primary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

aside ul {
    list-style: none;
}

aside li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    transition: padding-left 0.2s ease;
}

aside li:hover {
    padding-left: 8px;
    color: var(--accent);
}

aside li:last-child {
    border-bottom: none;
}

/* Rasi Grid in Sidebar */
.rasi-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.rasi-mini-btn {
    background: var(--gradient-dark);
    border: 1px solid var(--accent);
    color: #fff;
    padding: 8px 4px;
    border-radius: 8px;
    font-size: 0.7rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.rasi-mini-btn:hover {
    background: var(--accent);
    color: var(--primary);
    transform: scale(1.05);
}

/* =========================================
   12. RASI PALAN PAGE
   ========================================= */
.rasi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.rasi-card {
    background: var(--gradient-dark);
    border: 2px solid var(--accent);
    color: #fff;
    border-radius: var(--border-radius);
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.rasi-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-light);
}

.rasi-card img {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
}

.rasi-card div {
    font-weight: 700;
    font-size: 1rem;
}

/* =========================================
   13. MODAL
   ========================================= */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    text-align: center;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h2 {
    color: var(--accent);
    margin-bottom: 15px;
}

.close-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 25px;
    margin-top: 15px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.close-btn:hover {
    background: var(--accent);
    color: var(--primary);
}

/* =========================================
   13b. ARTICLE READER MODAL
   ========================================= */
.article-modal {
    padding: 20px;
    overflow-y: auto;
}

.article-modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.3s ease;
}

.article-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.article-modal-close:hover {
    background: var(--breaking-red);
    transform: scale(1.1);
}

.article-modal-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}

.article-modal-body {
    position: relative;
}

.article-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.article-modal-title {
    font-size: 1.5rem;
    line-height: 1.4;
    color: var(--primary);
    margin: 0 0 12px;
}

.article-modal-meta {
    display: flex;
    gap: 20px;
    color: var(--muted);
    font-size: 0.9rem;
}

.article-modal-meta i {
    margin-right: 5px;
    color: var(--accent);
}

.article-modal-text {
    padding: 25px;
    font-size: 1.1rem;
    line-height: 1.9;
    color: #333;
}

.article-modal-text p {
    margin-bottom: 1em;
}

.article-source-note {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--muted);
}

.article-source-note i {
    color: var(--accent);
}

.article-modal-actions {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.article-share-btns {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.telegram {
    background: #0088cc;
}

.read-original-btn {
    background: var(--primary);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.read-original-btn:hover {
    background: var(--accent);
    color: var(--primary);
}

/* Article modal responsive */
@media (max-width: 768px) {
    .article-modal {
        padding: 10px;
    }

    .article-modal-content {
        max-height: 95vh;
    }

    .article-modal-image {
        height: 220px;
    }

    .article-modal-title {
        font-size: 1.25rem;
    }

    .article-modal-text {
        font-size: 1rem;
        padding: 20px;
    }

    .article-modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .article-share-btns {
        justify-content: center;
    }

    .read-original-btn {
        text-align: center;
        justify-content: center;
    }
}

/* =========================================
   14. LOADING STATE
   ========================================= */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--muted);
}

.loading-spinner i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
    color: var(--accent);
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* =========================================
   15. FOOTER
   ========================================= */
footer {
    background: var(--gradient-dark);
    color: #e0e0e0;
    padding: 50px 20px 20px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1300px;
    margin: 0 auto;
}

.footer-section h3 {
    color: var(--accent);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-section p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.footer-links a {
    display: block;
    color: #ccc;
    padding: 6px 0;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 8px;
}

.social-icons {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
    font-size: 0.9rem;
}

/* =========================================
   16. RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 1024px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }

    .featured-main {
        min-height: 350px;
    }

    .two-column {
        grid-template-columns: 1fr;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header {
        border-radius: 0 0 20px 20px;
    }

    .header-logo {
        width: 250px;
        height: auto;
    }

    .top-bar {
        flex-direction: column;
        gap: 8px;
    }

    .date-container {
        justify-content: center;
    }

    nav.main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    nav.main-nav.show {
        display: flex;
    }

    nav.main-nav a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .featured-main {
        min-height: 280px;
    }

    .featured-side {
        grid-template-columns: 1fr;
    }

    .featured-title {
        font-size: 1.3rem;
    }

    .news-item {
        flex-direction: column;
    }

    .news-item img {
        width: 100%;
        height: 180px;
    }

    .slider-item {
        min-width: 220px;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .rasi-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .header-logo {
        width: 200px;
    }

    .breaking-news {
        flex-direction: column;
        padding: 10px;
        text-align: center;
    }

    .breaking-label {
        margin: 0 0 10px;
    }

    .breaking-ticker {
        margin: 0;
        width: 100%;
    }

    .featured-grid {
        gap: 10px;
    }

    .featured-main {
        min-height: 220px;
    }

    .rasi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================
   17. ACCORDION ARTICLE EXPANSION
   ========================================= */
/* Article expansion container */
.article-expansion {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 0 0 12px 12px;
    margin-top: 0;
    border-top: 3px solid var(--accent);
}

.article-expansion.expanded {
    max-height: 2000px;
    opacity: 1;
    padding: 0;
    margin-top: 15px;
}

.expansion-content {
    padding: 20px;
}

.expansion-image {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.expansion-image img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.expansion-header {
    margin-bottom: 20px;
}

.expansion-title {
    font-size: 1.5rem;
    line-height: 1.5;
    color: var(--primary);
    margin: 0 0 15px;
    font-weight: 700;
}

.expansion-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: var(--muted);
    font-size: 0.9rem;
}

.expansion-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(190, 157, 124, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
}

.expansion-meta i {
    color: var(--accent);
}

.expansion-body {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #333;
    margin-bottom: 25px;
}

.expansion-body p {
    margin-bottom: 1.2em;
    text-align: justify;
}

.expansion-body p:last-child {
    margin-bottom: 0;
}

.expansion-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.expansion-actions .action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.expansion-actions .share-btn {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
}

.expansion-actions .share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.expansion-actions .collapse-btn {
    background: linear-gradient(135deg, var(--primary), #2d3e44);
    color: white;
}

.expansion-actions .collapse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 42, 47, 0.4);
}

.expansion-footer {
    background: linear-gradient(135deg, #e8f4fd, #f0f4f8);
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--muted);
}

.expansion-footer i {
    color: var(--accent);
    font-size: 1.1rem;
}

/* Make news items cursors show as clickable */
.featured-main,
.side-card,
.news-item,
.slider-item {
    cursor: pointer;
    position: relative;
}

/* Click indicator */
.featured-main::after,
.side-card::after,
.news-item::after {
    content: '📖 படிக்க கிளிக் செய்யவும்';
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.featured-main:hover::after,
.side-card:hover::after,
.news-item:hover::after {
    opacity: 1;
}

/* Responsive expansion */
@media (max-width: 768px) {
    .expansion-content {
        padding: 15px;
    }

    .expansion-title {
        font-size: 1.25rem;
    }

    .expansion-body {
        font-size: 1rem;
        line-height: 1.8;
    }

    .expansion-meta {
        flex-direction: column;
        gap: 8px;
    }

    .expansion-image img {
        max-height: 250px;
    }

    .expansion-actions {
        flex-direction: column;
    }

    .expansion-actions .action-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .expansion-title {
        font-size: 1.1rem;
    }

    .expansion-body {
        font-size: 0.95rem;
    }

    .expansion-footer {
        flex-direction: column;
        text-align: center;
    }
}

/* Animation for expansion */
@keyframes expandIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-expansion.expanded .expansion-content {
    animation: expandIn 0.4s ease-out;
}

/* =========================================
   18. 3-COLUMN NEWS PAGE LAYOUT
   ========================================= */
.news-layout {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 80vh;
}

/* Left Sidebar - Breaking News */
.news-left {
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.news-left::-webkit-scrollbar {
    width: 4px;
}

.news-left::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 2px;
}

.sidebar-box {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 15px;
}

.sidebar-box h3 {
    color: var(--primary);
    font-size: 1rem;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-box h3 i {
    color: var(--accent);
}

/* Breaking News List */
.breaking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.breaking-item {
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.breaking-item:hover {
    background: rgba(190, 157, 124, 0.15);
    transform: translateX(3px);
}

.breaking-item img {
    width: 70px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.breaking-item-content {
    flex: 1;
    min-width: 0;
}

.breaking-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 4px;
}

.breaking-item-time {
    font-size: 0.7rem;
    color: var(--muted);
}

/* Center - Main Article */
.news-center {
    min-width: 0;
}

.article-container {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.article-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.article-header {
    padding: 25px;
    border-bottom: 1px solid #eee;
}

.article-title {
    font-size: 1.8rem;
    line-height: 1.4;
    color: var(--primary);
    margin: 0 0 15px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: var(--muted);
    font-size: 0.9rem;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-meta i {
    color: var(--accent);
}

.article-body {
    padding: 25px;
    font-size: 1.15rem;
    line-height: 1.9;
    color: #333;
}

.article-body p {
    margin-bottom: 1.2em;
    text-align: justify;
}

.article-share {
    padding: 20px 25px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-buttons button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 1.1rem;
    transition: var(--transition);
}

.share-buttons button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-buttons .whatsapp {
    background: #25D366;
}

.share-buttons .facebook {
    background: #1877F2;
}

.share-buttons .twitter {
    background: #1DA1F2;
}

.share-buttons .telegram {
    background: #0088cc;
}

.back-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.back-home-btn:hover {
    background: var(--accent);
    color: var(--primary);
}

/* Right Sidebar - Ads + Related */
.news-right {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.ad-slot {
    margin-bottom: 15px;
}

.ad-placeholder {
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    border: 2px dashed #ccc;
    border-radius: var(--border-radius);
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

.ad-placeholder i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

/* Related News List */
.related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-item {
    display: block;
    padding: 10px;
    border-radius: 8px;
    background: #f8f9fa;
    text-decoration: none;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.related-item:hover {
    background: rgba(190, 157, 124, 0.15);
    border-left-color: var(--accent);
    padding-left: 15px;
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.error-message i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--accent);
}

.error-message .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 12px 25px;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
}

/* Responsive - Tablet */
@media (max-width: 1200px) {
    .news-layout {
        grid-template-columns: 1fr 280px;
    }

    .news-left {
        display: none;
    }
}

/* Responsive - Mobile */
@media (max-width: 900px) {
    .news-layout {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .news-left,
    .news-right {
        display: none;
    }

    .article-image {
        height: 250px;
    }

    .article-title {
        font-size: 1.4rem;
    }

    .article-body {
        font-size: 1rem;
        padding: 15px;
    }

    .article-header {
        padding: 15px;
    }

    .article-share {
        flex-direction: column;
        align-items: stretch;
    }

    .share-buttons {
        justify-content: center;
    }

    .back-home-btn {
        text-align: center;
        justify-content: center;
    }
}

/* =========================================
   19. PRINT STYLES
   ========================================= */
@media print {

    header,
    footer,
    .breaking-news,
    nav,
    aside,
    .social-icons,
    .news-left,
    .news-right {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .box,
    .article-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}