* {
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body.menu-open {
    overflow: hidden;
}

.top-strip {
    background: linear-gradient(90deg, #065f46, #15803d);
    color: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
}

.top-strip-inner {
    min-height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
    font-size: 0.86rem;
    font-weight: 700;
    flex-wrap: wrap;
    padding: 0.35rem 0;
}

.top-strip-inner i {
    color: #ffb74d;
    margin-left: 0.35rem;
}

.navbar {
    top: 2.65rem;
    background: transparent;
    border: 0;
}

.navbar.navbar-scrolled {
    transform: translateY(-2px);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.navbar .logo {
    z-index: 3;
}

.navbar .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
    padding: 0.35rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.16);
    overflow-x: auto;
    scrollbar-width: none;
}

.navbar .nav-links::-webkit-scrollbar {
    display: none;
}

.navbar .nav-links a {
    color: #0f172a;
    font-weight: 700;
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 0.38rem 0.65rem;
}

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
    background: #ffb74d;
    color: #065f46;
}

.language-switcher {
    background: #f1f5f9;
    border-radius: 999px;
    padding: 0.2rem;
}

.language-switcher a {
    color: #0f172a;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
}

.language-switcher a.active {
    background: #065f46;
    color: #fff;
}

.mobile-menu-btn {
    background: rgba(255, 255, 255, 0.96);
    color: #065f46;
    border: 1px solid rgba(187, 247, 208, 0.95);
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.18);
}

.mobile-menu-btn:hover,
.mobile-menu-btn:focus-visible {
    background: #ecfdf5;
    color: #047857;
}

.mobile-menu {
    display: none;
    top: 6.4rem;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.mobile-menu .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.mobile-menu .nav-links a {
    display: block;
    background: #f8fafc;
    color: #0f172a;
}

.mobile-menu.active {
    display: block;
}

.hero {
    background:
        linear-gradient(180deg, rgba(231, 236, 239, 0.92) 0%, rgba(217, 224, 228, 0.9) 55%, rgba(238, 242, 246, 0.94) 100%),
        url('../images/school.jpg');
    background-color: #e5ebef;
    background-size: cover;
    background-position: center;
    position: relative;
}

.about {
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
    position: relative;
    overflow: hidden;
}

.about-modern {
    align-items: stretch;
}

.about-panel {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #dcfce7;
    border-radius: 1.4rem;
    padding: 1.3rem 1.2rem;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    animation: aboutFloat 7s ease-in-out infinite;
}

.about-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 0.5rem;
}

.about-chip {
    display: inline-flex;
    align-items: center;
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 0.26rem 0.72rem;
    font-weight: 700;
    font-size: 0.84rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 0.8rem;
}

