/* Reset e variabili base dal sito principale */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #F25C05;
    --secondary-black: #000000;
    --background-white: #ffffff;
    --mid-grey: #C1C1C1;
    --lines-grey: #DBDBDB;
    --text-grey: #7F7F7F;
    --light-grey: #D9D9D9;
    
    --font-primary: 'IBM Plex Sans', sans-serif;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-primary);
    color: var(--secondary-black);
    background-color: var(--secondary-black);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.decoration-1 {
   position: absolute;
   top: 150px;
   left: 80px;
   width: 66px;
   height: auto;
   z-index: -1;
   pointer-events: none;
}

.decoration-2 {
   position: absolute;
   bottom: 100px;
   right: 60px;
   width: 105px;
   height: auto;
   z-index: -1;
   pointer-events: none;
}

/* Split Layout Container */
.split-container {
    display: flex;
    width: 1440px;
    height: 982px;
}

/* Left Side - Black Background */
.split-left {
    flex: 1;
    background-color: var(--secondary-black);
    color: var(--background-white);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.left-content {
    width: 100%;
    max-width: 600px;
    padding: 60px 50px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

/* Logo */
.logo {
    position: absolute;
    top: 10px;
    left: 10px;
}

.logo img {
    height: 90px;
    width: auto;
}

/* Welcome Section */
.welcome-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.welcome-title {
    font-size: 50px;
    font-weight: 600;
    

}

.welcome-subtitle {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Benefits List */
.benefits-list {
    margin-left: -25px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 25px;
    
}

.benefits-list li {
    font-size: 18px;
    font-weight: 400;
    padding-left: 25px;
    position: relative;
}

.benefits-list li::before {
    margin-top: -4px;
    content: "■";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-size: 24px;
}

.benefit-title {
    font-style: italic;
    font-weight: 600;
}

.cta-text {
    font-size: 24px;
    font-weight: 600;
    margin-top: 20px;
}

/* Right Side - White Background */
.split-right {
    flex: 1;
    background-color: var(--background-white);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.right-content {
    width: 100%;
    max-width: 500px;
    padding: 0 80px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Form Section */
.form-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 429px;
}

.form-title {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 10px;
}

.form-subtitle {
    font-size: 18px;
    font-weight: 400;
    color: var(--secondary-black);
    text-align: center;
}

/* Social Buttons */
.social-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.btn-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    border: 1px solid var(--secondary-black);
    background-color: var(--background-white);
    color: var(--secondary-black);
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-social:hover {
    border-color: var(--mid-grey);
    background-color: #f9f9f9;
}

.btn-social svg {
    flex-shrink: 0;
}

/* Divider */
.divider {
    text-align: center;
    position: relative;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--lines-grey);
}



.divider::after {
    right: 0;
}

.divider span {
    display: inline-block;
    padding: 0 10px;
    background-color: var(--background-white);
    color: var(--text-grey);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Email Form */
.email-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 400;
    color: var(--secondary-black);
}

.form-group input {
    padding: 10px 16px;
    border: 1px solid var(--secondary-black);
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 400;
    color: var(--secondary-black);
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Continue Button */
.btn-continue {
    width: 50%;
    align-self: center;
    padding: 10px 5px;
    background-color: var(--secondary-black);
    color: var(--background-white);
    border: none;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-continue:hover {
    background-color: #333333;
}

/* Login Link */
.login-link {
    text-align: center;
    font-size: 14px;
    font-weight: 400;
    color: var(--secondary-black);
}

.login-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    text-decoration: underline;
}

/* Decorative Patterns */
.decoration-tl,
.decoration-tr,
.decoration-br {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.decoration-tl {
    top: 30px;
    left: 30px;
    width: 120px;
    height: auto;
    opacity: 0.6;
}

.decoration-tr {
    top: 30px;
    right: 30px;
    width: 120px;
    height: auto;
    opacity: 0.4;
}

.decoration-br {
    bottom: 30px;
    right: 30px;
    width: 120px;
    height: auto;
    opacity: 0.4;
}

/* Responsive Design */

/* Tablet + Mobile — layout verticale: nero in alto, form in basso */
@media (max-width: 1024px) {
    html, body {
        overflow: auto;
        height: auto;
    }

    /* Rimuove il flex-centering del body che causa problemi di layout */
    body {
        display: block;
    }

    .split-container {
        flex-direction: column;
        width: 100%;
        height: auto;
    }

    .split-left {
        flex: none;
        width: 100%;
    }

    .split-right {
        flex: none;
        width: 100%;
        overflow-x: hidden; /* evita overflow orizzontale (reCAPTCHA è 300px fissi) */
    }

    /* Logo: esce dall'absolute e rientra nel flusso */
    .logo {
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 24px;
    }

    .logo img {
        height: 86px;
    }

    /* Logo allineato a sinistra, leggermente rientrato rispetto al bordo del contenuto */
    .logo {
        margin-left: 20px;
    }

    .left-content {
        width: 100%;
        max-width: 100%;
        padding: 30px 0 40px;
        justify-content: flex-start;
        align-items: flex-start;
    }

    /* Testo centrato nel pannello, allineato a sinistra internamente */
    .welcome-section {
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
    }

    /* Rimuove il negative margin usato su desktop per il bullet — allinea la lista col testo */
    .benefits-list {
        margin-left: 0;
    }

    .right-content {
        width: 100%;
        max-width: 100%;
        padding: 40px 0;
        justify-content: flex-start;
        align-items: flex-start;
    }

    /* Form centrato nel pannello */
    .form-section {
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
    }

    .welcome-title {
        font-size: 34px;
    }

    .welcome-subtitle {
        font-size: 18px;
    }

    .form-title {
        font-size: 26px;
    }

    .decoration-1 {
        left: 50px;
     }
}

@media (max-width: 768px) {
    .left-content {
        padding: 25px 0 35px;
    }

    .right-content {
        padding: 35px 0;
    }

    .logo img {
        height: 80px;
    }

    .welcome-title {
        font-size: 28px;
    }

    .welcome-subtitle {
        font-size: 16px;
    }

    .benefits-list li {
        font-size: 15px;
    }

    .cta-text {
        font-size: 17px;
    }

    .form-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .left-content {
        padding: 20px 0 28px;
    }

    .right-content {
        padding: 28px 0;
    }

    .logo img {
        height: 65px;
    }

    /* Contenuto più stretto per avere margini laterali generosi */
    .welcome-section {
        max-width: 260px;
    }

    .form-section {
        max-width: 260px;
    }

    .welcome-title {
        font-size: 22px;
    }

    .welcome-subtitle {
        font-size: 14px;
    }

    .benefits-list {
        gap: 16px;
    }

    .benefits-list li {
        font-size: 13px;
    }

    .cta-text {
        font-size: 15px;
    }

    .form-title {
        font-size: 20px;
    }

    /* Nascondi le decorazioni SVG che su mobile creano offset indesiderati */
    .decoration-1,
    .decoration-2 {
        display: none;
    }

    .checkbox-group {
        gap: 8px;
    }

    .checkbox-label {
        font-size: 11px !important;
    }
}

/* Form validation */
.error-message {
    display: none;
    color: #e53e3e;
    font-size: 12px;
    margin-top: 4px;
}
.error-message.show { display: block; }
#sib-form input.error { border-color: #e53e3e !important; }

/* Privacy checkbox */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 10px;
}
.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
    margin-top: 2px;
}
.checkbox-label {
    font-size: 12px !important;
    color: var(--secondary-black);
    line-height: 1.4;
    cursor: pointer;
    margin: 0;
}
.privacy-link {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}
.privacy-link:hover {
    color: var(--secondary-black);
}

/* reCAPTCHA */
.g-recaptcha { transform: scale(0.85); transform-origin: left top; }

/* Submit button */
.btn-submit {
    width: 100%;
    padding: 12px 5px;
    background-color: var(--secondary-black);
    color: var(--background-white);
    border: none;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
}
.btn-submit:hover { background-color: #333333; }
@media (max-width: 1024px) {
    .btn-submit { width: 66.67%; align-self: center; }
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Brevo form */
#sib-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.modal-content {
    background: var(--background-white);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--secondary-black);
    line-height: 1;
}
.modal-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--secondary-black);
}
.modal-text {
    font-size: 16px;
    color: var(--text-grey);
    margin-bottom: 25px;
    line-height: 1.6;
}
.modal-button {
    display: inline-block;
    background: var(--secondary-black);
    color: var(--background-white);
    padding: 10px 25px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.3s ease;
}
.modal-button:hover { background: #333; }
