:root {
    --primary-color: #00627d;
    --secondary-color: #4ECDC4;
    --dark-color: #003847;
    --light-color: #F7F9FC;
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --card-bg: white;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease-in-out;
}

.main-nav.nav-hidden {
    transform: translateY(-100%);
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-links a {
    margin-left: 2rem;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-login {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    transition: all 0.3s ease !important;
}

.nav-login:hover {
    background: var(--primary-color);
    color: white !important;
    transform: translateY(-2px);
}

.nav-cta {
    background: var(--gradient);
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
}




/* Footer */
.main-footer {
    background: var(--dark-color);
    color: white;
    padding: 4rem 2rem 1rem;
    width: 100%;
    max-width: 100%;
    position: relative;
    box-sizing: border-box;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

.footer-brand {
    margin-bottom: 1.5rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.footer-brand .tagline {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.4;
}

.footer-col {
    padding: 1rem;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--secondary-color);
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-col ul li i {
    color: var(--secondary-color);
    font-size: 1rem;
    width: 20px;
}

.footer-col ul li a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    color: white;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* Sezione Metodi di Pagamento Indipendente */
.footer-payment-section {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 2rem 1rem;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-payment-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.payment-methods-footer {
    margin-top: 1rem;
}

.payment-icons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.payment-icons i {
    font-size: 2rem;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.payment-icons i:hover {
    opacity: 1;
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    padding-bottom: 80px; /* Spazio per sticky CTA su mobile */
    border-top: 1px solid rgba(255,255,255,0.1);
    width: 100%;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Liste scrollabili orizzontali su mobile */
.footer-scrollable-list {
    display: flex;
    flex-direction: column;
    list-style: none;
    padding: 0;
    margin: 0;
}

@media (max-width: 768px) {
    .footer-col-scrollable {
        width: 100%;
        overflow: visible;
        padding: 0.3rem 0;
    }
    
    .footer-col-scrollable h4 {
        margin-bottom: 0.8rem;
        font-size: 1rem;
        padding: 0 1rem; /* Padding solo per il titolo */
    }
    
    .footer-col-scrollable .footer-scrollable-list {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
        gap: 0.75rem;
        padding: 0.5rem 1rem; /* Padding solo a sinistra e destra per il primo e ultimo elemento */
        margin: 0;
        width: 100%;
        max-width: 100%;
        list-style: none;
    }
    
    .footer-col-scrollable .footer-scrollable-list::-webkit-scrollbar {
        display: none !important; /* Chrome, Safari, Opera */
        height: 0;
        width: 0;
    }
    
    .footer-col-scrollable .footer-scrollable-list li {
        flex: 0 0 auto !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        margin-bottom: 0 !important;
        margin-right: 0 !important;
        white-space: nowrap;
        display: block !important;
        align-items: center;
        gap: 0;
    }
    
    .footer-col-scrollable .footer-scrollable-list li i {
        display: none; /* Nascondi icone nelle liste scrollabili su mobile */
    }
    
    .footer-col-scrollable .footer-scrollable-list li a {
        padding: 0.6rem 1.2rem;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 25px;
        display: inline-block;
        transition: all 0.3s ease;
        color: white !important;
        text-decoration: none;
        font-size: 0.85rem;
        white-space: nowrap;
        min-width: fit-content;
    }
    
    .footer-col-scrollable .footer-scrollable-list li a:hover,
    .footer-col-scrollable .footer-scrollable-list li a:focus {
        background: rgba(255, 255, 255, 0.25);
        transform: translateY(-2px);
        color: white !important;
    }
    
    .footer-col-scrollable .footer-scrollable-list li a i {
        margin-right: 0.3rem;
        display: inline-block;
    }
}

@media (max-width: 768px) {
    .main-footer {
        padding: 2rem 0 1rem;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    .footer-content .footer-col-scrollable {
        grid-column: 1 / -1; /* Occupa tutta la larghezza su mobile */
        width: 100vw; /* Larghezza viewport completa */
        max-width: 100vw;
        margin-left: calc(-50vw + 50%); /* Centra e estende ai bordi */
        padding: 0.3rem 0;
    }

    .footer-col {
        padding: 0.3rem 1rem;
    }

    .footer-brand {
        margin-bottom: 1rem;
    }

    .footer-brand h3 {
        font-size: 1.2rem;
        margin-bottom: 0.3rem;
    }

    .footer-brand .tagline {
        font-size: 0.8rem;
    }

    .footer-col h4 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
        padding-bottom: 0.3rem;
    }
    
    .footer-col-scrollable h4 {
        margin-bottom: 0.5rem;
    }

    .footer-col ul li {
        margin-bottom: 0.5rem;
        font-size: 0.85rem;
    }

    .footer-col ul li i {
        font-size: 0.9rem;
        width: 16px;
    }

    .footer-col ul li a {
        font-size: 0.85rem;
        color: white;
    }
    
    /* Assicura visibilità delle colonne scrollabili */
    .footer-col-scrollable {
        display: block !important;
        visibility: visible !important;
    }

    .social-links {
        justify-content: flex-start;
        gap: 0.8rem;
        margin-top: 1rem;
    }

    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }

    .footer-payment-section {
        padding: 1.5rem 1rem;
        margin-top: 1.5rem;
    }

    .footer-payment-section h4 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .payment-icons {
        justify-content: center;
        gap: 1rem;
    }

    .payment-icons i {
        font-size: 1.8rem;
    }

    .footer-bottom {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        padding-bottom: 80px; /* Spazio per sticky CTA */
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .main-footer {
        padding: 1.5rem 1rem 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .footer-col {
        text-align: center;
        padding: 0.5rem 0;
    }

    .footer-brand {
        margin-bottom: 0.8rem;
    }

    .footer-brand h3 {
        font-size: 1.1rem;
    }

    .footer-brand .tagline {
        font-size: 0.75rem;
    }

    .footer-col h4 {
        font-size: 0.95rem;
        margin-bottom: 0.6rem;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-col ul {
        margin-bottom: 0.5rem;
    }

    .footer-col ul li {
        justify-content: center;
        margin-bottom: 0.4rem;
        font-size: 0.8rem;
    }

    .footer-col ul li i {
        font-size: 0.85rem;
        width: 14px;
    }

    .footer-col ul li a {
        font-size: 0.8rem;
    }

    .social-links {
        justify-content: center;
        gap: 0.6rem;
        margin-top: 0.8rem;
    }

    .social-links a {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .payment-icons {
        justify-content: center;
        gap: 0.6rem;
    }

    .footer-payment-section {
        padding: 1rem;
        margin-top: 1rem;
    }

    .footer-payment-section h4 {
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
    }

    .payment-icons {
        gap: 0.8rem;
    }

    .payment-icons i {
        font-size: 1.6rem;
    }

    .footer-bottom {
        margin-top: 1.5rem;
        padding-top: 1rem;
        padding-bottom: 80px; /* Spazio per sticky CTA */
        font-size: 0.75rem;
    }
}

/* Fix specifico per Safari */
@media not all and (min-resolution:.001dpcm) { 
    @supports (-webkit-appearance:none) {
        .hero-section .container {
            display: grid;
            grid-template-columns: 1fr;
            gap: 2rem;
        }
        
        @media (min-width: 769px) {
            .hero-section .container {
                grid-template-columns: 1fr 1fr;
            }


        }

        .hero-cta > .primary-btn {
            margin-bottom: 10px;
        }
    }
}

/* Stili generali */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

/* Stili per il modale di contatto */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    padding: clamp(10px, 2vw, 20px);
    box-sizing: border-box;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    animation: modalFadeIn 0.3s ease forwards;
}

/* Modal Content */
.modal-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: clamp(15px, 3vw, 25px);
    animation: contentSlideIn 0.3s ease forwards;
    overflow: visible !important;
}

/* Animazioni */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes contentSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close Button */
.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: #eee;
    transform: rotate(90deg);
}

.close-modal::before,
.close-modal::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 2px;
    background: #666;
    transform: rotate(45deg);
}

.close-modal::after {
    transform: rotate(-45deg);
}

/* Modal Header */
.modal-content h2 {
    color: var(--primary-color);
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 0 0 20px;
    padding-right: 40px;
}


/* Animazione per il completamento */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.progress-step.completed .step-number {
    animation: pulse 0.5s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }

    .modal-content {
        border-radius: 12px;
    }

    .progress-bar {
        top: -15px;
        margin: -15px -15px 15px;
    }

    .button-navigation {
        bottom: -15px;
        margin: 15px -15px -15px;
        padding: 15px;
    }

}

@media (max-width: 480px) {
    .modal {
        padding: 0;
    }

    .modal-content {
        min-height: 90vh;
        border-radius: 0;
    }

    .progress-bar {
        border-radius: 0;
    }

    .button-navigation {
        border-radius: 0;
    }



}

/* Assicura che il modal sia centrato verticalmente quando il contenuto è più piccolo della viewport */
@media screen and (min-height: 600px) {
    .modal.active {
        display: flex;
    }
}

.modal .close {
    display: none;
}

.modal-content h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-color);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 98, 125, 0.2);
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 2px 5px rgba(0, 98, 125, 0.2);
}

.submit-btn:hover {
    background-color: var(--dark-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 98, 125, 0.3);
}

/* Stili per gli alert nei modal */
.modal .alert {
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.modal .alert.show {
    opacity: 1;
    transform: translateY(0);
}

.modal .alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.modal .alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Media Queries per la responsività */
@media (max-width: 768px) {
    .home-container h1 {
        font-size: 36px;
    }
    
    .home-container p {
        font-size: 18px;
    }
    
}

@media (max-width: 480px) {
    .home-container h1 {
        font-size: 28px;
    }
    
    .home-container p {
        font-size: 16px;
    }
    
    .home-container a {
        padding: 12px 24px;
        font-size: 16px;
    }
}

.menu-preview {
    margin-bottom: 30px;
    max-width: 600px;
    width: 90%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 98, 125, 0.15);
    transition: all 0.3s ease-in-out;
    position: relative;
}

.menu-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 98, 125, 0.2);
}

