/* Enhanced Landing Page Styles - Add to your existing CSS */

/* ================================
   Hero Section Enhancements
   ================================ */

.hero-image-container {
    position: relative;
    transition: transform 0.3s ease;
}

.hero-image-container:hover {
    transform: scale(1.02);
}

.hero-image-container img {
    filter: brightness(0.9);
}

/* Floating code snippet in hero */
.hero .code-preview {
    animation: float 3s ease-in-out infinite;
}

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

/* ================================
   Format Comparison Section
   ================================ */

.format-comparison {
    position: relative;
    overflow: hidden;
}

.comparison-container {
    position: relative;
}

.comparison-image {
    transition: transform 0.3s ease;
}

.comparison-image:hover {
    transform: scale(1.02);
}

/* Animated pulse effect for the arrow */
@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

/* ================================
   Feature Cards Enhancements
   ================================ */

.feature-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card .feature-icon {
    transition: transform 0.3s ease;
    display: inline-block;
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(5deg);
}

/* ================================
   Mobile Writing Section
   ================================ */

.mobile-writing {
    position: relative;
}

.mobile-mockup {
    position: relative;
}

.mobile-mockup img {
    transition: transform 0.3s ease;
}

.mobile-mockup:hover img {
    transform: scale(1.05);
}

/* Icon containers in mobile section */
.mobile-writing .flex-shrink-0 > div {
    transition: all 0.3s ease;
}

.mobile-writing .flex:hover .flex-shrink-0 > div {
    transform: scale(1.1);
    box-shadow: 0 0 20px currentColor;
}

/* ================================
   Advantages Section Enhancement
   ================================ */

.advantage-item {
    transition: all 0.3s ease;
}

.advantage-item:hover {
    transform: translateX(10px);
}

.advantage-number {
    transition: all 0.3s ease;
}

.advantage-item:hover .advantage-number {
    transform: scale(1.2);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

/* ================================
   CTA Section Enhancement
   ================================ */

.cta-section {
    position: relative;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.cta-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

/* ================================
   Responsive Adjustments
   ================================ */

@media (max-width: 768px) {
    .hero .code-preview {
        position: static;
        margin-top: 2rem;
    }
    
    .comparison-container .absolute {
        display: none;
    }
    
    .mobile-mockup .absolute {
        display: none;
    }
}

/* ================================
   Loading Animation for Images
   ================================ */

img {
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Prevent layout shift while images load */
.hero-image-container,
.comparison-image,
.mobile-mockup {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.1));
}

/* ================================
   Accessibility Improvements
   ================================ */

.feature-card:focus-within,
.advantage-item:focus-within {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

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