/* ============================================
   YOUNA - Cards Styles
   ============================================ */

.enhanced-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 0.75rem;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    will-change: transform;
    position: relative;
    margin: 0.125rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    contain: layout style paint;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}

.enhanced-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.enhanced-card:hover {
    transform: translate3d(0, -4px, 0) scale(1.02);
    box-shadow: 
        0 15px 30px rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.enhanced-card:hover::before {
    opacity: 1;
}

.enhanced-card-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
    height: 100%;
}

.enhanced-card-image {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    will-change: transform;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0) scale(1);
}

.enhanced-card:hover .enhanced-card-image {
    transform: translate3d(0, 0, 0) scale(1.05);
}

.card-type-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 4;
}

.enhanced-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
    min-height: fit-content;
    height: auto !important;
    max-height: 40%;
}

.enhanced-card-content::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(100% + 1px);
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.75) 40%,
        rgba(0, 0, 0, 0.5) 80%,
        transparent 100%);
    backdrop-filter: blur(5px);
    z-index: 1;
}

.enhanced-card:hover .enhanced-card-content::before {
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.8) 40%,
        rgba(0, 0, 0, 0.6) 80%,
        transparent 100%);
    backdrop-filter: blur(8px);
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: fit-content;
}

.card-meta-title {
    font-weight: 700;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: white;
    text-shadow: 
        0.5px 0.5px 1px rgba(0, 0, 0, 0.9),
        0 0 8px rgba(0, 0, 0, 0.5);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    margin: 0;
    font-size: 0.85rem;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.card-meta-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-date,
.card-duration {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
    padding: 2px 5px;
    border-radius: 2px;
    backdrop-filter: blur(4px);
    font-size: 0.65rem;
}

.card-date i,
.card-duration i {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1em;
}

.enhanced-card-title {
    display: none;
}

.card-actions {
    display: none !important;
}

.card-description {
    display: none;
}

.cards-section {
    padding-bottom: 4rem;
}

.tours-section {
    /* Padding removed to match videos page style */
}

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

/* Mobile */
@media (max-width: 479px) {
    .enhanced-card {
        margin: 0.125rem;
    }

    .enhanced-card-content {
        padding: 0.375rem;
    }
    
    .card-meta-title {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
        margin-bottom: 0.15rem;
    }
    
    .card-meta-info {
        gap: 0.15rem;
        flex-wrap: wrap;
    }
    
    .card-date,
    .card-duration {
        font-size: 0.55rem;
        padding: 1px 3px;
    }
    
    .card-date i,
    .card-duration i {
        font-size: 0.5rem;
    }
}

/* Large mobile */
@media (min-width: 480px) and (max-width: 767px) {
    .enhanced-card {
        margin: 0.125rem;
    }

    .enhanced-card-content {
        padding: 0.5rem;
    }
    
    .card-meta-title {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        margin-bottom: 0.2rem;
    }
    
    .card-meta-info {
        gap: 0.2rem;
        flex-wrap: wrap;
    }
    
    .card-date,
    .card-duration {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
    
    .card-date i,
    .card-duration i {
        font-size: 0.55rem;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .enhanced-card {
        margin: 0.125rem;
    }

    .enhanced-card-content {
        padding: 0.5rem;
    }

    .card-meta-title {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
        margin-bottom: 0.25rem;
    }

    .card-meta-info {
        gap: 0.25rem;
        flex-wrap: wrap;
    }
    
    .card-date,
    .card-duration {
        font-size: 0.7rem;
        padding: 2px 5px;
    }
    
    .card-date i,
    .card-duration i {
        font-size: 0.65rem;
    }

    .cards-section {
        padding-bottom: 3rem;
    }
}

/* Desktop */
@media (min-width: 1024px) and (max-width: 1439px) {
    .enhanced-card {
        margin: 0.5rem;
    }

    .enhanced-card-content {
        padding: 0.625rem;
    }

    .card-meta-title {
        font-size: 0.95rem;
        -webkit-line-clamp: 2;
        margin-bottom: 0.25rem;
    }

    .card-meta-info {
        gap: 0.375rem;
        flex-wrap: nowrap;
    }
    
    .card-date,
    .card-duration {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
    
    .card-date i,
    .card-duration i {
        font-size: 0.7rem;
    }

    .cards-section {
        padding-bottom: 2.5rem;
    }
}

/* Large screens */
@media (min-width: 1440px) {
    .enhanced-card {
        margin: 0.5rem;
    }

    .enhanced-card-content {
        padding: 0.625rem;
    }

    .card-meta-title {
        font-size: 1rem;
        -webkit-line-clamp: 2;
        margin-bottom: 0.25rem;
    }

    .card-meta-info {
        gap: 0.375rem;
    }
    
    .card-date,
    .card-duration {
        font-size: 0.8rem;
        padding: 2px 7px;
    }
    
    .card-date i,
    .card-duration i {
        font-size: 0.75rem;
    }

    .cards-section {
        padding-bottom: 1.75rem;
    }
}

/* Extra Large Desktop */
@media (min-width: 1440px) {
    .enhanced-card-content {
        padding: 0.75rem;
    }
    
    .card-meta-title {
        font-size: 1.1rem;
        -webkit-line-clamp: 2;
        margin-bottom: 0.25rem;
    }
    
    .card-date,
    .card-duration {
        font-size: 0.85rem;
        padding: 3px 8px;
    }
    
    .card-date i,
    .card-duration i {
        font-size: 0.8rem;
    }
}