.preview-image {
    width: 100%;
    height: auto;
    max-width: 600px;
    display: block;
    border-radius: 8px;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 98, 125, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-overlay span {
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 18px;
}

.menu-preview:hover .preview-overlay {
    opacity: 1;
}

/* Rinominiamo il vecchio stile del link in cta-button */
.home-container .cta-button {
    text-decoration: none;
    color: white;
    background-color: var(--primary-color);
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 18px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 2px 5px rgba(0, 98, 125, 0.2);
}

.home-container .cta-button:hover {
    background-color: var(--dark-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 98, 125, 0.3);
}

/* Rimuoviamo la media query non più necessaria */
@media (max-width: 768px) {
    .preview-overlay span {
        font-size: 16px;
        padding: 10px 20px;
    }
}

/* Modifica dei colori specifici */
.nav-links a:hover {
    color: var(--primary-color);
}



.secondary-btn {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.demo-btn {
    display: inline-block;
    padding: 15px 30px;
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    color: white;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    border-radius: 30px;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.demo-btn:hover {
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 100;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media screen and (max-width: 1000px) {
    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .nav-container {
        overflow: visible;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 80px 20px;
        display: flex;
        flex-direction: column;
        gap: 20px;
        transition: right 0.3s ease-in-out;
        z-index: 1000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        pointer-events: none;
    }

    .nav-links.transitioning {
        pointer-events: none;
    }

    .nav-links.active {
        right: 0;
        pointer-events: auto;
    }

    .nav-links a {
        font-size: 1.2rem;
        margin-left: 0;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
        display: block;
        width: 100%;
        text-align: center;
        padding: 10px;
    }

    .nav-links.active a {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-login,
    .nav-cta {
        margin: 10px 0;
        width: 200px;
        text-align: center;
        display: inline-block;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-top: 5px;
    background-color: white;
}

.form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Stili per il form di registrazione */
.register-btn {
    background-color: #2ecc71;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    margin-left: 10px;
}

.register-btn:hover {
    background-color: #27ae60;
}

.form-check {
    margin: 20px 0;
}

.form-check input[type="checkbox"] {
    margin-right: 10px;
}

#registerAlertSuccess,
#registerAlertError {
    display: none;
}

/* Stili per la validazione del form */
.form-group input.is-valid {
    border-color: #28a745;
}

.form-group input.is-invalid {
    border-color: #dc3545;
}

/* Stili per il feedback di validazione */
#username-feedback {
    font-size: 12px;
    margin-top: 5px;
    transition: all 0.3s ease;
}

/* Media queries per il form di registrazione */
@media (max-width: 768px) {
    .register-btn {
        margin: 10px 0;
        text-align: center;
        display: block;
    }
}

/* Stili per i metodi di pagamento */
.payment-methods {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.payment-method {
    flex: 1;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method:hover {
    border-color: #007bff;
}

.payment-method.selected {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.payment-method i {
    font-size: 2.5em;
    color: var(--dark-color);
    transition: all 0.3s ease;
}

.payment-method.selected i {
    color: var(--primary-color);
}

/* Colori specifici per i brand */
.payment-method[data-method="stripe"] i {
    color: #635bff;
}

.payment-method[data-method="paypal"] i {
    color: #003087;
}

.payment-method:hover i {
    transform: scale(1.1);
}

#card-element {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

/* Aggiustamento responsive */
@media (max-width: 768px) {
    .payment-methods {
        text-align: center;
    }
    
    .payment-icons {
        justify-content: center;
    }
}

/* Stili per i tabs di registrazione */
.register-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    opacity: 0.6;
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-btn.active {
    opacity: 1;
    color: var(--primary-color);
}

.tab-btn.active:after {
    transform: scaleX(1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Mantenere solo questa versione unificata */
.button-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-bottom: 20px;
}

.button-navigation .next-btn,
.button-navigation .prev-btn {
    width: auto;
    min-width: 120px;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Stili per il riepilogo del pagamento */
#payment-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

#payment-summary .summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .register-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 auto;
        text-align: center;
        padding: 8px;
        font-size: 14px;
    }
}

/* Stili per i radio buttons */
.radio-group {
    display: flex;
    gap: 20px;
    margin: 10px 0;
}

.radio-group input[type="radio"] {
    margin-right: 5px;
}

.radio-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Stili per i campi di validazione */
input:invalid {
    border-color: inherit;
}

input:invalid:focus,
input.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-group input.is-valid {
    border-color: #28a745;
}

.form-group input.is-invalid {
    border-color: #dc3545;
}

/* Feedback di validazione */
.validation-feedback {
    display: none;
    font-size: 12px;
    margin-top: 5px;
    width: 100%;
    clear: both;
    position: relative;
    left: 0;
    right: 0;
}

.validation-feedback.invalid {
    display: block;
    color: #dc3545;
}

.validation-feedback.valid {
    display: block;
    color: #28a745;
}

/* Stili per il campo SDI/PEC */
.input-help {
    color: #666;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* Stili per le label con indicazioni */
.form-group label small {
    color: #666;
    font-weight: normal;
    font-size: 12px;
    margin-left: 4px;
}

/* Stili per il select compatto */
select#tipo_fatturazione {
    width: auto;
    min-width: 150px;
    padding: 8px 24px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px 12px;
}

select#tipo_fatturazione:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,98,125,0.25);
}

/* Stili per l'autocompletamento degli indirizzi */
.address-suggestions {
    display: none;
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    margin-top: 5px;
}

.address-suggestion-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
    line-height: 1.4;
}

.address-suggestion-item .street-name {
    font-weight: 500;
}

.address-suggestion-item .house-number {
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(0,98,125,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

.address-suggestion-item .city-name {
    color: #666;
    font-size: 0.9em;
}

.address-suggestion-item .province {
    color: #666;
    font-size: 0.9em;
}

.address-suggestion-item .cap {
    color: #666;
    font-size: 0.9em;
}

.address-suggestion-item:last-child {
    border-bottom: none;
}

.address-suggestion-item:hover {
    background-color: #f5f5f5;
}

.address-suggestion-item.selected {
    background-color: #e9ecef;
}

.address-suggestion-item strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Stile per il campo indirizzo durante la ricerca */
.searching {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ccc"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8z"/></svg>');
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 20px;
}

/* Disabilita i suggerimenti del browser */
input[autocomplete="new-field"]::-webkit-contacts-auto-fill-button,
input[autocomplete="new-field"]::-webkit-credentials-auto-fill-button,
input[autocomplete="new-field"]::-webkit-autofill {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
    position: absolute;
    right: 0;
}

/* Layout campi indirizzo */
.address-fields {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.address-street {
    flex: 1;
}

.address-number {
    width: 100px;
}

.address-number input {
    text-align: center;
}

.address-number input:not([readonly]) {
    background-color: #fff;
    cursor: text;
}

@media (max-width: 480px) {
    .address-fields {
        flex-direction: column;
        gap: 10px;
    }
    
    .address-street,
    .address-number {
        width: 100%;
    }
}

/* Stili per la selezione del piano */
.billing-cycle {
    margin-top: 20px;
}

.toggle-container {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.toggle {
    flex: 1;
    position: relative;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle input {
    position: absolute;
    opacity: 0;
}

.toggle span {
    display: block;
    font-weight: 500;
}

.toggle input:checked + span {
    color: var(--primary-color);
}

.toggle:has(input:checked) {
    border-color: var(--primary-color);
    background-color: rgba(0,98,125,0.05);
}

.discount {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 5px;
}

/* Stili per i campi readonly */
input[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.current-plan {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.current-plan h4 {
    color: var(--primary-color);
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.plan-price {
    font-size: 1.5em;
    font-weight: 600;
    margin: 0;
    color: #333;
}

/* Stili per la sezione voucher */
.voucher-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.voucher-input {
    display: flex;
    gap: 10px;
}

.voucher-input input {
    flex: 1;
}

.verify-voucher {
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.verify-voucher:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#voucher-feedback {
    margin-top: 5px;
    font-size: 12px;
}

#voucher-feedback.valid {
    color: #28a745;
}

#voucher-feedback.invalid {
    color: #dc3545;
}

.summary-item.total {
    margin-top: 15px;
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

.summary-item.voucher-discount {
    color: #28a745;
    font-weight: 500;
}

/* Stili per la pagina di checkout */
.checkout-container {
    max-width: 800px;
    margin: 100px auto;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.checkout-container h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.order-details {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.order-details h2 {
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.order-details p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #666;
}

/* Stili per il form di pagamento Stripe */
#payment-form {
    margin-top: 2rem;
}

#payment-element {
    margin-bottom: 24px;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
}

#payment-form button {
    background: var(--gradient);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 30px;
    width: 100%;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#payment-form button:hover {
    transform: translateY(-2px);
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#payment-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
}

.hidden {
    display: none;
}

/* Responsive per il checkout */
@media (max-width: 768px) {
    .checkout-container {
        margin: 60px auto;
        padding: 1.5rem;
        width: 95%;
    }

    .checkout-container h1 {
        font-size: 2rem;
    }

    .order-details {
        padding: 1.5rem;
    }
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    margin: 20px 0 30px;
    position: relative;
    max-width: 100%;
    padding: 0 10px;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #e0e0e0;
    transform: translateY(-50%);
    z-index: 1;
    border-radius: 2px;
}

.progress-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #666;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.progress-step span {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    transition: all 0.3s ease;
}

.progress-step.completed .step-number {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 98, 125, 0.3);
}

.progress-step.active .step-number {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 98, 125, 0.2);
}

.progress-step.completed + .progress-step::before {
    background: var(--primary-color);
    box-shadow: 0 0 8px rgba(0, 98, 125, 0.3);
}

.progress-step::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -50%;
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    transform: translateY(-50%);
    z-index: -1;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.progress-step:first-child::before {
    display: none;
}

/* Animazione per il completamento */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.progress-step.completed .step-number {
    animation: pulse 0.5s ease;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .progress-bar::before,
    .progress-step::before {
        background: #333;
    }
    
    .step-number {
        background: #1a1a1a;
        border-color: #333;
        color: #999;
    }
    
    .progress-step span {
        color: #999;
    }
    
    .progress-step.completed .step-number {
        background: var(--primary-color);
        border-color: var(--primary-color);
        color: #fff;
    }
    
    .progress-step.active .step-number {
        border-color: var(--primary-color);
        color: var(--primary-color);
        background: #1a1a1a;
    }
}

/* Mantenere solo gli stili specifici nella sezione .button-navigation */
.button-navigation .next-btn {
    background: var(--gradient);
    color: white;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.button-navigation .prev-btn {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

/* Stili per i campi condizionali */
#fields_persona_fisica,
#fields_persona_giuridica {
    display: none;  /* Nascosti di default */
    opacity: 0;
    transition: opacity 0.3s ease;
}

#fields_persona_fisica.active,
#fields_persona_giuridica.active {
    display: block;
    opacity: 1;
}

/* Stili per il feedback dell'username */
.username-feedback {
    display: none;
    font-size: 14px;
    margin-top: 5px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.username-feedback.checking {
    display: block;
    background-color: #fff3cd;
    color: #856404;
}

.username-feedback.available {
    display: block;
    background-color: #d4edda;
    color: #155724;
}

.username-feedback.unavailable {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
}

/* Spinner per il caricamento */
.username-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 5px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Aggiungiamo stili specifici per il primo tab che ha solo il pulsante Avanti */
#account-tab .button-navigation {
    justify-content: flex-end;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stile per la preview dell'URL */
.url-preview {
    font-family: monospace;
    color: #666;
    margin-top: 5px;
    padding: 5px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 14px;
}

.url-preview span {
    color: var(--primary-color);
    font-weight: bold;
}

/* Stile per i radio button del tipo fatturazione */
.billing-type-selector {
    margin-bottom: 20px;
}

.radio-group {
    display: flex;
    gap: 15px;
    margin-top: 8px;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    gap: 6px;
    cursor: pointer;
    padding: 6px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.radio-label:hover {
    border-color: var(--primary-color);
}

.radio-label input[type="radio"] {
    margin: 0;
}

.radio-label input[type="radio"]:checked {
    accent-color: var(--primary-color);
}

.radio-label input[type="radio"]:checked ~ .radio-label {
    border-color: var(--primary-color);
    background-color: rgba(0, 98, 125, 0.05);
}

/* Stili per i campi condizionali */
#fields_persona_fisica,
#fields_persona_giuridica {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#fields_persona_fisica.active,
#fields_persona_giuridica.active {
    display: block;
    opacity: 1;
}

/* Stili per il riepilogo costi */
.price-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 5px 0;
}

.summary-row.total {
    border-top: 2px solid #dee2e6;
    margin-top: 10px;
    padding-top: 10px;
    font-weight: bold;
    font-size: 1.1em;
}

.billing-period {
    display: block;
    text-align: center;
    color: #6c757d;
    margin-top: 10px;
}

.voucher-feedback {
    font-size: 14px;
    margin-top: 5px;
}

.voucher-feedback.valid {
    color: #28a745;
}

.voucher-feedback.invalid {
    color: #dc3545;
}

.billing-cycle-selector {
    display: flex;
    gap: 20px;
    margin: 15px 0;
}

.billing-cycle-option {
    flex: 1;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #fff;
}

.billing-cycle-option.selected {
    border-color: #2196F3;
    background: #f8f9ff;
}

.billing-cycle-option:hover {
    border-color: #2196F3;
    transform: translateY(-2px);
}

.billing-cycle-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.billing-cycle-option label {
    display: block;
    cursor: pointer;
}

.billing-cycle-option .period {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 5px;
}

.billing-cycle-option .description {
    color: #666;
    font-size: 0.9em;
}

.billing-cycle-option .discount-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #4CAF50;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.billing-cycle-option input[type="radio"] {
    display: none;
}

/* Stili per il gruppo input voucher */
.voucher-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 42px;
    position: relative;
}

.voucher-input-group input {
    flex: 1;
    height: 42px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: none !important;
    padding: 8px 12px;
}

.verify-voucher-btn {
    height: 42px;
    padding: 0 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Stili per il feedback del voucher */
.voucher-feedback {
    font-size: 14px;
    transition: all 0.3s ease;
    margin-top: 5px;
}

.voucher-feedback.checking {
    color: #6c757d;
    font-style: italic;
}

.voucher-feedback.valid {
    color: #28a745;
}

.voucher-feedback.invalid {
    color: #dc3545;
}

/* Rimuovo gli stili precedenti che causavano il problema */
.promocodeline {
    position: relative;
    padding-bottom: 5px;
}

.voucher-feedback.checking {
    color: #6c757d;
    font-style: italic;
}

.voucher-feedback.valid {
    color: #28a745;
}

.voucher-feedback.invalid {
    color: #dc3545;
}

/* Stili per il tab di pagamento */
.payment-summary {
    background: var(--light-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.payment-summary h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.business-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
    margin-bottom: 15px;
}

.business-name i {
    color: var(--primary-color);
}

.total-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.4em;
    font-weight: 600;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.payment-methods-container {
    margin: 30px 0;
}

.payment-methods-container h4 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

.payment-methods {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.payment-method {
    flex: 1;
    max-width: 200px;
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method img {
    height: 40px;
    object-fit: contain;
}

.payment-method span {
    font-size: 0.9em;
    color: var(--dark-color);
}

.payment-method:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.payment-method.selected {
    border-color: var(--primary-color);
    background-color: rgba(78, 205, 196, 0.05);
}

#payment-form-container {
    margin-top: 30px;
}


/* Tab Complete */
#complete-tab.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#complete-tab.tab-content.active {
    display: flex !important;
    opacity: 1;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    width: 100%;
    padding: 40px 20px;
    background: transparent;
    position: relative;
    z-index: 2;
}

/* Nascondi gli alert quando il tab complete è attivo */
#complete-tab.tab-content.active ~ #registerAlertError,
#complete-tab.tab-content.active ~ #registerAlertSuccess {
    display: none !important;
}

/* Nascondi progress bar e titolo quando il tab complete è attivo */
#complete-tab.tab-content.active ~ .progress-bar,
#complete-tab.tab-content.active ~ h2,
#complete-tab.tab-content.active ~ .button-navigation {
    display: none !important;
}

/* Success container */
#complete-tab .registration-success {
    text-align: center;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    padding: 40px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.5s ease-out;
}

/* Success icon */
#complete-tab .success-icon {
    font-size: 70px;
    color: #4CAF50;
    margin-bottom: 30px;
    animation: scaleIn 0.5s ease-out;
}

/* Success message */
#complete-tab h2 {
    color: #2C3E50;
    font-size: 32px;
    margin-bottom: 20px;
    animation: fadeInUp 0.5s ease-out 0.2s both;
}

#complete-tab p {
    color: #666;
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.6;
    animation: fadeInUp 0.5s ease-out 0.3s both;
}

/* Countdown */
#complete-tab #countdown {
    font-weight: bold;
    color: #4CAF50;
    font-size: 20px;
}

/* Dashboard button */
#complete-tab .dashboard-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease-out 0.4s both;
}

