/* ======================================================================
   Mr. Abdelrahman Rashed — principal profile
   Cleaned & refactored — same selectors, same behavior.
   ======================================================================   */

/* ============================================================
   BASE STYLES
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Cairo",sans-serif;
    min-height: 100vh;
    background: linear-gradient(
        rgba(0,0,0,.45),
        rgba(0,0,0,.45)
    ),
    url("../images/aols.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/*================ HEADER ================*/

header {
    width: 100%;
    height: 70px;
    position: fixed;
    top: 0;
    left: 0;
    padding: 0 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(15px);
    box-shadow: 0 5px 20px rgba(0,0,0,.15);
    z-index: 1000;
}

.logo {
    text-decoration: none;
    font-size: 28px;
    font-weight: 800;
    color: #2563eb;
    letter-spacing: 1px;
    background: linear-gradient(135deg,#1d4ed8 0%,#2563eb 50%,#3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    padding: 4px 0;
    transition: .3s;
    filter: drop-shadow(0 2px 4px rgba(37,99,235,.2));
}

nav ul {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
}

.logo::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,#2563eb,#60a5fa);
    border-radius: 10px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

.logo:hover::before {
    transform: scaleX(1);
}

.logo:hover {
    filter: drop-shadow(0 4px 8px rgba(241,241,241,.4));
}

nav ul li a {
    text-decoration: none;
    color: #374151;
    font-weight: 600;
    font-size: 14.5px;
    padding: 8px 18px;
    position: relative;
    transition: .3s;
}

nav ul li a::after {
    content: "";
    position: absolute;
    left: 18px;
    bottom: 2px;
    width: calc(100% - 36px);
    height: 2px;
    background: #2563eb;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .3s ease;
}

nav ul li a:hover {
    color: #2563eb;
}

nav ul li a:hover::after {
    transform: scaleX(1);
}

nav ul li a.active {
    color: #2563eb;
}

nav ul li a.active::after {
    transform: scaleX(1);
}

.menu-btn {
    display: none;
    font-size: 26px;
    color: #2563eb;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background .2s ease,transform .2s ease;
}

.menu-btn:hover {
    background: rgba(37,99,235,.1);
    transform: scale(1.08);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/*================ LANGUAGE SWITCH ================*/

.lang-switch {
    padding: 4px;
    border: 1.5px solid rgba(37,99,235,.3);
    border-radius: 50px;
    background: rgba(37,99,235,.08);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 2px;
    transition: .3s;
}

/*================ Gallery SECTION ================*/

.school-activities {
    padding: 130px 8% 80px;
}

.classes-title {
    text-align: center;
    margin-bottom: 40px;
}

.classes-title h2 {
    color: #fff;
    font-size: 45px;
    font-weight: 800;
    margin: -30px auto 10px;
}

.classes-title p {
    color: #ffe600;
    margin-top: 10px;
    font-size: 18px;
    font-weight: bold;
}

.school-logo {
    background-image: url(../images/logo.png);
    background-size: cover;
    width: 200px;
    height: 200px;
    margin: -30px auto 20px;
    object-fit: cover;
    border-radius: 50%;
    overflow: hidden;
    display: cover;
    padding: 0;
    transition: .4s ease;
}

.school-logo:hover {
    transform: scale(1.08);
    box-shadow: 0 0 25px #f5f4f4,
        0 0 60px #2b2b2b;
}

.teacher-photo:hover img{

    transform: scale(1.1);

}

/*================ DROPDOWN ================*/

.activity-dropdown {
    width: 100%;
    max-width: 650px;
    margin: 0 auto 50px;
    position: relative;
}

.activity-btn {
    width: 100%;
    margin: -30px auto 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border: none;
    border-radius: 18px;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(15px);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: .3s;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
}

.activity-btn:hover {
    background: rgba(255,255,255,.22);
}

.activity-btn .fa-images {
    margin-right: 10px;
    color: #ffe600;
}

.arrow {
    transition: .3s;
}

.activity-btn.active .arrow {
    transform: rotate(180deg);
}

.activity-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(18px);
    border-radius: 18px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: .35s;
    box-shadow: 0 15px 35px rgba(0,0,0,.25);
    z-index: 999;
}

.activity-menu.show {
    max-height: 450px;
    opacity: 1;
    overflow-y: auto;
}

.activity-menu button {
    width: 100%;
    padding: 16px 22px;
    background: transparent;
    border: none;
    color: #fff;
    text-align: left;
    font-size: 16px;
    cursor: pointer;
    transition: .25s;
}

.activity-menu button:hover {
    background: rgba(255,255,255,.18);
    color: #ffe600;
}

.activity-menu::-webkit-scrollbar {
    width: 8px;
}

.activity-menu::-webkit-scrollbar-thumb {
    background: #ffe600;
    border-radius: 20px;
}

.activity-menu::-webkit-scrollbar-track {
    background: transparent;
}

/*================ CONTENT ================*/

.mrabdo-tab-content {
    display: none;
    animation: fade .4s ease;
}

.mrabdo-tab-content.active {
    display: block;
}

/*================ GALLERY ================*/

.championship-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 300px));
    justify-content: center; 
    gap: 20px;
    width: 100%;
}

