/* =====================================================
   0️⃣ SECTION 2 - CONTAINER PRINCIPALE
===================================================== */
.section-2 {
    padding: 4rem 0;
    background-color: #f8f8f8; /* opzionale, sfondo chiaro */
}

.section-2-inner {
    width: 95%;
    max-width: 1600px;
    margin: 0 auto; /* centra la sezione */
}

/* =====================================================
   1️⃣ SERVICE CARDS - LAYOUT PRINCIPALE
===================================================== */
.section-2-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
    margin: 3rem 0;
}

.service-card {
    flex: 1 1 calc(25% - 1.5rem);
    min-width: 260px;
    height: 380px;
    display: flex;
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background-size: cover;
    background-position: center;

    transition:
        transform 0.45s cubic-bezier(.4,0,.2,1),
        box-shadow 0.45s ease;
}

.service-card:hover {
    transform: scale(1.035) translateY(-6px);
    box-shadow:
        0 20px 45px rgba(0,0,0,0.35),
        0 0 0 1px rgba(255,255,255,0.08);
}

/* =====================================================
   2️⃣ RESPONSIVE
===================================================== */
@media (max-width: 1300px) {
    .service-card { flex: 1 1 calc(50% - 1.5rem); } /* 2 per riga tablet */
}

@media (max-width: 768px) {
    .service-card { flex: 1 1 100%; height: 320px; } /* 1 per riga mobile */
}

/* =====================================================
   3️⃣ STRUTTURA CONTENUTO CARD
===================================================== */
.service-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
    text-align: left;
    color: #ffffff;
}

/* contenitore del testo per leggibilità */
.service-card-text {
    background: rgba(0,0,0,0); /* sfondo trasparente iniziale */
    padding: 0.8rem 1rem;
    border-radius: 6px;
    display: inline-block;
    max-width: 100%;
	padding: 1rem 1.4rem;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ---------- CORREZIONE ---------- */
.service-card:hover .service-card-text {
    background: rgba(0,70,0,0.8); /* verde scuro trasparente al passaggio del mouse */
    color: #ffffff; /* testo sempre leggibile */
}

/* =====================================================
   4️⃣ CTA SERVICE CARD
===================================================== */
.service-card .service-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: max-content;
    max-width: 100%;

    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.65);
    border-radius: 9px;

    padding: 0.6rem 1.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;

    position: relative;
    overflow: hidden;

    transition:
        transform 0.25s ease,
        background-color 0.25s ease,
        box-shadow 0.25s ease,
        color 0.25s ease;
}

/* CTA sempre in basso */
.service-card-content .service-cta {
    margin-top: auto;
    align-self: flex-start;
}

/* hover CTA: arancione */
.service-card:hover .service-cta {
    background: #ff7f00; /* arancione */
    border-color: #ff7f00;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

/* =====================================================
   5️⃣ OVERLAY PER LEGGIBILITÀ SU HOVER
===================================================== */
.service-card-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.25);
    border-radius: 12px;
    z-index: 1;
    transition: background 0.3s ease;
}

.service-card-content h3,
.service-card-content p,
.service-card-content .service-cta {
    position: relative;
    z-index: 2;
}

/* overlay più trasparente al passaggio del mouse */
.service-card:hover .service-card-content::before {
    background: rgba(0,0,0,0); /* immagine più chiara */
}

/* =====================================================
   6️⃣ SIPARIO DAL CENTRO
===================================================== */
.service-card::before,
.service-card::after {
    content: "";
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    z-index: 1;
    transition: transform 0.6s ease;
}

.service-card::before { left: 0; transform: translateX(0); }
.service-card::after { right: 0; transform: translateX(0); }

.service-card:hover::before { transform: translateX(-100%); }
.service-card:hover::after { transform: translateX(100%); }

/* =====================================================
   7️⃣ TIPOGRAFIA TESTO
===================================================== */
.service-card-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 0;
    color: #ffffff;
    transition: all 0.3s ease; /* per effetto hover */
}

.service-card:hover .service-card-content h3 {
    text-transform: uppercase; /* h3 diventa maiuscolo */
    font-size: 1.51rem;
    font-weight: 900;
}

.service-card-content p {
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.6;
    /*max-width: 90%;*/
    margin: 0;
    color: #ffffff;
    transition: all 0.3s ease;
}

.service-card:hover .service-card-content p {
    font-size: 0.96rem;
    font-weight: 500;
}

/* =====================================================
   CTA – CURSOR POINTER
===================================================== */
.service-cta {
	cursor: pointer;
}