/* ===================================
   NOTIZIE ITALIA OGGI - PREMIUM EDITION
   Custom CSS Styles - Part 1: Base Styles
   =================================== */

/* CSS Variables */
:root {
    /* Colors - Green & Gold Premium Theme */
    --primary-color: #2d7016;
    --primary-light: #4a9e2a;
    --primary-dark: #1e4a0f;
    --secondary-color: #d4af37;
    --secondary-light: #e6c968;
    --secondary-dark: #b8941f;
    
    /* Text Colors */
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #ecf0f1;
    --text-muted: #95a5a6;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-dark: #2c3e50;
    --bg-overlay: rgba(45, 112, 22, 0.9);
    
    /* Accent Colors */
    --accent-red: #e74c3c;
    --accent-blue: #3498db;
    --accent-orange: #f39c12;
    --accent-green: #27ae60;
    
    /* Shadows */
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.2);
    
    /* Border Radius */
    --radius-small: 6px;
    --radius-medium: 12px;
    --radius-large: 20px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Fonts */
    --font-primary: 'Roboto', sans-serif;
    --font-secondary: 'Merriweather', serif;
    
    /* Z-index layers */
    --z-loading: 9999;
    --z-header: 1000;
    --z-modal: 1100;
    --z-toast: 1200;
}

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

*::before,
*::after {
    box-sizing: border-box;
}

/* Base HTML & Body */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden; /* Prevent horizontal scrolling */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

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

a:hover {
    color: var(--primary-dark);
}

/* Lists */
ul, ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Buttons */
button {
    font-family: inherit;
    font-size: inherit;
    border: none;
    background: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Form Elements */
input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    border: 2px solid #e1e5e9;
    border-radius: var(--radius-small);
    padding: 0.75rem 1rem;
    transition: var(--transition-fast);
    width: 100%;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 112, 22, 0.1);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loading);
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.loading-spinner p {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

/* ===================================
   HEADER STYLES
   =================================== */

/* Top Banner */
.top-banner {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-color));
    color: white;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-red);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 50% { opacity: 1; }
    25%, 75% { opacity: 0.5; }
}

.weather-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Main Header */
.main-header {
    position: sticky;
    top: 0;
    background: white;
    box-shadow: var(--shadow-light);
    z-index: var(--z-header);
    transition: transform var(--transition-medium);
}

.header-main {
    padding: 1rem 0;
    border-bottom: 1px solid #e1e5e9;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo h1 {
    font-size: 2rem;
    margin: 0;
    color: var(--primary-color);
}

.logo h1 span {
    color: var(--secondary-color);
}

.logo p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
    font-style: italic;
}

/* Navigation */
.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    font-weight: 500;
    color: var(--text-primary);
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition-fast);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.search-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    width: 30px;
    height: 30px;
    justify-content: center;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Search Bar */
.search-bar {
    background: var(--bg-secondary);
    padding: 1rem 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
}

.search-bar.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.search-content {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-content input {
    flex: 1;
    border: 2px solid white;
    border-radius: var(--radius-medium);
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
}

.search-submit {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-medium);
    font-weight: 600;
    transition: var(--transition-fast);
}

.search-submit:hover {
    background: var(--primary-dark);
}

/* ===================================
   BREAKING NEWS TICKER
   =================================== */

.breaking-news {
    background: linear-gradient(45deg, var(--accent-red), #c0392b);
    color: white;
    padding: 0.75rem 0;
    overflow: hidden;
}

.breaking-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.breaking-label {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-small);
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breaking-text {
    flex: 1;
    overflow: hidden;
}

.ticker {
    white-space: nowrap;
    animation: scroll-left 60s linear infinite;
}

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

/* ===================================
   HERO SECTION
   =================================== */

.hero-section {
    margin: 2rem 0;
}

.hero-content {
    position: relative;
    border-radius: var(--radius-large);
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
    min-height: 400px;
    display: flex;
    align-items: flex-end;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    z-index: 2;
}

.hero-info {
    position: relative;
    z-index: 3;
    color: white;
    padding: 2rem;
    width: 100%;
}

.hero-category {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-small);
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-excerpt {
    font-size: 1.2rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-meta time {
    font-size: 0.9rem;
    opacity: 0.8;
}

.read-more {
    background: var(--secondary-color);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-medium);
    font-weight: 600;
    transition: var(--transition-fast);
    text-decoration: none;
}

.read-more:hover {
    background: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* ===================================
   MAIN CONTENT LAYOUT
   =================================== */

.main-content {
    padding: 2rem 0;
    background: var(--bg-secondary);
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
}

.content-main {
    min-width: 0; /* Prevent grid overflow */
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
}

.section-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.75rem;
    position: relative;
}

.section-header h3::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* View Controls */
.view-controls {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.25rem;
    border-radius: var(--radius-small);
    box-shadow: var(--shadow-light);
}

.view-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    color: var(--text-secondary);
}

