/* =============================================
   RK International - Scroll Animations
   ============================================= */

/* Base animation class */
.rk-anim {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.rk-anim.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Direction variants */
.rk-anim-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.rk-anim-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.rk-anim-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.rk-anim-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.rk-anim-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.rk-anim-scale.visible {
    opacity: 1;
    transform: scale(1);
}

.rk-anim-fade {
    opacity: 0;
    transform: none;
    transition: opacity 0.7s ease-out;
}
.rk-anim-fade.visible {
    opacity: 1;
}

/* Stagger delays */
.rk-stagger-1 { transition-delay: 0.08s; }
.rk-stagger-2 { transition-delay: 0.16s; }
.rk-stagger-3 { transition-delay: 0.24s; }
.rk-stagger-4 { transition-delay: 0.32s; }
.rk-stagger-5 { transition-delay: 0.40s; }
.rk-stagger-6 { transition-delay: 0.48s; }

/* =============================================
   Hero Section Animations
   ============================================= */
.hero-content .rk-anim { transition-delay: 0.1s; }
.hero-content .rk-stagger-1 { transition-delay: 0.2s; }
.hero-content .rk-stagger-2 { transition-delay: 0.35s; }
.hero-content .rk-stagger-3 { transition-delay: 0.5s; }

/* Hero slide text entrance */
.hero-slide .hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: heroSlideIn 0.8s ease-out 0.3s forwards;
}
@keyframes heroSlideIn {
    to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   Section Headers
   ============================================= */
.section-header .rk-anim {
    transform: translateY(25px);
}

/* =============================================
   Product Cards
   ============================================= */
.product-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.product-card.rk-anim {
    transform: translateY(40px);
}
.product-card.rk-anim.visible {
    transform: translateY(0);
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}
.product-card .product-card-img img {
    transition: transform 0.5s ease;
}
.product-card:hover .product-card-img img {
    transform: scale(1.08);
}
.product-card .overlay {
    transition: opacity 0.35s ease;
}

/* =============================================
   Why Choose Us Cards
   ============================================= */
.why-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.why-card.rk-anim.visible {
    animation: cardPop 0.5s ease-out forwards;
}
.why-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}
.why-card-icon {
    transition: transform 0.4s ease, background 0.4s ease;
}
.why-card:hover .why-card-icon {
    transform: scale(1.12) rotate(5deg);
    background: rgba(227,6,19,0.15);
}

/* =============================================
   Stats Counter Animation
   ============================================= */
.stat-item .number {
    transition: none;
}
.stat-item.animated .number {
    animation: countPulse 0.6s ease-out;
}
@keyframes countPulse {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Stats bar glow */
.stats-bar {
    position: relative;
    overflow: hidden;
}
.stats-bar::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(227,6,19,0.06) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* =============================================
   Banner CTA Parallax
   ============================================= */
.banner-cta {
    background-attachment: fixed;
}
@media (max-width: 768px) {
    .banner-cta {
        background-attachment: scroll;
    }
}

/* =============================================
   Contact Info Items
   ============================================= */
.contact-info-item.rk-anim.visible,
.contact-detail-card.rk-anim.visible {
    animation: slideUp 0.5s ease-out forwards;
}
.contact-info-item,
.contact-detail-card {
    transition: transform 0.3s ease;
}
.contact-info-item:hover,
.contact-detail-card:hover {
    transform: translateY(-4px);
}

/* =============================================
   FAQ Items
   ============================================= */
.faq-item.rk-anim.visible {
    animation: slideUp 0.4s ease-out forwards;
}

/* =============================================
   Timeline Items (About page)
   ============================================= */
.timeline-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}
.timeline-item:nth-child(odd).visible {
    animation: slideInLeft 0.6s ease-out;
}
.timeline-item:nth-child(even).visible {
    animation: slideInRight 0.6s ease-out;
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* =============================================
   Value Cards
   ============================================= */
.value-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.value-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(227,6,19,0.1);
}
.value-card-icon {
    transition: transform 0.4s ease, background 0.4s ease;
}
.value-card:hover .value-card-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(227,6,19,0.15);
}

/* =============================================
   Cert Cards
   ============================================= */
.cert-card {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.5s ease-out;
}
.cert-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.cert-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(227,6,19,0.12);
}

/* =============================================
   Floating Badge
   ============================================= */
.experience-badge {
    animation: floatBadge 3s ease-in-out infinite;
}
@keyframes floatBadge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* =============================================
   Image Hover Effects
   ============================================= */
.about-story-img {
    overflow: hidden;
    border-radius: 8px;
}
.about-story-img img {
    transition: transform 0.6s ease;
}
.about-story-img:hover img {
    transform: scale(1.05);
}

/* =============================================
   Page Hero Sections
   ============================================= */
.about-hero,
.products-hero,
.contact-hero {
    position: relative;
    overflow: hidden;
}
.about-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(227,6,19,0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* =============================================
   Enquiry Form
   ============================================= */
.enquiry-form-wrapper.rk-anim.visible {
    animation: slideUp 0.6s ease-out forwards;
}

/* =============================================
   Related Products
   ============================================= */
.related-products .product-card.rk-anim.visible {
    animation: cardPop 0.5s ease-out forwards;
}

/* =============================================
   Generic Animations
   ============================================= */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes cardPop {
    0% { opacity: 0; transform: translateY(30px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =============================================
   Smooth link underline animations
   ============================================= */
.enquire-btn {
    position: relative;
    overflow: hidden;
}
.enquire-btn::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: #E30613;
    transition: width 0.3s ease;
}
.enquire-btn:hover::after {
    width: 100%;
}

/* =============================================
   Breadcrumb animation
   ============================================= */
.breadcrumb {
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.1s forwards;
}

/* =============================================
   Product Detail animations
   ============================================= */
.product-detail-grid {
    opacity: 0;
    animation: slideUp 0.6s ease-out 0.15s forwards;
}
.product-tabs-section .product-tabs {
    opacity: 0;
    animation: slideUp 0.6s ease-out 0.2s forwards;
}

/* =============================================
   Tab Content Transitions
   ============================================= */
.tab-content {
    animation: fadeIn 0.3s ease-out;
}

/* =============================================
   Page Content
   ============================================= */
.page-content.rk-anim.visible {
    animation: slideUp 0.5s ease-out forwards;
}
