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

:root {
    --primary-color: #e74c3c;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --border-color: #e0e0e0;
    --white: #ffffff;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

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

/* Header */
.header {
    background: var(--white);
    border-bottom: 3px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

.logo h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -1px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.main-nav {
    display: flex;
    gap: 25px;
}

.main-nav a {
    font-weight: 500;
    font-size: 15px;
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 4px;
    position: relative;
}

.main-nav a:hover {
    color: var(--primary-color);
    background: rgba(231, 76, 60, 0.05);
}

.main-nav a.active {
    color: var(--primary-color);
    font-weight: 600;
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -18px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--cat-color, var(--primary-color));
}

.mobile-menu-btn {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    padding: 30px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

/* Featured Article */
.featured-article {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-article:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.featured-image {
    position: relative;
    height: 450px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.featured-content {
    padding: 25px;
}

.featured-content h2 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--secondary-color);
}

.featured-content h2:hover {
    color: var(--primary-color);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.article-meta .separator {
    color: #ddd;
}

.article-summary {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
}

.category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Category Title */
.category-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.news-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

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

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-content {
    padding: 18px;
}

.news-content h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.news-content h3:hover {
    color: var(--primary-color);
}

.news-summary {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.no-articles {
    background: var(--white);
    padding: 40px;
    text-align: center;
    border-radius: 8px;
    color: #999;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-box {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popular-item {
    display: flex;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

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

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

.popular-content h4 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-color);
    margin-bottom: 5px;
}

.popular-content h4:hover {
    color: var(--primary-color);
}

.popular-meta {
    font-size: 12px;
}

.popular-meta .category {
    font-weight: 600;
}

/* Ad Spaces */
.ad-space {
    background: var(--light-gray);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.ad-label {
    background: var(--border-color);
    text-align: center;
    padding: 4px;
    font-size: 10px;
    color: #999;
    letter-spacing: 1px;
}

.ad-placeholder {
    padding: 60px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
    border: 2px dashed var(--border-color);
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: white;
    margin-top: 50px;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

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

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #ddd;
    font-size: 14px;
}

.footer-section a:hover {
    color: white;
}

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

/* Responsive */
@media (max-width: 968px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .featured-image {
        height: 250px;
    }
    
    .featured-content h2 {
        font-size: 24px;
    }
}

/* ====================================
   COOKIE CONSENT POPUP
   ==================================== */

.cookie-consent {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 25px 20px;
    z-index: 10000;
    transition: bottom 0.5s ease-in-out;
}

.cookie-consent.show {
    bottom: 0;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 25px;
}

.cookie-icon {
    flex-shrink: 0;
    color: var(--primary-color);
}

.cookie-icon svg {
    display: block;
}

.cookie-text {
    flex: 1;
}

.cookie-text h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0 0 10px 0;
}

.cookie-text p {
    font-size: 14px;
    color: #555;
    margin: 0;
    line-height: 1.6;
}

.cookie-text a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-btn-reject {
    background: #f5f5f5;
    color: #666;
}

.cookie-btn-reject:hover {
    background: #e0e0e0;
}

.cookie-btn-accept {
    background: var(--primary-color);
    color: white;
}

.cookie-btn-accept:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

@media (max-width: 768px) {
    .cookie-consent {
        padding: 20px 15px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .cookie-icon {
        margin: 0 auto;
    }
    
    .cookie-buttons {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    
    .cookie-btn {
        width: 100%;
        padding: 16px 24px; /* Più grandi per touch */
        font-size: 16px; /* Previene zoom su iOS */
        min-height: 48px; /* Touch target raccomandato */
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
    
    .cookie-text h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .cookie-text p {
        font-size: 13px;
        line-height: 1.5;
    }
}

/* ====================================
   WIDGET DE CLIMA EN FOOTER
   ==================================== */

.weather-widget {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.weather-label {
    font-size: 12px;
    color: #ddd;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.weather-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.weather-city {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.weather-city:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.weather-flag {
    font-size: 20px;
}

.weather-name {
    font-size: 13px;
    color: #ecf0f1;
    font-weight: 500;
}

.weather-temp {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    margin-left: 4px;
}

.weather-icon {
    font-size: 18px;
    margin-left: 2px;
}

/* Widget simple (sin API) */
.weather-widget.simple .weather-container {
    justify-content: flex-start;
}

.weather-widget.simple .weather-city {
    padding: 6px 10px;
}

@media (max-width: 768px) {
    .weather-container {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .weather-city {
        justify-content: space-between;
        padding: 10px 15px;
    }
    
    .weather-widget {
        padding: 12px;
    }
}

