/* ==========================================
   STYLE.CSS - Arredo Moderno (Aggiornato)
   ========================================== */

/* Variabili Globali */
:root {
    --primary-color: #2c3e50;
    --accent-color: #d4a373;
    --bg-light: #f9f9f9;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --white: #ffffff;
}

/* Reset Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.6;
}

/* Header e Navigazione */
header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo img {
    height: 130px;
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-list a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-list a:hover {
    color: var(--accent-color);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 6px;
    min-width: 160px;
    padding: 10px 0;
    z-index: 100;
}

.dropdown-content a {
    display: block;
    padding: 8px 16px;
    color: var(--text-color);
    font-weight: normal;
}

.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.dropdown.active .dropdown-content {
    display: block;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.85), rgba(44, 62, 80, 0.85)), 
                url('https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?auto=format&fit=crop&w=1600&q=80') center center / cover no-repeat;
    background-color: #2c3e50;
    color: #ffffff;
    text-align: center;
    padding: clamp(60px, 8vw, 90px) 20px;
    border-radius: 12px;
    margin: 30px auto;
    max-width: 1200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 15px;
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.hero p {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    max-width: 750px;
    margin: 0 auto;
    color: #e2e8f0 !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    line-height: 1.6;
}

/* Layout Principale Container */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }
}

/* Griglia Articoli (Forzata a 2 colonne reali) */
.posts-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

/* Post Card */
.post-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.post-image-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-tag {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-image-wrapper .post-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: rgba(44, 62, 80, 0.85);
}

.post-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-title {
    font-size: 1.15rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    line-height: 1.4;
}

.post-title a {
    color: inherit;
    text-decoration: none;
}

.post-title a:hover {
    color: var(--accent-color);
}

.post-excerpt {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.5;
}

.btn-read {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.2s;
}

.btn-read:hover {
    background-color: var(--accent-color);
}

/* Dettaglio Singolo Articolo (.post-detail) */
.post-detail {
    flex: 1;
    min-width: 0;
}

/* Sidebar / Widget */
.sidebar {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (max-width: 900px) {
    .sidebar {
        width: 100%;
    }
}

.widget {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--bg-light);
}

.categories-list, .social-links {
    list-style: none;
}

.categories-list li {
    margin-bottom: 10px;
}

.categories-list a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.categories-list a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.affiliate-disclaimer {
    font-size: 0.8rem;
    color: #777;
    line-height: 1.5;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: #fff;
    margin-top: 60px;
    padding: 50px 20px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col p, .footer-col a {
    font-size: 0.85rem;
    color: #ccc;
    text-decoration: none;
    line-height: 1.6;
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #aaa;
}

/* Breadcrumbs */
.breadcrumbs {
    max-width: 1200px;
    margin: 15px auto 0;
    padding: 0 20px;
    font-size: 0.85rem;
    color: #666;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumbs a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.breadcrumbs span {
    margin: 0 8px;
    color: #999;
}

/* Menu Mobile & Hamburger */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: 0.3s;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        border-bottom: 1px solid var(--border-color);
        gap: 15px;
    }

    .nav-list.active {
        display: flex;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        padding-left: 15px;
        background-color: transparent;
    }
    
    .logo img {
        height: 70px !important;
    }
}