#complete-tab .dashboard-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* Stili per gli alert di registrazione */
#registerAlertError,
#registerAlertSuccess {
    position: relative;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    animation: slideDown 0.3s ease-out;
    z-index: 1000;
}

#registerAlertError {
    background-color: #fff2f0;
    border: 1px solid #ffccc7;
    color: #ff4d4f;
}

#registerAlertSuccess {
    background-color: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

/* Animazioni */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Effetto confetti per celebrare */

/* Responsive */
@media (max-width: 768px) {
    .payment-methods {
        flex-direction: column;
        align-items: center;
    }

    .payment-method {
        width: 100%;
        max-width: 300px;
    }
}

/* Stili per il feedback dell'email */
.email-feedback {
    font-size: 0.85em;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.email-feedback.checking {
    color: #666;
}

.email-feedback.available {
    color: #28a745;
}

.email-feedback.unavailable {
    color: #dc3545;
}

/* Stili per l'input email */
#email.invalid {
    border-color: #dc3545;
}

#email.valid {
    border-color: #28a745;
}

/* Spinner per il checking */
.email-feedback .username-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #666;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-right: 5px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.password-input-group {
    position: relative;
    width: 100%;
}

.password-input-group input {
    width: 100%;
    padding-right: 35px;
}

.password-input-group .toggle-password {
    position: absolute;
    right: 10px;
    top: 0;
    bottom: 0;
    height: 42px; /* Stessa altezza dell'input */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
    padding: 0 5px;
    z-index: 2;
    
}

