/* Global Styles */
:root {
    --primary-color: #1e3a8a;
    /* Navy Blue */
    --primary-gradient: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    /* Navy to Blue */
    --secondary-color: #64748b;
    /* Slate Grey for secondary actions */
    --accent-color: #3b82f6;
    /* Brighter Blue */
    --bg-color: #f8fafc;
    /* Very light blue-grey/white */
    --text-color: #334155;
    /* Slate 700 */
    --glass-bg: rgba(255, 255, 255, 0.95);
    /* Less transparent, more solid white feel */
    --glass-border: rgba(226, 232, 240, 0.8);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    --error-color: #ef4444;
    --success-color: #10b981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background: linear-gradient(180deg, #ffffff 0%, #93c5fd 100%);
    /* Stronger Blue Backdrop */
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.15);
    /* Glass Translucency */
    backdrop-filter: blur(25px);
    /* Strong Blur */
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    /* Glass Edge */
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
    padding: 40px;
    overflow: hidden;
    position: relative;
    animation: fadeIn 0.8s ease-out;
    z-index: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1,
h2,
h3 {
    color: #0f172a;
    /* Darker Navy for Text */
    margin-bottom: 20px;
    font-weight: 700;
}

h2 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

.subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e293b;
    /* Slate 800 */
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.4);
    /* Glass Input */
    backdrop-filter: blur(5px);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    color: #0f172a;
}

input:focus,
select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    /* Blue ring */
}

/* Validation Styles */
input.valid {
    border-color: var(--success-color);
}

input.invalid {
    border-color: var(--error-color);
}

/* Buttons */
.btn-primary,
.next-btn,
.submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
    margin-top: 10px;
    font-size: 1rem;
}

.btn-primary:hover,
.next-btn:hover,
.submit-btn:hover {
    background: #172554;
    /* Darker Navy */
    transform: none;
    box-shadow: none;
}

.btn-secondary,
.prev-btn {
    background: white;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.btn-secondary:hover,
.prev-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* Multi-step Navigation */
.step-content {
    display: none;
    animation: slideIn 0.3s ease-in-out;
}

.step-content.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

.form-navigation button {
    flex: 1;
}

/* Progress Bar */
.progress-bar-container {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.progress-bar-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    transform: translateY(-50%);
    z-index: 0;
}

.progress-step {
    width: 32px;
    height: 32px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: #94a3b8;
    z-index: 1;
    transition: all 0.3s;
}

.progress-step.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* Grid for Address */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

@media (max-width: 640px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Modal/Dialog */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.6);
    /* Slate 900 semi-transparent */
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 32px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
}

.btn-confirm {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-cancel {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* Side Floating Logos */
.floating-logo-container {
    position: fixed;
    top: 120px;
    z-index: 10;
    width: 250px;
    text-align: center;
    pointer-events: none;
}

.floating-logo-container.left {
    left: 50px;
}

.floating-logo-container.right {
    right: 50px;
}

.logo-img-floating {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.15));
    transition: transform 0.4s ease;
    pointer-events: auto;
    opacity: 0.9;
}

.logo-img-floating:hover {
    transform: scale(1.1) rotate(5deg);
    opacity: 1;
}

@media (max-width: 1100px) {
    .floating-logo-container {
        display: none;
    }

    /* Fallback for smaller screens: Put them on top again but smaller */
    .container::before {
        content: '';
        display: block;
        height: 60px;
        /* Spacer */
    }

    .mobile-logos {
        display: flex !important;
        justify-content: center;
        gap: 20px;
        margin-bottom: 20px;
    }

    .mobile-logo-img {
        height: 60px;
        width: auto;
    }
}