/*================ CARD ================*/

.championship-card {
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    transition: .35s;
    box-shadow: 0 10px 25px rgba(0,0,0,.2);
}

.championship-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 35px rgba(0,0,0,.3);
}

.championship-card img {
    width: 100%;
    height: 260px;
    object-fit: contain;
    border-radius: 15px;
    cursor: pointer;
    transition: .35s;
}

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

.championship-card h3 {
    margin-top: 18px;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}

.championship-card p {
    margin-top: 10px;
    color: #dddddd;
    font-size: 17px;
    line-height: 1.6;
}

/*================ POPUP ================*/

.image-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.image-modal.show {
    display: flex;
}

.modal-content {
  width: 90%;
    max-width: 900px;
    text-align: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 15px;
}

.modal-content p {
    color: #fff;
    margin-top: 20px;
    line-height: 1.8;
    white-space: pre-line;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 45px;
    cursor: pointer;
}

.lang-switch .ls-en, .lang-switch .ls-ar {
    padding: 5px 13px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    color: #2563eb;
    transition: background .3s,color .3s,box-shadow .3s;
    line-height: 1;
}

.lang-switch .ls-active {
    background: linear-gradient(135deg,#2563eb,#3b82f6);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37,99,235,.4);
}

.lang-switch:hover {
    border-color: rgba(37,99,235,.6);
    box-shadow: 0 2px 10px rgba(37,99,235,.15);
}

/*================ RTL SUPPORT ================*/

html[dir="rtl"] body {
    font-family: 'Cairo',sans-serif;
}

header.scrolled {
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.137), rgba(235, 245, 255, 0.048));
    box-shadow: 0 2px 0 rgba(37,99,235,.25), 0 12px 40px rgba(0,0,0,.18);
    transition: height .3s ease, box-shadow .3s ease;
}

/* اللوجو */

header.scrolled .logo {
    color: #fff;
    background: none;
    -webkit-text-fill-color: #fff;
}

/* اللينكات */

header.scrolled nav ul li a {
    color: #fdfdfd;
}

/* زر المنيو */

header.scrolled .menu-btn {
    color: #fff;
}

/* لو الكارد فيه فيديو فقط */
.championship-card:has(video) {
    grid-column: 1 / -1;
    max-width: 900px;   /* أو 1000px */
    width: 100%;
    margin: 0 auto;
}

.championship-card video{
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 15px;
    background: #000;
    transition: .35s;
}

.championship-card video:hover {
    transform: scale(1.02);
}

#popupVideo{
    display:none;
    width:auto;
    height:auto;
    max-width:95vw;
    max-height:85vh;
    aspect-ratio:16/9;
    object-fit:contain;
    border-radius:15px;
    background:#000;
}

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   RESPONSIVE — MEDIA QUERIES (largest → smallest)
   ============================================================ */

/* ---- BREAKPOINT — max-width: 768px ---- */

