/* EthicsComputer Custom Styles */

/* Sticky Navbar Styles */
#main-navbar {
    transition: all 0.3s ease-in-out;
}

#main-navbar.bg-dark-900\/95 {
    background-color: rgba(15, 23, 42, 0.95) !important;
}

/* Custom cursor styles */
#custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.5);
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.2s ease, background 0.2s ease;
    transform: translate(-50%, -50%);
}

#custom-cursor-ring {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
    transform: translate(-50%, -50%);
}

#custom-cursor-ring.hover {
    width: 60px;
    height: 60px;
    border-color: rgba(20, 184, 166, 0.8);
}

/* Particle canvas */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Custom animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.5); }
    50% { box-shadow: 0 0 40px rgba(20, 184, 166, 0.8); }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Service card hover effect */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
}

/* Flip card for case studies - Enhanced & Fixed */
.flip-card {
    perspective: 1500px;
    height: 300px;
    min-height: 300px;
    width: 100%;
    position: relative;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    transform-origin: center center;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, 
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    border-radius: 1.5rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.flip-card-front {
    transform: rotateY(0deg);
    z-index: 2;
}

.flip-card-back {
    transform: rotateY(180deg);
    z-index: 1;
    justify-content: flex-start;
    padding-top: 2.5rem;
}

/* Front card content styling */
.flip-card-front .text-5xl {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.flip-card-front h3 {
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.flip-card-front p {
    line-height: 1.6;
    flex-grow: 0;
}

/* Back card content styling */
.flip-card-back h4 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.flip-card-back ul {
    flex-grow: 1;
}

/* Hover effects */
.flip-card:hover {
    z-index: 10;
}

/* Grid layout fix for success stories */
#success-stories .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: stretch;
}

/* Mobile responsive for flip cards */
@media (max-width: 768px) {
    .flip-card {
        height: 400px;
        min-height: 400px;
    }
    
    .flip-card-front,
    .flip-card-back {
        padding: 1.5rem;
    }
    
    .flip-card-front h3 {
        font-size: 1.125rem;
    }
    
    .flip-card-front p {
        font-size: 0.875rem;
    }
    
    /* Touch devices - tap to flip */
    .flip-card:active .flip-card-inner {
        transform: rotateY(180deg);
    }
    
    #success-stories .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Tablet responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .flip-card {
        height: 420px;
        min-height: 420px;
    }
    
    #success-stories .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem;
    }
}

/* Progress bar */
.progress-bar {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #14b8a6);
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* Sticky CTA rail */
.sticky-cta-rail {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b82f6, #14b8a6);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563eb, #0d9488);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6, #14b8a6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass morphism */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .sticky-cta-rail {
        right: 10px;
        gap: 0.5rem;
    }
    
    #custom-cursor,
    #custom-cursor-ring {
        display: none;
    }
}

/* FAQ Accordion Styles */
[data-faq-item] {
    transition: all 0.3s ease;
}

[data-faq-item].active {
    background: rgba(255, 255, 255, 0.03);
}

[data-faq-question] {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

[data-faq-question]:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-faq-answer] {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

[data-faq-icon] {
    transition: transform 0.3s ease;
}

[data-faq-icon].rotate-180 {
    transform: rotate(180deg);
}

/* Pulse Glow Animation */
.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(34, 197, 94, 0.8);
    }
}

/* Training Cards Glow Effect */
.training-card-glow {
    position: absolute;
    inset: -2px;
    border-radius: 1rem;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    z-index: -1;
    filter: blur(20px);
}

.group:hover .training-card-glow {
    opacity: 0.7;
}

/* Individual card glow colors */
.training-card-glow.blue-glow {
    background: linear-gradient(to right, #3b82f6, #60a5fa);
}

.training-card-glow.teal-glow {
    background: linear-gradient(to right, #14b8a6, #5eead4);
}

.training-card-glow.purple-glow {
    background: linear-gradient(to right, #a855f7, #c084fc);
}

/* Course Tabs */
.course-tab {
    background: rgba(255, 255, 255, 0.05);
    color: #9ca3af;
    border: 1px solid transparent;
}

.course-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.course-tab.active {
    background: linear-gradient(to right, #6366f1, #a855f7);
    color: #fff;
    border-color: #6366f1;
}

/* Course Cards */
.course-card {
    opacity: 1;
    transition: all 0.3s ease;
}

.course-card.hidden {
    display: none;
}

/* Print styles */
@media print {
    #particle-canvas,
    .sticky-cta-rail,
    #custom-cursor,
    #custom-cursor-ring {
        display: none;
    }
}

