/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #2563eb;
    --dark-blue: #1e40af;
    --light-blue: #dbeafe;
    --success-green: #10b981;
    --warning-orange: #f59e0b;
    --danger-red: #ef4444;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --bg-white: #ffffff;
    --bg-gray: #f9fafb;
    --border-gray: #e5e7eb;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-gray);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

/* Landing Section */
.landing-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 20px;
}

.landing-content {
    text-align: center;
    color: white;
}

.logo {
    margin: 0 auto 20px;
    animation: fadeInDown 0.8s ease;
}

.landing-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    animation: fadeInDown 0.8s ease 0.2s both;
}

.landing-tagline {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 20px;
    opacity: 0.95;
    animation: fadeInDown 0.8s ease 0.4s both;
}

.landing-description {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 40px;
    opacity: 0.9;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.cta-button {
    background: white;
    color: var(--primary-blue);
    border: none;
    padding: 18px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeInUp 0.8s ease 0.8s both;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.cta-button .arrow {
    display: inline-flex;
    align-items: center;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cta-button:hover .arrow {
    transform: translateX(6px) scale(1.1);
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 60px;
    animation: fadeInUp 0.8s ease 1s both;
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: white;
    opacity: 0.9;
}

.badge-icon {
    font-size: 2rem;
}

/* Form Section */
.form-section {
    min-height: 100vh;
    padding: 60px 20px;
    background: var(--bg-gray);
}

.back-button {
    background: transparent;
    border: 2px solid var(--border-gray);
    color: var(--text-gray);
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 30px;
    display: inline-flex;
    align-items: center;
}

.back-button:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background-color: rgba(37, 99, 235, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.arrow-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.back-button:hover .arrow-icon {
    transform: translateX(-6px) scale(1.1);
}

/* Entrance Animation for Back Button */
.form-section:not(.hidden) .back-button,
.results-section:not(.hidden) .back-button {
    animation: slideInLeftFade 0.6s ease-out forwards;
    opacity: 0;
}

/* Form Navigation & Refresh Button */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.form-navigation .back-button {
    margin-bottom: 0;
}

.refresh-button {
    background: transparent;
    border: 2px solid var(--border-gray);
    color: var(--text-gray);
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
}

.refresh-button:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background-color: rgba(37, 99, 235, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.refresh-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    transition: transform 0.5s ease;
}

.refresh-button:hover .refresh-icon {
    transform: rotate(180deg);
}

.refresh-icon.spinning {
    animation: spin-icon 0.6s linear;
}

@keyframes spin-icon {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.form-section:not(.hidden) .refresh-button {
    animation: slideInRightFade 0.6s ease-out forwards;
    opacity: 0;
}

@keyframes slideInRightFade {
    from {
        opacity: 0;
        margin-right: -20px;
    }

    to {
        opacity: 1;
        margin-right: 0;
    }
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.form-header p {
    color: var(--text-gray);
    font-size: 1.1rem;
}

.loan-form {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.form-section-group {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-gray);
    padding-bottom: 20px;
}

.form-section-group h3 {
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

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

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

.form-group small {
    margin-top: 5px;
    color: var(--text-gray);
    font-size: 0.85rem;
}

.submit-button {
    width: 100%;
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
    position: relative;
}

.submit-button:hover {
    background: var(--dark-blue);
}

.submit-button:disabled {
    background: var(--text-gray);
    cursor: not-allowed;
}

.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spinner {
    width: 16px;
    height: 16px;
    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);
    }
}

.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid var(--danger-red);
}

/* Results Section */
.results-section {
    min-height: 100vh;
    padding: 60px 20px;
    background: var(--bg-gray);
}

.results-header {
    text-align: center;
    margin-bottom: 40px;
}

.results-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.results-header p {
    color: var(--text-gray);
    font-size: 1.1rem;
}

.download-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background: white;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.result-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.result-card.full-width {
    grid-column: 1 / -1;
}

.card-icon {
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.card-content h3 {
    font-size: 1rem;
    color: var(--text-gray);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.approval-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--border-gray);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--success-green));
    border-radius: 10px;
    transition: width 1s ease;
}

.risk-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.risk-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.risk-badge.low {
    background: #d1fae5;
    color: #065f46;
}

.risk-badge.medium {
    background: #fef3c7;
    color: #92400e;
}

.risk-badge.high {
    background: #fee2e2;
    color: #991b1b;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-label {
    font-size: 0.9rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
}

.detail-value.highlight {
    color: var(--primary-blue);
}

/* Metrics Card */
.metrics-grid {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    background: #f8fafc;
    padding: 15px;
    border-radius: 10px;
}

.metric-item {
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 5px;
}

.metric-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-blue);
}

