/* Layout: footer sempre in fondo alla viewport, anche con contenuto breve */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body > main {
    flex: 1 0 auto;
}

/* Bottoni: testo bianco (il tema sceglie il nero per contrasto sul blu primario) */
.btn-primary,
.btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-disabled-color: #fff;
}


.text-center {
    text-align: center;
}

.text-justify {
    text-align: justify !important;
}

.text-white {
    color: white;
}

.background-dark-blue {
    background-color: #001a33
}

.index-size {
    font-weight: bold;
    font-size: 2em;
}

.ap-easyde-forget-credential {
    cursor: pointer;
    text-decoration: underline;
}

@media only screen and (min-width: 768px) {
    .shift-up-3 {
        margin-top: -2% !important;
    }
}

@media only screen and (max-width: 768px) {
    .shift-up-3 {
        margin-top: 4% !important;
    }
}

.ap-easyde-alert {
    font-size: .9rem;
    text-align: center;
}

.img-container {
    height: 130px;
}

.alert-password{
    text-align: initial;
    font-size: 0.8em;
}

.ap-easyde-background4 {
    position: relative;
    background-size: cover;
    --bg4-color: transparent;
}

.ap-easyde-background4::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px;
    z-index: -1;
    background-repeat: no-repeat;
    background-position: top center;
    background-color: var(--bg4-color);
}

/* Header: colori alimentati dal tema (initColors); trasparenti finche' il tema non e' applicato */

.navbar-brand {
    color: transparent;
}

.btn-primary.ap-easyde-header, .ap-easyde-header {
    background-color: transparent;
}

/* Pulsante nell'header: niente bordo blu del tema, deve restare coerente con i colori del sito */
.btn.ap-easyde-header {
    --bs-btn-border-color: transparent;
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-border-color: transparent;
    border-color: transparent;
}

.ap-easyde-header-text,
.ap-easyde-header-title {
    color: transparent;
}

.ap-brand-logos {
    max-height: 4rem;
    width: auto;
}

/* Card della home sovrapposte al blocco hero */
.ap-card-overlap {
    position: relative;
    margin-top: -3rem;
}

.img-container {
    height: 130px;
}


/* ===== Prototipo restyling area pubblica (solo CSS; colori dal tema, nessun colore fisso) ===== */

/* Hero: luci morbide in movimento sopra il colore del tema */
main > div.ap-easyde-background1 {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

main > div.ap-easyde-background1::before,
main > div.ap-easyde-background1::after {
    content: '';
    position: absolute;
    z-index: -1;
    width: 38rem;
    height: 38rem;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .35;
    background: radial-gradient(circle, var(--ap-accent, #fff) 0%, transparent 70%);
    animation: ap-float 16s ease-in-out infinite alternate;
    pointer-events: none;
}

main > div.ap-easyde-background1::before {
    top: -18rem;
    left: -10rem;
}

main > div.ap-easyde-background1::after {
    right: -12rem;
    bottom: -22rem;
    opacity: .18;
    animation-duration: 22s;
    animation-direction: alternate-reverse;
}

@keyframes ap-float {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(7rem, 3rem, 0) scale(1.25); }
}

/* Titoli hero: entrata in sequenza */
main > div.ap-easyde-background1 .ap-easyde-title {
    animation: ap-fade-up .7s cubic-bezier(.2, .7, .2, 1) both;
}

main > div.ap-easyde-background1 h3.ap-easyde-title {
    animation-delay: .12s;
}

/* Card di login: entrata, ombra morbida, sollevamento al passaggio */
.ap-easyde-card-login-background {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .12), 0 1.5rem 3rem rgba(0, 0, 0, .10);
    animation: ap-fade-up .7s .2s cubic-bezier(.2, .7, .2, 1) both;
    transition: transform .3s ease, box-shadow .3s ease;
}

.ap-easyde-card-login-background:hover {
    transform: translateY(-4px);
    box-shadow: 0 .75rem 2rem rgba(0, 0, 0, .16), 0 2rem 3.5rem rgba(0, 0, 0, .12);
}

@keyframes ap-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}

/* Campi: bordo arrotondato e anello di focus animato */
.ap-easyde-card-login-background .form-control {
    border-radius: .6rem;
    padding: .7rem .9rem;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.ap-easyde-card-login-background .form-control:focus {
    transform: translateY(-1px);
}

/* Pulsante: sollevamento e riflesso al passaggio */
.ap-easyde-card-login-button {
    position: relative;
    overflow: hidden;
    border-radius: 2rem;
    padding: .55rem 2.2rem;
    transition: transform .2s ease, box-shadow .2s ease;
}

.ap-easyde-card-login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
}

.ap-easyde-card-login-button:active {
    transform: translateY(0);
}

.ap-easyde-card-login-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform .6s ease;
}

.ap-easyde-card-login-button:hover::after {
    transform: translateX(120%);
}

@media (prefers-reduced-motion: reduce) {
    main > div.ap-easyde-background1::before,
    main > div.ap-easyde-background1::after,
    main > div.ap-easyde-background1 .ap-easyde-title,
    .ap-easyde-card-login-background {
        animation: none;
    }

    .ap-easyde-card-login-background,
    .ap-easyde-card-login-button,
    .ap-easyde-card-login-button::after {
        transition: none;
    }
}

/* ===== Home pubblica: stessa estetica del login ===== */
#head-section {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

#head-section::before,
#head-section::after {
    content: '';
    position: absolute;
    z-index: -1;
    width: 38rem;
    height: 38rem;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .35;
    background: radial-gradient(circle, var(--ap-accent, #fff) 0%, transparent 70%);
    animation: ap-float 16s ease-in-out infinite alternate;
    pointer-events: none;
}

#head-section::before {
    top: -18rem;
    left: -10rem;
}

#head-section::after {
    right: -12rem;
    bottom: -22rem;
    opacity: .18;
    animation-duration: 22s;
    animation-direction: alternate-reverse;
}

#head-section .card,
#head-section img {
    animation: ap-fade-up .7s cubic-bezier(.2, .7, .2, 1) backwards;
}

#head-section img {
    animation-delay: .15s;
    border-radius: 1rem;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .15);
}

/* Card servizi: entrata a cascata e sollevamento con zoom dell'immagine */
.ap-card-overlap > [class*="col"] > .card {
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
    animation: ap-fade-up .7s cubic-bezier(.2, .7, .2, 1) backwards;
    transition: transform .3s ease, box-shadow .3s ease;
}

.ap-card-overlap > [class*="col"]:nth-child(1) > .card { animation-delay: .25s; }
.ap-card-overlap > [class*="col"]:nth-child(2) > .card { animation-delay: .37s; }
.ap-card-overlap > [class*="col"]:nth-child(3) > .card { animation-delay: .49s; }

.ap-card-overlap > [class*="col"] > .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, .18) !important;
}

.ap-card-overlap .card img.img-container {
    transition: transform .5s ease;
}

.ap-card-overlap .card:hover img.img-container {
    transform: scale(1.06);
}

@media (prefers-reduced-motion: reduce) {
    #head-section::before,
    #head-section::after,
    #head-section .card,
    #head-section img,
    .ap-card-overlap > [class*="col"] > .card {
        animation: none;
    }

    .ap-card-overlap > [class*="col"] > .card,
    .ap-card-overlap .card img.img-container {
        transition: none;
    }
}
