/* Custom animations and styles - Dark Mode */

/* MyCareer Logo Styles */
.mycareer-logo {
    display: inline-block;
    font-size: 1.25rem;
    line-height: 1;
    font-weight: 700;
    color: white;
    margin-right: 0.5rem;
    align-self: center;
}

@media screen and (min-width: 1280px) {
    .mycareer-logo {
        font-size: 1.5rem;
    }
}

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

/* Selection color */
::selection {
    background-color: rgba(14, 165, 233, 0.3);
    color: #fff;
}

/* Floating animation for hero elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 4s ease-in-out infinite;
    animation-delay: 1s;
}

/* Curriculum and FAQ accordion animations */
.curriculum-item.active .curriculum-arrow,
.faq-item.active .faq-arrow {
    transform: rotate(180deg);
}

.curriculum-content,
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.curriculum-item.active .curriculum-content,
.faq-item.active .faq-content {
    max-height: 500px;
}

/* Dark mode scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #334155 #0f172a;
}

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.active {
    max-height: 300px;
}

/* Code block syntax highlighting enhancements */
pre code {
    line-height: 1.6;
}

/* Gradient text fallback for older browsers */
@supports not (background-clip: text) {
    .text-transparent.bg-clip-text {
        color: #38bdf8;
        background: none;
    }
}

/* Form input animations */
input, select, textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Button hover states */
button, a {
    transition: all 0.2s ease;
}

/* Subtle entrance animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Pulse animation for live indicator */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Card hover effects */
.curriculum-item,
.faq-item {
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.curriculum-item:hover,
.faq-item:hover {
    border-color: rgba(56, 189, 248, 0.3);
}

/* Glow effect on primary buttons */
.bg-primary-600:hover {
    box-shadow: 0 0 30px rgba(14, 165, 233, 0.3);
}

/* Loading state for form */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive typography adjustments */
@media (max-width: 640px) {
    h1 {
        font-size: 2.25rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.75rem;
    }

    .text-xl {
        font-size: 1.125rem;
    }
}

/* Print styles */
@media print {
    nav,
    #apply,
    footer {
        display: none;
    }

    section {
        page-break-inside: avoid;
    }

    body {
        background: white;
        color: black;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gray-400,
    .text-gray-500 {
        color: #94a3b8;
    }

    .border-dark-700 {
        border-color: #475569;
    }
}

/* Gradient mesh background effect (subtle) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(14, 165, 233, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Image placeholder styling */
img {
    background-color: #1e293b;
}

/* Subtle border glow on hover for cards */
.bg-dark-900:hover,
.bg-dark-800:hover {
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.1);
}

/* Form validation states - only show after user interaction */
input.error,
textarea.error {
    border-color: #ef4444 !important;
}

input.success,
textarea.success {
    border-color: #22c55e !important;
}

/* Smooth gradient animation for hero text */
@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.bg-gradient-to-r {
    background-size: 200% 200%;
    animation: gradient-shift 5s ease infinite;
}
