/**
 * Rio Department Slider - Styling for the department slider widget
 */

/* Container styles */
.rio-department-slider-container {
    padding: 30px 0;
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
    position: relative;
    overflow: visible;
    padding-top: 60px; /* Space for navigation arrows at top */
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card styles */
.rio-department-card {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-top: 3px solid var(--primary-color);
    position: relative;
    margin: 5px;
    transform: translateY(0);
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

/* Card link styles */
.rio-department-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    outline: none;
    position: relative;
    z-index: 1;
}

.rio-department-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 20px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    border-top: 3px solid #0D7A3E;
}

.rio-department-card-link:focus {
    outline: none;
}

.rio-department-card-link:focus-visible {
    outline: 2px solid #0D7A3E;
    outline-offset: -2px;
    border-radius: 0.5rem;
}

/* Image styles */
.rio-department-image {
    position: relative;
    overflow: hidden;
    height: 180px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.rio-department-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.rio-department-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.rio-department-card:hover .rio-department-image img {
    transform: scale(1.05);
}

/* Content styles */
.rio-department-content {
    padding: 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to bottom, #ffffff 0%, #f9f9f9 100%);
}

.rio-department-title {
    margin: 0 0 10px;
    font-size: 18px !important;
    font-weight: 700;
    color: #0D7A3E !important;
    font-family: 'Frank Ruhl Libre', serif;
    letter-spacing: -0.01em;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    padding-bottom: 10px;
}

.rio-department-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: rgba(13, 122, 62, 0.3);
}

.rio-department-excerpt {
    margin: 0 0 15px;
    line-height: 1.5;
    color: #000000;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-clamp: 3;
}

/* Link styles */
.rio-department-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    margin-top: auto;
    background-color: #f8f8f8;
    color: #0D7A3E;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    letter-spacing: 0.03em;
}

.rio-department-card:hover .rio-department-link {
    background: var(--primary-color);
    color: #fff;
    padding-right: 16px;
}

.rio-department-link i {
    transition: all 0.3s ease;
    font-size: 0.8rem;
    opacity: 0.8;
}

.rio-department-card:hover .rio-department-link i {
    transform: translateX(5px);
    opacity: 1;
}

/* Swiper navigation styles */
.rio-department-slider-container .swiper-button-next,
.rio-department-slider-container .swiper-button-prev {
    color: #0D7A3E;
    background: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    top: 0;
    margin-top: 0;
    z-index: 20;
    border: 2px solid #0D7A3E;
}

.rio-department-slider-container .swiper-button-prev {
    right: 65px;
    left: auto;
    top: 10px;
}

.rio-department-slider-container .swiper-button-next {
    right: 15px;
    top: 10px;
}

.rio-department-slider-container .swiper-button-next:hover,
.rio-department-slider-container .swiper-button-prev:hover {
    background: #0D7A3E;
    color: white;
    transform: scale(1.05);
    border-color: #ffffff;
}

.rio-department-slider-container .swiper-button-next:after,
.rio-department-slider-container .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.rio-department-slider-container .swiper-pagination {
    bottom: -30px;
}

.rio-department-slider-container .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    opacity: 0.5;
}

.rio-department-slider-container .swiper-pagination-bullet-active {
    background: var(--primary-color);
    opacity: 1;
    transform: scale(1.2);
}

/* Responsive styles */
@media (max-width: 1024px) {
    .rio-department-image {
        height: 180px;
    }
}

@media (max-width: 600px) {
    .rio-department-image {
        height: 160px;
    }
    
    .rio-department-content {
        padding: 15px;
    }
}
