/**
 * Enhanced Homepage Styles
 * Modern 2025 aesthetics with animations and micro-interactions
 *
 * @package GeneratePress_Child_YAWC
 * @since 1.1.1
 */

/* ====================
   Animated Gradient Hero Section
   ==================== */

.yawc-hero-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 5rem 2rem;
}

/* Animated gradient background */
.yawc-hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: 1;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Particle canvas */
.yawc-hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0.6;
}

/* Glassmorphism overlay */
.yawc-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 900px;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: heroFadeIn 1s ease-out;
}

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

.yawc-hero-title {
    font-size: 4rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.yawc-hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1rem;
    font-weight: 600;
}

.yawc-hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero CTA Buttons */
.yawc-hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.yawc-hero-btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.yawc-hero-btn-primary {
    background: #ffffff;
    color: #667eea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.yawc-hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
    color: #667eea;
}

.yawc-hero-btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
}

.yawc-hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    color: #ffffff;
}

/* Floating code snippets animation */
.yawc-hero-code-snippet {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    animation: floatCode 20s linear infinite;
    z-index: 2;
}

.yawc-hero-code-snippet:nth-child(1) {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.yawc-hero-code-snippet:nth-child(2) {
    top: 30%;
    right: 10%;
    animation-delay: 5s;
}

.yawc-hero-code-snippet:nth-child(3) {
    bottom: 20%;
    left: 10%;
    animation-delay: 10s;
}

.yawc-hero-code-snippet:nth-child(4) {
    bottom: 10%;
    right: 5%;
    animation-delay: 15s;
}

@keyframes floatCode {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10%, 90% {
        opacity: 1;
    }
    50% {
        transform: translateY(-30px) rotate(5deg);
    }
}

/* ====================
   Enhanced Content Cards
   ==================== */

.yawc-tool-feature-card,
.yawc-latest-card {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Shine effect on hover */
.yawc-tool-feature-card::before,
.yawc-latest-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s;
    z-index: 1;
}

.yawc-tool-feature-card:hover::before,
.yawc-latest-card:hover::before {
    left: 100%;
}

/* Enhanced hover states */
.yawc-tool-feature-card:hover,
.yawc-latest-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

/* Icon pulse animation */
.yawc-tool-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.yawc-tool-feature-card:hover .yawc-tool-icon {
    animation: iconPulse 0.6s ease;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Progressive reveal animation */
.yawc-tool-feature-card,
.yawc-latest-card {
    opacity: 0;
    transform: translateY(30px);
    animation: revealCard 0.6s ease-out forwards;
}

.yawc-tool-feature-card:nth-child(1) { animation-delay: 0.1s; }
.yawc-tool-feature-card:nth-child(2) { animation-delay: 0.2s; }
.yawc-tool-feature-card:nth-child(3) { animation-delay: 0.3s; }
.yawc-tool-feature-card:nth-child(4) { animation-delay: 0.4s; }
.yawc-tool-feature-card:nth-child(5) { animation-delay: 0.5s; }
.yawc-tool-feature-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes revealCard {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================
   Enhanced Stats Counter
   ==================== */

.yawc-stat-number {
    position: relative;
    display: inline-block;
}

.yawc-stat-number::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.yawc-stat-card:hover .yawc-stat-number::after {
    transform: translateX(-50%) scaleX(1);
}

/* ====================
   Scroll Progress Indicator
   ==================== */

.yawc-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(102, 126, 234, 0.2);
    z-index: 9999;
}

.yawc-scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* ====================
   Enhanced Typography
   ==================== */

/* Better reading flow */
.entry-content p {
    margin-bottom: 1.5em;
    line-height: 1.8;
}

/* Pull quotes */
.entry-content blockquote {
    position: relative;
    padding: 2rem;
    margin: 2rem 0;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-left: 5px solid #667eea;
    border-radius: 8px;
    font-size: 1.2rem;
    font-style: italic;
    color: #2c2c2c;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.entry-content blockquote::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 4rem;
    color: #667eea;
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

/* Enhanced headings */
.entry-content h2,
.entry-content h3 {
    position: relative;
    padding-left: 1.5rem;
}

.entry-content h2::before,
.entry-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* ====================
   Code Blocks Enhancement
   ==================== */

.entry-content pre[class*="language-"] {
    position: relative;
    margin: 2rem 0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Copy button for code blocks */
.yawc-code-block-wrapper {
    position: relative;
}

.yawc-copy-code-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.yawc-copy-code-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.yawc-copy-code-btn.copied {
    background: #48bb78;
    border-color: #48bb78;
}

/* ====================
   Smooth Page Load Animation
   ==================== */

body.page-loaded {
    animation: pageLoadFade 0.6s ease-out;
}

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

/* ====================
   Responsive Design
   ==================== */

@media (max-width: 768px) {
    .yawc-hero-title {
        font-size: 2.5rem;
    }

    .yawc-hero-subtitle {
        font-size: 1.2rem;
    }

    .yawc-hero-description {
        font-size: 1rem;
    }

    .yawc-hero-content {
        padding: 2rem;
    }

    .yawc-hero-cta {
        flex-direction: column;
    }

    .yawc-hero-btn {
        width: 100%;
        text-align: center;
    }

    .yawc-hero-code-snippet {
        display: none; /* Hide floating code on mobile */
    }
}

/* ====================
   Dark Mode Enhancements
   ==================== */

[data-theme="dark"] .yawc-hero-content {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .entry-content blockquote {
    background: rgba(102, 126, 234, 0.1);
    color: #e0e0e0;
}

[data-theme="dark"] .yawc-tool-feature-card,
[data-theme="dark"] .yawc-latest-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .yawc-tool-feature-card:hover,
[data-theme="dark"] .yawc-latest-card:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

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

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .yawc-hero-gradient {
        animation: none;
        background-position: 0% 50%;
    }
}

/* Focus states for keyboard navigation */
.yawc-hero-btn:focus,
.yawc-tool-link:focus,
.yawc-copy-code-btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 3px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .yawc-hero-content {
        border: 2px solid #ffffff;
    }

    .yawc-tool-feature-card,
    .yawc-latest-card {
        border: 2px solid currentColor;
    }
}
