/* Layout & Spacing */
.premium-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.premium-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.premium-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-image-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.premium-card:hover .card-image-wrapper img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.premium-card:hover .card-overlay {
    opacity: 1;
}

.btn-card {
    background: #fff;
    color: #000;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}

.card-body {
    padding: 1.5rem;
}

.card-body h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Region Grid Spacing Fix */
.premium-regions-nav {
    margin-bottom: 4rem;
}

/* Assicura che la griglia regioni abbia spazio */
.region-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

/* HERO OTTIMIZZATA */
#hero-slider {
    min-height: 600px;
    /* PIU ALTO */
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-search-content {
    max-width: 800px;
    /* PIU STRETTO */
    text-align: center;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
}

.hero-subtitle {
    color: #f1f1f1;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Riposizionamento Ricerca */
.search-input-wrapper {
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 15px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    margin: 0 auto;
}

.search-field {
    border: none;
    background: transparent;
    padding: 10px;
    flex-grow: 1;
    font-size: 1rem;
    outline: none;
}

.search-submit {
    background: #009246;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.search-submit:hover {
    background: #007a3a;
}

/* Header Rimpicciolito */
.site-header-premium {
    padding: 10px 0 !important;
    /* COMPATTO */
}

.brand-text {
    font-size: 1.4rem !important;
}

@media(max-width: 900px) {
    .premium-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

@media(max-width: 600px) {
    .premium-grid {
        grid-template-columns: 1fr;
    }
}

/* Hero Slider Animations */
.premium-hero-search {
    position: relative;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 0;
}

.hero-slide.active {
    opacity: 1;
}

/* --- MERGED FROM LCAI PLUGIN EMERGENCY CSS --- */

/* Ottimizzazione Layout Principale */
.m26-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 50px 30px !important;
}

/* Hero Body */
.m26-hero-body {
    max-width: 1200px !important;
}

/* Fix Logo Schiacciato */
.site-logo img,
.custom-logo,
header img,
.site-header img {
    max-height: 80px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

/* Grid Discovery - 4 colonne ariose */
.m26-disc-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 30px !important;
    width: 100% !important;
    margin-top: 40px !important;
}

/* Card ottimizzate */
.m26-disc-card {
    width: 100% !important;
    margin: 0 !important;
    min-height: 280px !important;
}

.m26-disc-img {
    height: 200px !important;
}

/* Main content grid - sidebar proporzionata */
.m26-grid {
    display: grid !important;
    grid-template-columns: 1fr 350px !important;
    gap: 50px !important;
}

/* Responsive ottimizzato */
@media (max-width: 1200px) {
    .m26-disc-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 25px !important;
    }
}

@media (max-width: 900px) {
    .m26-grid {
        grid-template-columns: 1fr !important;
    }

    .m26-disc-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .m26-disc-grid {
        grid-template-columns: 1fr !important;
    }

    .m26-container {
        padding: 30px 20px !important;
    }
}
/* --- HERO SLIDER STYLES (Moved from slider-template.php) --- */
.hero-slider.premium-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    margin-bottom: -50px;
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}
.slide-background {
    height: 100%;
    width: 100%;
}
.zoom-effect-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: slowZoom 20s infinite alternate;
}
@keyframes slowZoom {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}
.slide-overlay-premium {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.6) 100%);
}
.slide-content.premium-content {
    position: absolute;
    bottom: 0; right: 0; left: 0; top: 0;
    display: flex; align-items: center; justify-content: center;
    color: white;
    z-index: 10;
}
.slide-category-badge {
    background: #ce2b37; color: #fff;
    padding: 5px 15px; border-radius: 20px;
    font-size: 0.8rem; text-transform: uppercase;
    font-weight: 700; display: inline-block;
    margin-bottom: 20px;
}
.slide-title-premium {
    font-size: 3.5rem; line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}
.slide-title-premium a {
    color: inherit; text-decoration: none;
    transition: color 0.3s;
}
.slide-title-premium a:hover { color: #009246; }
.slide-excerpt-premium {
    font-size: 1.2rem; margin-bottom: 30px;
    opacity: 0.9; max-width: 700px;
    margin-left: auto; margin-right: auto;
}
.btn-premium-slide {
    background: #009246; color: white;
    padding: 15px 40px; font-size: 1rem;
    font-weight: 700; text-transform: uppercase;
    text-decoration: none; border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0, 146, 70, 0.3);
    display: inline-flex; align-items: center; gap: 10px;
}
.btn-premium-slide:hover {
    background: white; color: #009246;
    transform: translateY(-5px);
}
@media(max-width: 768px) {
    .slide-title-premium { font-size: 2rem; }
    .hero-slider.premium-slider { height: 400px; }
}

/* --- HOMEPAGE HERO STYLES (Moved from index.php) --- */
.premium-hero-search { position: relative; }
.hero-slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1.5s ease-in-out; z-index: 0;
}
.hero-slide.active { opacity: 1; }

/* --- HEADER STYLES (Moved from header.php) --- */
.top-bar-premium {
    background: linear-gradient(90deg, #009246 0%, #007a3a 100%);
    color: #fff; padding: 10px 0; font-size: 0.9rem; font-family: 'Open Sans', sans-serif;
}
.top-bar-container {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 1200px; margin: 0 auto; padding: 0 15px;
}
.site-header-premium {
    background: rgba(255,255,255,0.98); backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); padding: 15px 0;
    position: sticky; top: 0; z-index: 1000; transition: all 0.3s ease;
}
.header-container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.main-navigation-premium { display: flex; justify-content: space-between; align-items: center; }
.brand-text-premium {
    font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 1.8rem;
    color: #222; letter-spacing: -1px; text-transform: uppercase;
}
.brand-line-premium {
    display: block; position: absolute; bottom: 5px; left: 0;
    width: 100%; height: 3px; background: #009246; border-radius: 2px;
}
.menu-toggle-premium { display: none; background: transparent; border: none; font-size: 1.5rem; cursor: pointer; }
.breadcrumbs-wrapper { background: #f8f9fa; border-bottom: 1px solid #e9ecef; padding: 12px 0; }
.breadcrumbs-container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
/* Forced Homepage Breadcrumb */
.home-breadcrumbs-wrapper {
    background: #fff; border-bottom: 1px solid #f0f0f0; padding: 15px 0; margin-bottom: 2rem;
}
.home-breadcrumbs-container {
    max-width: 1200px; margin: 0 auto; padding: 0 15px; font-size: 0.9rem; color: #555;
}
