/* Funnel Modal Styles */
.funnel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.funnel-overlay.active {
    display: flex;
    opacity: 1;
}

/* Prevent body scroll when modal is open */
body.funnel-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.funnel-container {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    margin: 1rem;
    display: flex;
    flex-direction: column;
}

/* Funnel Header */
.funnel-header {
    background: linear-gradient(135deg, var(--aktuna-gold) 0%, var(--aktuna-gold-dark) 100%);
    padding: 1.5rem 2rem;
    position: relative;
}

.funnel-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.funnel-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.funnel-progress {
    margin-top: 0.5rem;
}

.funnel-progress-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.funnel-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.funnel-progress-fill {
    height: 100%;
    background: white;
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Funnel Body */
.funnel-body {
    padding: 2rem;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Funnel Steps */
.funnel-step {
    display: none;
    flex-direction: column;
    animation: fadeInUp 0.4s ease;
    flex: 1;
}

.funnel-step.active {
    display: flex;
}

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

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

.funnel-step.exit {
    animation: fadeOutDown 0.3s ease;
}

/* Question Styling */
.funnel-question {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2rem;
    line-height: 1.3;
    text-align: center;
}

/* Answer Options */
.funnel-options {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    flex: 1;
}

.funnel-option {
    background: white;
    border: 2px solid #e8e6e0;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
}

.funnel-option:hover {
    border-color: var(--aktuna-gold);
    background: rgba(173, 149, 81, 0.05);
    transform: translateX(4px);
}

.funnel-option:active {
    transform: scale(0.98);
}

.funnel-option.selected {
    border-color: var(--aktuna-gold);
    background: rgba(173, 149, 81, 0.1);
}

.funnel-option-check {
    width: 24px;
    height: 24px;
    border: 2px solid #e8e6e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.funnel-option:hover .funnel-option-check {
    border-color: var(--aktuna-gold);
}

.funnel-option.selected .funnel-option-check {
    background: var(--aktuna-gold);
    border-color: var(--aktuna-gold);
}

.funnel-option.selected .funnel-option-check svg {
    opacity: 1;
}

.funnel-option-check svg {
    width: 14px;
    height: 14px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Final Step - Success Message */
.funnel-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.funnel-success-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.funnel-success-message {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.funnel-success-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
}

/* Form Styling */
.funnel-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.funnel-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.funnel-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.funnel-form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.funnel-form-input {
    padding: 0.875rem 1rem;
    border: 2px solid #e8e6e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    transition: all 0.3s ease;
    background: white;
}

.funnel-form-input:focus {
    outline: none;
    border-color: var(--aktuna-gold);
    box-shadow: 0 0 0 3px rgba(173, 149, 81, 0.15);
}

.funnel-form-input::placeholder {
    color: #aaa;
}

.funnel-form-input.error {
    border-color: #ef4444;
}

/* Checkbox Styling */
.funnel-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.funnel-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #e8e6e0;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.funnel-checkbox.checked {
    background: var(--aktuna-gold);
    border-color: var(--aktuna-gold);
}

.funnel-checkbox svg {
    width: 12px;
    height: 12px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.funnel-checkbox.checked svg {
    opacity: 1;
}

.funnel-checkbox-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    cursor: pointer;
}

.funnel-checkbox-label a {
    color: var(--aktuna-gold);
    text-decoration: none;
}

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

/* Submit Button */
.funnel-submit {
    background: linear-gradient(135deg, var(--aktuna-gold) 0%, var(--aktuna-gold-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1.125rem 2rem;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(173, 149, 81, 0.3);
}

.funnel-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(173, 149, 81, 0.4);
}

.funnel-submit:active {
    transform: translateY(0);
}

.funnel-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.funnel-submit.loading {
    pointer-events: none;
}

.funnel-submit .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Back Button */
.funnel-back {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    margin-top: auto;
    transition: all 0.3s ease;
}

.funnel-back:hover {
    color: var(--text-primary);
}

.funnel-back svg {
    width: 18px;
    height: 18px;
}

/* Thank You Screen */
.funnel-thankyou {
    text-align: center;
    padding: 2rem 0;
}

.funnel-thankyou-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    animation: bounceIn 0.6s ease;
}

.funnel-thankyou-icon svg {
    width: 50px;
    height: 50px;
    color: white;
}

.funnel-thankyou-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.funnel-thankyou-text {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.funnel-thankyou-close {
    background: var(--text-primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.funnel-thankyou-close:hover {
    background: var(--aktuna-gold);
    transform: translateY(-2px);
}

/* CTA Button in Hero */
.btn-cta-funnel {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border: none;
    border-radius: 0px;
    padding: 1.5rem 3rem;
    font-size: 1.0625rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 320px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.3);
    cursor: pointer;
    margin-top: 1rem;
}

.btn-cta-funnel:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(34, 197, 94, 0.4);
}

.btn-cta-funnel svg {
    margin-right: 0.75rem;
}

/* Error Message */
.funnel-error {
    color: #ef4444;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

/* Path Selection Grid */
.funnel-path-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    flex: 1;
}

.funnel-path-card {
    background: white;
    border: 2px solid #e8e6e0;
    border-radius: 16px;
    padding: 1.5rem 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.funnel-path-card:hover {
    border-color: var(--aktuna-gold);
    background: rgba(173, 149, 81, 0.04);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(173, 149, 81, 0.15);
}

.funnel-path-card:active {
    transform: scale(0.97);
}

.funnel-path-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--aktuna-gold) 0%, var(--aktuna-gold-dark) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.funnel-path-icon svg {
    width: 26px;
    height: 26px;
    color: white;
}

.funnel-path-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.funnel-path-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Path Badge */
.funnel-path-badge {
    display: inline-block;
    background: rgba(173, 149, 81, 0.12);
    color: var(--aktuna-gold);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 1rem;
    align-self: flex-start;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .funnel-overlay {
        align-items: flex-end;
    }
    
    .funnel-container {
        max-height: 100%;
        height: 100%;
        border-radius: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
    }
    
    .funnel-header {
        padding: 1.25rem 1.5rem;
        flex-shrink: 0;
    }
    
    .funnel-body {
        padding: 1.5rem;
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        min-height: 0;
    }
    
    .funnel-question {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .funnel-option {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
    
    .funnel-form-row {
        grid-template-columns: 1fr;
    }
    
    .funnel-path-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .funnel-path-card {
        padding: 1.25rem 0.875rem;
    }

    .funnel-path-icon {
        width: 44px;
        height: 44px;
    }

    .funnel-path-icon svg {
        width: 22px;
        height: 22px;
    }

    .funnel-path-label {
        font-size: 0.9375rem;
    }
    
    .btn-cta-funnel {
        min-width: auto;
        width: 100%;
        max-width: 320px;
        padding: 1.25rem 2rem;
        font-size: 0.9375rem;
    }
    
    .funnel-thankyou-title {
        font-size: 1.5rem;
    }
    
    .funnel-step {
        padding-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .funnel-body {
        padding: 1.25rem;
    }
    
    .funnel-question {
        font-size: 1.125rem;
    }
    
    .funnel-success-icon {
        width: 60px;
        height: 60px;
    }
    
    .funnel-success-icon svg {
        width: 30px;
        height: 30px;
    }
}
