/* ========== ANIMATIONS ========== */

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse Animation for CTA buttons */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(233, 69, 96, 0.6);
    }
    100% {
        box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(201, 169, 110, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(201, 169, 110, 0.6);
    }
}

/* ========== ANIMATED ELEMENTS ========== */

/* Cards animate in on scroll */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for grid items */
.posts-grid [data-animate]:nth-child(1) { transition-delay: 0.1s; }
.posts-grid [data-animate]:nth-child(2) { transition-delay: 0.2s; }
.posts-grid [data-animate]:nth-child(3) { transition-delay: 0.3s; }
.posts-grid [data-animate]:nth-child(4) { transition-delay: 0.4s; }
.posts-grid [data-animate]:nth-child(5) { transition-delay: 0.5s; }
.posts-grid [data-animate]:nth-child(6) { transition-delay: 0.6s; }

.features-grid [data-animate]:nth-child(1) { transition-delay: 0.1s; }
.features-grid [data-animate]:nth-child(2) { transition-delay: 0.2s; }
.features-grid [data-animate]:nth-child(3) { transition-delay: 0.3s; }

.testimonials-grid [data-animate]:nth-child(1) { transition-delay: 0.1s; }
.testimonials-grid [data-animate]:nth-child(2) { transition-delay: 0.2s; }
.testimonials-grid [data-animate]:nth-child(3) { transition-delay: 0.3s; }

/* CTA Button Pulse */
.btn-cta {
    animation: pulse 2s infinite;
}

.btn-cta:hover {
    animation: none;
}

/* Hero Title Glow */
.hero-content h1 {
    animation: glow 3s ease-in-out infinite;
}

/* ========== NAVBAR SCROLL EFFECT ========== */
.site-header.scrolled {
    padding: 0;
    background: rgba(13, 13, 13, 0.99) !important;
    border-bottom-color: rgba(201, 169, 110, 0.2);
}

.site-header.scrolled .navbar {
    padding: 10px 20px;
}

/* ========== TESTIMONIAL ENHANCEMENTS ========== */
.testimonial-card {
    position: relative;
    overflow: hidden;
}

.testimonial-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-red));
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

.testimonial-card:hover::after {
    transform: scaleX(1);
}

/* ========== CARD HOVER ENHANCEMENTS ========== */
.post-card {
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(233, 69, 96, 0.03), transparent);
    transition: left 0.5s ease;
    z-index: 1;
    pointer-events: none;
}

.post-card:hover::before {
    left: 100%;
}

/* ========== MOBILE MENU OVERLAY ========== */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========== LOADING SPINNER ========== */
.loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(201, 169, 110, 0.2);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== BACK TO TOP ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--gradient-btn);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    border: none;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.5);
}

/* ========== SELECTION STYLE ========== */
::selection {
    background: var(--accent-red);
    color: white;
}

::-moz-selection {
    background: var(--accent-red);
    color: white;
}
