/* ===== PRESTON PUBLISHERS ANIMATIONS ===== */
/* Clean animations without layout interference */

/* ===== KEYFRAME ANIMATIONS ===== */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(250, 109, 30, 0.5); }
    50% { box-shadow: 0 0 20px rgba(250, 109, 30, 0.8); }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes progress {
    from { width: 0%; }
    to { width: 100%; }
}

/* ===== ENHANCED PAGE LOADER ===== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: all 0.8s ease-out;
    overflow: hidden;
}

/* Animated background pattern */
.page-loader::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(250, 109, 30, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(250, 109, 30, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: backgroundPulse 4s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.loader-logo {
    width: 150px;
    height: 150px;
    margin-bottom: 30px;
    animation: logoFloat 3s ease-in-out infinite, logoGlow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 25px rgba(250, 109, 30, 0.4));
    position: relative;
    z-index: 2;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    box-shadow: 
        0 0 30px rgba(250, 109, 30, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    /* Ensure proper image display */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: optimize-contrast;
    /* Prevent image distortion */
    max-width: 150px;
    max-height: 150px;
    /* Center the image within its container */
    display: block;
    margin-left: auto;
    margin-right: auto;
}

@keyframes logoFloat {
    0%, 100% { 
        transform: translateY(0px) scale(1); 
    }
    50% { 
        transform: translateY(-10px) scale(1.05); 
    }
}

@keyframes logoGlow {
    0%, 100% { 
        filter: drop-shadow(0 0 25px rgba(250, 109, 30, 0.4)) brightness(1) contrast(1.1);
        box-shadow: 
            0 0 30px rgba(250, 109, 30, 0.3),
            inset 0 0 20px rgba(255, 255, 255, 0.1);
    }
    50% { 
        filter: drop-shadow(0 0 35px rgba(250, 109, 30, 0.7)) brightness(1.2) contrast(1.2);
        box-shadow: 
            0 0 40px rgba(250, 109, 30, 0.5),
            inset 0 0 25px rgba(255, 255, 255, 0.15);
    }
}

.loader-text {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(250, 109, 30, 0.5);
    animation: textFade 2s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes textFade {
    0%, 100% { 
        opacity: 0.8; 
        transform: scale(1);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.02);
    }
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #FA6D1E;
    border-right: 3px solid rgba(250, 109, 30, 0.5);
    border-radius: 50%;
    animation: spinnerRotate 1s linear infinite, spinnerPulse 2s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes spinnerRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spinnerPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 10px rgba(250, 109, 30, 0.3);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 0 20px rgba(250, 109, 30, 0.6);
    }
}

/* Loading progress bar */
.loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FA6D1E, #ff8c42, #FA6D1E);
    border-radius: 2px;
    animation: progressLoad 3s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(250, 109, 30, 0.5);
}

