/* animations.css */

/* Base state for animated elements - hidden and slightly shifted */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

/* State when element comes into view */
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for groups of elements */
.animate-delay-100 {
    transition-delay: 100ms;
}

.animate-delay-200 {
    transition-delay: 200ms;
}

.animate-delay-300 {
    transition-delay: 300ms;
}

.animate-delay-400 {
    transition-delay: 400ms;
}

.animate-delay-500 {
    transition-delay: 500ms;
}

/* Optional: Different directions */
.fade-in-left {
    transform: translateX(-20px);
}

.fade-in-right {
    transform: translateX(20px);
}

.fade-in-left.is-visible,
.fade-in-right.is-visible {
    transform: translateX(0);
}

/* Icon Hover Efects */
.material-symbols-outlined {
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
    /* Required for transform to work on spans */
}

/* Support group hover for icons */
.group:hover .material-symbols-outlined {
    transform: scale(1.2);
}

.material-symbols-outlined:hover {
    transform: scale(1.2);
    /* cursor: pointer; Optional: only if they are clickable, but safe to omit for visual flair */
}


/* Ensure content is visible if JS fails or user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* --- Carousel & Reviews --- */

/* Make review cards a bit taller so more text fits comfortably */
.review-card {
    min-height: 320px;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.reviews-carousel-container {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    /* Fade edges */
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    overflow: hidden;
    width: 100%;
}

.reviews-track {
    display: flex;
    gap: 1.5rem;
    /* 24px/gap-6 equivalent */
    width: max-content;
    animation: scroll 40s linear infinite;
    will-change: transform;
}

/* IMPORTANT: Pause on hover of the static container (prevents hover flicker/glitches) */
@media (hover: hover) {

    .reviews-carousel-container:hover .reviews-track,
    .reviews-carousel-container:focus-within .reviews-track {
        animation-play-state: paused;
    }
}

@keyframes scroll {
    to {
        transform: translateX(calc(-50% - 0.75rem));
        /* Move half width + half gap */
    }
}

/* Read More Button */
.read-more-btn {
    color: #3b82f6;
    /* primary color approximation */
    background: none;
    border: none;
    padding: 0;
    margin-left: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.875rem;
}

.read-more-btn:hover {
    text-decoration: underline;
}

/* Reviews Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.6);
    /* slate-900/60 */
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 32rem;
    /* max-w-lg */
    border-radius: 0.75rem;
    /* rounded-xl */
    padding: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.dark .modal-content {
    background: #1c2127;
    border: 1px solid #3b4754;
    color: white;
}

.modal-overlay.is-open .modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #64748b;
    /* slate-500 */
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #0f172a;
    /* slate-900 */
}

.dark .modal-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}