/*
 * Global Insight News Website Styles
 * Modern, responsive design with unique layout
 */

/* ===== CSS VARIABLES ===== */
:root {
    --primary-color: #0a192f;
    --secondary-color: #ff6b35;
    --accent-color: #00b4d8;
    --text-dark: #1a1a1a;
    --text-light: #f8f9fa;
    --text-gray: #6c757d;
    --bg-light: #ffffff;
    --bg-off-white: #f8f9fa;
    --bg-dark: #0a192f;
    --border-color: #e9ecef;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

/* Optimized reset for faster rendering */
*, *::before, *::after { box-sizing: border-box; }



html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-off-white);
    overflow-x: hidden;
    margin: 0 !important;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Optimized image loading */
.lazy-img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-img.loaded {
    opacity: 1;
}

/* Placeholder for images before loading */
.image-placeholder {
    background: linear-gradient(90deg, #f0f0f0 0px, #f8f9fa 40%, #f0f0f0 80%);
    background-size: 200% 100%;
    animation: loadingPlaceholder 1.5s infinite;
}

@keyframes loadingPlaceholder {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive images */
.hero-image,
.article-card-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--secondary-color);
}

/* Desktop Navigation */
.desktop-nav ul {
    display: flex;
    gap: 1.5rem;
}

.desktop-nav a {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem;
    position: relative;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--secondary-color);
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: var(--transition);
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    width: 100%;
}

/* Search Bar */
.search-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-input {
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 180px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    width: 220px;
}

.search-btn {
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 0.5rem 0.8rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--secondary-color);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-nav.active {
    max-height: 500px;
    display: block;
}

.mobile-nav ul {
    padding: 1rem;
}

.mobile-nav li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav li:last-child {
    border-bottom: none;
}

.mobile-nav a {
    font-weight: 600;
    display: block;
}

.mobile-nav a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

