/**
 * LIMOKAR - Custom Animations
 * Replaces Framer Motion animations from React
 */

/* ==========================================================================
   Fade In Animation
   ========================================================================== */

.limokar-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.limokar-fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays */
.limokar-fade-in[data-delay="1"] { transition-delay: 0.1s; }
.limokar-fade-in[data-delay="2"] { transition-delay: 0.2s; }
.limokar-fade-in[data-delay="3"] { transition-delay: 0.3s; }
.limokar-fade-in[data-delay="4"] { transition-delay: 0.4s; }
.limokar-fade-in[data-delay="5"] { transition-delay: 0.5s; }
.limokar-fade-in[data-delay="6"] { transition-delay: 0.6s; }

/* ==========================================================================
   Card Hover Effects
   ========================================================================== */

.limokar-card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.limokar-card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(195, 151, 45, 0.15);
}

/* ==========================================================================
   Button Shine Effect
   ========================================================================== */

.limokar-btn-shine {
    position: relative;
    overflow: hidden;
}

.limokar-btn-shine::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 ease;
}

.limokar-btn-shine:hover::before {
    left: 100%;
}

/* ==========================================================================
   Gold Glow Effect
   ========================================================================== */

.limokar-gold-glow {
    box-shadow: 0 0 0 rgba(195, 151, 45, 0);
    transition: box-shadow 0.3s ease;
}

.limokar-gold-glow:hover {
    box-shadow: 0 0 30px rgba(195, 151, 45, 0.4);
}

/* ==========================================================================
   Scale on Hover
   ========================================================================== */

.limokar-scale-hover {
    transition: transform 0.3s ease;
}

.limokar-scale-hover:hover {
    transform: scale(1.05);
}