/* Pie Chart */
.chart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.pie-chart {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: conic-gradient(var(--border-gray) 0% 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 1s ease;
}

.pie-chart::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
}

.chart-center-text {
    position: relative;
    z-index: 1;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-gray);
    text-align: center;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    font-size: 0.85rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* Simulator */
.simulator-card {
    background: linear-gradient(to bottom right, #ffffff, #f0fdf4);
    border: 1px solid #bbf7d0;
}

.simulator-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 20px;
    align-items: center;
}

@media (max-width: 768px) {
    .simulator-container {
        grid-template-columns: 1fr;
    }
}

.sim-control-group {
    margin-bottom: 25px;
}

.sim-control-group label {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.highlight-text {
    color: var(--primary-blue);
    font-weight: 700;
}

input[type=range] {
    width: 100%;
    height: 6px;
    background: var(--border-gray);
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-blue);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.sim-result {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.sim-gauge {
    width: 100px;
    margin: 0 auto 10px;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 250px;
}

.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 2.5;
}

.circle {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease;
}

.percentage {
    fill: var(--text-dark);
    font-family: sans-serif;
    font-weight: bold;
    font-size: 0.5em;
    text-anchor: middle;
}

/* Timeline */
.timeline-container {
    position: relative;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 35px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--border-gray);
    z-index: 0;
}

.timeline-step {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
}

.step-dot {
    width: 32px;
    height: 32px;
    background: white;
    border: 3px solid var(--border-gray);
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-gray);
    transition: all 0.4s ease;
}

.timeline-step.active .step-dot {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.step-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.step-desc {
    font-size: 0.75rem;
    color: var(--text-gray);
}

/* Action Plan */
.action-plan-card {
    background: linear-gradient(to right, #fff, #f0f9ff);
    border: 1px solid #bae6fd;
}

.action-list {
    list-style: none;
    margin-top: 15px;
}

.action-list li {
    padding: 12px;
    margin-bottom: 8px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid var(--warning-orange);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-weight: 500;
}

.ai-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 8px;
}

.explanation-text {
    line-height: 1.8;
    color: var(--text-dark);
    font-size: 1.05rem;
    margin-top: 15px;
}

.suggestions-list {
    list-style: none;
    margin-top: 15px;
}

.suggestions-list li {
    padding: 15px;
    background: var(--bg-gray);
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary-blue);
    font-size: 1rem;
    line-height: 1.6;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
}

.primary-button,
.secondary-button {
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.primary-button {
    background: var(--primary-blue);
    color: white;
    border: none;
}

.primary-button:hover {
    background: var(--dark-blue);
}

.secondary-button {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.secondary-button:hover {
    background: var(--light-blue);
}

/* Footer */
.footer {
    background: transparent;
    color: var(--text-gray);
    text-align: center;
    padding: 40px 20px;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

/* Dynamic Gradient Top Border */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--success-green), var(--warning-orange), var(--primary-blue));
    background-size: 300% 100%;
    animation: footerGradient 4s linear infinite;
}

@keyframes footerGradient {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 100% 0%;
    }
}

/* Social Media Section */
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    background: transparent;
    z-index: 1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Base White Background */
.social-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: -2;
    border-radius: 50%;
}

/* Liquid Fill Effect */
.social-icon::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--primary-blue);
    z-index: -1;
    transition: height 0.3s ease-in-out;
    border-radius: 50% 50% 0 0;
}

/* Brand Specific Colors */
.social-icon.linkedin::before {
    background: #0077b5;
}

.social-icon.github::before {
    background: #333333;
}

.social-icon.whatsapp::before {
    background: #25D366;
}