.password-input-group .toggle-password:hover {
    color: #333;
}

.password-input-group .validation-feedback {
    margin-top: 5px;
    width: 100%;
}

/* Stile per le pagine statiche */
.static-page {
    max-width: 1200px;
    margin: 80px auto 40px;
    padding: 0 20px;
}

.static-page .content {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.static-page .content h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2.5em;
}

.last-updated {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 30px;
    font-style: italic;
}

.static-page-content .content {
    line-height: 1.6;
    color: #444;
}

.static-page-content .content p {
    margin-bottom: 20px;
}

.static-page-content .content h2 {
    color: #333;
    margin: 30px 0 15px;
    font-size: 1.8em;
}

.static-page-content .content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.static-page-content .content li {
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .static-page-container {
        margin: 60px auto 30px;
        padding: 0 15px;
    }
    
    .static-page-content {
        padding: 30px;
    }
    
    .static-page-content h1 {
        font-size: 2em;
    }
}

/* Stile per i link nel footer */
.footer-link {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9em;
    cursor: pointer;
    display: inline-block;
    padding: 5px 0;
    pointer-events: auto;
}

.footer-link:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

/* Rimuovo il pointer-events: none dal footer */
.footer-col p {
    margin-top: 15px;
    pointer-events: auto;
}

.footer-col {
    pointer-events: auto;
}

