/* ============================================================
   CMS NEWS - ALLEVAMENTO GIOLIDE GOLDEN RETRIEVER
   Stile coerente con /golden/assets/css/style.css
   ============================================================ */

/* ====== VARIABILI ====== */
:root {
    --nero: #000000;
    --bianco: #ffffff;
    --grigio-chiaro: #f5f5f5;
    --grigio-testo: #333333;
    --arancio: #D97B29;
    --arancio-chiaro: #E8944F;
    --arancio-scuro: #C06820;
    --rosso: #8B0000;
    --rosso-hover: #A52A2A;
    --grigio-scuro: #3D4852;
    --font-heading: 'Josefin Sans', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

/* ====== BASE (solo per pagine CMS standalone) ====== */
.main-content {
    padding: 4rem 0;
    background-color: var(--grigio-chiaro);
    min-height: 60vh;
}

.box-interno {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ====== INTRO SEZIONE ====== */
.intro-sezione {
    text-align: center;
    margin-bottom: 3rem;
}

.titolo-pagina {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    color: var(--rosso);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

/* ====== CATEGORIE FILTER ====== */
.categories-filter {
    background: var(--bianco);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 3rem;
}

.categories-filter h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--grigio-testo);
    margin-bottom: 1.5rem;
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.category-tag {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--grigio-chiaro);
    color: var(--grigio-testo);
    text-decoration: none;
    border-radius: 25px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-tag:hover {
    background: var(--arancio);
    color: var(--bianco);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 123, 41, 0.3);
}

.category-tag.active {
    background: var(--arancio);
    color: var(--bianco);
    border-color: var(--arancio-scuro);
}

/* ====== POSTS GRID ====== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: var(--bianco);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.post-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.08);
}

.post-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--arancio);
    color: var(--bianco);
    border-radius: 15px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.post-content h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--grigio-testo);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.post-content h2 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.post-content h2 a:hover {
    color: var(--arancio-scuro);
}

.post-meta {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1rem;
}

.post-excerpt {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--rosso);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
    position: relative;
    padding-bottom: 3px;
}

.read-more::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--rosso);
    transition: width 0.3s ease;
}

.read-more:hover::after {
    width: 100%;
}

.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bianco);
    border-radius: 8px;
}

.no-posts p {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: #888;
}

/* ====== SINGLE POST ====== */
.single-post {
    background: var(--bianco);
    border-radius: 8px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--grigio-chiaro);
}

.post-header .post-category {
    margin-bottom: 1rem;
}

.post-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    color: var(--grigio-testo);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.post-header .post-meta {
    font-size: 0.95rem;
}

.post-featured-image {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-body {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--grigio-testo);
    margin-bottom: 3rem;
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body h2,
.post-body h3,
.post-body h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--grigio-testo);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.post-body h2 {
    font-size: 1.8rem;
}

.post-body h3 {
    font-size: 1.5rem;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.post-body ul,
.post-body ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.post-body a {
    color: var(--arancio-scuro);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.3s ease;
}

.post-body a:hover {
    text-decoration-color: var(--arancio-scuro);
}

/* ====== GALLERY ====== */
.post-gallery {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--grigio-chiaro);
}

.post-gallery h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--grigio-testo);
    margin-bottom: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* ====== POST FOOTER ====== */
.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--grigio-chiaro);
}

/* ====== BUTTONS ====== */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--rosso);
    color: var(--bianco);
    border-color: var(--rosso);
}

.btn-primary:hover {
    background-color: var(--rosso-hover);
    border-color: var(--rosso-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--grigio-testo);
    border-color: var(--grigio-testo);
}

.btn-secondary:hover {
    background-color: var(--grigio-testo);
    color: var(--bianco);
}

/* ====== PAGINATION ====== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.pagination-info {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: #888;
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    background: var(--rosso);
    color: var(--bianco);
    border: 2px solid var(--rosso);
}

.pagination-btn:hover {
    background: var(--rosso-hover);
    border-color: var(--rosso-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
}

/* ====== LIGHTBOX ====== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: var(--bianco);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    color: var(--grigio-testo);
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: var(--arancio);
    color: var(--bianco);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    color: var(--grigio-testo);
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: var(--arancio);
    color: var(--bianco);
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .main-content {
        padding: 3rem 0;
    }
    
    .box-interno {
        padding: 0 1rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .single-post {
        padding: 1.5rem;
    }
    
    .post-header h1 {
        font-size: 1.8rem;
    }
    
    .post-body {
        font-size: 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 1rem;
    }
}
