/* ===================================================
   SLIDE-OUT PANELS & DRAWER COMPONENTS
   Enhanced interactive slide-out panels with animations
   ================================================== */

:root {
    --panel-width: 400px;
    --panel-width-mobile: 85vw;
    --panel-transition: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================================
   SLIDE-OUT PANEL SYSTEM
   ================================================== */

.slide-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: var(--panel-width);
    height: 100vh;
    background: white;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    z-index: 1500;
    transition: right 0.4s var(--panel-transition);
    overflow-y: auto;
    will-change: right;
}

.slide-panel.open {
    right: 0;
}

.slide-panel.left {
    right: auto;
    left: -100%;
}

.slide-panel.left.open {
    left: 0;
}

.slide-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, rgba(142, 68, 173, 0.05) 0%, rgba(52, 152, 219, 0.05) 100%);
    position: sticky;
    top: 0;
    z-index: 100;
}

.slide-panel-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.slide-panel-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #8e44ad;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.slide-panel-close:hover {
    background: rgba(142, 68, 173, 0.1);
    transform: rotate(90deg);
}

.slide-panel-content {
    padding: 2rem;
}

.slide-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 1400;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--panel-transition);
}

.slide-panel-overlay.active {
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
    visibility: visible;
    backdrop-filter: blur(4px);
}

/* ===================================================
   DRAWER PANELS WITH DIFFERENT POSITIONS
   ================================================== */

.drawer-top {
    position: fixed;
    top: -100%;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    max-height: 60vh;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1500;
    transition: top 0.4s var(--panel-transition);
    overflow-y: auto;
}

.drawer-top.open {
    top: 80px;
}

.drawer-bottom {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    max-height: 60vh;
    background: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1500;
    transition: bottom 0.4s var(--panel-transition);
    overflow-y: auto;
}

.drawer-bottom.open {
    bottom: 0;
}

.drawer-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 1rem auto;
}

/* ===================================================
   MODAL SLIDE-IN EFFECT
   ================================================== */

.modal-slide {
    --modal-slide-from: right;
}

.modal-slide.from-left {
    --modal-slide-from: left;
}

.modal-slide.from-top {
    --modal-slide-from: top;
}

.modal-slide.from-bottom {
    --modal-slide-from: bottom;
}

.modal-slide .modal-dialog {
    animation: slideInModal 0.4s var(--panel-transition);
}

@keyframes slideInModal {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.modal-slide.from-left .modal-dialog {
    animation: slideInModalLeft 0.4s var(--panel-transition);
}

@keyframes slideInModalLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===================================================
   EXPANDED HERO SECTION FEATURES
   ================================================== */

.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-background-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 50%, #eff2f5 100%);
}

.hero-floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 0;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.05;
    animation: float 8s ease-in-out infinite;
}

.floating-shape.shape-1 {
    width: 200px;
    height: 200px;
    background: #8e44ad;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.floating-shape.shape-2 {
    width: 300px;
    height: 300px;
    background: #3498db;
    top: 50%;
    right: 5%;
    animation-delay: 2s;
    animation-direction: reverse;
}

.floating-shape.shape-3 {
    width: 150px;
    height: 150px;
    background: #d4af37;
    bottom: 10%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(30px);
    }
}

/* ===================================================
   STICKY ELEMENTS WITH PARALLAX
   ================================================== */

.sticky-element {
    position: sticky;
    top: 100px;
    z-index: 10;
}

/* ===================================================
   SCROLL REVEAL ANIMATIONS
   ================================================== */

.reveal {
    opacity: 0;
    transform: translateY(20px);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* ===================================================
   ENHANCED HOVER EFFECTS
   ================================================== */

.interactive-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: all 0.3s ease-out;
}

.interactive-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transition: left 0.5s ease-out;
    z-index: 1;
    pointer-events: none;
}

.interactive-card:hover::before {
    left: 100%;
}

/* ===================================================
   STAGGERED ANIMATIONS
   ================================================== */

.stagger-container > * {
    opacity: 0;
    animation: slideInUp 0.6s ease-out forwards;
}

.stagger-container > :nth-child(1) { animation-delay: 0.1s; }
.stagger-container > :nth-child(2) { animation-delay: 0.2s; }
.stagger-container > :nth-child(3) { animation-delay: 0.3s; }
.stagger-container > :nth-child(4) { animation-delay: 0.4s; }
.stagger-container > :nth-child(5) { animation-delay: 0.5s; }

/* ===================================================
   GRADIENT ANIMATIONS
   ================================================== */

.gradient-animate {
    background: linear-gradient(
        -45deg,
        #8e44ad,
        #3498db,
        #8e44ad
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===================================================
   BLUR & BACKDROP EFFECTS
   ================================================== */

.blur-in {
    animation: blurIn 0.8s ease-out;
}

@keyframes blurIn {
    from {
        filter: blur(10px);
        opacity: 0;
    }
    to {
        filter: blur(0px);
        opacity: 1;
    }
}

/* ===================================================
   PULSE & GLOW EFFECTS
   ================================================== */

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(142, 68, 173, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(142, 68, 173, 0.8);
    }
}

/* ===================================================
   EXPAND & COLLAPSE ANIMATIONS
   ================================================== */

.expandable {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.expandable.open {
    max-height: 1000px;
    transition: max-height 0.4s ease-in;
}

/* ===================================================
   RESPONSIVE ADJUSTMENTS
   ================================================== */

@media (max-width: 768px) {
    :root {
        --panel-width: 85vw;
    }

    .slide-panel {
        width: var(--panel-width-mobile);
    }

    .drawer-top.open {
        top: 70px;
    }

    .slide-panel-header {
        padding: 1rem;
    }

    .slide-panel-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .slide-panel {
        width: 100vw;
    }

    .floating-shape {
        opacity: 0.02;
    }
}

/* ===================================================
   DARK MODE SUPPORT
   ================================================== */

@media (prefers-color-scheme: dark) {
    .slide-panel,
    .drawer-top,
    .drawer-bottom {
        background: #1a1a1a;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }

    .slide-panel-header {
        background: rgba(142, 68, 173, 0.1);
        border-bottom-color: #333;
    }

    .slide-panel-title {
        color: #fff;
    }
}

/* ===================================================
   ACCESSIBILITY ENHANCEMENTS
   ================================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================================
   PERFORMANCE OPTIMIZATIONS
   ================================================== */

.slide-panel,
.drawer-top,
.drawer-bottom {
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.floating-shape {
    will-change: transform;
    transform: translate3d(0, 0, 0);
}