/* Stili per le pagine statiche */
.static-page {
    min-height: calc(100vh - 200px); /* Altezza minima considerando header e footer */
    display: flex;
    flex-direction: column;
    padding: 40px 0;
}

.static-page .container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.static-page h1 {
    margin-bottom: 30px;
    color: #333;
}

.static-page .content {
    flex: 1;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.static-page .no-content {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.static-page .no-content i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 20px;
}

.static-page .no-content p {
    font-size: 18px;
    margin-bottom: 20px;
}

.static-page .no-content .back-link {
    display: inline-block;
    padding: 10px 20px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.static-page .no-content .back-link:hover {
    background: #0056b3;
}

/* Stili per la pagina di amministrazione delle pagine statiche */
.admin-container {
    max-width: 1200px;
    margin: 80px auto 40px;
    padding: 0 20px;
}

.pages-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.page-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.page-item:hover {
    transform: translateY(-5px);
}

.page-item h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2em;
}

.page-item p {
    color: #666;
    margin-bottom: 15px;
}

.edit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.edit-btn:hover {
    background: var(--dark-color);
}

.edit-btn i {
    font-size: 0.9em;
}

.payment-terms {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
    text-align: left;
}

.payment-terms a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.payment-terms a:hover {
    color: var(--secondary-color);
}

/* Stili per il modal leggero */
.light-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.light-modal-content {
    position: relative;
    background: #fff;
    margin: 50px auto;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-height: 70vh;
    overflow-y: auto;

}

.light-modal-content .content {
    text-align: left !important; 
    font-size: 0.9em;
}

.light-modal-body > h2 {
    font-size: 1.4em;
    color: var(--primary-color);
    text-align: left !important;
    padding:0;
    margin-bottom: 3px;
    margin-top: 12px;
    display: none;
}

.light-modal-content .content h2 {
    font-size: 1.2em;
    color: var(--primary-color);
    text-align: left !important;
    padding:0;
    margin-bottom: 3px;
    margin-top: 12px;
}


.close-light-modal {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-light-modal:hover {
    color: #333;
}

.light-modal-body {
    padding: 15px 0;
    line-height: 1.6;
}

/* Animazione per il modal */
.light-modal.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.light-modal-content.show {
    animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}




.password-requirements {
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    display: none;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 5px 0;
}

.password-requirements li {
    margin: 3px 0;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    opacity: 1;
    max-height: 20px;
    overflow: hidden;
}

.password-requirements li.valid {
    opacity: 0;
    max-height: 0;
    margin: 0;
}

.password-requirements li.invalid {
    color: #dc3545;
}

.password-requirements li i {
    width: 14px;
    text-align: center;
}

.password-requirements.active {
    display: block;
}


/* Animazioni */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stili per il form di registrazione */
#registerModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow-y: auto;
}

#registerModal.active {
    display: flex;
}