.view-btn.active,
.view-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* ===================================
   TRENDING STORIES
   =================================== */

.trending-section {
    margin-bottom: 3rem;
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.trending-card {
    background: white;
    border-radius: var(--radius-medium);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition-medium);
    position: relative;
}

.trending-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.trending-card.list-view {
    display: flex;
    align-items: center;
}

.trending-card.list-view .card-image {
    width: 200px;
    flex-shrink: 0;
}

.trending-card.list-view .card-content {
    flex: 1;
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

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

.card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-small);
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

.card-title a:hover {
    color: var(--primary-color);
}

.card-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.card-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-time i {
    color: var(--primary-color);
}

/* ===================================
   NEWS GRID
   =================================== */

.news-section {
    margin-bottom: 3rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.news-card {
    background: white;
    border-radius: var(--radius-medium);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition-medium);
    border: 1px solid transparent;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.news-card .card-image {
    height: 220px;
}

.news-card .card-content {
    padding: 1.25rem;
}

.news-card .card-title {
    font-size: 1.1rem;
    -webkit-line-clamp: 2;
}

.news-card .card-excerpt {
    -webkit-line-clamp: 2;
    font-size: 0.95rem;
}

/* Featured News Card */
.news-card.featured {
    grid-column: span 2;
    display: flex;
    min-height: 300px;
}

.news-card.featured .card-image {
    width: 50%;
    height: auto;
}

.news-card.featured .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}

.news-card.featured .card-title {
    font-size: 1.5rem;
    -webkit-line-clamp: 3;
}

.news-card.featured .card-excerpt {
    font-size: 1rem;
    -webkit-line-clamp: 4;
}

/* Load More Button */
.load-more-section {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-medium);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition-fast);
    border: 2px solid var(--primary-color);
}

.load-more-btn:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.load-more-btn i {
    transition: var(--transition-fast);
}

.load-more-btn:hover i {
    transform: translateY(2px);
}

.load-more-btn:hover i {
    transform: translateY(2px);
}

/* ===================================
   SIDEBAR WIDGETS
   =================================== */

.sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.widget {
    background: white;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-light);
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.widget-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 1.25rem;
    position: relative;
}

.widget-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--secondary-color);
}

.widget-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.widget-content {
    padding: 1.5rem;
}

/* Tab Controls */
.tab-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-small);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.tab-btn.active,
.tab-btn:hover {
    background: white;
    color: var(--primary-color);
}

/* Popular Articles Widget */
.popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
    transition: var(--transition-fast);
}

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

.popular-item:hover {
    background: var(--bg-secondary);
    margin: 0 -1.5rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-small);
}

.popular-rank {
    background: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.popular-rank.top-3 {
    background: var(--secondary-color);
    color: var(--text-primary);
}

.popular-info {
    flex: 1;
    min-width: 0;
}

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

.popular-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.popular-title a:hover {
    color: var(--primary-color);
}

.popular-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Newsletter Widget */
.newsletter-widget .widget-content {
    text-align: center;
}

.newsletter-widget p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-form input {
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: var(--radius-small);
    font-size: 0.95rem;
}

.newsletter-form button {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-small);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.newsletter-form button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Social Widget */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-small);
    text-decoration: none;
    transition: var(--transition-fast);
    border: 1px solid #e1e5e9;
}

.social-link:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-light);
}

.social-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.social-link.facebook {
    color: #1877f2;
}

.social-link.facebook:hover {
    background: rgba(24, 119, 242, 0.1);
    border-color: #1877f2;
}

.social-link.twitter {
    color: #1da1f2;
}

.social-link.twitter:hover {
    background: rgba(29, 161, 242, 0.1);
    border-color: #1da1f2;
}

.social-link.instagram {
    color: #e4405f;
}

.social-link.instagram:hover {
    background: rgba(228, 64, 95, 0.1);
    border-color: #e4405f;
}

.social-link.youtube {
    color: #ff0000;
}

.social-link.youtube:hover {
    background: rgba(255, 0, 0, 0.1);
    border-color: #ff0000;
}

/* ===================================
   CONTACT SECTION
   =================================== */

.contact-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 4rem 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
}

.contact-item i {
    width: 20px;
    color: var(--secondary-color);
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-heavy);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-form input,
.contact-form textarea {
    border: 2px solid #e1e5e9;
    border-radius: var(--radius-small);
    padding: 0.75rem;
    font-size: 1rem;
    transition: var(--transition-fast);
    color: var(--text-primary);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 112, 22, 0.1);
}

.form-checks {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    position: relative;
    transition: var(--transition-fast);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-medium);
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    transition: var(--transition-fast);
    border: 2px solid var(--primary-color);
}

.submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-logo h3 {
    color: var(--primary-color);
    font-size: 1.75rem;
}

