/*
 * Mallorca Property Search - Wizard Styles
 * Premium Glassmorphism Design with Animated Transitions
 */

/* ============================
   Base & Typography
   ============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--color-text-dark);
    background: var(--color-black);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ============================
   Header - Minimal & Floating
   ============================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    background: transparent;
    transition: background 0.3s ease;
}

.site-header.scrolled {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
}

.header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .brand {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        text-decoration: none;
    }

    .brand:hover {
        text-decoration: none;
    }

    .brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--brand-gold-light) 0%, var(--brand-gold) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--brand-gold-glow);
}

.brand-logo-text {
    color: var(--color-black);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: -0.02em;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-white);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.brand-tagline {
    font-size: 0.7rem;
    color: var(--color-text-white-muted);
    font-weight: 400;
}

.language-selector {
    display: flex;
    gap: 0.25rem;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-text-white-muted);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-white);
}

.lang-btn.active {
    background: var(--brand-gold);
    border-color: var(--brand-gold);
    color: var(--color-black);
    font-weight: 600;
}

/* ============================
   Hero Section - Full Screen
   ============================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 5rem 0 2rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.5) 30%,
        rgba(0, 0, 0, 0.4) 60%,
        rgba(0, 0, 0, 0.5) 100%
    );
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* ============================
   Hero Content - Desktop Side by Side
   ============================ */
.hero-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ============================
   How It Works - Left Side (Desktop)
   ============================ */
.how-it-works-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-label {
    display: none;
}

/* Mobile: Horizontal icons with expandable text */
.steps-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-icon {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.step-item.active .step-icon,
.step-item:hover .step-icon {
    background: rgba(212, 164, 76, 0.2);
    border-color: var(--brand-gold);
}

.step-icon i {
    font-size: 1.2rem;
    color: var(--brand-gold);
}

.step-item p {
    display: none;
}

/* Mobile: Expanded text area below icons */
.step-text-display {
    text-align: center;
    margin-top: 1rem;
    min-height: 50px;
}

.step-text-display p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    margin: 0;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================
   Wizard Container - Dark Glass
   ============================ */
.wizard-container {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    padding: 32px 28px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    max-width: 520px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.wizard-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

/* ============================
   Progress Bar - Segmented
   ============================ */
.wizard-progress {
    margin-bottom: 2rem;
}

.progress-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.progress-bar-container {
    display: flex;
    gap: 6px;
}

.progress-segment {
    height: 4px;
    flex: 1;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-segment.active {
    background: linear-gradient(90deg, var(--brand-gold) 0%, var(--brand-gold-light) 100%);
    box-shadow: 0 0 8px var(--brand-gold-glow);
}

.progress-segment.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% { left: 100%; }
}

/* ============================
   Wizard Steps - Slide Animations
   ============================ */
.wizard-steps-container {
    position: relative;
    overflow: hidden;
}

.wizard-step {
    display: none;
    position: relative;
}

.wizard-step.active {
    display: block;
    animation: slideInFromRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.wizard-step.active.from-left {
    animation: slideInFromLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.wizard-step.exit-left {
    display: block;
    animation: slideOutToLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.wizard-step.exit-right {
    display: block;
    animation: slideOutToRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutToLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-60px);
    }
}

@keyframes slideOutToRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(60px);
    }
}

.wizard-step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.wizard-step-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

/* ============================
   Chip Groups
   ============================ */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip i {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ============================
   Budget Options with Advanced Slider
   ============================ */
.budget-options,
.timeline-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chip-budget,
.chip-timeline {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
    font-size: 1rem;
}

/* Advanced Budget Toggle */
.budget-advanced-toggle {
    text-align: center;
    margin-top: 1rem;
}

.budget-advanced-toggle button {
    background: transparent;
    border: none;
    color: var(--brand-gold);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.budget-advanced-toggle button:hover {
    color: var(--brand-gold-light);
    text-decoration: underline;
}

.budget-advanced-toggle button i {
    margin-left: 0.35rem;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.budget-advanced-toggle button.expanded i {
    transform: rotate(180deg);
}

/* Budget Slider */
.budget-slider-container {
    display: none;
    padding: 1.5rem 0;
}

.budget-slider-container.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

.budget-slider-values {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.budget-value {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--color-white);
    font-size: 0.95rem;
    font-weight: 600;
    min-width: 100px;
    text-align: center;
}

.budget-slider {
    position: relative;
    height: 6px;
    margin: 1.5rem 0;
}

.budget-slider-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.budget-slider-range {
    position: absolute;
    height: 100%;
    background: linear-gradient(90deg, var(--brand-gold) 0%, var(--brand-gold-light) 100%);
    border-radius: 3px;
}

.budget-slider input[type="range"] {
    position: absolute;
    width: 100%;
    height: 6px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
}

.budget-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--color-white);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 3px solid var(--brand-gold);
    margin-top: -4px; /* Adjusted to vertically center on track */
}

.budget-slider input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--color-white);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 3px solid var(--brand-gold);
}

/* ============================
   Feature Chips with Tick/Star
   ============================ */
.chip-feature {
    position: relative;
    padding-left: 2.5rem;
}

.chip-feature .feature-indicator {
    position: absolute;
    left: 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    opacity: 0;
    transition: all 0.2s ease;
}