#registerModal .modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#registerModal h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
}

#registerModal .subtitle {
    text-align: center;
    color: #666;
    font-size: 16px;
    margin-bottom: 25px;
    font-weight: 400;
}

#registerForm .form-group {
    margin-bottom: 0.75rem;
    position: relative;
}

#registerForm label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

#registerForm input[type="email"],
#registerForm input[type="password"],
#registerForm input[type="text"],
#registerForm input[type="tel"] {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#registerForm input[type="email"]:focus,
#registerForm input[type="password"]:focus,
#registerForm input[type="text"]:focus,
#registerForm input[type="tel"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
    outline: none;
}

#registerForm input.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: 4.5rem; /* Manteniamo lo stesso spazio per tutti gli stati */
}

#registerForm input.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: 4.5rem; /* Manteniamo lo stesso spazio per tutti gli stati */
}

#registerForm input.checking {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='2' x2='12' y2='6'%3E%3C/line%3E%3Cline x1='12' y1='18' x2='12' y2='22'%3E%3C/line%3E%3Cline x1='4.93' y1='4.93' x2='7.76' y2='7.76'%3E%3C/line%3E%3Cline x1='16.24' y1='16.24' x2='19.07' y2='19.07'%3E%3C/line%3E%3Cline x1='2' y1='12' x2='6' y2='12'%3E%3C/line%3E%3Cline x1='18' y1='12' x2='22' y2='12'%3E%3C/line%3E%3Cline x1='4.93' y1='19.07' x2='7.76' y2='16.24'%3E%3C/line%3E%3Cline x1='16.24' y1='7.76' x2='19.07' y2='4.93'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: 4.5rem; /* Manteniamo lo stesso spazio per tutti gli stati */
    animation: spin 1s linear infinite;
}