.about-stat {
    border-radius: 1rem;
    background: linear-gradient(180deg, #f8fff7, #effcf0);
    border: 1px solid #dcfce7;
    padding: 0.8rem 0.55rem;
    text-align: center;
}

.about-stat strong {
    display: block;
    font-size: 1.2rem;
    color: #065f46;
    line-height: 1.1;
}

.about-stat span {
    color: #374151;
    font-size: 0.8rem;
    font-weight: 700;
}

.about-visuals {
    display: grid;
    gap: 0.8rem;
}

.about-gallery img {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.about-gallery img:nth-child(1) {
    animation: cardLift 4.8s ease-in-out infinite;
}

.about-gallery img:nth-child(2) {
    animation: cardLift 5.2s ease-in-out infinite 0.25s;
}

.about-gallery img:nth-child(3) {
    animation: cardLift 5.4s ease-in-out infinite 0.5s;
}

.about-gallery img:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.about-video {
    min-height: 240px;
}

.about-video video {
    min-height: 240px;
}

@keyframes cardLift {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes aboutFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.academics {
    background: linear-gradient(180deg, #f8fff7 0%, #e8f5e9 100%);
}

.social-media {
    background: linear-gradient(180deg, #fff8ef 0%, #ffe7c7 100%);
}

.admissions {
    background: linear-gradient(180deg, #f4fff1 0%, #ecf9e8 100%);
}

.contact {
    background: linear-gradient(180deg, #fff9ef 0%, #ffeacc 100%);
}

.about,
.academics,
.social-media,
.admissions,
.contact {
    position: relative;
    overflow: hidden;
}

.about::before,
.about::after,
.academics::before,
.academics::after,
.social-media::before,
.social-media::after,
.admissions::before,
.admissions::after,
.contact::before,
.contact::after {
    content: "";
    position: absolute;
    left: -8%;
    width: 116%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
    background-repeat: repeat-x;
    background-size: 520px 110px;
    animation: waveFlow 13s linear infinite;
}

.about::before,
.academics::before,
.social-media::before,
.admissions::before,
.contact::before {
    top: -12px;
    height: 88px;
    background-image: radial-gradient(55px 28px at 50% 100%, rgba(255, 255, 255, 0.75) 98%, transparent 100%);
}

.about::after,
.academics::after,
.social-media::after,
.admissions::after,
.contact::after {
    bottom: -16px;
    height: 96px;
    opacity: 0.28;
    background-image: radial-gradient(58px 30px at 50% 0, rgba(255, 255, 255, 0.72) 98%, transparent 100%);
    animation-duration: 17s;
    animation-direction: reverse;
}

.about > .container,
.academics > .container,
.social-media > .container,
.admissions > .container,
.contact > .container {
    position: relative;
    z-index: 1;
}

@keyframes waveFlow {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-260px);
    }
}

.hero-shell {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    width: min(1120px, 100%);
    margin-inline: auto;
    position: relative;
    z-index: 2;
}

.hero-content {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid #e2e8f0;
    border-radius: 2rem;
    box-shadow: 0 20px 32px rgba(2, 6, 23, 0.15);
    padding: 1.9rem 1.7rem;
    position: relative;
    z-index: 2;
    max-width: 700px;
    width: 100%;
    margin-inline: auto;
    overflow: hidden;
    text-align: center;
}

.hero-kicker {
    color: #16a34a;
    font-weight: 700;
    margin-bottom: 0.65rem;
}

.hero-content h2 {
    color: #065f46;
    white-space: nowrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: clamp(1.1rem, 1.95vw, 2.1rem);
    line-height: 1.2;
    max-width: 100%;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, #16a34a, #ffb74d);
    color: #fff;
    font-weight: 800;
    border-radius: 999px;
    padding: 0.9rem 2rem;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 12px 22px rgba(22, 163, 74, 0.28);
}

.cta-button:hover {
    transform: translateY(-3px);
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 0.9rem;
    overflow: hidden;
    z-index: 3;
    background: #ffffff;
    box-shadow: 0 10px 18px rgba(2, 6, 23, 0.14);
}

.hero-media-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
    z-index: 3;
}

.hero-static-media {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 0.9rem;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 10px 18px rgba(2, 6, 23, 0.14);
    z-index: 3;
}

.slider-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
    transform: none;
    transform-origin: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.slider-image.active {
    opacity: 1;
}

.hero-slider-frame {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    z-index: 1;
    transform: none;
    overflow: visible;
    padding: 18px;
    isolation: isolate;
}

.hero-frames-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: clamp(0.85rem, 2vw, 1.4rem);
    margin-top: 0.2rem;
}

.hero-frame-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
    transform: none;
    transform-origin: center;
    display: block;
    border-radius: 0.9rem;
    box-shadow: none;
}

.hero-media-badge {
    position: absolute;
    right: 0.85rem;
    bottom: 0.85rem;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #065f46, #16a34a);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 10px 18px rgba(2, 6, 23, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-media-link:hover .hero-media-badge {
    transform: translateX(-2px);
    box-shadow: 0 12px 22px rgba(2, 6, 23, 0.24);
}

.hero-media-badge i {
    font-size: 0.95rem;
}

.hero-slider-frame-two {
    transform: none;
}

.hero-slider-frame-three {
    transform: none;
}

.hero-slider-frame::before,
.hero-slider-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 0;
    pointer-events: none;
}

.hero-slider-frame::before {
    z-index: 1;
    background: #ffffff;
    clip-path: polygon(
        2% 7%, 8% 2%, 17% 5%, 28% 1%, 40% 4%, 51% 0%, 63% 6%, 74% 2%, 85% 7%, 95% 3%,
        98% 14%, 100% 25%, 96% 35%, 99% 47%, 95% 60%, 100% 73%, 97% 84%, 92% 95%, 80% 98%, 69% 96%,
        57% 100%, 46% 95%, 35% 99%, 23% 94%, 12% 98%, 3% 90%, 0% 78%, 4% 66%, 1% 54%, 5% 41%, 0% 29%, 3% 18%
    );
    animation: frameBrushMotion 2.7s ease-in-out infinite;
}

.hero-slider-frame::after {
    z-index: 2;
    inset: 8px;
    background: #fdfdfd;
    clip-path: polygon(
        4% 9%, 11% 4%, 20% 7%, 31% 3%, 42% 7%, 53% 2%, 65% 8%, 76% 4%, 87% 9%, 95% 6%,
        97% 16%, 94% 28%, 98% 40%, 94% 52%, 99% 65%, 95% 77%, 97% 89%, 89% 95%, 78% 97%, 67% 94%,
        56% 98%, 45% 94%, 34% 97%, 24% 92%, 14% 96%, 6% 90%, 3% 80%, 6% 68%, 2% 56%, 7% 44%, 3% 32%, 6% 21%
    );
    animation: frameBrushMotionAlt 2.2s ease-in-out infinite;
}

.scratch-overlay {
    display: none;
}

@keyframes frameBrushMotion {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    35% { transform: translate(-1px, 1px) rotate(-0.6deg) scale(1.01); }
    70% { transform: translate(1px, -1px) rotate(0.5deg) scale(0.995); }
}

@keyframes frameBrushMotionAlt {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    30% { transform: translate(1px, -1px) rotate(0.7deg) scale(1.006); }
    65% { transform: translate(-1px, 1px) rotate(-0.5deg) scale(0.996); }
}

.hero-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 130px;
    background:
        radial-gradient(180px 80px at 10% 0, #fff 98%, transparent 100%),
        radial-gradient(220px 90px at 35% 10%, #fff 98%, transparent 100%),
        radial-gradient(220px 90px at 60% 5%, #fff 98%, transparent 100%),
        radial-gradient(220px 90px at 85% 12%, #fff 98%, transparent 100%);
}

.reveal-hidden {
    opacity: 0;
    transform: translateY(24px);
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.academics {
    position: relative;
}

.academic-stages .stage {
    position: relative;
    padding: 1.1rem 1.1rem 1.4rem;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    text-align: center;
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.academic-stages .stage:hover {
    transform: translateY(-7px);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.14);
}

.academic-stages .stage:nth-child(2) {
    background: linear-gradient(180deg, #f4fff1, #e2f8da);
    border-color: #7ccf88;
    transform: scale(1.02);
}

.about-gallery img,
.stage img {
    width: 100%;
    border-radius: 1rem;
    object-fit: cover;
}

.stage img {
    height: 12.4rem;
    margin-bottom: 0.9rem;
    object-fit: contain;
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 0.35rem;
}

.stage h3 {
    color: #065f46;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.social-icon i {
    font-size: 1.75rem;
    color: #15803d;
}

.social-icon span {
    font-weight: 700;
    color: #0f172a;
}

.requirements h3 {
    font-size: 1.25rem;
    margin-bottom: 0.85rem;
    color: #065f46;
}

.requirements ul {
    list-style: disc;
    padding-right: 1.2rem;
    display: grid;
    gap: 0.55rem;
}

.info-item {
    text-align: center;
}

.info-item i {
    font-size: 1.25rem;
    color: #15803d;
    margin-bottom: 0.5rem;
}

.footer-logo img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.site-footer {
    background: linear-gradient(135deg, #065f46 0%, #0b6b3c 55%, #15803d 100%);
    position: relative;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 10%, rgba(255, 183, 77, 0.2), transparent 35%),
        radial-gradient(circle at 85% 90%, rgba(255, 183, 77, 0.16), transparent 38%);
    pointer-events: none;
}

.site-footer .footer-content {
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: 2rem;
}

.footer-brand h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.15rem;
}

.footer-brand p {
    color: #d1fae5;
}

.footer-note {
    margin-top: 1rem;
    color: #ecfdf5;
    max-width: 36ch;
    line-height: 1.8;
}

.footer-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffdfb3;
    margin-bottom: 0.9rem;
}

.footer-links {
    display: grid;
    gap: 0.6rem;
}

.footer-links a {
    color: #f0fdf4;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
    color: #ffb74d;
    transform: translateX(-4px);
}

.footer-contact {
    display: grid;
    gap: 0.6rem;
}

.footer-contact p {
    margin: 0;
    color: #f0fdf4;
    line-height: 1.7;
}

.footer-contact i {
    color: #ffb74d;
    margin-left: 0.45rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.95rem 1rem;
    text-align: center;
    position: relative;
    z-index: 1;
    color: #d1fae5;
    font-weight: 700;
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

.whatsapp-float:hover {
    transform: translateY(-2px) scale(1.03);
}

@media (max-width: 1023px) {
    .navbar {
        top: 2.75rem;
    }

    .navbar .nav-links {
        display: none;
    }

    .hero-content {
        text-align: center;
    }

    .hero-content h2 {
        white-space: normal;
        font-size: clamp(1.25rem, 5vw, 2rem);
    }

    .hero-slider-frame {
        width: 100%;
        height: auto;
        padding: 8px;
    }

    .hero-frames-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.7rem;
    }

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

    .about-panel {
        animation: none;
    }
}

@media (min-width: 1280px) {
    .navbar .nav-links a {
        font-size: 0.86rem;
        padding: 0.42rem 0.72rem;
    }
}

@media (max-width: 640px) {
    .top-strip-inner {
        gap: 0.6rem;
        font-size: 0.74rem;
    }

    .hero-wave {
        height: 95px;
    }

    .hero-slider-frame {
        width: 100%;
        height: auto;
        transform: none;
        padding: 5px;
    }

    .hero-frames-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        margin-top: 0.3rem;
    }

    .hero-media-badge {
        right: 0.55rem;
        bottom: 0.55rem;
        width: 2.15rem;
        height: 2.15rem;
        font-size: 0.78rem;
    }

    .hero-media-badge i {
        font-size: 0.78rem;
    }

    .hero-content {
        max-width: 92%;
        padding: 1.25rem 0.95rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.35rem;
    }

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

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .slider-image,
    .animate-in,
    .whatsapp-float,
    .back-to-top,
    .stage,
    .cta-button,
    .about-panel,
    .about-gallery img {
        transition: none !important;
        animation: none !important;
    }

    .about::before,
    .about::after,
    .academics::before,
    .academics::after,
    .social-media::before,
    .social-media::after,
    .admissions::before,
    .admissions::after,
    .contact::before,
    .contact::after {
        animation: none !important;
    }

    .hero-slider-frame::after,
    .scratch-overlay {
        animation: none !important;
        opacity: 1;
    }
}
