html {
  font-size: 14px;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* --------------------------------------------------
   LAYOUT GENERALE
-------------------------------------------------- */
:root {
    --brand-dark: #07020d;
    --brand-gray: #3b3542;
    --brand-gold: #cdac92;
    --brand-light: #f5efeb;
    --brand-border: #dbdbdb;
    --brand-lightblue: #f0f1ff;
    --brand-darkblue: #0d6efd;
    --brand-middleblue: #dcdefa; 
    --brand-markedblue: #94bfff;
    --transition-fast: 0.5s ease;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--brand-dark);
    /*    background-color: #ffffff;*/
    line-height: 1.6;
}

/* PAGE LOADER */
/*.page-loader {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

    .page-loader.visible {
        opacity: 1;
        pointer-events: all;
    }

    .page-loader.hidden {
        display: none;
    }

*/
.page-loader {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

    .page-loader.hidden {
        display: none;
    }

.loader-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    position: relative;
    background: var(--brand-darkblue);
    animation: pulse 1.4s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.75);
        box-shadow: 0 0 0 0 rgba(0,123,255,0.5);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 20px rgba(0,123,255,0);
    }

    100% {
        transform: scale(0.75);
        box-shadow: 0 0 0 0 rgba(0,123,255,0);
    }
}



a {
    color: var(--brand-dark);
    text-decoration: none;
    transition: color var(--transition-fast);
}

    a:hover {
        color: var(--brand-gold);
    }

/* Utility */
.text-gold {
    color: var(--brand-gold) !important;
}

.bg-gold {
    background-color: var(--brand-gold) !important;
}

.border-gold {
    border-color: var(--brand-gold) !important;
}

/* Tutti i bottoni con effetto premium */
.btn-primary {
    --btn-original-bg: #0d6efd;
    color: #fff;
}

.btn-secondary {
    --btn-original-bg: #6c757d;
    color: #fff;
}

.btn-success {
    --btn-original-bg: #198754;
    color: #fff;
}

.btn-danger {
    --btn-original-bg: #dc3545;
    color: #fff;
}

.btn-warning {
    --btn-original-bg: #ffc107;
    color: #000;
}

.btn-info {
    --btn-original-bg: #0dcaf0;
    color: #000;
}

.btn-light {
    --btn-original-bg: #f8f9fa;
    color: #000;
}

.btn-dark {
    --btn-original-bg: #212529;
    color: #fff;
}

/* Classe universale per effetto premium */
.btn,
button,
[class*="btn-"] {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color .35s ease, border-color .35s ease;
}

    .btn::before,
    button::before,
    [class*="btn-"]::before {
        content: "";
        position: absolute;
        inset: 0;
        /* usa il colore originale del bottone, NON currentColor */
        background-color: var(--btn-original-bg);
        transform: scale(1);
        transform-origin: center;
        transition: transform .55s cubic-bezier(.25,.8,.25,1), opacity .55s ease;
        z-index: -1;
    }

    /* Hover: sparisce verso il centro */
    .btn:hover::before,
    button:hover::before,
    [class*="btn-"]:hover::before {
        transform: scale(0);
        opacity: 0;
    }

    /* Hover: testo e bordo assumono il colore originale */
    .btn:hover,
    button:hover,
    [class*="btn-"]:hover {
        background-color: transparent !important;
        color: var(--btn-original-bg) !important;
        border-color: var(--btn-original-bg) !important;
    }

/* COOKIE NOTIFICATION */
.cs-cookie-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    transition: opacity 0.45s ease, transform 0.45s ease;
    pointer-events: none;
    z-index: 1050;
    background: #07020d;
    color: #ffffff;
    padding: 18px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 900px;
    width: 90%;
    font-size: 0.95rem;
}

    .cs-cookie-notification.is-visible {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        pointer-events: auto;
    }

    .cs-cookie-notification-close {
        position: absolute;
        top: 0;
        right: 0;
        border-radius: 50px;
        font-size: 20px;
        font-weight: bold;
        background-color: white;
        color: black;
        border: none;
        width: 32px;
        height: 32px;
    }

.cs-cookie-icon {
    font-size: 1.4rem;
    font-weight: 600;
    color: #cdac92;
    background: #07020d;
    border: 2px solid #cdac92;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 14px;
}

.cs-cookie-text {
    flex: 1;
    line-height: 1.4;
}

    .cs-cookie-text a {
        color: #cdac92;
        text-decoration: underline;
    }

        .cs-cookie-text a:hover {
            text-decoration: none;
        }