.password-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: block;
    max-width: 100%;
    padding: 0.5rem;
    font-size: 0.875rem;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.password-tooltip.hiding {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.password-tooltip ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style-type: none;
}

.password-tooltip li {
    margin-bottom: 0.25rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateX(0);
}

.password-tooltip li.satisfied {
    color: #28a745;
    text-decoration: line-through;
    opacity: 0.7;
    transform: translateX(5px);
}

.password-tooltip li:before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
    transition: color 0.3s ease;
}

.password-tooltip li.satisfied:before {
    content: "✓";
    color: #28a745;
}

#registerAlertError {
    display: none;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
}

#registerAlertError.show {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#registerForm .password-input-group {
    position: relative;
}

#registerForm .toggle-password {
    position: absolute;
    right: 1.8rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    padding: 0.5rem;
    z-index: 2;
}

#registerForm .toggle-password:hover {
    color: var(--primary-color);
}

#registerForm .email-feedback,
#registerForm .password-feedback {
    font-size: 14px;
    margin-top: 5px;
}

#registerForm .email-feedback.available {
    color: #28a745;
}

#registerForm .email-feedback.unavailable {
    color: #dc3545;
}

#registerForm .password-feedback {
    color: #666;
}

#registerForm .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
    white-space: normal;
    word-break: break-word;
    width: 100%;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

