/**
 * Dasha Calculator Landing Page - CSS Animations & Styles
 * Phase 3: Static Assets for the Dasha Landing Page
 */

/* ===== CSS Custom Properties ===== */
:root {
    /* Primary Palette */
    --indigo-deep: #4b0082;
    --indigo-light: #9370db;
    --gold-primary: #ffd700;
    --gold-dark: #d4af37;
    --gold-light: #ffed4e;

    /* Background Gradients */
    --hero-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    --card-gradient: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    --cta-gradient: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #d4af37 100%);

    /* Planet Colors */
    --sun-color: #FF9500;
    --moon-color: #E8E8E8;
    --mars-color: #DC3545;
    --mercury-color: #28A745;
    --jupiter-color: #FFC107;
    --venus-color: #E91E8C;
    --saturn-color: #1E3A5F;
    --rahu-color: #6C757D;
    --ketu-color: #8B4513;
}

/* ===== Dasha Wheel Rotation Animation ===== */
.dasha-wheel {
    animation: slow-rotate 120s linear infinite;
}

.dasha-wheel:hover {
    animation-play-state: paused;
}

@keyframes slow-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===== Progress Bar Fill Animation ===== */
.progress-fill {
    animation: fill-bar 1.5s ease-out forwards;
    transform-origin: left;
    transform: scaleX(0);
}

.progress-fill.animate {
    transform: scaleX(var(--fill-percent, 0.5));
}

@keyframes fill-bar {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(var(--fill-percent, 0.5));
    }
}

/* Progress bar container */
.dasha-progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.dasha-progress-bar .progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--planet-color, var(--indigo-deep)) 0%, var(--gold-primary) 100%);
}

/* ===== CTA Button Pulse Animation ===== */
.cta-pulse {
    animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(255, 215, 0, 0);
    }
}

/* Enhanced CTA button with pulse */
.main-cta-btn.cta-pulse:hover {
    animation: none;
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4);
}

/* ===== Planet Icon Hover Effects ===== */
.planet-icon {
    transition: all 0.3s ease;
    cursor: pointer;
}

.planet-icon:hover {
    transform: scale(1.1);
}

/* Planet-specific hover glow effects */
.planet-icon.sun:hover {
    filter: drop-shadow(0 0 8px var(--sun-color));
}

.planet-icon.moon:hover {
    filter: drop-shadow(0 0 8px var(--moon-color));
}

.planet-icon.mars:hover {
    filter: drop-shadow(0 0 8px var(--mars-color));
}

.planet-icon.mercury:hover {
    filter: drop-shadow(0 0 8px var(--mercury-color));
}

.planet-icon.jupiter:hover {
    filter: drop-shadow(0 0 8px var(--jupiter-color));
}

.planet-icon.venus:hover {
    filter: drop-shadow(0 0 8px var(--venus-color));
}

.planet-icon.saturn:hover {
    filter: drop-shadow(0 0 8px var(--saturn-color));
}

.planet-icon.rahu:hover {
    filter: drop-shadow(0 0 8px var(--rahu-color));
}

.planet-icon.ketu:hover {
    filter: drop-shadow(0 0 8px var(--ketu-color));
}

/* ===== Hero Background Styles ===== */
.dasha-hero-bg {
    background-image: url('../images/backgrounds/dasha-hero-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.dasha-hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.85) 0%, rgba(22, 33, 62, 0.75) 50%, rgba(15, 15, 35, 0.9) 100%);
    pointer-events: none;
}

.dasha-hero-bg > * {
    position: relative;
    z-index: 1;
}

/* ===== Dasha Wheel Container ===== */
.dasha-wheel-container {
    position: absolute;
    right: -10%;
    top: 50%;
    transform: translateY(-50%);
    width: 500px;
    height: 500px;
    opacity: 0.6;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .dasha-wheel-container {
        width: 350px;
        height: 350px;
        right: -15%;
    }
}

@media (max-width: 768px) {
    .dasha-wheel-container {
        display: none;
    }
}

/* ===== Dasha Level Card Animations ===== */
.dasha-level-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dasha-level-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(75, 0, 130, 0.2);
}

/* Card icon bounce on hover */
.dasha-level-card:hover .card-icon {
    animation: icon-bounce 0.5s ease;
}

@keyframes icon-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* ===== Planet Table Row Hover ===== */
.planet-row {
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.planet-row:hover {
    background-color: rgba(75, 0, 130, 0.05);
    border-left-color: var(--planet-color, var(--indigo-deep));
    box-shadow: 0 2px 8px rgba(75, 0, 130, 0.1);
}

/* Planet-specific border colors */
.planet-row.sun { --planet-color: var(--sun-color); }
.planet-row.moon { --planet-color: var(--moon-color); }
.planet-row.mars { --planet-color: var(--mars-color); }
.planet-row.mercury { --planet-color: var(--mercury-color); }
.planet-row.jupiter { --planet-color: var(--jupiter-color); }
.planet-row.venus { --planet-color: var(--venus-color); }
.planet-row.saturn { --planet-color: var(--saturn-color); }
.planet-row.rahu { --planet-color: var(--rahu-color); }
.planet-row.ketu { --planet-color: var(--ketu-color); }

/* ===== FAQ Accordion Animations ===== */
.faq-question {
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.faq-question:hover {
    border-left-color: var(--gold-primary);
    background-color: rgba(248, 249, 250, 0.8);
}

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

.faq-item.active .faq-answer {
    max-height: 500px;
    opacity: 1;
    padding: 16px 20px;
}

.faq-toggle {
    transition: transform 0.3s ease;
}

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

/* ===== Premium CTA Section ===== */
.premium-cta-section {
    position: relative;
    overflow: hidden;
}

.premium-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/backgrounds/dasha-hero-bg.webp') center/cover no-repeat;
    opacity: 0.1;
    pointer-events: none;
}

.premium-cta-section > * {
    position: relative;
    z-index: 1;
}

/* Premium report mockup styling */
.premium-mockup {
    transform: perspective(1000px) rotateY(-5deg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.premium-mockup:hover {
    transform: perspective(1000px) rotateY(-2deg) scale(1.02);
}

/* ===== Transition Timeline Animations ===== */
.transition-timeline {
    position: relative;
}

.transition-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--indigo-deep);
}

.transition-item {
    opacity: 0;
    transform: translateX(-20px);
    animation: fade-in-right 0.5s ease forwards;
}

.transition-item:nth-child(1) { animation-delay: 0.1s; }
.transition-item:nth-child(2) { animation-delay: 0.2s; }
.transition-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes fade-in-right {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Timeline date marker */
.transition-date-marker {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--indigo-deep);
    border: 2px solid white;
}

/* ===== Scroll-Triggered Animations ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .cta-pulse {
        animation: pulse-mobile 2s ease-in-out infinite;
    }

    @keyframes pulse-mobile {
        0%, 100% {
            box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.3);
        }
        50% {
            box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
        }
    }

    .premium-mockup {
        transform: none;
    }

    .premium-mockup:hover {
        transform: scale(1.02);
    }
}

/* ===== Trust Badge Animations ===== */
.trust-badge {
    transition: transform 0.2s ease;
}

.trust-badge:hover {
    transform: scale(1.05);
}

/* ===== Loading States ===== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

/* ===== Print Styles ===== */
@media print {
    .dasha-wheel,
    .cta-pulse,
    .animate-on-scroll {
        animation: none !important;
    }

    .premium-cta-section,
    .main-cta-btn {
        display: none !important;
    }
}
