/* ============================================================
   PAGINA PRODOTTI / CATALOGO
   Stile coerente con homepage (sfondo blu, cards moderne)
   ============================================================ */

/* ── Reset & Container ─────────────────────────── */
.cat-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── HERO ──────────────────────────────────────── */
.cat-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 40%, #3b82f6 70%, #60a5fa 100%);
    padding: 80px 24px 60px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.cat-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.cat-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    border-radius: 50%;
}

.cat-hero-inner {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cat-hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}

.cat-hero-lead {
    font-size: 1.25rem;
    line-height: 1.6;
    margin: 0 0 12px;
    opacity: 0.95;
}

.cat-hero-lead strong {
    color: #fbbf24;
}

.cat-hero-sub {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.7;
    max-width: 600px;
    margin: 0 auto;
}

/* ── SECTION HEADERS ──────────────────────────── */
.cat-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.cat-section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 10px;
}

.cat-section-header p {
    font-size: 1.05rem;
    color: #64748b;
    margin: 0;
}

/* ── SEZIONE TIPOLOGIE ─────────────────────────── */
.cat-types-section {
    padding: 60px 0 80px;
    background: #f8fafc;
}

/* Griglia 4 cards selettori */
.cat-type-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 0;
}

.cat-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 16px 16px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    position: relative;
}

.cat-type-card:hover {
    border-color: var(--type-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.cat-type-card.active {
    border-color: var(--type-color);
    background: var(--type-bg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
    position: relative;
    z-index: 2;
}

.cat-type-icon {
    font-size: 2rem;
    line-height: 1;
}

.cat-type-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.cat-type-card.active .cat-type-name {
    color: var(--type-color);
}

.cat-type-tagline {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.3;
}

.cat-type-arrow {
    font-size: 0.75rem;
    color: #94a3b8;
    transition: transform 0.3s;
}

.cat-type-card.active .cat-type-arrow {
    transform: rotate(180deg);
    color: var(--type-color);
}

/* ── PANNELLO DETTAGLIO TIPO ──────────────────── */
.cat-type-detail {
    display: none;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 16px 16px;
    padding: 32px;
    margin-top: -2px;
    position: relative;
    z-index: 1;
}

.cat-type-detail.active {
    display: block;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header del dettaglio */
.cat-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.cat-detail-intro h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cat-detail-icon {
    font-size: 1.5rem;
}

.cat-detail-intro p {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
    max-width: 600px;
}

.cat-detail-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    background: var(--type-color, #3b82f6);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cat-detail-cta:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #fff;
    text-decoration: none;
}

/* Griglia specifiche tecniche */
.cat-specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.cat-spec-box {
    background: #f8fafc;
    border-radius: 10px;
    padding: 18px;
}

.cat-spec-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cat-spec-icon {
    font-size: 1rem;
}

.cat-spec-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cat-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #334155;
    font-weight: 500;
}

/* Features row (badges sì/no) */
.cat-features-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
}

.cat-feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.cat-feature-badge.yes {
    background: #dcfce7;
    color: #166534;
}

.cat-feature-badge.no {
    background: #f1f5f9;
    color: #94a3b8;
}

/* Applicazioni */
.cat-applications {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #475569;
}

.cat-applications strong {
    margin-right: 4px;
}

.cat-app-tag {
    display: inline-block;
    padding: 3px 10px;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
}

/* ── CATALOGO PRODOTTI ─────────────────────────── */
.cat-products-section {
    padding: 60px 0 80px;
    background: #fff;
}

.cat-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cat-product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
}

.cat-product-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    text-decoration: none;
    color: inherit;
}

.cat-product-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f1f5f9;
}

.cat-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cat-product-card:hover .cat-product-img img {
    transform: scale(1.05);
}

.cat-product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: #f1f5f9;
}

.cat-product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.cat-product-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}

.cat-product-info p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.cat-product-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    align-self: flex-start;
}

.cat-product-cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: #3b82f6;
    margin-top: auto;
    padding-top: 8px;
}

.cat-product-card:hover .cat-product-cta {
    color: #1d4ed8;
}

/* ── PERCHÉ SCEGLIERCI ─────────────────────────── */
.cat-why-section {
    padding: 60px 0 80px;
    background: #f8fafc;
}

.cat-benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cat-benefit {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.cat-benefit:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.cat-benefit-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 14px;
}

.cat-benefit h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px;
}

.cat-benefit p {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* ── CTA FINALE ────────────────────────────────── */
.cat-cta-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 40%, #3b82f6 70%, #60a5fa 100%);
    padding: 60px 24px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.cat-cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.cat-cta-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 10px;
    position: relative;
    z-index: 1;
}

.cat-cta-section > .cat-container > p {
    font-size: 1.05rem;
    opacity: 0.85;
    margin: 0 0 28px;
    position: relative;
    z-index: 1;
}

.cat-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.cat-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: #dc2626;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.cat-btn-primary:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.4);
    color: #fff;
    text-decoration: none;
}

.cat-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.cat-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
    text-decoration: none;
}

.cat-cta-contacts {
    display: flex;
    justify-content: center;
    gap: 32px;
    font-size: 0.9rem;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

/* ── RESPONSIVE ────────────────────────────────── */
@media (max-width: 1024px) {
    .cat-type-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .cat-specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cat-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .cat-benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cat-hero {
        padding: 50px 20px 40px;
    }

    .cat-hero h1 {
        font-size: 2rem;
    }

    .cat-hero-lead {
        font-size: 1.05rem;
    }

    .cat-type-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .cat-type-card {
        padding: 14px 12px 12px;
    }

    .cat-type-icon {
        font-size: 1.5rem;
    }

    .cat-type-name {
        font-size: 0.85rem;
    }

    .cat-type-tagline {
        display: none;
    }

    .cat-type-detail {
        padding: 20px;
    }

    .cat-detail-header {
        flex-direction: column;
    }

    .cat-specs-grid {
        grid-template-columns: 1fr;
    }

    .cat-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .cat-product-img {
        height: 140px;
    }

    .cat-benefits-grid {
        grid-template-columns: 1fr;
    }

    .cat-cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cat-cta-contacts {
        flex-direction: column;
        gap: 8px;
    }

    .cat-section-header h2 {
        font-size: 1.5rem;
    }

    .cat-features-row {
        gap: 6px;
    }

    .cat-feature-badge {
        font-size: 0.72rem;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .cat-type-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .cat-products-grid {
        grid-template-columns: 1fr;
    }
}