/* ========================================
   TRANSLATIONS SECTION (الترجمات)
   Dedicated CSS file for Translations Section
   ======================================== */

/* ========================================
   SECTION CONTAINER
   ======================================== */
.translations-section {
    position: relative;
    padding: 5rem 1.5rem;
    background: linear-gradient(210deg, var(--color-bg-darker), #1a3a3a);
    color: var(--color-faq-cream);
    overflow: hidden;
}

.translations-section__bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(212, 175, 55, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
    pointer-events: none;
}

.translations-section__glow {
    position: absolute;
    border-radius: var(--radius-full);
    background-color: rgba(212, 175, 55, 0.08);
    filter: blur(100px);
    pointer-events: none;
}

.translations-section__glow--tl {
    top: 0;
    left: 0;
    width: 20rem;
    height: 20rem;
    transform: translate(-50%, -50%);
}

.translations-section__glow--br {
    bottom: 0;
    right: 0;
    width: 24rem;
    height: 24rem;
    transform: translate(50%, 50%);
}

.translations-section__container {
    position: relative;
    z-index: 10;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ========================================
   HEADER
   ======================================== */
.translations-section__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 3rem;
    text-align: center;
}

.translations-section__header-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.translations-section__header-line {
    width: 4rem;
    height: 1px;
    background: linear-gradient(to left, transparent, var(--color-pillar-shahada));
}

.translations-section__header-line--reverse {
    background: linear-gradient(to right, transparent, var(--color-pillar-shahada));
}

.translations-section__header-icon-border {
    padding: 0.5rem;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: var(--radius-full);
    backdrop-filter: blur(4px);
    background-color: rgba(212, 175, 55, 0.1);
}

.translations-section__header-icon-border .material-symbols-outlined {
    font-size: 1.75rem;
    color: var(--color-pillar-shahada);
}

.translations-section__title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-faq-cream);
    margin-bottom: 1rem;
}

.translations-section__description {
    font-weight: 300;
    max-width: 42rem;
    margin: 0 auto;
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* ========================================
   TABS
   ======================================== */
.translations-section__tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.translations-section__tab {
    padding: 0.625rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all var(--transition-base);
    border: 1px solid var(--color-border);
    background-color: transparent;
    color: var(--color-text-secondary);
}

.translations-section__tab:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.translations-section__tab--active {
    background-color: var(--color-primary);
    color: var(--color-text-dark);
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(227, 188, 59, 0.3);
}

.translations-section__tab--active:hover {
    color: var(--color-text-dark);
}

/* ========================================
   TAB CONTENT
   ======================================== */
.translations-section__tab-content {
    display: none;
}

.translations-section__tab-content--active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   BOOK CARDS (كتب مترجمة) - PREMIUM DESIGN
   ======================================== */
.translations-book-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, rgba(26, 35, 50, 0.95), rgba(17, 22, 32, 0.98));
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(212, 175, 55, 0.15);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.translations-book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.translations-book-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.4),
        0 0 50px rgba(212, 175, 55, 0.15),
        0 0 0 1px rgba(212, 175, 55, 0.2) inset;
    border-color: rgba(212, 175, 55, 0.35);
}

.translations-book-card:hover::before {
    opacity: 1;
}

/* Book Cover Container */
.translations-book-card__cover {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(180deg, #1a2332, #0f141c);
}

/* 3D Book Effect */
.translations-book-card__cover::before {
    content: '';
    position: absolute;
    top: 8%;
    bottom: 8%;
    right: 0;
    width: 15px;
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0.4),
            rgba(0, 0, 0, 0.1) 30%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(0, 0, 0, 0.2));
    z-index: 5;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.translations-book-card:hover .translations-book-card__cover::before {
    opacity: 1;
}

/* Decorative Corner Ornaments */
.translations-book-card__cover::after {
    content: '';
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 2rem;
    height: 2rem;
    border-top: 2px solid rgba(212, 175, 55, 0.4);
    border-left: 2px solid rgba(212, 175, 55, 0.4);
    opacity: 0;
    transition: all var(--transition-base);
    z-index: 10;
}