/* ==========================================================================
   FAQ Accordion Animation
   ========================================================================== */

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.is-open .faq-content {
    max-height: 500px;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.is-open .faq-icon {
    transform: rotate(45deg);
}

/* ==========================================================================
   Image Zoom on Hover
   ========================================================================== */

.limokar-image-zoom {
    overflow: hidden;
}

.limokar-image-zoom img {
    transition: transform 0.6s ease;
}

.limokar-image-zoom:hover img {
    transform: scale(1.1);
}

/* ==========================================================================
   Text Gradient Animation
   ========================================================================== */

.limokar-text-shimmer {
    background: linear-gradient(
        90deg,
        #C3972D 0%,
        #D4A84A 50%,
        #C3972D 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ==========================================================================
   Pulse Animation (for badges)
   ========================================================================== */

.limokar-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ==========================================================================
   Slide In Animations
   ========================================================================== */

.limokar-slide-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.limokar-slide-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.limokar-slide-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.limokar-slide-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================================================
   Background Parallax Effect
   ========================================================================== */

.limokar-parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

@media (max-width: 768px) {
    .limokar-parallax {
        background-attachment: scroll;
    }
}

/* ==========================================================================
   Mobile Menu Animation
   ========================================================================== */

#mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

#mobile-menu.is-open {
    transform: translateX(0);
}

/* ==========================================================================
   Loading Spinner
   ========================================================================== */

.limokar-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(195, 151, 45, 0.2);
    border-top-color: #C3972D;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ==========================================================================
   Icon Rotation on Hover
   ========================================================================== */

.limokar-icon-rotate {
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.limokar-icon-rotate:hover {
    transform: rotate(360deg);
}

/* ==========================================================================
   Accordion Icon Rotation
   ========================================================================== */

.limokar-accordion-icon {
    transition: transform 0.3s ease;
}

.limokar-accordion.is-open .limokar-accordion-icon,
.limokar-accordion-trigger.is-open .limokar-accordion-icon {
    transform: rotate(180deg);
}

/* Accordion Content */
.limokar-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.limokar-accordion.is-open .limokar-accordion-content,
.limokar-accordion-trigger.is-open + .limokar-accordion-content {
    max-height: 1000px;
    opacity: 1;
}

/* ==========================================================================
   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;
    }

    .limokar-fade-in,
    .limokar-slide-left,
    .limokar-slide-right {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   FAQ Accordion Animation
   ========================================================================== */

/* Hide content by default */
.limokar-accordion-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease-in-out;
}

/* Show content when open */
.limokar-accordion.is-open .limokar-accordion-content,
.limokar-accordion-trigger.is-open + .limokar-accordion-content {
    max-height: 1000px;
    opacity: 1;
}

/* Remove hidden class when open (override Tailwind) */
.limokar-accordion.is-open .limokar-accordion-content.hidden,
.limokar-accordion-trigger.is-open + .limokar-accordion-content.hidden {
    display: block !important;
}

/* Rotate icon when open */
.limokar-accordion.is-open .limokar-accordion-icon,
.limokar-accordion-trigger.is-open .limokar-accordion-icon {
    transform: rotate(180deg);
}

/* Old class names support */
.faq-item.is-open .faq-content,
.faq-trigger.is-open + .faq-content {
    max-height: 1000px;
    opacity: 1;
}

.faq-item.is-open .faq-content.hidden,
.faq-trigger.is-open + .faq-content.hidden {
    display: block !important;
}

/* FAQ Page specific - using .limokar-accordion-content */
.faq-item .limokar-accordion-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease-in-out,
                padding 0.3s ease;
}

.faq-item.is-open .limokar-accordion-content {
    max-height: 500px;
    opacity: 1;
    padding-bottom: 1.5rem;
}

.faq-item .limokar-accordion-icon {
    transition: transform 0.3s ease;
}

.faq-item.is-open .limokar-accordion-icon {
    transform: rotate(180deg);
}

/* ==========================================================================
   WordPress Pagination Styles
   ========================================================================== */

.pagination,
.page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.page-numbers a,
.page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: 9999px;
    font-weight: 300;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.page-numbers a:hover {
    background: rgba(195, 151, 45, 0.1);
    border-color: rgba(195, 151, 45, 0.3);
    color: #C3972D;
    transform: translateY(-2px);
}

.page-numbers .current {
    background: linear-gradient(135deg, #C3972D 0%, #D4A73E 100%);
    border-color: #C3972D;
    color: #000;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(195, 151, 45, 0.3);
}

.page-numbers .dots {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

.page-numbers a svg,
.page-numbers span svg {
    width: 20px;
    height: 20px;
}

/* Prev/Next buttons */
.page-numbers .prev,
.page-numbers .next {
    font-weight: 400;
}

@media (max-width: 640px) {
    .page-numbers a,
    .page-numbers span {
        min-width: 40px;
        height: 40px;
        font-size: 13px;
    }
}

/* ==========================================================================
   Legal Pages Content Styles
   ========================================================================== */

.limokar-legal-content {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 1.8;
    font-weight: 300;
}

.limokar-legal-content h2 {
    font-family: 'Prata', serif;
    font-size: 28px;
    font-weight: 400;
    color: #C3972D;
    margin-top: 48px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(195, 151, 45, 0.2);
}

.limokar-legal-content h2:first-child {
    margin-top: 0;
}

.limokar-legal-content h3 {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 400;
    color: #fff;
    margin-top: 32px;
    margin-bottom: 16px;
}

.limokar-legal-content p {
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.limokar-legal-content strong {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.limokar-legal-content ul,
.limokar-legal-content ol {
    margin-left: 24px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.7);
}

.limokar-legal-content li {
    margin-bottom: 12px;
    padding-left: 8px;
}

.limokar-legal-content li::marker {
    color: #C3972D;
}

.limokar-legal-content a {
    color: #C3972D;
    text-decoration: none;
    border-bottom: 1px solid rgba(195, 151, 45, 0.3);
    transition: all 0.3s ease;
}

.limokar-legal-content a:hover {
    color: #D4A84A;
    border-bottom-color: #D4A84A;
}

.limokar-legal-content em {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.limokar-legal-content hr {
    margin: 48px 0;
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(195, 151, 45, 0.3), transparent);
}

@media (max-width: 768px) {
    .limokar-legal-content {
        font-size: 15px;
    }

    .limokar-legal-content h2 {
        font-size: 24px;
        margin-top: 32px;
    }

    .limokar-legal-content h3 {
        font-size: 18px;
    }
}