#registerForm .checkbox-label > * {
    white-space: initial;
    word-break: break-word;
}

#registerForm .checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

#registerForm .checkbox-label a {
    color: var(--primary-color);
    text-decoration: none;
    display: inline;
}

#registerForm .checkbox-label a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    #registerForm .checkbox-label {
        display: block;
    }    
    .checkbox-label {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
        padding: 5px 0;
    }
    
    .checkbox-label input[type="checkbox"] {
        margin-top: 2px;
    }
}

.login-link {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.login-link a{
    color: var(--primary-color);
}

/* Stili per il login con Google */
.social-login {
    margin-bottom: 25px;
}

.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #666;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.divider span {
    padding: 0 10px;
}

/* Stili per gli alert */
#registerAlertSuccess,
#registerAlertError {
    display: none;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
}

#registerAlertSuccess {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#registerAlertError {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    #registerModal .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
}

/* Stili per il form di registrazione */
#registerForm .register-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#registerForm .register-btn:hover {
    background-color: var(--dark-color);
    transform: translateY(-2px);
}

#registerForm .register-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

#registerForm .register-btn .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

#registerForm .register-btn.loading .spinner {
    display: block;
}

#registerForm .register-btn.loading span {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.register-btn.loading {
    cursor: not-allowed;
}




