/* Quick Links Styles */
.rnz-ql-wrap {
    width: 100%;
}

.rnz-ql-grid {
    display: grid;
    /* Default gap and columns, overridden by Elementor */
    gap: 16px;
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 767px) {
    .rnz-ql-grid {
        display: flex !important; /* Force Swiper flex layout */
        gap: 0 !important; /* Handled by Swiper spaceBetween */
        grid-template-columns: none !important;
    }
}

.rnz-ql-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    /* Default styles, can be overridden by Elementor */
    background-color: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.3s ease, box-shadow 0.3s ease;
    
    /* Animation initial state */
    opacity: 0;
    transform: translateY(20px);
}

.rnz-ql-item.is-visible:hover {
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    transition-delay: 0s !important; /* Cancel inline entrance delay on hover */
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Animation triggered state */
.rnz-ql-item.is-visible {
    opacity: 1;
    transform: translateY(0);
    /* Note: transition-delay is applied inline via PHP for stagger effect */
}

/* To ensure hover transform works after animation completes, we need to handle transitions carefully.
   The initial state has transform translateY(40px), the final is translateY(0).
   The hover state is translateY(-4px).
   Since they all use transform, hover will smoothly work from translateY(0) to translateY(-4px). */

.rnz-ql-icon {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
}

.rnz-ql-icon i {
    font-size: 32px;
}

.rnz-ql-icon svg {
    width: 32px;
    height: auto;
}

.rnz-ql-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: flex-end;
}

.rnz-ql-title {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 12px 0;
    color: #000;
}

.rnz-ql-btn {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0d6efd;
    display: inline-flex;
    align-items: center;
}

/* Responsive defaults */
@media (max-width: 1024px) {
    .rnz-ql-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .rnz-ql-grid {
        grid-template-columns: 1fr;
    }
    .rnz-ql-item {
        padding: 20px;
    }
}

/* Swiper Controls (Mobile Only) */
.rnz-ql-wrap .swiper-button-next,
.rnz-ql-wrap .swiper-button-prev {
    display: none;
}
.rnz-ql-wrap .swiper-pagination {
    display: none;
}

@media (max-width: 767px) {
    .rnz-ql-wrap {
        position: relative;
        padding-bottom: 50px; /* Space for pagination */
    }

    .rnz-ql-wrap .swiper-pagination {
        display: block;
        bottom: 0;
    }
    
    .rnz-ql-wrap .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
        background: #000;
        opacity: 0.2;
        margin: 0 5px;
        transition: all 0.3s ease;
    }
    
    .rnz-ql-wrap .swiper-pagination-bullet-active {
        opacity: 1;
        width: 25px;
        border-radius: 5px;
        background: #0d6efd;
    }

    .rnz-ql-wrap .swiper-button-next,
    .rnz-ql-wrap .swiper-button-prev {
        display: flex;
        width: 40px;
        height: 40px;
        background: #fff;
        border-radius: 50%;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        color: #0d6efd;
        top: 50%;
        transform: translateY(-50%);
        margin-top: -25px; /* Offset for pagination padding */
    }

    .rnz-ql-wrap .swiper-button-next:after,
    .rnz-ql-wrap .swiper-button-prev:after {
        font-size: 16px;
        font-weight: bold;
    }
}
