
/* PHOENIX Online Development - Enhancement Styles */

/* ============================================
   THEME VARIABLES
   ============================================ */
:root[data-theme="dark"] {
    --bg-primary: #0A0E27;
    --bg-secondary: #1A1F3A;
    --text-primary: #FFFFFF;
    --text-secondary: #94A3B8;
    --border-color: rgba(139, 92, 246, 0.2);
}

:root[data-theme="light"] {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --border-color: rgba(139, 92, 246, 0.3);
}

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 30px rgba(139, 92, 246, 0.6);
}

/* ============================================
   PARTICLE SYSTEM
   ============================================ */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* ============================================
   LOADING ANIMATION
   ============================================ */
.phoenix-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.phoenix-loader.loaded {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-phoenix {
    animation: phoenixRise 2s ease-in-out infinite;
}

@keyframes phoenixRise {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.phoenix-wing-left,
.phoenix-wing-right {
    animation: wingFlap 1s ease-in-out infinite;
    transform-origin: center;
}

@keyframes wingFlap {
    0%, 100% {
        transform: scaleX(1);
    }
    50% {
        transform: scaleX(1.2);
    }
}

.loader-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 1rem;
    letter-spacing: 0.2em;
}

.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 2px;
    margin: 1.5rem auto 0;
    overflow: hidden;
}

.loader-bar {
    height: 100%;
    background: var(--gradient-primary);
    animation: loadProgress 2s ease-in-out infinite;
}

@keyframes loadProgress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

/* ============================================
   SCROLL PROGRESS INDICATOR
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(139, 92, 246, 0.1);
    z-index: 9998;
}

.scroll-progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.1s ease;
}

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(26, 31, 58, 0.6);
    border: 2px solid var(--border-color);
    border-radius: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(10, 14, 39, 0.6);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--phoenix-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-errors,
.form-success {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.form-errors {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
}

.form-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6EE7B7;
}

/* ============================================
   SEARCH MODAL
   ============================================ */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.search-modal.active {
    display: flex;
}

.search-modal-content {
    width: 90%;
    max-width: 600px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

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

.search-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.search-input {
    flex: 1;
    padding: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.search-input:focus {
    outline: none;
}

.search-close {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.search-close:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-primary);
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.search-result-item {
    display: block;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.search-result-item:hover {
    background: rgba(139, 92, 246, 0.1);
}

.result-type {
    font-size: 0.8rem;
    color: var(--phoenix-cyan);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.result-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.no-results {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(26, 31, 58, 0.6);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--phoenix-purple);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
    user-select: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--phoenix-purple);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   TESTIMONIALS CAROUSEL
   ============================================ */
.testimonials-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.testimonial-item {
    display: none;
    text-align: center;
    padding: 2rem;
    background: rgba(26, 31, 58, 0.6);
    border: 2px solid var(--border-color);
    border-radius: 1rem;
}

.testimonial-item.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.testimonial-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.testimonial-author {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.testimonial-role {
    color: var(--phoenix-cyan);
    font-size: 0.9rem;
}

.carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.carousel-prev,
.carousel-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid var(--phoenix-purple);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: var(--phoenix-purple);
    transform: scale(1.1);
}

.carousel-dots {
    display: flex;
    gap: 0.5rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--phoenix-purple);
    width: 30px;
    border-radius: 5px;
}

/* ============================================
   MICRO-INTERACTIONS
   ============================================ */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Card Flip Animation */
.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--phoenix-purple);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.1s ease;
    mix-blend-mode: difference;
}

.custom-cursor.hover {
    width: 40px;
    height: 40px;
    background: rgba(139, 92, 246, 0.2);
}

/* ============================================
   PARALLAX SECTIONS
   ============================================ */
.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 200%;
    background-size: cover;
    background-position: center;
    transition: transform 0.1s ease-out;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .theme-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }
    
    .search-modal-content {
        width: 95%;
    }
    
    .testimonials-carousel {
        padding: 1rem;
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
}

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

/* Focus styles for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--phoenix-purple);
    outline-offset: 2px;
}

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