/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */

/* ============================================================
   CARD SERVIZIO (carosello servizi)
   - Gradiente scuro dal basso verso l'alto sopra l'immagine
   - Descrizione nascosta di default, visibile in hover
   ============================================================ */
.card-servizio {
    position: relative;
    overflow: hidden;
}

/* Freccia "vai a" sempre visibile accanto al titolo: affordance per mobile + desktop */
.card-servizio .elementor-heading-title::after {
    content: " \2192"; /* → */
    display: inline-block;
    margin-left: 6px;
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.card-servizio:hover .elementor-heading-title::after {
    transform: translateX(10px);
}

/* Mobile: niente hover, mostriamo sempre la descrizione */
@media (max-width: 767px) {
    .card-servizio .descrizione-servizio {
        max-height: 300px;
        opacity: 1;
    }
}

.card-servizio::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        color-mix(in srgb, var(--e-global-color-bc1c632) 90%, transparent) 0%,
        color-mix(in srgb, var(--e-global-color-bc1c632) 50%, transparent) 45%,
        color-mix(in srgb, var(--e-global-color-bc1c632) 0%, transparent) 100%
    );
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
    transition: opacity 0.8s ease;
}

.card-servizio > .e-con-inner {
    position: relative;
    z-index: 2;
}

.card-servizio .descrizione-servizio {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition:
        max-height 0.9s cubic-bezier(0.25, 0.1, 0.25, 1),
        opacity 0.8s ease,
        margin-top 0.8s ease;
}

.card-servizio:hover .descrizione-servizio,
.card-servizio:focus-within .descrizione-servizio {
    max-height: 300px;
    opacity: 1;
}

/* ============================================================
   TABELLA TIPOLOGIA (es. tipologie container)
   - Header dark blue del kit + testo bianco
   - Bordi sottili Light Grey, righe alternate per leggibilità
   - Tipografia Avenir Next ereditata dal body
   ============================================================ */
.tabella-tipologia {
    --tt-border: color-mix(in srgb, var(--e-global-color-bc1c632) 12%, transparent);
    --tt-stripe: color-mix(in srgb, var(--e-global-color-3cc9f1f) 40%, transparent);
}

.tabella-tipologia table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--tt-border);
    font-size: 1.6rem;
    line-height: 1.5;
    margin-block-end: 0px !important;
}

.tabella-tipologia table th,
.tabella-tipologia table td {
    width: auto !important;
    padding: 1.4rem 1.8rem;
    vertical-align: top;
    text-align: left;
    border-bottom: 1px solid var(--tt-border);
}

.tabella-tipologia table td + td,
.tabella-tipologia table th + th {
    border-left: 1px solid var(--tt-border);
}

.tabella-tipologia table tr:last-child td {
    border-bottom: 0;
}

/* Prima riga = header (usa <strong> nella sorgente, non <th>) */
.tabella-tipologia table tr:first-child td {
    background: var(--e-global-color-f0a2e8a);
    color: var(--e-global-color-d83a341);
    border-bottom-color: var(--e-global-color-f0a2e8a);
}

.tabella-tipologia table tr:first-child td + td {
    border-left-color: color-mix(in srgb, var(--e-global-color-d83a341) 20%, transparent);
}

.tabella-tipologia table tr:first-child p {
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Righe alternate */
.tabella-tipologia table tr:nth-child(even):not(:first-child) td {
    background: var(--tt-stripe);
}

/* Prima colonna: leggermente più forte */
.tabella-tipologia table tr:not(:first-child) td:first-child p strong {
    color: var(--e-global-color-bc1c632);
    font-weight: 600;
}

.tabella-tipologia table tr:not(:first-child) td:nth-child(2) {
    color: color-mix(in srgb, var(--e-global-color-bc1c632) 75%, transparent);
}

.tabella-tipologia table p {
    margin: 0;
}

/* Mobile: tabella scrollabile invece che spaccata */
@media (max-width: 767px) {
    .tabella-tipologia {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .tabella-tipologia table {
        min-width: 480px;
        font-size: 1.5rem;
    }
    .tabella-tipologia table th,
    .tabella-tipologia table td {
        padding: 1.1rem 1.4rem;
    }
}

