@import url('variables.css');

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    /* Background removed for animated liquid background */
    position: relative;
}


.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-main);

    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow: hidden;
}

body.loaded .loader-container {
    display: none;
}

.no-scroll {
    overflow: hidden;
    height: 100%;
}

.fade-in {
    animation: fadeIn 0.5s forwards;
}

.fade-out {
    animation: fadeOut 0.5s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.pagina {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 20px;
}

.wrapper {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 30px;
    border-radius: 20px;

    /* Magic Bento Styles */
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    /* Lighter border for white bg */
    box-shadow: none;
    transition: all 0.3s ease;

    width: 100%;
    position: relative;
    /* For Pseudo-element positioning */
    overflow: hidden;
    /* Contain particles */

    /* Glow Variables */
    --glow-x: 50%;
    --glow-y: 50%;
    --glow-intensity: 0;
    --glow-radius: 200px;
    --glow-color: 132, 0, 255;
    /* Purple default */
}

/* Hover Effect */
.wrapper:hover {
    transform: none;
    box-shadow: none;
}

.wrapper:hover::after {
    padding: 4px;
    /* Thicker border on hover */
}

/* Border Glow Effect */
.wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    /* Thin border glow */
    background: radial-gradient(var(--glow-radius) circle at var(--glow-x) var(--glow-y),
            rgba(var(--glow-color), calc(var(--glow-intensity) * 0.4)) 0%,
            rgba(157, 96, 207, calc(var(--glow-intensity) * 0.3)) 25%,
            rgba(128, 202, 205, calc(var(--glow-intensity) * 0.2)) 50%,
            transparent 80%);
    border-radius: inherit;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease, padding 0.3s ease;
    z-index: 10;
}

/* Particle Styles */
.particle {
    pointer-events: none;
}


.formulario {
    padding: 0;
    width: 100%;
}

.logo-container img {
    width: 110px;
    top: 0;
    left: 0;
}

.progress-container {
    display: flex;
    margin: 30px 0;
}

.progress {
    display: flex;
    gap: 10px;
    background-color: var(--bg-wrapper);

}

.step {
    width: 15px;
    height: 15px;
    /* Added missing height */
    background-color: var(--border-color);

    border-radius: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.step.active {
    width: 45px;
    background-color: var(--purple);
}

.title-container {
    width: 100%;
}

.title-container h1 {
    font-size: 26px;
    font-weight: bold;
    color: var(--text-color);
}

.title-container p {
    margin: 20px 0;
    font-size: 16px;
    color: var(--text-muted);
}

.form-and-image {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    /* Allow wrapping */
}



.accept-terms-container {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--text-color);
}

.accept-terms-container input[type="checkbox"] {
    margin: 10px 10px 10px 0;
    padding: 8px;
}

.accept-terms-container p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.accept-terms-container a {
    color: var(--purple);
    text-decoration: underline;
    font-size: 14px;
}

.form-row-width {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.form-holder {
    width: 100%;
    margin-bottom: 20px;
}

.form-holder:last-child {
    margin-bottom: 5px;
}

.form-holder p,
.form-holder label,
.form-holder input,
.form-holder select {
    font-size: 15px;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);

    background-color: #f3f1ee;
    font-size: 15px;
}

/* Scroll container fills remaining space */
.form-row-scroll {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 20px;
    flex: 1;
    /* Grow to fill available space */
    width: auto;
    /* Remove fixed vw width */
    /* Remove arbitrary limit */
    height: auto;
    min-height: 290px;
}

.form-row-scroll::-webkit-scrollbar {
    width: 8px;
}

.form-row-scroll::-webkit-scrollbar-track {
    background: #e8e3df;
    border-radius: 25px;
}

.form-row-scroll::-webkit-scrollbar-thumb {
    background: #a5a29e;
    ;
    border-radius: 25px;
    border: 1px solid #e8e3df;
}

@supports not selector(::-webkit-scrollbar) {
    .form-row-scroll {
        scrollbar-color: #a5a29e #e8e3df;
    }
}

.form-row-name {
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
}

.half-width {
    width: 48%;
}

input {
    background-color: #f3f1ee;
}

.choice-container,
.textinput-container {
    display: flex;
    align-items: center;
}

.choice-container {
    margin-bottom: 8px;
}

@media (max-width: 430px) {
    .textinput-container {
        flex-direction: column;
        align-items: flex-start;
    }

    input.otro-text {
        margin-left: 0 !important;
        width: 100%;
    }
}