.chip-feature.importance-2 .feature-indicator {
    opacity: 1;
    color: var(--brand-gold);
}

.chip-feature.importance-3 .feature-indicator {
    opacity: 1;
    color: var(--color-black);
}

.feature-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 1.25rem;
    text-align: center;
}

.feature-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.feature-legend span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.feature-legend .tick {
    color: var(--brand-gold);
    font-weight: 700;
}

.feature-legend .star {
    color: var(--brand-gold);
}

/* ============================
   Contact Form
   ============================ */
.contact-form {
    max-width: 100%;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 0.1rem;
    cursor: pointer;
    flex-shrink: 0;
}

.form-check-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    cursor: pointer;
}

.privacy-notice {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

/* ============================
   Navigation Buttons
   ============================ */
.wizard-navigation {
    display: flex;
    gap: 12px;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-back,
.btn-next,
.btn-submit {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 16px 24px;
    font-size: 0.95rem;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-back {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--color-white);
}

.btn-back i { margin-right: 0.25rem; }
.btn-next i,
.btn-submit i { margin-left: 0.25rem; }

/* ============================
   Reassurance - Hidden (integrated)
   ============================ */
.reassurance-section {
    display: none;
}

/* ============================
   Footer - Minimal
   ============================ */
.site-footer {
    padding: 1.25rem 0;
    background: var(--color-black);
    color: var(--color-white);
    position: relative;
    z-index: 10;
}

.footer-content {
    text-align: center;
}

.footer-brand {
    font-size: 0.8rem;
    margin-bottom: 0.15rem;
    opacity: 0.7;
}

.footer-brand strong {
    color: var(--brand-gold);
    opacity: 1;
}

.footer-tagline {
    font-size: 0.7rem;
    opacity: 0.5;
    margin: 0;
}

/* ============================
   Loading Overlay
   ============================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--brand-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner p {
    font-size: 1rem;
    color: var(--color-text-white-muted);
    font-weight: 500;
}

/* ============================
   Validation States
   ============================ */
.form-control.is-invalid {
    border-color: #e53e3e;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.15);
}

.validation-message {
    color: #e53e3e;
    font-size: 0.85rem;
    margin-top: 0.75rem;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================
   Mobile Responsive
   ============================ */
@media (max-width: 575px) {
    .site-header {
        padding: 0.75rem 0;
    }

    .brand-text {
        display: none;
    }

    .hero-section {
        padding: 4.5rem 0 1rem;
        background-attachment: scroll;
    }

    .how-it-works-section {
        margin-bottom: 1.5rem;
    }

    .steps-row {
        gap: 0.75rem;
    }

    .step-icon {
        width: 48px;
        height: 48px;
    }

    .wizard-container {
        padding: 24px 20px;
        border-radius: 20px;
        margin: 0 0.5rem;
    }

    .wizard-step-title {
        font-size: 1.3rem;
    }

    .wizard-step-subtitle {
        font-size: 0.9rem;
    }

    .chip {
        padding: 11px 18px;
        font-size: 0.9rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .btn-back,
    .btn-next,
    .btn-submit {
        padding: 14px 20px;
    }

    .feature-legend {
        gap: 1.25rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 991px) {
    .step-text-display {
        display: block;
    }
}

@media (min-width: 992px) {
    .step-text-display {
        display: none !important;
    }
}

/* ============================
   Tablet & Desktop
   ============================ */
@media (min-width: 768px) {
    .wizard-container {
        padding: 40px 36px;
    }

    .wizard-step-title {
        font-size: 1.65rem;
    }

    .budget-options,
    .timeline-options {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .chip-budget,
    .chip-timeline {
        width: auto;
        flex: 1 1 45%;
    }

    .contact-form {
        max-width: 100%;
    }
}

/* Desktop: Side by Side Layout */
@media (min-width: 992px) {
    .hero-content {
        flex-direction: row;
        align-items: center;
        gap: 4rem;
    }

    .how-it-works-section {
        flex: 0 0 320px;
        margin-bottom: 0;
    }

    .steps-row {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .step-item {
        flex-direction: row;
        cursor: default;
        width: 100%;
    }

    .step-icon {
        width: 56px;
        height: 56px;
    }

    .step-icon i {
        font-size: 1.3rem;
    }

    .step-item p {
        display: block;
        font-size: 0.95rem;
        color: rgba(255, 255, 255, 0.8);
        line-height: 1.4;
        margin: 0;
        max-width: none;
        text-align: left;
    }

    .step-text-display {
        display: none;
    }

    .wizard-wrapper {
        flex: 1;
    }

    .wizard-container {
        padding: 48px 44px;
        max-width: 560px;
        margin: 0;
    }

    .wizard-step-title {
        font-size: 1.75rem;
    }
}

@media (min-width: 1200px) {
    .hero-content {
        gap: 5rem;
    }

    .how-it-works-section {
        flex: 0 0 360px;
    }

    .step-item p {
        font-size: 1rem;
    }
}

/* ============================
   Accessibility
   ============================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.chip:focus-visible,
.btn:focus-visible,
.form-control:focus-visible,
.lang-btn:focus-visible {
    outline: 2px solid var(--brand-gold);
    outline-offset: 2px;
}
