/* ==========================================================
   ildivorzista — CARDS
   Versione 1.1
========================================================== */

/* ==========================================================
   SECTION HEADER
========================================================== */

.idv-section-heading {
    max-width: 760px;
    margin-inline: auto;
    margin-bottom: clamp(42px, 6vw, 68px);
    text-align: center;
}

.idv-section-heading__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin: 0 0 16px;
    padding: 7px 12px;

    color: var(--color-primary-dark);
    background: rgb(110 91 255 / 8%);
    border: 1px solid rgb(110 91 255 / 14%);
    border-radius: 999px;

    font-size: 0.75rem;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.idv-section-heading__title {
    margin: 0 0 18px;

    color: var(--text-title);

    font-size: clamp(2rem, 3vw, 3.1rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.idv-section-heading__description {
    max-width: 660px;
    margin: 0 auto;

    color: var(--text-body);

    font-size: clamp(1rem, 1.4vw, 1.125rem);
    line-height: 1.7;
}

/* ==========================================================
   PATH CARDS GRID
========================================================== */

.idv-paths-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

/* ==========================================================
   PATH CARD
========================================================== */

.idv-path-card {
    position: relative;

    display: flex;
    min-height: 330px;
    flex-direction: column;

    padding: 30px;

    overflow: hidden;

    color: var(--text-title);
    background: var(--surface);

    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);

    box-shadow:
        0 8px 24px rgb(16 24 40 / 5%);

    text-decoration: none !important;

    transform: translateZ(0);

    transition:
        transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 320ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 240ms ease,
        background-color 240ms ease;
}

.idv-path-card::before {
    position: absolute;
    top: -80px;
    right: -80px;

    width: 180px;
    height: 180px;

    content: "";

    background:
        radial-gradient(
            circle,
            rgb(110 91 255 / 13%),
            transparent 68%
        );

    border-radius: 50%;

    opacity: 0.75;

    transition:
        transform 600ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 260ms ease;
}

.idv-path-card::after {
    position: absolute;
    right: 0;
    bottom: 0;

    width: 100%;
    height: 4px;

    content: "";

    background:
        linear-gradient(
            90deg,
            var(--color-primary),
            var(--color-secondary)
        );

    transform: scaleX(0);
    transform-origin: left;

    transition:
        transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

.idv-path-card:visited {
    color: var(--text-title);
}

.idv-path-card:hover {
    color: var(--text-title);
    background: var(--surface);

    border-color: rgb(110 91 255 / 22%);

    box-shadow:
        0 24px 60px rgb(16 24 40 / 10%);

    transform: translateY(-6px);
}

.idv-path-card:hover::before {
    opacity: 1;
    transform: scale(1.2);
}

.idv-path-card:hover::after {
    transform: scaleX(1);
}

.idv-path-card:focus-visible {
    outline: 3px solid rgb(110 91 255 / 28%);
    outline-offset: 5px;
}

/* ==========================================================
   CARD ICON
========================================================== */

.idv-path-card__icon {
    position: relative;
    z-index: 1;

    display: inline-flex;

    width: 54px;
    height: 54px;

    align-items: center;
    justify-content: center;

    margin-bottom: 30px;

    color: var(--color-primary-dark);

    background:
        linear-gradient(
            135deg,
            rgb(110 91 255 / 12%),
            rgb(217 78 214 / 10%)
        );

    border: 1px solid rgb(110 91 255 / 15%);
    border-radius: var(--radius-md);

    font-size: 1.35rem;
    font-weight: 800;

    transition:
        transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
        color 220ms ease,
        background 220ms ease,
        box-shadow 220ms ease;
}

.idv-path-card:hover .idv-path-card__icon {
    color: var(--white);

    background:
        linear-gradient(
            135deg,
            var(--color-primary),
            var(--color-secondary)
        );

    box-shadow:
        0 12px 26px rgb(110 91 255 / 22%);

    transform:
        rotate(-3deg)
        scale(1.04);
}

/* ==========================================================
   CARD CONTENT
========================================================== */

.idv-path-card__content {
    position: relative;
    z-index: 1;

    flex: 1;
}

.idv-path-card__title {
    margin: 0 0 14px;

    color: var(--text-title);

    font-size: 1.35rem;
    font-weight: 780;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.idv-path-card__description {
    margin: 0;

    color: var(--text-body);

    font-size: 0.975rem;
    line-height: 1.65;
}

/* ==========================================================
   CARD FOOTER
========================================================== */

.idv-path-card__footer {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-top: auto;
    padding-top: 28px;

    color: var(--color-primary-dark);

    font-size: 0.9375rem;
    font-weight: 750;
}

.idv-path-card__arrow {
    display: inline-flex;

    width: 36px;
    height: 36px;

    align-items: center;
    justify-content: center;

    flex: 0 0 36px;

    color: var(--color-primary-dark);
    background: rgb(110 91 255 / 8%);

    border: 1px solid rgb(110 91 255 / 8%);
    border-radius: 50%;

    font-size: 1.15rem;

    transition:
        transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
        background-color 220ms ease,
        border-color 220ms ease;
}

.idv-path-card:hover .idv-path-card__arrow {
    background: rgb(110 91 255 / 14%);
    border-color: rgb(110 91 255 / 14%);

    transform: translateX(5px);
}

/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 1100px) {
    .idv-paths-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .idv-path-card {
        min-height: 300px;
    }
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 640px) {
    .idv-section-heading {
        max-width: none;
        margin-bottom: 36px;
        text-align: left;
    }

    .idv-section-heading__title {
        font-size: clamp(2rem, 10vw, 2.8rem);
    }

    .idv-section-heading__description {
        margin-inline: 0;
        font-size: 1rem;
    }

    .idv-paths-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .idv-path-card {
        min-height: auto;
        padding: 24px;
    }

    .idv-path-card__icon {
        width: 50px;
        height: 50px;
        margin-bottom: 24px;

        font-size: 1.2rem;
    }

    .idv-path-card__title {
        font-size: 1.25rem;
    }

    .idv-path-card__footer {
        margin-top: 28px;
        padding-top: 0;
    }

    .idv-path-card__arrow {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }
}

/* ==========================================================
   TOUCH DEVICES
========================================================== */

@media (hover: none) {
    .idv-path-card:hover {
        border-color: var(--border-color);
        box-shadow:
            0 8px 24px rgb(16 24 40 / 5%);
        transform: none;
    }

    .idv-path-card:hover::before {
        opacity: 0.75;
        transform: none;
    }

    .idv-path-card:hover::after {
        transform: scaleX(0);
    }

    .idv-path-card:hover .idv-path-card__icon,
    .idv-path-card:hover .idv-path-card__arrow {
        transform: none;
    }
}

/* ==========================================================
   ACCESSIBILITY
========================================================== */

@media (prefers-reduced-motion: reduce) {
    .idv-path-card,
    .idv-path-card::before,
    .idv-path-card::after,
    .idv-path-card__icon,
    .idv-path-card__arrow {
        transition: none;
    }

    .idv-path-card:hover,
    .idv-path-card:hover::before,
    .idv-path-card:hover .idv-path-card__icon,
    .idv-path-card:hover .idv-path-card__arrow {
        transform: none;
    }
}