input[type="checkbox"],
input[type="radio"] {
    margin-right: 6px;
}

label {
    margin: 0;
    white-space: normal;
    word-break: break-word;
}

input.otro-text {
    width: auto;
    padding: 3px;
    border-radius: 8px;
    border: 1px solid var(--border-color);

    background-color: #f3f1ee;
    font-size: 15px;
    margin-left: 5px;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.prev-btn,
.next-btn,
.send-btn {
    font-family: inherit;
    /* Inherit font from body */
    background-color: var(--white);
    color: var(--text-color);
    padding: 15px 50px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0px 10px 40px rgba(0, 0, 0, 0.1);
    border: none;
}

.prev-btn:hover,
.next-btn:hover,
.send-btn:hover {
    background-color: var(--purple);
    color: var(--white);
}

.next-btn,
.send-btn {
    margin-left: auto;
}

.buttons {
    display: flex;
    justify-content: space-between;
    margin: 15px;
}

.prev-btn {
    display: none;
    opacity: 0;
}

/* Removed conflicting .hidden rules that prevented animations */

@keyframes slideInFromRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }

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

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(30px);
        opacity: 0;
    }
}

@keyframes slideOutToLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(-30px);
        opacity: 0;
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }

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

.prev-btn.active {
    display: inline-block;
    animation: slideInFromLeft 0.6s ease forwards;
}

.prev-btn.hidden {
    animation: slideOutToLeft 0.6s ease forwards;
    opacity: 0;
    pointer-events: none;
}

.next-btn.hidden {
    animation: slideOutToRight 0.6s ease forwards;
    opacity: 0;
    pointer-events: none;
}

.next-btn.active {
    display: inline-block;
    animation: slideInFromRight 0.6s ease forwards;
}

.send-btn.active {
    display: inline-block;
    animation: slideInFromRight 0.6s ease forwards;
    opacity: 1;
}

.send-btn.hidden {
    animation: slideOutToRight 0.6s ease forwards;
    opacity: 0;
    pointer-events: none;
}

.hidden {
    display: none;
}

/* Responsive Layout using Flexbox and max-widths */

/* Responsive Layout using Flexbox and max-widths */

@media (min-width: 901px) {
    /* No specific override needed for width as we use flex:1 now */
    /* Ensure form content inside doesn't stretch weirdly if needed, or leave it fluid */
}

@media (max-width: 900px) {
    .form-and-image {
        flex-direction: column;
    }



    .form-row-width {
        width: 100%;
    }

    .form-row-scroll {
        width: 100%;
        height: auto;
        min-height: 290px;
    }

    .wrapper {
        margin: 10px;
        padding: 20px;
    }

    .formulario {
        padding: 0;
    }
}

@media (max-width: 600px) {
    .form-row-name {
        flex-direction: column;
        gap: 15px;
    }

    .half-width {
        width: 100%;
    }

    #title {
        text-align: center;
        margin: 0 auto;
    }

    #title h1 {
        font-size: 22px;
    }

    #title p {
        font-size: 14px;
        text-align: center;
    }

    .buttons {
        flex-direction: row;
        /* Keep side-by-side */
        gap: 15px;
        margin: 20px 0 10px 0;
    }

    .prev-btn,
    .next-btn,
    .send-btn {
        width: auto;
        /* Let them size naturally or flex */
        flex: 1;
        /* Equal width */
        margin: 0;
        padding: 12px 20px;
        /* Reduces size slightly */
        font-size: 15px;
    }

    .next-btn {
        margin-left: 0;
    }

    .pagina {
        height: auto;
        min-height: 100vh;
        padding: 0;
        max-width: 100%;
    }

    .wrapper {
        margin: 0;
        padding: 20px 15px;
        border-radius: 0;
        box-shadow: none;
        width: 100%;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .form-row-scroll {
        height: auto !important;
        max-height: none !important;
        overflow: visible;
        flex: 1;
        /* Push buttons to bottom if content is short, or flow if long */
    }

    /* Fixed alignment for radio buttons overlap issue */
    .form-row-width {
        height: auto;
    }

    .buttons {
        margin-top: auto;
        /* Push to bottom if space permits */
        padding-top: 20px;
        background-color: var(--bg-wrapper);

        /* Ensure visual continuity */
        position: sticky;
        bottom: 0;
        z-index: 10;
        padding-bottom: 20px;
    }
}


/* Toastify Custom Styles */
.toastify {
    font-family: var(--font-primary);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
}

