/* PROFESSIONAL ANIMATIONS FOR MICRON WEBSITE - DIRECT IMPLEMENTATION */

/* ========== 1. HEADER ANIMATIONS ========== */
/* Navbar fade-in and subtle drop */
header {
    animation: headerFadeIn 0.8s ease forwards;
}

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

/* Header nav links animation */
.header_nav ul li {
    opacity: 0;
    animation: fadeInNav 0.5s ease forwards;
}

.header_nav ul li:nth-child(1) { animation-delay: 0.1s; }
.header_nav ul li:nth-child(2) { animation-delay: 0.2s; }
.header_nav ul li:nth-child(3) { animation-delay: 0.3s; }
.header_nav ul li:nth-child(4) { animation-delay: 0.4s; }
.header_nav ul li:nth-child(5) { animation-delay: 0.5s; }
.header_nav ul li:nth-child(6) { animation-delay: 0.6s; }

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

/* ========== 2. SECTION HEADING ANIMATIONS ========== */
/* Animated line before headings */
.micron_heading .head_line {
    width: 0;
    animation: lineExpand 0.8s ease-out 0.2s forwards;
}

@keyframes lineExpand {
    from { width: 0; }
    to { width: 100%; }
}

/* Text reveal for section headings */
.micron_heading h2 {
    opacity: 0;
    transform: translateY(20px);
    animation: headingReveal 0.8s ease-out 0.4s forwards;
}

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

/* Enhanced gradient animation for heading spans */
.micron_heading h2 span {
    background: linear-gradient(90deg,         #FF0080, #FF8C00, #FFD700, #00FF80, #8A2BE2, #FF0080);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 4s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

/* ========== 3. BOX ANIMATIONS ========== */
/* Product box hover effects - Enhanced & Professional */
.ssd_box, .crucial_box, .video_box, .dram_row {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease;
}

.ssd_box:hover, 
.crucial_box:hover, 
.video_box:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 
                0 5px 15px rgba(68, 15, 222, 0.2);
}

/* Add blue highlight glow on hover */
.ssd_box:hover::after, 
.crucial_box:hover::after, 
.video_box:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    box-shadow: 0 0 0 2px rgba(0, 104, 255, 0.5);
    pointer-events: none;
    animation: glowPulse 2s infinite;
}

@keyframes glowPulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* ========== 4. BUTTON ANIMATIONS ========== */
/* Professional CTA button hover effect */
a.cta_main {
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

a.cta_main::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
                rgba(255,255,255,0.1), 
                rgba(255,255,255,0.2), 
                rgba(255,255,255,0.1));
    transition: all 0.6s ease;
    z-index: 1;
}

a.cta_main:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(0, 104, 255, 0.3);
}

a.cta_main:hover::before {
    left: 100%;
}

/* Shop now arrow animation */
a.read_more .ssd_bt_icon {
    transition: all 0.3s ease;
}

/* ========== 5. IMAGE ANIMATIONS ========== */
/* Subtle float effect for product images */
.crucial_image img, .dram_image img {
    transition: transform 3s ease-in-out;
    animation: floatEffect 6s ease-in-out infinite;
}

@keyframes floatEffect {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

/* ========== 6. PAGE LOAD ANIMATIONS ========== */
/* Staggered fade-in for grid items */
.ssd_grid ul li,
.crucial_grid ul li,
.videos_grid .video_box {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

/* Stagger the animations */
.ssd_grid ul li:nth-child(1),
.crucial_grid ul li:nth-child(1),
.videos_grid .video_box:nth-child(1) {
    animation-delay: 0.1s;
}

.ssd_grid ul li:nth-child(2),
.crucial_grid ul li:nth-child(2),
.videos_grid .video_box:nth-child(2) {
    animation-delay: 0.2s;
}

.ssd_grid ul li:nth-child(3),
.videos_grid .video_box:nth-child(3) {
    animation-delay: 0.3s;
}

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

/* ========== 7. ICON & TEXT EFFECTS ========== */
/* Tag hover effect */
.crucial_tags ul li, 
.dram_tags ul li {
    transition: all 0.3s ease;
}

.crucial_tags ul li:hover, 
.dram_tags ul li:hover {
    transform: translateY(-2px);
    background: rgba(0, 104, 255, 0.5);
}

/* Price highlight on hover */
.price {
    transition: all 0.3s ease;
}

.crucial_price:hover .price, 
.dram_price:hover .price {
    color: #0068FF;
    text-shadow: 0 0 10px rgba(0, 104, 255, 0.4);
}

/* ========== 8. PERFORMANCE OPTIMIZATIONS ========== */
/* Use will-change for hardware acceleration on important elements */
.ssd_box, 
.crucial_box, 
.video_box, 
.micron_heading h2, 
a.cta_main {
    will-change: transform;
}

/* Respect user preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}


/* CSS for the scroll animation */
section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

section.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Add a subtle fade-in to the page */
body {
    animation: pageFadeIn 0.8s ease;
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* ========== ADD THIS TO YOUR animations.css FILE ========== */

/* Section Divider - Only after hero */
.hero-divider {
    height: 4px;
    background: linear-gradient(90deg, 
        #FF0080, #FF8C00, #FFD700, #00FF80, 
        #00BFFF, #8A2BE2, #FF0080);
    background-size: 400% 100%;
    animation: colorFlow 8s linear infinite;
    opacity: 0.9;
    position: relative;
    overflow: hidden;
}

.hero-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 3s infinite;
}

@keyframes colorFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}