/* Custom styles for Paideia */

:root {
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --animation-duration: 2s;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    min-height: 80vh;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.min-vh-75 {
    min-height: 75vh;
}

/* Hero Illustration */
.hero-illustration {
    position: relative;
    animation: float var(--animation-duration) ease-in-out infinite;
}

.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.floating-icon {
    position: absolute;
    color: rgba(255, 255, 255, 0.6);
    font-size: 2rem;
    animation: orbit 8s linear infinite;
}

.floating-icon:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.floating-icon:nth-child(2) {
    top: 20%;
    right: 20%;
    animation-delay: 2s;
}

.floating-icon:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.floating-icon:nth-child(4) {
    bottom: 20%;
    right: 20%;
    animation-delay: 6s;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes orbit {
    0% {
        transform: rotate(0deg) translateX(30px) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateX(30px) rotate(-360deg);
    }
}

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

/* Card Enhancements */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.15) !important;
}

/* Form Enhancements */
.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Textarea height constraints to prevent UI expansion issues */
textarea.form-control {
    resize: vertical;
    overflow-y: auto;
    min-height: 60px;
    max-height: 200px;
}

/* Specific constraints for different textarea types */
textarea#resumeText {
    max-height: 300px;
    min-height: 200px;
}

textarea#currentSkills,
textarea#currentExperience,
textarea#currentEducation {
    max-height: 120px;
    min-height: 60px;
}

textarea#resumeSkills,
textarea#resumeEducation,
textarea#resumeExperience {
    max-height: 100px;
    min-height: 50px;
}

/* AI Coach message input */
textarea#messageInput {
    max-height: 150px;
    min-height: 80px;
}

/* Content display areas that might expand */
.modal .modal-body,
.content-display {
    max-height: 70vh;
    overflow-y: auto;
}

/* Ensure pre-formatted text doesn't break layout */
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
}

/* Tag Styles */
.tag {
    display: inline-block;
    background-color: var(--bs-primary);
    color: white;
    padding: 0.375rem 0.75rem;
    margin: 0.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.tag:hover {
    background-color: var(--bs-primary);
    transform: scale(1.05);
}

.tag .remove-tag {
    margin-left: 0.5rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.tag .remove-tag:hover {
    opacity: 1;
}

/* Results Section */
.recommendation-card {
    border-left: 4px solid var(--bs-primary);
    transition: all 0.3s ease;
}

.recommendation-card:hover {
    border-left-color: var(--bs-success);
    transform: translateX(5px);
}

.match-score {
    font-size: 2rem;
    font-weight: bold;
    color: var(--bs-success);
}

.salary-range {
    background: linear-gradient(45deg, var(--bs-success), var(--bs-info));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.skill-item {
    background: var(--bs-gray-800);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--bs-gray-700);
    transition: all 0.3s ease;
}

.skill-item:hover {
    border-color: var(--bs-primary);
    background: var(--bs-gray-700);
}

/* Learning Path Styles */
.learning-path {
    background: linear-gradient(135deg, var(--bs-info) 0%, var(--bs-primary) 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

.learning-path h6 {
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Progress Indicators */
.progress-step {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.progress-step::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    background: var(--bs-primary);
    border-radius: 50%;
}

.progress-step::after {
    content: '';
    position: absolute;
    left: 0.375rem;
    top: 1.5rem;
    width: 0.25rem;
    height: calc(100% - 1rem);
    background: var(--bs-gray-300);
}

.progress-step:last-child::after {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        text-align: center;
    }
    
    .hero-illustration .fa-10x {
        font-size: 6rem !important;
    }
    
    .floating-icon {
        font-size: 1.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-gray-800);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-primary);
}

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for better accessibility */
.btn:focus,
.form-control:focus,
.tag:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-section {
        background: var(--bs-dark);
    }
    
    .card {
        border: 2px solid var(--bs-border-color);
    }
}

/* Add fadeOut and pulse animations for premium showcase */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 15px rgba(255, 193, 7, 0.1);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

/* Account feature showcase styles */
.account-feature-card {
    transition: transform 0.3s ease, background-color 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.account-feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

#accountShowcase {
    animation-fill-mode: both;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