.footer-logo h3 span {
    color: var(--secondary-color);
}

.footer-logo p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-light);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition-fast);
}

.footer-section ul li a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-social a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.footer-newsletter {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.footer-newsletter input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-small);
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.footer-newsletter input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.footer-newsletter button {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem;
    border-radius: var(--radius-small);
    transition: var(--transition-fast);
}

.footer-newsletter button:hover {
    background: var(--primary-dark);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    opacity: 0.8;
}

.footer-bottom p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

/* ===================================
   UTILITY COMPONENTS
   =================================== */

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-medium);
    transition: var(--transition-fast);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: white;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-heavy);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    z-index: var(--z-toast);
    transform: translateX(400px);
    transition: var(--transition-medium);
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-notification.success .toast-icon {
    color: var(--accent-green);
}

.toast-notification.error .toast-icon {
    color: var(--accent-red);
}

.toast-notification.info .toast-icon {
    color: var(--accent-blue);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
}

.toast-close:hover {
    color: var(--text-primary);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Large Tablets */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .content-layout {
        grid-template-columns: 1fr 300px;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .nav-menu {
        gap: 1.5rem;
    }
}

/* Tablets */
@media (max-width: 768px) {
    /* Header adjustments */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: var(--shadow-medium);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu a {
        padding: 1rem;
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
    }
    
    .nav-menu a:last-child {
        border-bottom: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .header-main {
        position: relative;
    }
    
    /* Layout changes */
    .content-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .sidebar {
        position: static;
        order: -1;
    }
    
    /* Hero section */
    .hero-content {
        min-height: 300px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-excerpt {
        font-size: 1rem;
    }
    
    .hero-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    /* Grid adjustments */
    .trending-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-card.featured {
        grid-column: span 1;
        flex-direction: column;
    }
    
    .news-card.featured .card-image {
        width: 100%;
        height: 200px;
    }
    
    /* Contact section */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Breaking news */
    .breaking-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .breaking-label {
        align-self: flex-start;
    }
}

/* Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Typography scaling */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    
    /* Header */
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo p {
        font-size: 0.7rem;
    }
    
    .top-banner {
        font-size: 0.8rem;
    }
    
    .banner-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    /* Hero section */
    .hero-content {
        min-height: 250px;
    }
    
    .hero-info {
        padding: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-excerpt {
        font-size: 0.95rem;
    }
    
    /* Cards */
    .trending-card.list-view {
        flex-direction: column;
    }
    
    .trending-card.list-view .card-image {
        width: 100%;
        height: 200px;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    /* Widgets */
    .widget-content {
        padding: 1rem;
    }
    
    .widget-header {
        padding: 1rem;
    }
    
    .tab-controls {
        flex-wrap: wrap;
    }
    
    /* Contact form */
    .contact-form {
        padding: 1.5rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-newsletter {
        flex-direction: column;
    }
    
    /* Buttons */
    .load-more-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
    
    /* Toast notification */
    .toast-notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        min-width: auto;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero-info {
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 1.25rem;
    }
    
    .section-header h3 {
        font-size: 1.5rem;
    }
    
    .card-content {
        padding: 0.75rem;
    }
    
    .widget-content,
    .widget-header {
        padding: 0.75rem;
    }
}

/* ===================================
   ACCESSIBILITY & INTERACTIONS
   =================================== */

/* Focus styles for better accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .ticker {
        animation: none;
    }
    
    .live-dot {
        animation: none;
    }
    
    .spinner {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.4);
        --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.5);
    }
    
    .card-image::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: 2px solid var(--text-primary);
        pointer-events: none;
    }
}

/* Print styles */
@media print {
    .header-main,
    .breaking-news,
    .sidebar,
    .contact-section,
    .footer,
    .back-to-top,
    .toast-notification,
    .loading-screen {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
        background: white;
    }
    
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .hero-content {
        background: white;
        color: black;
        box-shadow: none;
        border: 2px solid black;
    }
    
    .hero-overlay {
        display: none;
    }
    
    .card-image {
        border: 1px solid black;
    }
    
    a::after {
        content: " [" attr(href) "]";
        font-size: 0.8em;
        color: #666;
    }
}

/* ===================================
   ANIMATION KEYFRAMES
   =================================== */

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Bounce in */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

.bounce-in {
    animation: bounceIn 0.8s ease-out;
}

/* Lazy loading image fade */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

/* ===================================
   UTILITY CLASSES FOR JAVASCRIPT
   =================================== */

.hidden {
    display: none !important;
}

.invisible {
    visibility: hidden !important;
}

.disabled {
    opacity: 0.6 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Scroll reveal classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal.delay-1 {
    transition-delay: 0.2s;
}

.reveal.delay-2 {
    transition-delay: 0.4s;
}

.reveal.delay-3 {
    transition-delay: 0.6s;
}
