/* ===== HOMEPAGE STYLES ===== */

/* Base Button Styles */
.btn {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    outline: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
}

.btn:focus {
    ring: 2px;
    ring-offset: 2px;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

.btn-primary:focus {
    ring-color: #3b82f6;
}

.btn-outline {
    border: 1px solid #d1d5db;
    color: #374151;
    background-color: white;
}

.btn-outline:hover {
    background-color: #f9fafb;
    transform: translateY(-1px);
}

.btn-outline:focus {
    ring-color: #6b7280;
}

/* Card Styles */
.card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.card-header {
    padding: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

/* Form Styles */
.input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    outline: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.input:focus {
    ring: 2px;
    ring-color: #3b82f6;
    border-color: #3b82f6;
}

.input:hover {
    border-color: #9ca3af;
}

.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.select-trigger {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    outline: none;
    width: 100%;
    background-color: white;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.select-trigger:focus {
    ring: 2px;
    ring-color: #3b82f6;
    border-color: #3b82f6;
}

.select-trigger:hover {
    border-color: #9ca3af;
}

/* Tab Styles */
.tabs-trigger {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    white-space: nowrap;
}

.tabs-trigger.active {
    background-color: white;
    color: #2563eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #bfdbfe;
}

.tabs-trigger:not(.active) {
    color: #6b7280;
}

.tabs-trigger:not(.active):hover {
    background-color: #f9fafb;
    color: #374151;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 4xl;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

/* Results Section */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

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

/* Performance Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.metric-card {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    width: 100%;
    background-color: #e5e7eb;
    border-radius: 9999px;
    height: 0.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease-in-out;
}

/* Responsive Design */
@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }
    
    .hero-title {
        font-size: 3rem;
    }
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .tabs-trigger {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .hero-section {
        padding: 1rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

/* Accessibility Improvements */
.btn:focus-visible,
.input:focus-visible,
.select-trigger:focus-visible,
.tabs-trigger:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn-outline {
        border-width: 2px;
        border-color: #374151;
    }

    .input, .select-trigger {
        border-width: 2px;
        border-color: #374151;
    }

    .tabs-trigger:not(.active) {
        color: #111827;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .btn, .input, .select-trigger, .tabs-trigger, .result-card {
        transition: none;
    }

    .progress-fill {
        transition: none;
    }

    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
}

/* Loading States */
.btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}