.toast-error {
    background: linear-gradient(135deg, #ef476f, var(--purple)) !important;
    color: var(--white);
}

.toast-success {
    background: linear-gradient(135deg, var(--teal), var(--purple-light)) !important;
    color: var(--white);
}

/* --- Variables (ensure these match core/variables.css if not already imported) --- */
:root {
    --purple: #B571DE;
    --purple-hover: #734697;
    --purple-light: #ae7dd7;
    --white: #fafafa;
    --text-color: #333333;
    --text-muted: #707070;
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Zilla Slab', serif;
}

/* --- Typography --- */
body {
    font-family: var(--font-primary);
    color: var(--text-color);
}

h1 {
    font-family: var(--font-secondary);
    font-weight: 700;
    color: var(--text-color);
}

p,
label,
input,
button {
    font-family: var(--font-primary);
}

/* --- Progress Bar --- */
.step {
    background-color: #e0e0e0;
    /* Inactive */
}

.step.active {
    background-color: var(--purple);
}

.step.finish {
    background-color: var(--purple-light);
}

/* --- Inputs --- */
.form-control {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    background-color: #fff;
    border-color: var(--purple);
    box-shadow: 0 0 0 4px rgba(181, 113, 222, 0.1);
    outline: none;
}

/* Checkboxes & Radios */
.choice-container input[type="radio"],
.choice-container input[type="checkbox"] {
    accent-color: var(--purple);
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

.choice-container {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.choice-container:hover {
    background-color: rgba(181, 113, 222, 0.05);
}

/* --- Buttons --- */
.buttons button {
    border-radius: 50px;
    /* Pill shape */
    padding: 12px 30px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.prev-btn {
    background: transparent;
    border: 2px solid var(--purple) !important;
    color: var(--purple);
}

.prev-btn:hover {
    background: rgba(181, 113, 222, 0.1);
    transform: translateX(-3px);
}

.next-btn,
.send-btn {
    background: var(--purple);
    color: white;
    box-shadow: 0 4px 15px rgba(181, 113, 222, 0.3);
}

.next-btn:hover,
.send-btn:hover {
    background: var(--purple-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(181, 113, 222, 0.4);
}

/* --- Title Container --- */
.title-container h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.title-container p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* --- Split Layout Refinements --- */
body {
    background-color: #f0f2f5;
    /* Light grey BG for the page to make card pop */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.pagina {
    padding: 20px;
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wrapper {
    display: flex;
    flex-direction: row;
    /* Split Layout */
    width: 100%;
    max-width: 1100px;
    min-height: 600px;
    padding: 0;
    /* Remove inner padding */
    overflow: hidden;
    /* Important for rounding corners */
}

/* Left Panel - Visuals */
.form-left-panel {
    width: 40%;
    /* Reduced to give more space to form */
    position: relative;
    background-color: var(--purple);
    /* Fallback */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

/* Logo in Left Panel */
.form-left-panel .logo-container {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 10;
    margin: 0;
}

.form-left-panel .logo-container img {
    filter: brightness(0) invert(1);
    /* Make logo white */
}


#liquid-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-flower {
    position: absolute;
    z-index: 2;
    opacity: 0.8;
}

.flower-left {
    bottom: -250px;
    left: -250px;
    width: 350px;
    /* Slightly larger to compensate for cutoff */
    height: auto;
}

.flower-right {
    top: -250px;
    right: -250px;
    width: 350px;
    height: auto;
}

.hero-bg,
.form-left-content {
    /* Hide old bg usage if present */
    display: none;
}


/* Right Panel - Form */
.form-right-panel {
    width: 60%;
    /* Increased width */
    padding: 40px;
    /* Reduced padding for more internal space */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center content vertically, but keep elements together */
    background-color: #ffffff;
    z-index: 10;
}

/* Adjustments for nested form elements */
.formulario {
    width: 100%;
    /* margin-bottom removed to keep buttons close */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-container {
    margin-bottom: 2rem;
    text-align: left;
}

.title-container h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.title-container p {
    margin-bottom: 2rem;
}

.form-and-image {
    flex-direction: column;
}

/* Responsive */
@media (max-width: 900px) {
    .wrapper {
        flex-direction: column;
        max-width: 500px;
    }

    .form-left-panel {
        width: 100%;
        height: 200px;
        /* Header banner style */
    }

    .form-right-panel {
        width: 100%;
        padding: 30px;
    }

    .flower-left,
    .flower-right {
        width: 150px;
    }
}

.buttons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 2rem;
}