/* ===== BREAKING NEWS TICKER ===== */
.ticker {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ticker-content {
    display: inline-block;
    animation: scroll 30s linear infinite;
    padding-left: 100%;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ===== MAIN CONTAINER ===== */
.main-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* ===== HERO SECTION ===== */
.hero-section {
    margin-bottom: 2rem;
}

.hero-card {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.hero-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.hero-image {
    background-size: cover;
    background-position: center;
    min-height: 400px;
}

.hero-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-content h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 1rem 0;
    line-height: 1.2;
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.read-more {
    background: var(--secondary-color);
    color: var(--text-light);
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    margin-top: 1rem;
    display: inline-block;
    transition: var(--transition);
}

.read-more:hover {
    background: var(--primary-color);
    transform: translateX(5px);
}

/* ===== CATEGORY TAGS ===== */
.category-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.category-tag.technology { background: #e3f2fd; color: #1565c0; }
.category-tag.business { background: #fff3e0; color: #e65100; }
.category-tag.science { background: #f3e5f5; color: #6a1b9a; }
.category-tag.health { background: #e8f5e8; color: #2e7d32; }
.category-tag.world { background: #fce4ec; color: #c2185b; }
.category-tag.culture { background: #fff9c4; color: #f57f17; }

/* ===== ARTICLE META ===== */
.article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-top: auto;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ===== TRENDING SECTION ===== */
.trending-section {
    margin: 3rem 0;
}

.trending-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trending-section h2 i {
    color: var(--secondary-color);
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ===== FEATURED ARTICLES GRID ===== */
.featured-grid {
    margin: 3rem 0;
}

.featured-grid h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.featured-grid h2 i {
    color: var(--secondary-color);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* Article Cards - Multiple Layouts */
.article-card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.article-card.large {
    grid-column: span 2;
}

.article-card.tall {
    grid-row: span 2;
}

.article-card-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.article-card.large .article-card-image,
.article-card.tall .article-card-image {
    height: 220px;
}

.article-card-content {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card h3 {
    font-size: 1.1rem;
    margin: 0.5rem 0;
    line-height: 1.3;
    color: var(--primary-color);
}

.article-card p {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    /* flex: 1; */
}

.article-card .article-meta {
    margin-top: auto;
    font-size: 0.8rem;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-color), #1a365d);
    color: var(--text-light);
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 3rem 0;
}

.newsletter-content h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    max-width: 500px;
    margin: 1.5rem auto;
    flex-wrap: wrap;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: var(--border-radius);
    min-width: 200px;
}

.newsletter-form button {
    background: var(--secondary-color);
    color: var(--text-light);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--accent-color);
}

.newsletter-content small {
    opacity: 0.8;
    font-size: 0.8rem;
}

/* ===== CATEGORY PAGE STYLES ===== */
.category-header {
    background: var(--bg-light);
    padding: 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.category-header-content {
    max-width: 1400px;
    margin: 0 auto;
}

.category-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.category-header p {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.filter-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--secondary-color);
    color: var(--text-light);
    border-color: var(--secondary-color);
}

.category-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.load-more-container {
    text-align: center;
}

.load-more-btn {
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.load-more-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* ===== DETAIL PAGE STYLES ===== */
.article-detail {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.article-content {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.breadcrumb {
    margin-bottom: 1.5rem;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.breadcrumb a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.article-header h1 {
    font-size: 2.2rem;
    color: var(--primary-color);
    line-height: 1.2;
    margin: 1rem 0;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.article-image {
    height: 400px;
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.share-btn {
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.share-btn.twitter:hover { background: #1da1f2; color: white; border-color: #1da1f2; }
.share-btn.facebook:hover { background: #1877f2; color: white; border-color: #1877f2; }
.share-btn.linkedin:hover { background: #0a66c2; color: white; border-color: #0a66c2; }
.share-btn.copy:hover { background: var(--primary-color); color: white; }

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-body h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem;
    color: var(--primary-color);
}

.article-body p {
    margin-bottom: 1.2rem;
}

.article-body .lead {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.article-body ul {
    margin: 1rem 0 1.5rem 1.5rem;
}

.article-body ul li {
    list-style: disc;
    margin-bottom: 0.5rem;
}

blockquote {
    border-left: 4px solid var(--secondary-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--bg-off-white);
    font-style: italic;
    color: var(--primary-color);
}

.fact-box {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
    border-left: 4px solid var(--accent-color);
}

.fact-box h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Author Bio */
.author-bio {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-off-white);
    border-radius: var(--border-radius);
    margin: 2rem 0;
    align-items: center;
}

.author-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    flex-shrink: 0;
}

.author-info h4 {
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.author-info p {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* Related Articles */
.related-articles {
    margin: 2rem 0;
}

.related-articles h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.related-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.related-image {
    height: 120px;
    background-size: cover;
    background-position: center;
}

.related-content {
    padding: 1rem;
}

.related-content h4 {
    font-size: 0.95rem;
    margin: 0.5rem 0;
    line-height: 1.3;
}

.related-date {
    font-size: 0.8rem;
    color: var(--text-gray);
}

/* Comments Section */
.comments-section {
    margin: 2rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.comments-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.comment-form {
    margin-bottom: 1.5rem;
}

.comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    min-height: 100px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 0.5rem;
}

.comment-form button {
    background: var(--secondary-color);
    color: var(--text-light);
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
}

.comment {
    background: var(--bg-off-white);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.comment-header span {
    color: var(--text-gray);
}

/* Sidebar */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.newsletter-widget,
.trending-widget,
.ad-placeholder {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.newsletter-widget h4,
.trending-widget h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.newsletter-widget p {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 0.8rem;
}

.newsletter-widget input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}

.newsletter-widget button {
    width: 100%;
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 0.6rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.trending-list a {
    font-size: 0.9rem;
    padding: 0.5rem;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.trending-list a:hover {
    border-left-color: var(--secondary-color);
    padding-left: 0.8rem;
    color: var(--secondary-color);
}

.ad-placeholder {
    text-align: center;
    color: var(--text-gray);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-off-white);
    border: 2px dashed var(--border-color);
}

/* ===== LEGAL PAGES ===== */
.legal-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.legal-page {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    line-height: 1.8;
}

.legal-header {
    background: linear-gradient(135deg, var(--primary-color), #1a365d);
    color: var(--text-light);
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
}

.legal-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.legal-header .last-updated {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
    font-style: italic;
}

.legal-content {
    padding: 2.5rem;
}

.legal-intro {
    background: rgba(255, 107, 53, 0.05);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--secondary-color);
    margin-bottom: 2rem;
}

.legal-content h1 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 1.5rem 0 0.8rem;
}

.legal-content h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin: 1.2rem 0 0.6rem;
    background: var(--bg-off-white);
    padding: 0.8rem;
    border-radius: calc(var(--border-radius) / 2);
    border-left: 3px solid var(--accent-color);
}

.legal-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.legal-content ul {
    margin: 0.8rem 0 1.5rem 1.5rem;
}

.legal-content ul li {
    list-style: disc;
    margin-bottom: 0.5rem;
}

.legal-content ol {
    margin: 0.8rem 0 1.5rem 1.5rem;
}

.legal-content ol li {
    list-style: decimal;
    margin-bottom: 0.8rem;
}

.legal-content a {
    color: var(--secondary-color);
    text-decoration: underline;
    transition: var(--transition);
}

.legal-content a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.legal-section {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.legal-section:hover {
    border-bottom: 1px solid var(--secondary-color);
    padding-bottom: 1.8rem;
}

.legal-section:last-child {
    border-bottom: none;
}

.table-of-contents {
    background: var(--bg-off-white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.table-of-contents h3 {
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    text-align: center;
    font-size: 1.3rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.table-of-contents ul {
    columns: 2;
    column-gap: 2rem;
    padding-left: 1rem;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.table-of-contents a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 0.3rem 0;
    transition: var(--transition);
    position: relative;
}

.table-of-contents a:before {
    content: "• ";
    color: var(--secondary-color);
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: var(--transition);
}

.table-of-contents a:hover {
    color: var(--secondary-color);
    padding-left: 0.5rem;
}

.table-of-contents a:hover:before {
    opacity: 1;
}

.section-content {
    padding: 1rem 0 0 0.5rem;
    border-left: 2px solid var(--border-color);
    margin-left: 0.5rem;
}

@media (max-width: 768px) {
    .legal-header {
        padding: 2rem 1.5rem;
    }
    
    .legal-header h1 {
        font-size: 2rem;
    }
    
    .legal-content {
        padding: 1.5rem;
    }
    
    .legal-intro {
        padding: 1rem;
    }
    
    .table-of-contents ul {
        columns: 1;
    }
    
    .legal-content h3 {
        font-size: 1.1rem;
    }
    .featured-grid h2,.category-grid{
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .legal-header {
        padding: 1.5rem 1rem;
    }
    
    .legal-header h1 {
        font-size: 1.6rem;
    }
    
    .legal-content {
        padding: 1rem;
    }
    
    .table-of-contents {
        padding: 1rem;
    }
}

/* ===== FOOTER ===== */
.footer {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 10px 0;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.footer-section p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    font-size: 1.3rem;
}

.social-links a:hover {
    color: var(--secondary-color);
    transform: translateY(-2px);
}

.app-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.app-links a {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-links a:hover {
    background: var(--secondary-color);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.8;
}



.legal-links a {
    margin: 0 0.3rem;
    text-decoration: underline;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--secondary-color);
    color: var(--text-light);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .hero-card {
        grid-template-columns: 1fr;
    }

    .hero-image {
        min-height: 250px;
    }

    .article-detail {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        order: -1;
    }

    .article-card.large {
        grid-column: span 1;
    }

    .article-card.tall {
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    /* Mobile Navigation */
    .desktop-nav,
    .search-container {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    /* Ticker adjustments */
    .ticker {
        font-size: 0.8rem;
        padding: 0.4rem 0.5rem;
    }

    .ticker-content {
        animation-duration: 20s;
    }

    /* Main Container */
    .main-container,
    .category-container,
    .article-detail,
    .legal-container {
        padding: 0 5px;
        margin: 1rem auto;
    }

    /* Hero Section */
    .hero-content {
        padding: 1.5rem;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    /* Article Grid */
    .articles-grid,
    .category-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Newsletter */
    .newsletter-section {
        padding: 2rem 1rem;
        margin: 2rem 5px;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 0.8rem;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }

    /* Article Detail */
    .article-content {
        padding: 1.5rem;
    }

    .article-header h1 {
        font-size: 1.6rem;
    }

    .article-image {
        height: 250px;
        margin: 1.5rem 0;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        width: 100%;
        justify-content: center;
    }

    .article-body {
        font-size: 1rem;
    }

    .author-bio {
        flex-direction: column;
        text-align: center;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    /* Category Header */
    .category-header {
        padding: 5px;
        margin-bottom: 5px;
    }
.article-card-content{
    padding: 5px;
}
.trending-grid{
    gap: 5px;
}
.hero-section{
    margin-bottom: 5px;
}
.trending-section,.featured-grid{
    margin: 5px 0;
}
.hero-content p,.article-card p{
    margin-bottom: 5px;
}
.hero-content h1{
    margin: 5px 0;
}
.read-more{
    margin-top: 5px;
}
p{
    margin: 0 !important;
}
    .category-header h1 {
        font-size: 1.8rem;
    }

    .filter-options {
        gap: 0.3rem;
    }

    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    /* Legal Pages */
    .legal-content {
        padding: 1.5rem;
    }

    .legal-content h1 {
        font-size: 1.6rem;
    }

    /* Footer */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 5px 1.5rem;
    }


    /* Mobile Menu */
    .mobile-nav {
        max-height: 0;
        transition: max-height 0.3s ease;
    }

    .mobile-nav.active {
        max-height: 600px;
    }

    /* Back to Top */
    .back-to-top {
        bottom: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0.5rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    .ticker {
        font-size: 0.7rem;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-content h1 {
        font-size: 1.3rem;
    }

    .category-header h1 {
        font-size: 1.5rem;
    }

    .article-header h1 {
        font-size: 1.4rem;
    }

    .article-content {
        padding: 1rem;
    }

    .legal-content {
        padding: 1rem;
    }

    .legal-content h1 {
        font-size: 1.4rem;
    }

    .legal-content h2 {
        font-size: 1.2rem;
    }
}

/* ===== ACCESSIBILITY & PERFORMANCE ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .ticker-content {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .header, .footer, .newsletter-section, .share-buttons,
    .comments-section, .back-to-top, .mobile-nav, .ticker {
        display: none;
    }

    .article-detail {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        display: none;
    }

    body {
        background: white;
    }

    .article-content {
        box-shadow: none;
        padding: 0;
    }
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Error State */
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    border-left: 4px solid #c62828;
}

/* Success Message */
.success-message {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    border-left: 4px solid #2e7d32;
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.hidden { display: none; }
