/* ═══════════════════════════════════════════════════════════
   CATALOGHI ERREGGI - STYLESHEET
   
   Sezioni:
   1. Hero Slider
   2. Cataloghi Accordion
   3. Cards Cataloghi
   4. Flipbook Modal
   5. CTA Finale
   6. Responsive
═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   1. HERO SLIDER CATALOGHI
═══════════════════════════════════════════════════════════ */

.cataloghi-hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slider-cataloghi {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide-cat {
    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;
}

.hero-slide-cat.active {
    opacity: 1;
}

.hero-overlay-cat {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(64, 64, 64, 0.75) 0%, rgba(40, 40, 40, 0.85) 100%);
}

.hero-content-cat {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.hero-title-cat {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-subtitle-cat {
    font-size: 1.5rem;
    margin-bottom: 40px;
    opacity: 0.95;
}

.hero-badges-cat {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.badge-cat {
    background: rgba(255,255,255,0.15);
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.95rem;
    border: 1px solid rgba(255,255,255,0.2);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
}

.badge-cat i {
    color: var(--primary);
    font-size: 1.1rem;
}

.hero-slider-dots-cat {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}

.hero-dot-cat {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.hero-dot-cat:hover {
    background: rgba(255, 255, 255, 0.6);
}

.hero-dot-cat.active {
    background: var(--primary);
    width: 35px;
    border-radius: 6px;
}

/* ═══════════════════════════════════════════════════════════
   2. SEZIONE CATALOGHI
═══════════════════════════════════════════════════════════ */

.cataloghi-section {
    padding: 100px 0;
    background: var(--bg-light);
}

/* ═══════════════════════════════════════════════════════════
   3. IMMAGINI HEADER CATEGORIE
═══════════════════════════════════════════════════════════ */

.category-image {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

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

.catalogo-category:hover .category-image img {
    transform: scale(1.05);
}

.category-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.category-image-overlay h3 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   4. ACCORDION CATEGORIE
═══════════════════════════════════════════════════════════ */

.catalogo-category {
    background: white;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: all 0.3s;
}

.catalogo-category:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 5px solid transparent;
}

.category-header:hover {
    background: var(--bg-light);
    border-left-color: var(--primary);
}

.category-header.active {
    background: var(--bg-light);
    border-left-color: var(--primary);
}

.category-info {
    display: flex;
    align-items: center;
    gap: 25px;
}

.category-info i {
    font-size: 3rem;
    color: var(--primary);
}

.category-info h3 {
    font-size: 1.8rem;
    color: var(--secondary);
    margin-bottom: 5px;
    font-weight: 700;
}

.category-info p {
    color: var(--text-gray);
    font-size: 1rem;
    margin: 0;
}

.category-arrow {
    font-size: 1.5rem;
    color: var(--secondary);
    transition: transform 0.3s;
}

.category-header.active .category-arrow {
    transform: rotate(180deg);
}

.category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
    padding: 0 40px;
}

.category-content.active {
    max-height: 2000px;
    padding: 30px 40px 50px;
}

/* ═══════════════════════════════════════════════════════════
   5. LAYOUT CATALOGO SINGOLO
═══════════════════════════════════════════════════════════ */

.catalogo-single {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    align-items: start;
}

.catalogo-preview {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: all 0.3s;
}

.catalogo-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.catalogo-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.catalogo-details {
    padding: 20px 0;
}

.catalogo-details h4 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 15px;
    font-weight: 700;
}

.catalogo-details p {
    color: var(--text-gray);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 25px;
}

.catalogo-features {
    list-style: none;
    padding: 0;
    margin: 0 0 35px 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.catalogo-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary);
    font-weight: 600;
    font-size: 1rem;
}

.catalogo-features li i {
    color: var(--primary);
    font-size: 1.1rem;
}

.btn-flipbook-large {
    background: var(--primary);
    color: white;
    border: none;
    padding: 20px 45px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(252, 176, 64, 0.4);
}

.btn-flipbook-large:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(252, 176, 64, 0.5);
}

