/* ==========================================================================
   Accreditations Section (قسم الاعتمادات)
   ========================================================================== */

.accreditations-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f9f7f4 100%);
    position: relative;
    overflow: hidden;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
}

.accreditations-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primaryColor), var(--helperColor));
}

.accreditations-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
}

.accreditations-header .tag {
    background-color: var(--primaryColor);
    color: var(--white);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(175, 131, 99, 0.3);
}

.accreditations-header h2 {
    color: var(--middleColor);
    font-size: 36px;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 15px;
}

.accreditations-header h2 span {
    color: var(--primaryColor);
}

.accreditations-header p {
    color: #666;
    font-size: 17px;
    line-height: 1.8;
}

/* Grid for ISO Cards */
.accreditations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.accreditation-card {
    background: var(--white);
    border-radius: 16px;
    border: 1px solid rgba(175, 131, 99, 0.18);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.accreditation-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(175, 131, 99, 0.2);
    border-color: var(--primaryColor);
}

.accreditation-img-wrapper {
    position: relative;
    background: #ffffff;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;
    border-bottom: 1px solid #f0ebe4;
    cursor: pointer;
    overflow: hidden;
}

.accreditation-img-wrapper img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.accreditation-card:hover .accreditation-img-wrapper img {
    transform: scale(1.05);
}

.accreditation-zoom-overlay {
    position: absolute;
    inset: 0;
    background: rgba(32, 15, 6, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
    opacity: 0;
    transition: opacity 0.3s ease;
    gap: 8px;
}

.accreditation-img-wrapper:hover .accreditation-zoom-overlay {
    opacity: 1;
}

.accreditation-zoom-overlay i {
    font-size: 20px;
    background: var(--primaryColor);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.accreditation-zoom-overlay span {
    font-size: 14px;
    font-weight: 600;
}

.accreditation-body {
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: right;
}

.accreditation-badge {
    display: inline-block;
    align-self: flex-start;
    background: rgba(175, 131, 99, 0.12);
    color: var(--primaryColor);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}

.accreditation-body h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--middleColor);
    margin-bottom: 8px;
}

.accreditation-body .subtitle {
    font-size: 15px;
    color: var(--primaryColor);
    font-weight: 700;
    margin-bottom: 12px;
}

.accreditation-body p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* PDF Section Feature Card */
.accreditation-pdf-banner {
    background: linear-gradient(135deg, var(--lightHelper) 0%, #200f06 100%);
    border-radius: 20px;
    padding: 35px 40px;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    box-shadow: 0 15px 35px rgba(28, 28, 53, 0.3);
    position: relative;
    overflow: hidden;
}

.accreditation-pdf-banner::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(175, 131, 99, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.pdf-info-side {
    display: flex;
    align-items: center;
    gap: 25px;
    flex: 1;
}

.pdf-icon-wrapper {
    width: 75px;
    height: 75px;
    min-width: 75px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--primaryColor);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff5252;
    font-size: 38px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.pdf-text-wrapper h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--white);
}

.pdf-text-wrapper p {
    font-size: 15px;
    color: #d1d5db;
    margin: 0;
    line-height: 1.6;
}

.pdf-action-side {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.pdf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.pdf-btn-primary {
    background-color: var(--primaryColor);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(175, 131, 99, 0.4);
}

.pdf-btn-primary:hover {
    background-color: #966d50;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(175, 131, 99, 0.6);
    color: var(--white);
}

.pdf-btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.pdf-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    color: var(--white);
}

/* Lightbox Modal */
.accreditation-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.accreditation-modal.active {
    opacity: 1;
    visibility: visible;
}

.accreditation-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: var(--white);
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.accreditation-modal.active .accreditation-modal-content {
    transform: scale(1);
}

.accreditation-modal-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.accreditation-modal-caption {
    margin-top: 15px;
    font-size: 18px;
    font-weight: 700;
    color: var(--middleColor);
    text-align: center;
}

.accreditation-modal-close {
    position: absolute;
    top: -15px;
    left: -15px;
    width: 40px;
    height: 40px;
    background: var(--primaryColor);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    border: 2px solid var(--white);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.accreditation-modal-close:hover {
    transform: scale(1.1);
    background: var(--helperColor);
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .accreditations-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .accreditation-pdf-banner {
        flex-direction: column;
        text-align: center;
        padding: 30px 25px;
    }

    .pdf-info-side {
        flex-direction: column;
        text-align: center;
    }

    .pdf-action-side {
        width: 100%;
        justify-content: center;
    }

    .accreditations-header h2 {
        font-size: 28px;
    }
}

@media (max-width: 600px) {
    .accreditations-section {
        padding: 50px 0;
    }

    .accreditations-grid {
        grid-template-columns: 1fr;
    }

    .pdf-action-side {
        flex-direction: column;
    }

    .pdf-btn {
        width: 100%;
    }

    .accreditations-header h2 {
        font-size: 24px;
    }

    .accreditations-header p {
        font-size: 15px;
    }
}