.social-icon.instagram::before {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-icon:hover {
    transform: translateY(-5px);
    color: white;
    border-color: transparent;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
}

.social-icon:hover::before {
    height: 100%;
    border-radius: 0;
}

.social-icon svg {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    z-index: 1;
}

.social-icon:hover svg {
    transform: scale(1.2) rotate(15deg);
}

.footer p {
    transition: transform 0.3s ease, color 0.3s ease;
}

.footer:hover p:first-child {
    color: var(--primary-blue);
    transform: scale(1.02);
}

.disclaimer {
    margin-top: 15px;
    opacity: 0.7;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Responsive Design */
@media (max-width: 768px) {
    .landing-title {
        font-size: 2.5rem;
    }

    .landing-tagline {
        font-size: 1.2rem;
    }

    .trust-badges {
        gap: 20px;
    }

    .form-header h2,
    .results-header h2 {
        font-size: 2rem;
    }

    .loan-form {
        padding: 25px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons button {
        width: 100%;
    }
}

/* Hide Up/Down arrows for number inputs */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* Dynamic Animations for Form Section */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Apply animation when form is visible */
.form-section:not(.hidden) .form-group {
    opacity: 0;
    /* Start hidden for stagger effect */
    animation: slideInUp 0.5s ease-out forwards;
}

/* Staggered delays for form groups */
.form-section:not(.hidden) .form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.form-section:not(.hidden) .form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.form-section:not(.hidden) .form-group:nth-child(3) {
    animation-delay: 0.3s;
}

.form-section:not(.hidden) .form-group:nth-child(4) {
    animation-delay: 0.4s;
}

.form-section:not(.hidden) .form-group:nth-child(5) {
    animation-delay: 0.5s;
}

.form-section:not(.hidden) .form-group:nth-child(6) {
    animation-delay: 0.6s;
}

/* Interactive Focus Effects */
.form-group input:focus,
.form-group select:focus {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
    border-color: #2563eb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Submit Button Pulse Animation */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

.submit-button {
    animation: pulse-glow 2s infinite;
}

/* Results Section Dynamic Animations */
.results-section:not(.hidden) .results-header {
    opacity: 0;
    animation: fadeInDown 0.8s ease-out forwards;
}

.results-section:not(.hidden) .result-card {
    opacity: 0;
    animation: cardPopIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes cardPopIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Staggered delays for result cards */
.results-section:not(.hidden) .result-card:nth-child(1) {
    animation-delay: 0.2s;
}

.results-section:not(.hidden) .result-card:nth-child(2) {
    animation-delay: 0.3s;
}

.results-section:not(.hidden) .result-card:nth-child(3) {
    animation-delay: 0.4s;
}

.results-section:not(.hidden) .result-card:nth-child(4) {
    animation-delay: 0.5s;
}

.results-section:not(.hidden) .result-card:nth-child(5) {
    animation-delay: 0.6s;
}

/* Enhanced AI Badge Shimmer */
.ai-badge {
    background-size: 200% auto;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

@keyframes slideInLeftFade {
    from {
        opacity: 0;
        margin-left: -20px;
    }

    to {
        opacity: 1;
        margin-left: 0;
    }
}

/* Swipe Transitions */
.section-exit {
    animation: swipeOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.section-enter {
    animation: swipeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes swipeOut {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateX(-40px) scale(0.98);
    }
}

@keyframes swipeIn {
    0% {
        opacity: 0;
        transform: translateX(40px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Geometric Data Flow Animation */
.footer {
    position: relative;
    overflow: hidden;
}

.footer-tech-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.tech-shape {
    position: absolute;
    bottom: -50px;
    background: rgba(37, 99, 235, 0.03);
    border: 1px solid rgba(37, 99, 235, 0.15);
    animation: floatUp 15s infinite linear;
}

.shape-1 {
    width: 40px;
    height: 40px;
    left: 10%;
    animation-duration: 12s;
    animation-delay: 0s;
}

.shape-2 {
    width: 80px;
    height: 80px;
    left: 25%;
    animation-duration: 20s;
    animation-delay: -5s;
    border-radius: 12px;
}

.shape-3 {
    width: 30px;
    height: 30px;
    left: 45%;
    animation-duration: 15s;
    animation-delay: -2s;
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
}

.shape-4 {
    width: 60px;
    height: 60px;
    left: 70%;
    animation-duration: 18s;
    animation-delay: -8s;
    transform: rotate(45deg);
}

.shape-5 {
    width: 50px;
    height: 50px;
    left: 85%;
    animation-duration: 14s;
    animation-delay: -4s;
    background: rgba(245, 158, 11, 0.05);
    border-color: rgba(245, 158, 11, 0.2);
    border-radius: 50%;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    100% {
        transform: translateY(-300px) rotate(360deg);
        opacity: 0;
    }
}

.footer .container {
    position: relative;
    z-index: 1;
}

/* Enhanced Dropdown Styling with Animation */
.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #ffffff;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    width: 100%;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.select-wrapper:focus-within select {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: #2563eb;
    outline: none;
}

.select-wrapper:focus-within::after {
    transform: translateY(-50%) rotate(180deg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.select-wrapper select:hover {
    border-color: #2563eb;
    background-color: #f8fafc;
}