.translations-book-card:hover .translations-book-card__cover::after {
    opacity: 1;
    top: 0.75rem;
    left: 0.75rem;
}

.translations-book-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: brightness(0.95);
}

.translations-book-card:hover .translations-book-card__cover img {
    transform: scale(1.08);
    filter: brightness(1.05);
}

/* Gradient Overlay */
.translations-book-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(17, 22, 32, 1) 0%,
            rgba(17, 22, 32, 0.8) 20%,
            rgba(17, 22, 32, 0.2) 50%,
            transparent 100%);
    z-index: 2;
    transition: all var(--transition-base);
}

.translations-book-card:hover .translations-book-card__overlay {
    background: linear-gradient(to top,
            rgba(17, 22, 32, 1) 0%,
            rgba(17, 22, 32, 0.6) 25%,
            rgba(17, 22, 32, 0.1) 60%,
            transparent 100%);
}

/* Download Button */
.translations-book-card__download {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-text-dark);
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow:
        0 8px 25px rgba(227, 188, 59, 0.4),
        0 0 0 2px rgba(255, 255, 255, 0.1) inset;
    z-index: 10;
    font-weight: 700;
    font-size: 0.875rem;
}

.translations-book-card:hover .translations-book-card__download {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.translations-book-card__download:hover {
    background: linear-gradient(135deg, var(--color-primary-hover), var(--color-primary));
    transform: translateX(-50%) scale(1.08);
    box-shadow:
        0 12px 35px rgba(227, 188, 59, 0.5),
        0 0 0 2px rgba(255, 255, 255, 0.2) inset;
}

.translations-book-card__download .material-symbols-outlined {
    font-size: 1.25rem;
}

/* Book Info Section */
.translations-book-card__info {
    padding: 1.5rem;
    background: linear-gradient(180deg, transparent, rgba(212, 175, 55, 0.02));
    position: relative;
}

.translations-book-card__info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
}

/* Date Badge */
.translations-book-card__language {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 0.75rem;
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-primary);
    border: 1px solid rgba(212, 175, 55, 0.25);
    backdrop-filter: blur(4px);
}

.translations-book-card__language--en,
.translations-book-card__language--fr,
.translations-book-card__language--es {
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-primary);
    border: 1px solid rgba(212, 175, 55, 0.25);
}

/* Book Title */
.translations-book-card__title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-base);
}

.translations-book-card:hover .translations-book-card__title {
    color: var(--color-primary);
}

/* ========================================
   ARTICLE CARDS (مقالات مترجمة)
   ======================================== */
.translations-article-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: rgba(17, 22, 32, 0.8);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-base);
}

.translations-article-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(227, 188, 59, 0.3);
}

.translations-article-card__image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.translations-article-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.3);
    transition: all 0.5s ease;
}

.translations-article-card:hover .translations-article-card__image img {
    filter: grayscale(0);
    transform: scale(1.1);
}

.translations-article-card__image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17, 22, 32, 0.8), transparent);
}

.translations-article-card__language {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(8px);
}

.translations-article-card__language--en {
    background-color: rgba(59, 130, 246, 0.8);
    color: #ffffff;
}

.translations-article-card__language--fr {
    background-color: rgba(239, 68, 68, 0.8);
    color: #ffffff;
}

.translations-article-card__language--es {
    background-color: rgba(249, 115, 22, 0.8);
    color: #ffffff;
}

.translations-article-card__content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.translations-article-card__badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: rgba(227, 188, 59, 0.15);
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(227, 188, 59, 0.3);
    margin-bottom: 0.75rem;
    width: fit-content;
}

.translations-article-card__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-base);
}

.translations-article-card:hover .translations-article-card__title {
    color: var(--color-primary);
}

.translations-article-card__description {
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--color-text-secondary);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
    flex: 1;
}

.translations-article-card__meta {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

.translations-article-card__meta .material-symbols-outlined {
    font-size: 1rem;
    color: var(--color-primary);
}

/* ========================================
   FOOTER CTA
   ======================================== */
.translations-section__footer {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.translations-section__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 3rem;
    padding: 0 2rem;
    background-color: var(--color-primary);
    color: var(--color-text-dark);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(227, 188, 59, 0.3);
}

.translations-section__cta:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(227, 188, 59, 0.4);
}