.cs-cookie-notification .btn {
    flex-shrink: 0;
    border-radius: 8px;
    font-weight: 600;
}

/* PRIVACY POLICY */
.pp-wrapper {
    padding: 32px 26px;
    background: #ffffff;
    color: #3b3542;
    font-size: 0.95rem;
    line-height: 1.55;
}

    .pp-wrapper h2 {
        font-size: 1.9rem;
        color: #07020d;
        margin-bottom: 20px;
    }

    .pp-wrapper h3 {
        font-size: 1.25rem;
        margin-top: 26px;
        margin-bottom: 12px;
        color: #07020d;
    }

    .pp-wrapper ul {
        padding-left: 20px;
        margin-bottom: 18px;
    }

    .pp-wrapper a {
        color: #cdac92;
        text-decoration: underline;
    }

        .pp-wrapper a:hover {
            text-decoration: none;
        }

.pp-update {
    margin-top: 30px;
    font-size: 0.85rem;
    color: #7a7480;
}

/* POPUP PRIVACY POLICY */
/* OVERLAY */
.cs-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 2000;
}

    .cs-modal.is-visible {
        display: block;
    }

/* BACKDROP */
.cs-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 2, 13, 0.55);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity .35s ease;
}

.cs-modal.is-visible .cs-modal-backdrop {
    opacity: 1;
}

/* DIALOG */
.cs-modal-dialog {
    position: relative;
    max-width: 820px;
    margin: 60px auto;
    background: transparent;
    padding: 0 15px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .35s ease, transform .35s ease;
}

.cs-modal.is-visible .cs-modal-dialog {
    opacity: 1;
    transform: translateY(0);
}

/* CONTENT */
.cs-modal-content {
    background: #ffffff;
    padding: 32px 28px;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.25);
}

/* TITLE */
.cs-modal-title {
    font-size: 1.8rem;
    color: #07020d;
    margin-bottom: 18px;
}

/* BODY (scroll interno) */
.cs-modal-body {
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 6px;
}

/* CLOSE BUTTON */
.cs-modal-close {
    position: absolute;
    top: -10px;
    right: 10px;
    background: #ffffff;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    padding: 4px 10px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform .2s ease;
}

    .cs-modal-close:hover {
        transform: scale(1.1);
    }

/* LOGIN */
#loginModal > .cs-modal-dialog, #recuperaPasswordModal > .cs-modal-dialog {
    width: 400px !important;
    height: auto !important;
}
#loginModal i.ph-thin, #recuperaPasswordModal i.ph-thin {
    font-size: 6rem;
    color: var(--brand-darkblue);
}
#loginModal .pp-wrapper, #recuperaPasswordModal .pp-wrapper {
    padding: 0 20px !important;
}
.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #666;
}

    .toggle-password i {
        font-size: 20px;
    }
#btn-recuperaPassword, #btn-back-to-login {
    text-decoration: underline!important;
    cursor: pointer;
}

/* ============================
   ERRORI
   ============================ */
.error-msg {
    color: #b30000;
    margin-top: 10px;
    font-size: 14px;
}

#notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Notifica base */
.notification {
    min-width: 260px;
    max-width: 340px;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    opacity: 0;
    transform: translateX(30px);
    transition: all .25s ease;
}

    /* Varianti */
    .notification.success {
        background: #28a745;
        color: #fff;
    }

    .notification.error {
        background: #dc3545;
        color: #fff;
    }

    .notification.warning {
        background: #ffc107;
        color: #000;
    }

    /* Stato visibile */
    .notification.show {
        opacity: 1;
        transform: translateX(0);
    }


/* MOBILE */
@media (max-width: 768px) {
    .cs-cookie-notification {
        bottom: 0;
        left: 0;
        transform: none;
        border-radius: 0;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 18px;
        gap: 14px;
    }

    .cs-cookie-icon {
        margin-bottom: 10px;
    }

    .cs-cookie-text {
        font-size: 0.9rem;
    }

    .cs-cookie-notification .btn {
        align-self: flex-end;
    }

    .cs-modal-dialog {
        margin: 20px auto;
    }

    .cs-modal-content {
        padding: 24px 20px;
    }

    .cs-modal-body {
        max-height: 70vh;
    }
}

body.no-scroll {
    overflow: hidden !important;
    height: 100vh;
}
