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

html {
    overflow-x: hidden;
}

body {
    font-family: 'Noto Sans Tamil', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    background-color: #e8e8e8;
    line-height: 1.6;
}

.site-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.08);
    min-height: 100vh;
}

/* Header */
header {
    background-color: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 1rem 2rem;
    position: relative;
    z-index: 100;
}

header.sticky {
    position: sticky;
    top: 0;
}

.header-container {
    max-width: 1340px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #c62828;
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

nav a {
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

nav a:hover {
    color: #d32f2f;
}

.header-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

/* News Ticker */
.news-ticker {
    background-color: #d32f2f;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.ticker-label {
    background-color: #b71c1c;
    color: #ffeb3b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.6rem 1.2rem;
    flex-shrink: 0;
}

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

.ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: scroll 30s linear infinite;
    color: #ffffff;
    font-weight: 500;
}

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

/* Page layout with right ad sidebar */
.page-with-ads {
    display: flex;
    max-width: 1340px;
    margin: 0 auto;
    min-height: 60vh;
}
.ad-sidebar {
    flex-shrink: 0;
    width: 320px;
    padding: 2rem 2rem 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 80px;
    align-self: flex-start;
}
.ad-sidebar-right {
    margin-left: 0;
    margin-right: 2rem;
}
.ad-slot {
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ad-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.85rem;
    text-align: center;
    padding: 0.5rem;
}
.ad-slot iframe {
    max-width: 100%;
    max-height: 100%;
}
.ad-slot .ad-image-link {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
}
.ad-slot .ad-image-link img,
.ad-slot > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: middle;
}
@media (max-width: 1200px) {
    .ad-sidebar {
        display: none;
    }
    .container.with-sidebar {
        max-width: 1340px;
    }
}

/* Container */
.container {
    max-width: 1340px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}
.container.with-sidebar {
    max-width: 1040px;
}

/* Main Feature Section */
.main-feature {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

.featured-article {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.featured-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.featured-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.92);
    color: #333;
    padding: 1.2rem 1.5rem;
    border-radius: 10px;
    max-width: 480px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.article-source {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #666;
}

.featured-overlay .article-source {
    color: #666;
}

.featured-overlay .category {
    color: #d32f2f;
}

.source-logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #000;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.featured-headline {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.featured-excerpt {
    color: #555;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.read-more {
    color: #d32f2f;
    text-decoration: none;
    font-weight: 600;
}

.featured-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #999;
}

.carousel-nav {
    display: flex;
    gap: 0.5rem;
}

.carousel-nav button {
    background: none;
    border: 1px solid #ddd;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
}

