/* About modal - matches קו החוסן visual language (see app.css, learningChapterShared.css) */

:root {
    --about-brand-purple: #320f5b;
    --about-brand-yellow: #fec600;
    --about-modal-max-width: 720px;
    --about-logo-max-width: 120px;
    --about-logo-max-height: 72px;
}

body.about-modal-open {
    overflow: hidden;
}

.about-open-btn {
    border: none;
    border-radius: 999px;
    background: var(--about-brand-purple);
    color: #fff;
    font-family: 'Assistant', 'Segoe UI', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(50, 15, 91, 0.18);
}

.about-open-btn:hover {
    background: #442172;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(50, 15, 91, 0.24);
}

.about-open-btn:active {
    transform: translateY(0);
}

.about-open-btn:focus-visible {
    outline: 3px solid rgba(50, 15, 91, 0.35);
    outline-offset: 3px;
}

#standaloneResetOpenBtn {
    margin-inline-start: 8px;
}

#standaloneCompletedRestartBtn {
    margin-top: 12px;
}

.welcome-header-actions {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 3;
}

.about-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(17, 10, 33, 0.58);
    direction: rtl;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.about-backdrop[hidden] {
    display: none;
}

.about-backdrop.about-backdrop--visible {
    opacity: 1;
    visibility: visible;
}

.about-modal {
    width: min(100%, var(--about-modal-max-width));
    max-height: min(90vh, 820px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    border: 2px solid #e2d4fa;
    background: linear-gradient(180deg, #ffffff 0%, #faf8fc 100%);
    box-shadow: 0 18px 42px rgba(50, 15, 91, 0.28);
    text-align: center;
    transform: translateY(8px) scale(0.98);
    transition: transform 0.22s ease;
}

.about-backdrop.about-backdrop--visible .about-modal {
    transform: translateY(0) scale(1);
}

.about-modal__header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.125rem 3rem 1rem;
    background: var(--about-brand-purple);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.about-modal__title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.15rem, 2.5vw, 1.35rem);
    font-weight: 800;
    line-height: 1.3;
}

.about-modal__close {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.about-modal__close:hover {
    background: var(--about-brand-yellow);
    color: var(--about-brand-purple);
    border-color: var(--about-brand-yellow);
    box-shadow: 0 4px 14px rgba(254, 198, 0, 0.45);
    transform: translateY(-50%) scale(1.1);
}

.about-modal__close:active {
    background: #ffd633;
    border-color: #ffd633;
    transform: translateY(-50%) scale(1.02);
    box-shadow: 0 2px 8px rgba(254, 198, 0, 0.35);
}

.about-modal__close:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.55);
    outline-offset: 2px;
}

.about-modal__close svg {
    display: block;
}

.about-modal__body {
    padding: 1.25rem 1.75rem 1rem;
}

.about-modal__project-title {
    margin: 0 0 0.75rem;
    color: var(--about-brand-purple);
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    font-weight: 800;
    line-height: 1.25;
}

.about-modal__description,
.about-modal__year,
.about-modal__faculty {
    margin: 0 0 0.5rem;
    color: #3d3550;
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    line-height: 1.65;
    font-weight: 500;
}

.about-modal__faculty {
    margin-bottom: 1.5rem;
}

.about-modal__faculty-link {
    color: var(--about-brand-purple);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.about-modal__faculty-link:hover {
    color: #442172;
}

.about-modal__faculty-link:focus-visible {
    outline: 3px solid rgba(50, 15, 91, 0.35);
    outline-offset: 3px;
    border-radius: 4px;
}

.about-modal__partners {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.about-modal__partner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.875rem;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #e2d4fa;
    background: rgba(255, 255, 255, 0.85);
    text-align: right;
}

.about-modal__partner-content {
    flex: 1;
    min-width: 0;
}

.about-modal__partner-heading {
    margin: 0 0 0.375rem;
    color: var(--about-brand-purple);
    font-size: 0.875rem;
    font-weight: 800;
}

.about-modal__names {
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0;
    color: #3d3550;
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: 500;
}

.about-modal__role {
    margin: 0;
    color: #3d3550;
    font-size: 0.9rem;
    line-height: 1.5;
}

.about-modal__role-label {
    color: var(--about-brand-purple);
    font-weight: 800;
}

.about-modal__logo {
    flex-shrink: 0;
    width: auto;
    max-width: var(--about-logo-max-width);
    max-height: var(--about-logo-max-height);
    object-fit: contain;
}

.about-modal__footer {
    margin-top: auto;
    padding: 0.875rem 1.75rem 1.125rem;
    background: var(--about-brand-purple);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 767.98px) {
    .welcome-header-actions {
        top: 0.75rem;
        left: 0.75rem;
    }

    .about-open-btn {
        font-size: 0.875rem;
        padding: 7px 14px;
    }

    .about-backdrop {
        padding: 12px;
    }

    .about-modal__header {
        padding-inline: 2.75rem 1rem;
    }

    .about-modal__body {
        padding-inline: 1.25rem;
    }

    .about-modal__partners {
        grid-template-columns: 1fr;
    }

    .about-modal__partner {
        flex-direction: column-reverse;
        align-items: center;
        text-align: center;
    }

    .about-modal__partner-content {
        text-align: center;
    }
}
