/**
 * Highlights Section Component Styles
 * 
 * @package TeeqCore
 * @since 1.0.0
 */

/* ===============================================
   Scroll Animation Styles
   =============================================== */

/* Base animation states */
.section-scroll-animate {
    opacity: 1;
}

.section-header-animate,
.highlight-item-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animate when in view */
.section-scroll-animate.animate-in-view .section-header-animate {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.section-scroll-animate.animate-in-view .title-animate {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.section-scroll-animate.animate-in-view .subtitle-animate {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

.section-scroll-animate.animate-in-view .highlight-item-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for highlight items */
.section-scroll-animate.animate-in-view .highlight-item-animate[data-index="0"] {
    transition-delay: 0.7s;
}

.section-scroll-animate.animate-in-view .highlight-item-animate[data-index="1"] {
    transition-delay: 0.85s;
}

.section-scroll-animate.animate-in-view .highlight-item-animate[data-index="2"] {
    transition-delay: 1s;
}

.section-scroll-animate.animate-in-view .highlight-item-animate[data-index="3"] {
    transition-delay: 1.15s;
}

.section-scroll-animate.animate-in-view .highlight-item-animate[data-index="4"] {
    transition-delay: 1.3s;
}

.section-scroll-animate.animate-in-view .highlight-item-animate[data-index="5"] {
    transition-delay: 1.45s;
}

/* Immediate animation fallback */
.section-scroll-animate.immediate-animate .section-header-animate,
.section-scroll-animate.immediate-animate .highlight-item-animate,
.section-header-animate.immediate-animate,
.highlight-item-animate.immediate-animate {
    opacity: 1;
    transform: translateY(0);
    transition-duration: 0.6s;
}

/* ===============================================
   Highlights Section Base Styles
   =============================================== */

.highlights-section {
    position: relative;
}

.highlight-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.highlight-item:hover {
    transform: translateY(-5px) scale(1.02);
}

/* ===============================================
   Icon Styling
   =============================================== */

.highlight-item .w-20 {
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(218, 252, 113, 0.3);
}

.highlight-item:hover .w-20 {
    box-shadow: 0 8px 25px rgba(218, 252, 113, 0.4);
    transform: scale(1.1);
}

.highlight-item .w-20 i {
    transition: transform 0.3s ease;
}

.highlight-item:hover .w-20 i {
    transform: scale(1.1);
}

/* ===============================================
   Typography Enhancements
   =============================================== */

.highlights-section h2 {
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.highlights-section h3 {
    font-weight: 700;
    line-height: 1.3;
}

.highlights-section p {
    line-height: 1.6;
}

/* ===============================================
   Link Styling
   =============================================== */

.highlight-item a {
    transition: all 0.3s ease;
    text-decoration: none;
}

.highlight-item a:hover {
    text-decoration: none;
    color: #374151;
}

.highlight-item a i {
    transition: transform 0.3s ease;
}

.highlight-item:hover a i {
    transform: translateX(4px);
}

/* RTL Support */
[dir="rtl"] .highlight-item:hover a i {
    transform: translateX(-4px);
}

/* ===============================================
   Grid Layout Enhancements
   =============================================== */

.highlights-section .grid {
    gap: 2rem;
}

@media (min-width: 1024px) {
    .highlights-section .grid {
        gap: 3rem;
    }
}

/* ===============================================
   Background Variations
   =============================================== */

.highlights-section.bg-gray-50 {
    background-color: #f9fafb;
}

.highlights-section.bg-white {
    background-color: #ffffff;
}

/* ===============================================
   Animation Enhancements
   =============================================== */

.highlight-item {
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.6s ease-out forwards;
}

.highlight-item:nth-child(1) {
    animation-delay: 0.1s;
}

.highlight-item:nth-child(2) {
    animation-delay: 0.2s;
}

.highlight-item:nth-child(3) {
    animation-delay: 0.3s;
}

.highlight-item:nth-child(4) {
    animation-delay: 0.4s;
}

.highlight-item:nth-child(5) {
    animation-delay: 0.5s;
}

.highlight-item:nth-child(6) {
    animation-delay: 0.6s;
}

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

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

@media (max-width: 768px) {
    .highlights-section {
        padding: 4rem 0;
    }

    .highlights-section h2 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .highlights-section .grid {
        gap: 2rem;
    }

    .highlight-item .w-20 {
        width: 4rem;
        height: 4rem;
    }

    .highlight-item .w-20 i {
        font-size: 1.5rem;
    }

    .highlight-item h3 {
        font-size: 2rem;
    }
}

@media (max-width: 640px) {
    .highlights-section .text-center {
        text-align: start;
    }

    .highlights-section h2 {
        font-size: 1.875rem;
    }

    .highlight-item .w-20 {
        margin-left: 0;
        margin-right: auto;
    }

    [dir="rtl"] .highlight-item .w-20 {
        margin-right: 0;
        margin-left: auto;
    }
}

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

.highlight-item a:focus {
    outline: 2px solid #dafc71;
    outline-offset: 2px;
    border-radius: 0.25rem;
}

.highlight-item .w-20:focus-within {
    outline: 2px solid #dafc71;
    outline-offset: 2px;
}

/* ===============================================
   Reduced Motion Support
   =============================================== */

@media (prefers-reduced-motion: reduce) {

    /* Disable scroll animations for users who prefer reduced motion */
    .section-header-animate,
    .highlight-item-animate {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }

    .highlight-item {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .highlight-item:hover {
        transform: none;
    }

    .highlight-item:hover .w-20,
    .highlight-item:hover .w-20 i,
    .highlight-item:hover a i {
        transform: none;
    }

    .highlight-item a,
    .highlight-item .w-20,
    .highlight-item .w-20 i {
        transition: none;
    }
}

/* ===============================================
   High Contrast Mode
   =============================================== */

@media (prefers-contrast: high) {
    .highlights-section {
        border-top: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
    }

    .highlight-item .w-20 {
        border: 2px solid currentColor;
    }

    .highlight-item a {
        border: 1px solid transparent;
    }

    .highlight-item a:focus,
    .highlight-item a:hover {
        border-color: currentColor;
        background-color: rgba(0, 0, 0, 0.1);
    }
}

/* ===============================================
   Print Styles
   =============================================== */

@media print {
    .highlights-section {
        background: white !important;
        padding: 1rem 0 !important;
    }

    .highlight-item {
        break-inside: avoid;
        margin-bottom: 1rem;
    }

    .highlight-item .w-20 {
        background: #f0f0f0 !important;
        color: black !important;
    }

    .highlight-item h2,
    .highlight-item h3 {
        color: black !important;
    }

    .highlight-item p {
        color: #666 !important;
    }

    .highlight-item a {
        color: black !important;
        text-decoration: underline;
    }
}