/*
 Theme Name:   Qwery Child Theme
 Theme URI:    http://qwery.ancorathemes.com
 Description:  Qwery Child Theme
 Author:       AncoraThemes
 Author URI:   http://ancorathemes.com
 Template:     qwery
 Version:      1.3
 Tags:         flexible-header, custom-background, custom-colors, custom-header, custom-menu, featured-image-header, featured-images, full-width-template, microformats, post-formats, theme-options, threaded-comments, translation-ready
 Text Domain:  qwery
*/


/* =Child-Theme customization starts here
------------------------------------------------------------ */


/* Contact form */

.wpcf7-form.sent .wpcf7-response-output {
    display: none !important;
}

/* =========================================================
   CASATALENT - BLOCCO SETTORI DINAMICO
   Shortcode: [casatalent_settori]
   ========================================================= */


/* Sezione full width */
.ct-sectors {
    position: relative;
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;

    background:
        linear-gradient(
            112deg,
            #35212a 0%,
            #29252d 28%,
            #21252d 58%,
            #191d24 100%
        );

    color: #ffffff;

    padding: clamp(70px, 7vw, 110px) 0;
}


/* Leggera profondità sul fondo */
.ct-sectors::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    background:
        radial-gradient(
            circle at 12% 25%,
            rgba(122, 39, 56, 0.14),
            transparent 34%
        ),
        radial-gradient(
            circle at 88% 80%,
            rgba(255, 255, 255, 0.025),
            transparent 34%
        );

    z-index: 0;
}


/* Contenitore interno */
.ct-sectors__inner {
    position: relative;
    z-index: 1;

    width: min(1380px, calc(100% - 80px));
    margin: 0 auto;

    display: grid;
    grid-template-columns:
        minmax(330px, 0.72fr)
        minmax(0, 1.45fr);

    gap: clamp(50px, 6vw, 95px);

    align-items: start;
}


/* =========================================================
   COLONNA SINISTRA
   ========================================================= */

.ct-sectors__intro {
    position: relative;
    padding-top: 4px;
}


.ct-sectors__title {
    margin: 0;

    max-width: 520px;

    font-family:
        var(--theme-font-h1_font-family, "span", Georgia, serif);

    font-size: clamp(48px, 4.2vw, 72px);
    font-weight: 300;
    line-height: 0.93;

    letter-spacing: -0.045em;

    text-transform: uppercase;

    color: #ffffff;
}


.ct-sectors__description {
    max-width: 520px;

    margin: 28px 0 0;

    font-family:
        var(--theme-font-p_font-family, "DM Sans", Arial, sans-serif);

    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;

    color: rgba(255, 255, 255, 0.70);
}


/* =========================================================
   GRIGLIA SETTORI
   ========================================================= */

.ct-sectors__grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 10px;
}


/* Singolo box */
.ct-sectors__card {
    position: relative;

    min-height: 88px;

    display: flex;
    align-items: flex-end;

    padding: 15px 18px 14px;

    border: 1px solid rgba(255, 255, 255, 0.15);

    background: #2d3038;

    overflow: hidden;

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


/* Due sole tonalità di nero/antracite */
.ct-sectors__card:nth-child(odd) {
    background: #2e3139;
}

.ct-sectors__card:nth-child(even) {
    background: #292d35;
}


/* Leggerissima luce interna */
.ct-sectors__card::before {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.035),
            transparent 60%
        );

    opacity: 0;

    transition: opacity 0.28s ease;

    pointer-events: none;
}


/* Titolo box */
.ct-sectors__card-title {
    position: relative;
    z-index: 1;

    display: block;

    font-family:
        var(--theme-font-h1_font-family, "span", Georgia, serif);

    font-size: clamp(20px, 1.55vw, 28px);
    font-weight: 300;

    line-height: 1.03;

    letter-spacing: -0.035em;

    color: rgba(255, 255, 255, 0.94);
}


/* Hover desktop */
@media (hover: hover) and (pointer: fine) {

    .ct-sectors__card:hover {
        transform: translateY(-5px);

        background: #383b43;

        border-color: rgba(255, 255, 255, 0.35);

        box-shadow:
            0 16px 34px rgba(0, 0, 0, 0.18);
    }

    .ct-sectors__card:hover::before {
        opacity: 1;
    }
}

/* =========================================================
   CASATALENT - ANIMAZIONE INGRESSO BLOCCO SETTORI
   Attivata da /js/casatalent-sectors.js
   ========================================================= */

@keyframes ct-sectors-copy-reveal {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ct-sectors-card-reveal {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* Nasconde gli elementi solo quando JavaScript ha attivato l'animazione */
.ct-sectors--animate:not(.is-visible) .ct-sectors__title,
.ct-sectors--animate:not(.is-visible) .ct-sectors__description,
.ct-sectors--animate:not(.is-visible) .ct-sectors__card {
    opacity: 0;
}


/* Titolo */
.ct-sectors--animate.is-visible .ct-sectors__title {
    animation:
        ct-sectors-copy-reveal
        0.68s
        cubic-bezier(0.22, 1, 0.36, 1)
        0s
        backwards;
}


/* Descrizione */
.ct-sectors--animate.is-visible .ct-sectors__description {
    animation:
        ct-sectors-copy-reveal
        0.68s
        cubic-bezier(0.22, 1, 0.36, 1)
        0.10s
        backwards;
}


/* Box: entrata progressiva in base all'ordine */
.ct-sectors--animate.is-visible .ct-sectors__card {
    animation:
        ct-sectors-card-reveal
        0.56s
        cubic-bezier(0.22, 1, 0.36, 1)
        var(--ct-sector-delay, 160ms)
        backwards;
}


/* Accessibilità: niente animazioni se l'utente le ha ridotte */
@media (prefers-reduced-motion: reduce) {

    .ct-sectors--animate:not(.is-visible) .ct-sectors__title,
    .ct-sectors--animate:not(.is-visible) .ct-sectors__description,
    .ct-sectors--animate:not(.is-visible) .ct-sectors__card {
        opacity: 1;
        transform: none;
    }

    .ct-sectors--animate.is-visible .ct-sectors__title,
    .ct-sectors--animate.is-visible .ct-sectors__description,
    .ct-sectors--animate.is-visible .ct-sectors__card {
        animation: none !important;
    }
}

