/*
 * Global News Website Styles
 * Modern, professional, and responsive design
 */

/* CSS Variables for consistent theming */
:root {
    --primary-color: #1a73e8;
    --secondary-color: #ea4335;
    --accent-color: #34a853;
    --text-dark: #202124;
    --text-light: #5f6368;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #dadce0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}
a {
    color: #202124;
}
a:hover {
    text-decoration: underline;
}

/* Container System */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.container-fluid {
    width: 100%;
    padding: 0 15px;
}

/* Header Styles */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--primary-color);
    color: white;
    padding: 8px 0;
    font-size: 0.85rem;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.weather-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-links a {
    color: white;
    margin-left: 12px;
    font-size: 1.1rem;
}

.header-main {
    padding: 15px 0;
    background: var(--bg-white);
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary-color);
}

/* Navigation */
.nav-menu {
    display: flex;
    gap: 25px;
    list-style: none;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 600;
    padding: 8px 0;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    text-decoration: none;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: var(--transition);
}

/* Search Bar */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 200px;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    width: 250px;
}

/* Main Content Grid */
.main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 25px;
    padding: 25px 0;
}

.content-area {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Article Cards - Multiple Layouts */
.article-card {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Hero Article - Large Featured */
.article-hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    min-height: 350px;
}

.article-hero .image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.article-hero .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-hero:hover .image-container img {
    transform: scale(1.05);
}

.article-hero .content {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-hero .category-tag {
    background: var(--secondary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
    width: fit-content;
}

.article-hero h2 {
    margin: 10px 0;
    font-size: 1.8rem;
    line-height: 1.2;
}

.article-hero .meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: auto;
}

/* Standard Article Card */
.article-standard {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 10px;
    padding: 10px;
}

.article-standard .image-container {
    border-radius: 6px;
    overflow: hidden;
    height: 120px;
}

.article-standard .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-standard:hover .image-container img {
    transform: scale(1.1);
}

.article-standard .content h3 {
    font-size: 1.1rem;
    margin: 5px 0;
    line-height: 1.3;
}

.article-standard .meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Horizontal Article */
.article-horizontal {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
}

.article-horizontal .image-container {
    border-radius: 8px;
    overflow: hidden;
    height: 200px;
}

.article-horizontal .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-horizontal:hover .image-container img {
    transform: scale(1.05);
}

.article-horizontal h3 {
    font-size: 1.3rem;
    margin: 10px 0;
}

/* Compact Article */
.article-compact {
    padding: 15px;
    border-left: 4px solid var(--primary-color);
}

.article-compact h4 {
    font-size: 1rem;
    margin: 5px 0;
    line-height: 1.3;
}

.article-compact .meta {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Breaking News Ticker */
.breaking-news {
    background: var(--text-dark);
    color: white;
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
}

.breaking-news .container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.breaking-label {
    background: var(--secondary-color);
    padding: 4px 10px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    border-radius: 3px;
}

.breaking-ticker {
    display: inline-block;
    animation: scroll 60s linear infinite;
    animation-delay: 0s;
}

@keyframes scroll {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-100%); }
}

/* Sidebar Components */
.widget {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.widget h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.trending-list {
    list-style: none;
}

.trending-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    align-items: start;
}

.trending-list li:last-child {
    border-bottom: none;
}

.trending-number {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1.2rem;
    line-height: 1;
}

.newsletter-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.btn {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
}

.btn:hover {
    background: #1557b0;
    transform: translateY(-1px);
    text-decoration: none;
}

/* Category Page Styles */
.category-header {
    background: var(--bg-white);
    padding: 30px 0;
    margin-bottom: 25px;
    border-bottom: 3px solid var(--primary-color);
}

.category-header h1 {
    font-size: 2.2rem;
    margin: 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Detail Page Styles */
.article-detail {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.article-detail .hero-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
}

.article-detail h1 {
    font-size: 2.5rem;
    margin: 20px 0;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    gap: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.article-content p {
    margin-bottom: 1.5em;
}

.article-content h2 {
    margin: 1.5em 0 0.5em;
    font-size: 1.8rem;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--text-light);
    background: var(--bg-light);
    padding: 20px;
    border-radius: 0 8px 8px 0;
}
p{
    margin-bottom: 0 !important;
}
/* Footer Styles */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 10px 0 !important;
    margin-top: 0px;
}
.footer-bottom a{
    color: #bdc1c6;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #bdc1c6;
}

.footer-links a:hover {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    font-size: 0.85rem;
    color: #bdc1c6;
}

/* Privacy & Terms Pages */
.privacy, .Terms {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 30px auto;
    line-height: 1.7;
    color: var(--text-dark);
}

.privacy h2, .Terms h1 {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
}

.privacy h3, .Terms h3 {
    margin-top: 30px;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.privacy p, .Terms p {
    margin-bottom: 1.2em !important;
    font-size: 1.05rem;
    line-height: 1.8;
}

.privacy ul, .Terms ul {
    margin-left: 25px;
    margin-bottom: 1.5em;
    padding-left: 15px;
}

.privacy li, .Terms li {
    margin-bottom: 0.8em;
    font-size: 1.05rem;
    line-height: 1.7;
}

.privacy strong, .Terms strong {
    color: var(--text-dark);
    font-weight: 600;
}

.privacy .mm, .Terms .mm {
    color: var(--primary-color);
    font-weight: 600;
}

/* Table of Contents Styling */
.privacy div[style="margin-left: 30px"], .Terms .title > p:first-of-type {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid var(--primary-color);
}

.privacy div[style="margin-left: 30px"] a, .Terms .title > p:first-of-type a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    padding: 5px 0;
}

.privacy div[style="margin-left: 30px"] a:hover, .Terms .title > p:first-of-type a:hover {
    text-decoration: underline;
    padding-left: 5px;
}

/* Section Styling */
.privacy .title, .Terms .title {
    margin: 30px 0;
    padding: 25px 0;
    border-bottom: 1px solid var(--border-color);
}

.privacy .title:last-child, .Terms .title:last-child {
    border-bottom: none;
}

/* Responsive adjustments for policy pages */
@media (max-width: 768px) {
    .privacy, .Terms {
        padding: 20px 15px;
        margin: 15px;
    }
    
    .privacy h2, .Terms h1 {
        font-size: 1.8rem;
    }
    
    .privacy h3, .Terms h3 {
        font-size: 1.3rem;
    }
    
    .privacy p, .Terms p, .privacy li, .Terms li {
        font-size: 1rem;
    }
    #box2,#box5,#category2{
        grid-template-columns: 1fr !important;
    }
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
    padding: 20px;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.close-menu {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

.mobile-nav {
    list-style: none;
}

.mobile-nav li {
    margin-bottom: 15px;
}

.mobile-nav a {
    display: block;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 6px;
    font-weight: 600;
    color: var(--text-dark);
}

.mobile-nav a:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

.mobile-search {
    margin-top: 20px;
}

.mobile-search input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: -1;
    }

    .article-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .article-horizontal {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Mobile optimizations - strict margins */
    .container, .container-fluid {
        padding: 0 5px;
    }

    body {
        margin: 0;
    }

    /* Header adjustments */
    .header-top {
        padding: 5px 0;
        font-size: 0.75rem;
    }

    .header-main {
        padding: 10px 0;
    }

    .logo {
        font-size: 1.4rem;
    }

    .nav-menu, .search-container {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* Main content padding */
    .main-content, .category-header, .article-detail {
        padding: 10px 5px;
    }

    /* Article adjustments */
    .article-hero {
        gap: 10px;
    }

    .article-hero h2 {
        font-size: 1.4rem;
    }

    .article-standard {
        grid-template-columns: 120px 1fr;
        gap: 10px;
        padding: 10px;
    }

    .article-horizontal {
        padding: 15px 10px;
    }

    .article-compact {
        padding: 12px 10px;
    }

    .article-detail {
        padding: 15px 10px;
    }

    .article-detail h1 {
        font-size: 1.8rem;
        margin: 2.5px 0;
    }

    .article-detail .hero-image {
        height: 250px;
        margin-bottom: 5px;
    }

    /* Sidebar widgets */
    .widget {
        padding: 15px 10px;
    }

    /* Footer */
    .footer {
        padding: 30px 5px 15px;
    }

    .footer-content {
        gap: 20px;
        grid-template-columns: 1fr;
    }

    /* Policy pages */
    .policy-content {
        padding: 20px 15px;
        margin: 10px;
    }

    /* Breaking news ticker */
    .breaking-news {
        font-size: 0.8rem;
    }

    .breaking-label {
        padding: 3px 6px;
        font-size: 0.7rem;
    }

    /* Form inputs */
    .search-input, .newsletter-form input {
        width: 100%;
        max-width: 100%;
    }

    /* Ensure all elements fit within viewport */
    .mobile-menu {
        width: 90%;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }

    .article-standard {
        grid-template-columns: 1fr;
    }

    .article-standard .image-container {
        height: 180px;
    }

    .article-horizontal .image-container {
        height: 160px;
    }

    .article-detail .hero-image {
        height: 200px;
    }

    .article-meta {
        flex-direction: column;
        gap: 5px;
    }
}

/* Accessibility & Performance */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Print Styles */
@media print {
    .header, .footer, .sidebar, .breaking-news, .hamburger, .mobile-menu {
        display: none !important;
    }

    .main-content {
        grid-template-columns: 1fr;
    }

    .article-detail {
        box-shadow: none;
        padding: 0;
    }

    a {
        text-decoration: none;
        color: var(--text-dark);
    }
}
