/**
 * Tablet Optimization: 768px - 1024px
 * iPad, Android Tablets, Landscape Phones
 */

@media (min-width: 768px) and (max-width: 1024px) {
    
    /* CONTAINER */
    .container {
        max-width: 100%;
        padding: 0 2rem;
    }
    
    /* HEADER */
    .topbar {
        padding: 1.2rem 0;
    }
    
    .topbar-social a {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .topbar-logo a {
        font-size: 1.6rem;
    }
    
    .primary-menu {
        gap: 1.5rem;
    }
    
    .primary-menu a {
        font-size: 0.95rem;
        padding: 0.8rem 1rem;
    }
    
    /* HOME LAYOUT */
    .home-layout {
        grid-template-columns: 1fr 250px;
        gap: 2rem;
    }
    
    .home-sidebar-left {
        display: none;
    }
    
    /* ARTICLES GRID 2 COLONNE */
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* HERO */
    .hero-article {
        min-height: 350px;
    }
    
    .hero-article-image {
        height: 350px;
    }
    
    .hero-article-title {
        font-size: 1.8rem;
    }
    
    /* WIDGET SEZIONI 2 COLONNE */
    .category-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem;
    }
    
    /* CATEGORIA */
    .category-hero-image {
        height: 0;
        padding-bottom: 56.25%;
    }
    
    .category-list-item {
        grid-template-columns: 200px 1fr;
        gap: 1.5rem;
    }
    
    .category-list-image {
        height: 150px;
    }
    
    /* SINGLE POST */
    .single-post-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .article-sidebar {
        width: 100%;
    }
    
    .article-header-image {
        height: 400px;
    }
    
    .article-main {
        padding: 2rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-content h2 {
        font-size: 1.6rem;
    }
    
    /* FOOTER 3 COLONNE */
    .footer-columns {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* TABLET PORTRAIT */
@media (min-width: 768px) and (max-width: 834px) and (orientation: portrait) {
    
    .home-layout {
        grid-template-columns: 1fr;
    }
    
    .home-sidebar-right {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    /* Single post - layout a colonna singola */
    .single-post-layout {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        width: 100%;
        margin-top: var(--spacing-2xl);
    }
}

/* TABLET LANDSCAPE */
@media (min-width: 1024px) and (max-width: 1024px) and (orientation: landscape) {
    
    .home-layout {
        grid-template-columns: 220px 1fr 220px;
    }
    
    .home-sidebar-left {
        display: block;
    }
    
    /* Single post - sidebar più stretta per iPad landscape */
    .single-post-layout {
        grid-template-columns: 1fr 250px;
    }
}