.translations-section__cta .material-symbols-outlined {
    transition: transform var(--transition-base);
}

.translations-section__cta:hover .material-symbols-outlined {
    transform: translateX(-4px);
}

/* ========================================
   SWIPER STYLES FOR TRANSLATIONS
   ======================================== */
.translations-books-swiper,
.translations-articles-swiper {
    position: relative;
    padding: 1rem 0 3rem;
    overflow: visible;
}

.translations-books-swiper .swiper-slide,
.translations-articles-swiper .swiper-slide {
    height: auto;
}

/* Navigation Buttons */
.translations-books-swiper .swiper-button-next,
.translations-books-swiper .swiper-button-prev,
.translations-articles-swiper .swiper-button-next,
.translations-articles-swiper .swiper-button-prev {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-radius: var(--radius-full);
    box-shadow: 0 4px 15px rgba(227, 188, 59, 0.3);
    transition: all var(--transition-base);
}

.translations-books-swiper .swiper-button-next::after,
.translations-books-swiper .swiper-button-prev::after,
.translations-articles-swiper .swiper-button-next::after,
.translations-articles-swiper .swiper-button-prev::after {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-dark);
}

.translations-books-swiper .swiper-button-next:hover,
.translations-books-swiper .swiper-button-prev:hover,
.translations-articles-swiper .swiper-button-next:hover,
.translations-articles-swiper .swiper-button-prev:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(227, 188, 59, 0.5);
}

.translations-books-swiper .swiper-button-next.swiper-button-disabled,
.translations-books-swiper .swiper-button-prev.swiper-button-disabled,
.translations-articles-swiper .swiper-button-next.swiper-button-disabled,
.translations-articles-swiper .swiper-button-prev.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* RTL Support for Navigation */
[dir="rtl"] .translations-books-swiper .swiper-button-next,
[dir="rtl"] .translations-articles-swiper .swiper-button-next {
    right: auto;
    left: 0;
}

[dir="rtl"] .translations-books-swiper .swiper-button-prev,
[dir="rtl"] .translations-articles-swiper .swiper-button-prev {
    left: auto;
    right: 0;
}

/* Pagination */
.translations-books-pagination,
.translations-articles-pagination {
    position: relative !important;
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.translations-books-pagination .swiper-pagination-bullet,
.translations-articles-pagination .swiper-pagination-bullet {
    width: 0.625rem;
    height: 0.625rem;
    background-color: rgba(212, 175, 55, 0.3);
    opacity: 1;
    transition: all var(--transition-base);
}

.translations-books-pagination .swiper-pagination-bullet-active,
.translations-articles-pagination .swiper-pagination-bullet-active {
    background-color: var(--color-primary);
    width: 2rem;
    border-radius: var(--radius-full);
    box-shadow: 0 0 10px rgba(227, 188, 59, 0.5);
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 767px) {

    .translations-books-swiper .swiper-button-next,
    .translations-books-swiper .swiper-button-prev,
    .translations-articles-swiper .swiper-button-next,
    .translations-articles-swiper .swiper-button-prev {
        display: none;
    }

    .translations-section {
        padding: 3rem 1rem;
    }

    .translations-section__title {
        font-size: 1.75rem;
    }
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */
@media (min-width: 768px) {
    .translations-section__title {
        font-size: 2.75rem;
    }

    .translations-books-swiper .swiper-button-next,
    .translations-articles-swiper .swiper-button-next {
        right: -0.5rem;
    }

    .translations-books-swiper .swiper-button-prev,
    .translations-articles-swiper .swiper-button-prev {
        left: -0.5rem;
    }
}

/* ========================================
   RESPONSIVE - DESKTOP
   ======================================== */
@media (min-width: 1024px) {

    .translations-books-swiper .swiper-button-next,
    .translations-articles-swiper .swiper-button-next {
        right: -1.5rem;
    }

    .translations-books-swiper .swiper-button-prev,
    .translations-articles-swiper .swiper-button-prev {
        left: -1.5rem;
    }
}