/* Sidebar Articles */
.sidebar-articles {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-article {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.sidebar-article:last-child {
    border-bottom: none;
}

.sidebar-image {
    width: 120px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.sidebar-content {
    flex: 1;
}

.sidebar-source {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.sidebar-headline {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.article-meta {
    font-size: 0.8rem;
    color: #999;
}

.category {
    color: #d32f2f;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
}

.see-all {
    color: #d32f2f;
    text-decoration: none;
    font-weight: 600;
}

/* Latest News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    margin-bottom: 4rem;
}

/* News card – redesigned */
.news-card {
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e8e8e8;
    transition: border-color 0.25s ease, transform 0.25s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    border-color: #d0d0d0;
    transform: translateY(-2px);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: #f0f0f0;
}

.card-content {
    padding: 1.25rem 1.35rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-source {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.card-headline {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.35;
    color: #1a1a1a;
}

.news-card a.card-headline,
.news-card .card-headline a {
    color: inherit;
    text-decoration: none;
}

.news-card a.card-headline:hover,
.news-card .card-headline a:hover {
    color: #c62828;
}

.card-content .article-meta {
    font-size: 0.8rem;
    color: #777;
    margin-top: auto;
    padding-top: 0.65rem;
    border-top: 1px solid #eee;
}

.card-share-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.card-share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    background: white;
    color: #666;
}

.card-share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.card-share-button i {
    font-size: 16px;
}

.card-share-button-facebook:hover {
    background-color: #1877f2;
    color: white;
    border-color: #1877f2;
}

.card-share-button-twitter:hover {
    background-color: #1da1f2;
    color: white;
    border-color: #1da1f2;
}

.card-share-button-whatsapp:hover {
    background-color: #25d366;
    color: white;
    border-color: #25d366;
}

/* Category listing grid */
.category-listing {
    margin-bottom: 4rem;
}

.category-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.category-listing .no-articles {
    text-align: center;
    color: #666;
    padding: 3rem 0;
}

/* Category short card – same base, with excerpt */
.news-card-short .news-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.news-card-short .card-image {
    height: 200px;
    flex-shrink: 0;
}

.news-card-short .card-content {
    flex: 1;
}

.news-card-short .card-headline {
    font-size: 1.05rem;
}

.news-card-short .card-excerpt {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-short .article-meta {
    font-size: 0.8rem;
    color: #777;
    border-top: 1px solid #eee;
    padding-top: 0.65rem;
    margin-top: auto;
}

@media (max-width: 900px) {
    .category-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .category-news-grid {
        grid-template-columns: 1fr;
    }

    .news-card .card-content {
        padding: 1rem 1.15rem;
    }

    .card-headline {
        font-size: 1rem;
    }
}

/* Must Read Section */
.must-read {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

.must-read-featured {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.must-read-content {
    padding: 2rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.must-read-headline {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

/* Weekly Highlight */
.weekly-highlight {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

/* Top Creator Section */
.top-creators {
    margin-bottom: 4rem;
}

.creators-list {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 1rem 0;
}

.creator-card {
    text-align: center;
    min-width: 150px;
}

.creator-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
}

.creator-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.creator-org {
    font-size: 0.85rem;
    color: #666;
}

/* Footer */
footer {
    background-color: #f5f5f5;
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1340px;
    margin: 0 auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.footer-brand {
    max-width: 300px;
}

@media (max-width: 768px) {
    .footer-brand {
        max-width: 100%;
    }
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #c62828;
}

.footer-tagline {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.newsletter-button {
    padding: 0.75rem 1.5rem;
    background-color: #d32f2f;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.newsletter-button:hover {
    background-color: #b71c1c;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-column h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
    display: inline-block;
}

.footer-column a:hover {
    color: #d32f2f;
}

.social-links {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #666;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
    background-color: transparent;
    border: 1px solid transparent;
}

.social-links a:hover {
    color: #d32f2f;
    background-color: rgba(211, 47, 47, 0.1);
    border-color: rgba(211, 47, 47, 0.2);
    transform: translateY(-2px);
}

.social-links i {
    font-size: 22px;
    line-height: 1;
    display: inline-block;
    width: 22px;
    height: 22px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid #e5e5e5;
    font-size: 0.85rem;
    color: #666;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .footer-links {
        justify-content: center;
        gap: 1rem;
    }
}

.footer-links a {
    color: #666;
    text-decoration: none;
    white-space: nowrap;
}

.footer-links a:hover {
    color: #d32f2f;
}

/* Placeholder images */
.placeholder-img {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

/* ========== MOBILE BOTTOM TAB BAR ========== */
.mobile-bottom-tabs {
    display: none;
}

.mobile-categories-overlay,
.mobile-categories-drawer {
    display: none;
}

@media (max-width: 768px) {
    /* Bottom tab bar */
    .mobile-bottom-tabs {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #e0e0e0;
        z-index: 1000;
        padding: 0.35rem 0 0.5rem;
        justify-content: space-around;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    }

    .mobile-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.2rem;
        text-decoration: none;
        color: #888;
        font-size: 0.7rem;
        font-weight: 500;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.25rem 0.5rem;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-tab svg {
        width: 22px;
        height: 22px;
        stroke-width: 1.8;
    }

    .mobile-tab.active {
        color: #d32f2f;
    }

    /* Categories drawer */
    .mobile-categories-overlay,
    .mobile-categories-drawer {
        display: block;
    }

    .mobile-categories-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1100;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s;
    }

    .mobile-categories-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-categories-drawer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        z-index: 1200;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
        transition: transform 0.3s ease;
        max-height: 70vh;
        overflow-y: auto;
        padding-bottom: 1rem;
    }

    .mobile-categories-drawer.open {
        transform: translateY(0);
    }

    .mobile-drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.25rem 0.75rem;
        border-bottom: 1px solid #eee;
        position: sticky;
        top: 0;
        background: #fff;
        border-radius: 16px 16px 0 0;
    }

    .mobile-drawer-header h3 {
        font-size: 1.1rem;
        font-weight: 700;
    }

    .mobile-drawer-header button {
        background: none;
        border: none;
        font-size: 1.6rem;
        color: #666;
        cursor: pointer;
        padding: 0 0.25rem;
        line-height: 1;
    }

    .mobile-drawer-list {
        display: flex;
        flex-direction: column;
    }

    .mobile-drawer-item {
        padding: 0.85rem 1.25rem;
        text-decoration: none;
        color: #333;
        font-size: 1rem;
        border-bottom: 1px solid #f5f5f5;
        transition: background 0.15s;
    }

    .mobile-drawer-item:active {
        background: #f0f0f0;
    }

    /* Add bottom padding for tab bar */
    .site-wrapper {
        padding-bottom: 65px;
    }

    footer {
        padding-bottom: 0;
        margin-bottom: 0;
    }

    /* Hide desktop nav on mobile */
    header nav {
        display: none;
    }

    .header-icons {
        display: none;
    }

    /* Header mobile */
    header {
        padding: 0.75rem 1rem;
    }

    .logo span {
        font-size: 1.2rem;
    }

    /* Site wrapper full width on mobile */
    .site-wrapper {
        box-shadow: none;
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        background-color: #fff;
        overflow-x: hidden;
    }

    /* Prevent horizontal overflow */
    .page-with-ads {
        max-width: 100%;
        flex-direction: column;
    }

    .news-ticker {
        max-width: 100%;
    }

    .header-container {
        max-width: 100%;
    }

    .footer-container {
        max-width: 100%;
    }

    /* Featured section */
    .main-feature {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .featured-image {
        height: 250px;
    }

    .featured-overlay {
        position: relative;
        bottom: auto;
        left: auto;
        max-width: 100%;
        border-radius: 0;
        background: #fff;
        backdrop-filter: none;
        box-shadow: none;
        padding: 1rem;
    }

    .featured-overlay .article-source { color: #666; }
    .featured-overlay .category { color: #d32f2f; }
    .featured-headline { font-size: 1.3rem; }

    /* Container */
    .container {
        padding: 1rem;
        max-width: 100%;
    }

    .container.with-sidebar {
        max-width: 100%;
    }

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

    /* News grids */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        margin-bottom: 2rem;
    }

    /* Must read */
    .must-read {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .must-read-image {
        height: 220px;
    }

    .must-read-content {
        padding: 1rem;
    }

    .must-read-headline {
        font-size: 1.3rem;
    }

    /* Weekly highlight */
    .weekly-highlight {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    /* Section headers */
    .section-title {
        font-size: 1.3rem;
    }

    .section-header {
        margin-bottom: 1.25rem;
    }

    /* Sidebar articles */
    .sidebar-articles {
        gap: 1rem;
    }

    .sidebar-image {
        width: 90px;
        height: 75px;
    }

    .sidebar-headline {
        font-size: 0.9rem;
    }

    /* Creators */
    .creators-list {
        gap: 1.25rem;
    }

    .creator-card {
        min-width: 110px;
    }

    .creator-avatar {
        width: 60px;
        height: 60px;
    }

    /* Footer */
    footer {
        padding: 2rem 1rem 1.5rem;
        margin-top: 2rem;
    }

    /* Ticker */
    .ticker-label {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .ticker-content {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .weekly-highlight {
        grid-template-columns: 1fr;
    }

    .featured-image {
        height: 200px;
    }

    .card-image {
        height: 170px;
    }
}