@keyframes progressLoad {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Loading dots */
.loading-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    position: relative;
    z-index: 2;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background: #FA6D1E;
    border-radius: 50%;
    margin: 0 4px;
    animation: dotBounce 1.4s ease-in-out infinite both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dot:nth-child(3) { animation-delay: 0s; }

@keyframes dotBounce {
    0%, 80%, 100% { 
        transform: scale(0);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
}

/* ===== SMOOTH PAGE TRANSITIONS ===== */
body {
    opacity: 1;
    transition: none;
}

body.loaded {
    opacity: 1;
}

/* ===== ANIMATION CLASSES ===== */
.pulse-animation {
    animation: pulse 2s infinite;
}

.pulse-glow {
    animation: pulse 2s infinite, glow 2s infinite;
}

.floating-image {
    animation: float 3s ease-in-out infinite;
}

.floating-image-slow {
    animation: floatSlow 4s ease-in-out infinite;
}

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

.shake-animation {
    animation: shake 0.5s ease-in-out;
}

.wave-animation {
    animation: wave 1s ease-in-out;
}

.rotate-slow {
    animation: rotateSlow 3s linear infinite;
}

.rotate-continuous {
    animation: rotate 1s linear infinite;
}

.slide-in-up {
    animation: slideInUp 0.8s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

.zoom-in {
    animation: zoomIn 0.8s ease-out;
}

.progress-animated {
    animation: progress 2s ease-out;
}

/* ===== ENHANCED BUTTON ANIMATIONS ===== */
.global_button, .global_button2 {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.global_button::before, .global_button2::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.global_button:hover::before, .global_button2:hover::before {
    left: 100%;
}

.global_button:hover, .global_button2:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ===== FORM INPUT ANIMATIONS ===== */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(250, 109, 30, 0.1);
    border-color: #FA6D1E;
}

/* ===== CARD ANIMATIONS ===== */
.card-animated {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-animated:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ===== TESTIMONIAL CARD ANIMATIONS ===== */
.testimonial-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* ===== LOGO ANIMATIONS ===== */
.logo-animated {
    transition: all 0.3s ease;
}

.logo-animated:hover {
    transform: scale(1.1) rotate(5deg);
}

/* ===== STATIC CATEGORY CARDS (No Animations) ===== */
.category-card {
    position: relative;
    overflow: hidden;
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
}

.category-card:hover {
    transform: none;
    box-shadow: none;
}

.category-card::before {
    display: none;
}

/* ===== TEXT REVEAL ANIMATIONS ===== */
.text-reveal span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.6s ease-out forwards;
}

.text-reveal span:nth-child(1) { animation-delay: 0.1s; }
.text-reveal span:nth-child(2) { animation-delay: 0.2s; }
.text-reveal span:nth-child(3) { animation-delay: 0.3s; }
.text-reveal span:nth-child(4) { animation-delay: 0.4s; }
.text-reveal span:nth-child(5) { animation-delay: 0.5s; }

/* ===== STAGGERED ANIMATIONS ===== */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }
.stagger-item:nth-child(7) { animation-delay: 0.7s; }
.stagger-item:nth-child(8) { animation-delay: 0.8s; }

/* ===== PARALLAX EFFECTS ===== */
.parallax-slow {
    transition: transform 0.1s ease-out;
}

/* ===== RESPONSIVE ANIMATIONS ===== */
@media (max-width: 768px) {
    .floating-image,
    .floating-image-slow {
        animation: none;
    }
    
    .enhanced-hover:hover {
        transform: none;
    }
    
    .global_button:hover,
    .global_button2:hover {
        transform: none;
    }
    
    /* Responsive loading screen */
    .loader-logo {
        width: 120px;
        height: 120px;
        margin-bottom: 25px;
        padding: 12px;
    }
    
    .loader-text {
        font-size: 24px;
        letter-spacing: 1px;
        margin-bottom: 25px;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
    }
    
    .loading-progress {
        width: 150px;
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .loader-logo {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
        padding: 10px;
    }
    
    .loader-text {
        font-size: 20px;
        letter-spacing: 0.5px;
        margin-bottom: 20px;
    }
    
    .loading-spinner {
        width: 35px;
        height: 35px;
    }
    
    .loading-progress {
        width: 120px;
        margin-top: 10px;
    }
    
    .loading-dots {
        margin-top: 10px;
    }
}

/* ===== REDUCED MOTION SUPPORT ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .floating-image,
    .floating-image-slow,
    .pulse-animation,
    .pulse-glow,
    .rotate-slow,
    .rotate-continuous {
        animation: none;
    }
}

/* ===== CUSTOM AOS ANIMATIONS ===== */
[data-aos="fade-up-slow"] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

[data-aos="fade-up-slow"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* ===== FALLBACK ANIMATIONS (CSS Only) ===== */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeInLeft 0.8s ease-out forwards;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(20px);
    animation: fadeInRight 0.8s ease-out forwards;
}

.zoom-in {
    opacity: 0;
    transform: scale(0.8);
    animation: zoomIn 0.8s ease-out forwards;
}

.slide-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.8s ease-out forwards;
}

/* ===== ESSENTIAL VISIBILITY FIXES ===== */
/* Only fix elements that are actually hidden */
[data-aos] {
    opacity: 1;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* Ensure category cards are visible */
.category-list li {
    opacity: 1;
    visibility: visible;
    display: inline-block;
}

/* Fix only essential hidden elements */
.sec_8, .our-work, .sec_7, .sec-10, .sec_1, .sec_2, .sec_4, .sec_6 {
    display: block;
    visibility: visible;
    opacity: 1;
}

/* Fix testimonial section */
.testimonial__inner {
    display: block;
    visibility: visible;
}

/* Fix footer section */
.main_footer {
    display: block;
    visibility: visible;
}

/* Fix category list visibility */
.editing_new_list {
    display: block;
    visibility: visible;
}

/* Ensure all content is visible */
.global_innner, .banner_inner, .content_img {
    display: block;
    visibility: visible;
}

/* Make genre section completely static - no animations */
.sec_8 .global_innner,
.sec_8 .category-list,
.sec_8 .category-list li {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
}