@media (max-width:768px) {

    .mrabdo-activities {
        padding: 95px 5% 40px;
    }

    .teacher-photo {
        width: 150px;
        height: 150px;
        margin: 0 auto 15px;
    }

    .classes-title {
        margin-bottom: 20px;
    }

    .classes-title h2 {
        font-size: 26px;
        margin: 0 auto 8px;
        line-height: 1.3;
    }

    .classes-title p {
        font-size: 14px;
        margin-top: 5px;
    }


    /* DROPDOWN */
    .activity-dropdown {
        width: 100%;
        margin: 15px auto 30px;
    }

    .activity-btn {
        padding: 14px 16px;
        font-size: 15px;
        border-radius: 15px;
        margin: 0;
    }


    /* GALLERY */
    .championship-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

    .championship-card {
    padding: 10px;
    border-radius: 15px;
}

    .championship-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
}

.championship-card:has(video) {
    grid-column: 1 / -1;
}

.championship-card video {
    width: 100%;
    min-height: 180px;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: 12px;
    background: #000;
}

    .championship-card h3 {
        font-size: 14px;
        margin-top: 8px;
    }

    .championship-card p {
        font-size: 12px;
        margin-top: 5px;
    }

}

.scroll-top {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: .3s;
    z-index: 999;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


@media (max-width:768px) {
    .menu-btn{
        display: block;
        font-size: 30px;
        cursor: pointer;
        z-index: 1002;
    }

    /* Navbar */
    nav{
        position: fixed;
        top: 75px;
        right: -300px;
        width: 280px;
        height: 100vh;
        background: rgba(255,255,255,.96);
        backdrop-filter: blur(20px);
        box-shadow: -4px 0 30px rgba(0,0,0,.12);
        transition: .4s cubic-bezier(.4,0,.2,1);
        border-left: 1px solid rgba(37,99,235,.15);
        display: flex;
        flex-direction: column;
    }

    nav.active{
        right: 0;
    }

    /* ===========================
       OVERLAY خلف المنيو
    =========================== */
    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .55);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        opacity: 0;
        visibility: hidden;
        transition: opacity .4s ease, visibility .4s ease;
        z-index: 998;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    nav::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: linear-gradient(180deg, #2563eb, #60a5fa, #2563eb);
    }

    /* ===========================
       حركة دخول متتالية للروابط
    =========================== */
    nav ul li {
        opacity: 0;
        transform: translateX(30px);
        transition: opacity .45s ease, transform .45s ease;
        width: 80%;
    }

    nav.active ul li {
        opacity: 1;
        transform: translateX(0);
    }

    nav.active ul li:nth-child(1) {
        transition-delay: .10s;
    }

    nav.active ul li:nth-child(2) {
        transition-delay: .16s;
    }

    nav.active ul li:nth-child(3) {
        transition-delay: .22s;
    }

    nav.active ul li:nth-child(4) {
        transition-delay: .28s;
    }

    nav.active ul li:nth-child(5) {
        transition-delay: .34s;
    }

    nav.active ul li:nth-child(6) {
        transition-delay: .40s;
    }

    /* ===========================
       شكل احلى للروابط جوه المنيو
    =========================== */
    nav ul li a {
        position: relative;
        font-size: 16px;
        color: #374151;
        overflow: hidden;
        display: block;
        text-align: center;
        border-radius: 12px;
        padding: 12px 20px;
    }

    nav ul li a::after {
        content: "";
        position: absolute;
        bottom: 6px;
        left: 50%;
        width: 0;
        height: 2px;
        background: linear-gradient(90deg, #2563eb, #60a5fa);
        transition: width .3s ease, left .3s ease;
    }

    nav ul li a:hover::after,
    nav ul li a.active::after {
        width: 60%;
        left: 20%;
    }

    nav ul li a:hover {
        background: linear-gradient(135deg, rgba(37, 99, 235, .1), rgba(96, 165, 250, .08));
        color: #1d4ed8;
    }

    /* ===========================
       ايقونة الفتح / القفل (زرار الهامبرجر)
    =========================== */
    .menu-btn i {
        transition: transform .35s ease;
        display: inline-block;
    }

    .menu-btn:has(.fa-xmark) i,
    .menu-btn i.fa-xmark {
        transform: rotate(180deg);
    }

    /* ===========================
       قفل السكرول لما المنيو مفتوحة
    =========================== */
    body.nav-open {
        overflow: hidden;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        gap: 10px;
    }

    .hero {
        padding: 100px 20px 40px;
    }

    .hero-content h1 {
        font-size: 38px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 90%;
    }
}

/* Navbar */

/* Menu Button */

