/* ===========================
   Talent Promo Modal Styles
   Matches User's Exact Request
   =========================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    /* Increased to sit above everything */
    animation: fadeIn 0.3s ease-out;
    padding: 20px;
}

.modal-overlay.active {
    display: flex !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===========================
   Modal Container
   =========================== */
.modal-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.98) 0%, rgba(30, 30, 45, 0.98) 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    direction: rtl;
    /* Default Arabic */
}

/* LTR Support */
body.lang-en #talentPromoModal .modal-container {
    direction: ltr !important;
}

body.lang-en #talentPromoModal .close-btn {
    left: auto !important;
    right: 20px !important;
}

body.lang-en #talentPromoModal .modal-text {
    text-align: left !important;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Background Image Effect */
.modal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Use a dark gradients as fallback since we don't have the image file yet */
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

/* Dark overlay for better text readability */
.modal-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
    z-index: 0;
}

/* ===========================
   Close Button
   =========================== */
.close-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: transparent;
    border: 2px solid #d4a574;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(212, 165, 116, 0.15);
    border-color: #e0b684;
    transform: rotate(90deg);
}

.close-btn svg {
    color: #d4a574;
    width: 24px;
    height: 24px;
}

/* ===========================
   Modal Content
   =========================== */
.modal-content {
    position: relative;
    z-index: 1;
    padding: 60px 80px 40px;
    text-align: center;
    border-radius: 16px;
}

/* Header */
.modal-header {
    margin-bottom: 40px;
}

.modal-title {
    color: #ffffff;
    font-size: 38px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 20px;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
    font-family: 'Cairo', sans-serif;
}

.title-underline {
    width: 100%;
    max-width: 900px;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.3) 20%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0.3) 80%,
            transparent 100%);
    margin: 0 auto;
}

/* Body */
.modal-body {
    margin: 40px 0 50px;
}

.modal-text {
    color: rgba(255, 255, 255, 0.95);
    font-size: 17px;
    line-height: 1.9;
    max-width: 900px;
    margin: 0 auto;
    padding: 28px 40px;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.12) 0%, rgba(199, 149, 74, 0.08) 100%);
    border: 1.5px solid rgba(212, 165, 116, 0.35);
    border-radius: 8px;
    backdrop-filter: blur(8px);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    font-family: 'Cairo', sans-serif;
}

/* Footer */
.modal-footer {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.details-btn {
    background: linear-gradient(135deg, #d4a574 0%, #c7954a 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(212, 165, 116, 0.3);
    font-family: 'Cairo', sans-serif;
    text-decoration: none;
}

.details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(212, 165, 116, 0.4);
    background: linear-gradient(135deg, #e0b684 0%, #d4a574 100%);
}

.details-btn:active {
    transform: translateY(0);
}

.details-btn svg {
    transition: transform 0.3s ease;
}

/* Rotate icon based on direction */
.lang-ar .details-btn svg {
    transform: rotate(180deg);
}

.lang-en .details-btn svg {
    transform: rotate(0deg);
}

.details-btn:hover svg {
    transform: rotate(180deg) translateX(-4px);
}

body.lang-en .details-btn:hover svg {
    transform: rotate(0deg) translateX(4px);
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
    .modal-content {
        padding: 50px 30px 30px;
    }

    .modal-title {
        font-size: 28px;
    }

    .modal-text {
        font-size: 16px;
        padding: 20px 25px;
    }

    .details-btn {
        padding: 14px 32px;
        font-size: 16px;
    }

    .close-btn {
        top: 15px;
        left: 15px;
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 40px 20px 25px;
    }

    .modal-title {
        font-size: 1.5rem !important;
        /* 24px -> 1.5rem standard */
    }

    .modal-text {
        font-size: 0.95rem !important;
        /* 14px -> 0.95rem standard */
        padding: 18px 20px;
        line-height: 1.6;
    }

    .details-btn {
        padding: 12px 28px;
        font-size: 0.95rem;
    }
}