/* ============================================
   Latest Ads Carousel & Cards Styles
   ============================================ */

/* -------------------------------
   Latest Ads Section
-------------------------------- */
.latest-ads-section {
    background: white;
    padding: 3rem 0;
}

/* -------------------------------
   Latest Cards Styles
-------------------------------- */
.latest-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #f3f4f6;
    overflow: hidden;
}

.latest-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #e0e7ff;
}

/* -------------------------------
   Image Container
-------------------------------- */
.latest-card-image {
    position: relative;
    width: 100%;
    height: 180px;
    background-color: #f3f4f6;
    overflow: hidden;
    border-bottom: 1px solid #e5e7eb;
}

.latest-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.latest-card:hover .latest-card-image img {
    transform: scale(1.05);
}

/* Fallback when no image */
.latest-card-image .image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
    display: flex;
    align-items: center;
    justify-content: center;
}

.latest-card-image .image-placeholder i {
    font-size: 3rem;
    color: #c7d2fe;
}

/* -------------------------------
   New Badge for Latest Ads
-------------------------------- */
.new-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* -------------------------------
   Card Content
-------------------------------- */
.latest-card-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.latest-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.latest-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.latest-card-title a:hover {
    color: #4f46e5;
}

.latest-card-subtitle {
    font-size: 0.7rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

/* Subject Tags */
.latest-subject-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.latest-subject-tag {
    background-color: #f3f4f6;
    color: #4b5563;
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
}

/* Info Rows */
.latest-info-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
    color: #6b7280;
}

.latest-info-row i {
    width: 0.875rem;
    color: #9ca3af;
}

/* -------------------------------
   Card Footer
-------------------------------- */
.latest-card-footer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.latest-date {
    font-size: 0.65rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.latest-button {
    background-color: #f3f4f6;
    color: #4b5563;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.3rem 0.7rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
}

.latest-button:hover {
    background-color: #4f46e5;
    color: white;
}

/* -------------------------------
   Swiper Navigation Customization
-------------------------------- */
.latest-swiper-container {
    position: relative;
    padding: 10px 0 50px 0;
    overflow: hidden;
}

.latest-swiper-container .swiper-slide {
    height: auto;
}

.latest-swiper-container .swiper-button-prev,
.latest-swiper-container .swiper-button-next {
    background: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.latest-swiper-container .swiper-button-prev:hover,
.latest-swiper-container .swiper-button-next:hover {
    background: #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.latest-swiper-container .swiper-button-prev:after,
.latest-swiper-container .swiper-button-next:after {
    font-size: 1rem;
    font-weight: bold;
    color: #4f46e5;
}

.latest-swiper-container .swiper-button-prev:hover:after,
.latest-swiper-container .swiper-button-next:hover:after {
    color: white;
}

/* Pagination Dots */
.latest-swiper-container .swiper-pagination {
    bottom: 0;
}

.latest-swiper-container .swiper-pagination-bullet {
    width: 0.5rem;
    height: 0.5rem;
    background: #cbd5e1;
    opacity: 1;
    transition: all 0.3s ease;
}

.latest-swiper-container .swiper-pagination-bullet-active {
    width: 1.5rem;
    border-radius: 0.25rem;
    background: #4f46e5;
}

/* -------------------------------
   Responsive Adjustments
-------------------------------- */
@media (max-width: 768px) {
    .latest-card-image {
        height: 160px;
    }
    
    .latest-card-title {
        font-size: 0.9rem;
    }
}