.btn-flipbook-large i {
    font-size: 1.3rem;
}

/* ═══════════════════════════════════════════════════════════
   6. FLIPBOOK MODAL
═══════════════════════════════════════════════════════════ */

.flipbook-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.flipbook-modal.active {
    display: flex;
}

.flipbook-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
}

.flipbook-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    z-index: 10001;
}

.flipbook-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    background: var(--bg-light);
}

.flipbook-header h3 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin: 0;
    font-weight: 700;
}

.flipbook-close {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--secondary);
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flipbook-close:hover {
    background: rgba(0,0,0,0.1);
    transform: rotate(90deg);
}

.flipbook-viewer {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2c2c2c;
}

#pdf-canvas {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

/* Controlli Navigazione */
.flipbook-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(0,0,0,0.8);
    padding: 15px 30px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.flipbook-nav {
    width: 45px;
    height: 45px;
    border: none;
    background: var(--primary);
    color: white;
    font-size: 1.2rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flipbook-nav:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.flipbook-nav:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.5;
}

.flipbook-page-info {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

/* Toolbar Strumenti */
.flipbook-toolbar {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    background: rgba(0,0,0,0.8);
    padding: 10px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.flipbook-toolbar button,
.flipbook-toolbar a {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.flipbook-toolbar button:hover,
.flipbook-toolbar a:hover {
    background: var(--primary);
    transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════════════
   6. CTA FINALE
═══════════════════════════════════════════════════════════ */

.cataloghi-cta {
    background: var(--secondary);
    padding: 100px 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.cataloghi-cta::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 400px;
    height: 400px;
    background: var(--primary);
    opacity: 0.1;
    border-radius: 50%;
    filter: blur(80px);
}

.cta-content-cat {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.cta-content-cat i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 30px;
}

.cta-content-cat h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 800;
}

.cta-content-cat p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.8;
}

/* ═══════════════════════════════════════════════════════════
   7. RESPONSIVE
═══════════════════════════════════════════════════════════ */

@media (max-width: 992px) {
    .catalogo-single {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .catalogo-preview {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .hero-title-cat {
        font-size: 3rem;
    }
    
    .flipbook-container {
        width: 95%;
        height: 85vh;
    }
}

@media (max-width: 768px) {
    .cataloghi-hero {
        height: 500px;
    }
    
    .hero-title-cat {
        font-size: 2.5rem;
    }
    
    .hero-subtitle-cat {
        font-size: 1.2rem;
    }
    
    .hero-badges-cat {
        flex-direction: column;
        align-items: center;
    }
    
    .category-image {
        height: 200px;
    }
    
    .category-image-overlay h3 {
        font-size: 1.5rem;
    }
    
    .catalogo-single {
        grid-template-columns: 1fr;
    }
    
    .catalogo-preview {
        max-width: 100%;
    }
    
    .catalogo-details h4 {
        font-size: 1.6rem;
    }
    
    .catalogo-features {
        grid-template-columns: 1fr;
    }
    
    .btn-flipbook-large {
        width: 100%;
        justify-content: center;
        padding: 18px 30px;
    }
    
    .category-header {
        padding: 20px 25px;
    }
    
    .category-info {
        gap: 15px;
    }
    
    .category-info i {
        font-size: 2rem;
    }
    
    .category-info h3 {
        font-size: 1.4rem;
    }
    
    .category-content {
        padding: 0 25px;
    }
    
    .category-content.active {
        padding: 20px 25px 35px;
    }
    
    .flipbook-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    
    .flipbook-controls {
        padding: 12px 20px;
        gap: 15px;
    }
    
    .flipbook-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .flipbook-toolbar {
        top: 10px;
        right: 10px;
    }
    
    .cta-content-cat h2 {
        font-size: 2rem;
    }
    
    .cta-content-cat p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title-cat {
        font-size: 2rem;
    }
    
    .flipbook-page-info {
        font-size: 0.95rem;
        min-width: 60px;
    }
}