/*
Theme Name: Ajyal Al-Mawahib
Theme URI: https://ajyal.edu
Author: Ajyal Al-Mawahib Schools
Description: مدارس أجيال المواهب - تعليم تجريبي رائد
Version: 1.0
Text Domain: ajyal
*/

:root {
    --bg-color: #0a192f;
    --text-primary: #e6f1ff;
    --text-secondary: #8892b0;
    --accent-gold: #d4af37;
    --accent-gold-hover: #b5952f;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-hover-bg: rgba(255, 255, 255, 0.08);

    --font-heading: 'Cairo', sans-serif;
    --font-body: 'Tajawal', sans-serif;

    --ease-out: cubic-bezier(0.645, 0.045, 0.355, 1);

    --accent-active: #e63946;
}

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

html {
    scroll-behavior: smooth;
    direction: rtl;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    text-align: right;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
}

/* =====================
   LOGO & BRAND
   ===================== */
.logo-container {
    flex-shrink: 0;
    margin-right: -150px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    padding-right: 160px;
    margin-left: auto;
}

.school-name {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.8), 0 0 20px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 100, 100, 0.4);
    background: linear-gradient(90deg, #00d4ff 0%, #00ffff 12%, #ffd700 24%, #ff6b6b 36%, #00ffff 48%, #ffd700 60%, #00d4ff 72%, #ff6b6b 84%, #00d4ff 100%);
    background-size: 400% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: laserShine 6s linear infinite;
    white-space: nowrap;
}

@keyframes laserShine {
    to {
        background-position: -200% center;
    }
}

.logo-wrapper {
    position: absolute;
    top: -10px;
    right: -70px;
    width: fit-content;
    height: fit-content;
    z-index: 1001;
}

.logo-img {
    height: 145px;
    width: 145px;
    object-fit: contain;
    background: transparent;
    border-radius: 0;
    padding: 0;
    display: block;
    position: relative;
    z-index: 20;
    opacity: 1;
    animation: logoPulse 3s infinite alternate;
    clip-path: inset(0 0 40% 0);
}

@keyframes logoPulse {
    0% {
        filter: drop-shadow(0 0 1px rgba(212, 175, 55, 0.2)) brightness(1);
        transform: scale(1);
    }
    100% {
        filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.5)) brightness(1.1);
        transform: scale(1.02);
    }
}

.logo-wrapper::after {
    display: none;
}

.logo-text {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-heading);
    font-size: 0.55rem;
    font-weight: 700;
    text-align: center;
    z-index: 25;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.8), 0 0 20px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 100, 100, 0.4);
    background: linear-gradient(90deg, #00d4ff 0%, #00ffff 12%, #ffd700 24%, #ff6b6b 36%, #00ffff 48%, #ffd700 60%, #00d4ff 72%, #ff6b6b 84%, #00d4ff 100%);
    background-size: 400% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: laserShine 6s linear infinite;
    white-space: nowrap;
}

.footer-brand img {
    height: 80px;
    border-radius: 8px;
    background: transparent;
    padding: 5px;
}

/* =====================
   HEADER & NAV
   ===================== */
#main-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 120px;
    padding: 0;
    background-color: transparent !important;
    background-image: none !important;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--glass-border);
    overflow: visible;
    display: flex;
    align-items: center;
}

#main-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(to left, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 40%, transparent 100%),
        url('hero-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scaleX(-1);
    z-index: -1;
    opacity: 1;
    filter: contrast(1.4) brightness(1.3) saturate(1.3);
    image-rendering: -webkit-optimize-contrast;
}

#main-header.scrolled {
    padding: 1rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

nav.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    height: 100%;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-logo {
    height: 80px;
    margin-bottom: 1rem;
    object-fit: contain;
}

/* WordPress nav menu styles */
.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

/* WordPress adds menu-item class to each <li> */
.nav-links li {
    list-style: none;
}

.nav-links a {
    color: #ffffff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5), 0 0 10px rgba(0, 255, 255, 0.3);
    text-decoration: none;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.nav-links a:hover {
    color: var(--accent-gold);
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.6), 0 0 10px rgba(212, 175, 55, 0.4);
}

/* Active state: JS class OR WordPress current-menu-item */
.nav-links a.active,
.nav-links .current-menu-item > a,
.nav-links .current-page-ancestor > a,
.nav-links .current-menu-ancestor > a {
    color: var(--accent-active);
}

/* .btn-primary style — add this CSS class to the "التسجيل" menu item in WP admin */
.nav-links a.btn-primary {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
    text-shadow: none;
}

.nav-links a.btn-primary:hover {
    background-color: rgba(212, 175, 55, 0.1);
    transform: translateY(-3px);
    color: var(--accent-gold);
}

.nav-links a.btn-primary.active,
.nav-links .current-menu-item > a.btn-primary {
    color: var(--accent-gold);
}

/* .nav-highlight — add this CSS class to "المنصة التعليمية" in WP admin */
.nav-links a.nav-highlight {
    color: var(--text-secondary);
    text-shadow: none;
}

.nav-links a.nav-highlight:hover {
    color: var(--accent-gold);
}

.nav-links a.nav-highlight.active,
.nav-links .current-menu-item > a.nav-highlight {
    color: var(--text-secondary);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.hamburger .bar {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    display: block;
}

/* =====================
   BUTTONS (global)
   ===================== */
.btn-primary {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
}

.btn-primary:hover {
    background-color: rgba(212, 175, 55, 0.1);
    transform: translateY(-3px);
}

.btn-secondary {
    display: inline-block;
    padding: 1rem 2rem;
    margin-right: 1rem;
    margin-left: 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.btn-secondary:hover {
    color: var(--text-primary);
}

/* =====================
   CAROUSEL HERO
   ===================== */
#carousel-hero {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 120px;
    background: linear-gradient(135deg, var(--bg-color) 0%, #0d1f3a 50%, var(--bg-color) 100%);
    position: relative;
    margin-top: 120px;
    overflow: visible;
}

.carousel-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 60%;
    perspective: 1000px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--accent-gold);
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    font-size: 0.9rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

.scroll-arrow {
    font-size: 1.5rem;
    animation: arrowBounce 1.5s infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

.marquee-wrapper {
    width: 600px;
    height: 200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    overflow: visible;
}

.marquee-content {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: carousel3D 20s linear infinite;
}

@keyframes carousel3D {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(-360deg); }
}

.video-card,
.news-card {
    position: absolute;
    width: 200px;
    height: 130px;
    left: 50%;
    top: 50%;
    margin-left: -100px;
    margin-top: -65px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(212, 175, 55, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    background: #1a1a2e;
    backface-visibility: hidden;
}

.marquee-content > *:nth-child(1) { transform: rotateY(0deg) translateZ(280px); }
.marquee-content > *:nth-child(2) { transform: rotateY(51.4deg) translateZ(280px); }
.marquee-content > *:nth-child(3) { transform: rotateY(102.8deg) translateZ(280px); }
.marquee-content > *:nth-child(4) { transform: rotateY(154.3deg) translateZ(280px); }
.marquee-content > *:nth-child(5) { transform: rotateY(205.7deg) translateZ(280px); }
.marquee-content > *:nth-child(6) { transform: rotateY(257.1deg) translateZ(280px); }
.marquee-content > *:nth-child(7) { transform: rotateY(308.6deg) translateZ(280px); }

.video-card:hover,
.news-card:hover {
    box-shadow: 0 30px 70px rgba(212, 175, 55, 0.5);
    border-color: var(--accent-gold);
}

.video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-overlay::after {
    content: '▶';
    color: #fff;
    font-size: 12px;
    margin-right: -2px;
}

.video-title {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 0.7rem;
    padding: 3px;
    text-align: center;
    white-space: normal;
    line-height: 1.2;
}

.news-card {
    width: 150px;
    height: 100px;
    margin: 0 1rem;
    background: #112240;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1px solid var(--glass-border);
    white-space: normal;
}

.news-badge {
    background: #d93025;
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 5px;
}

.news-card p {
    font-size: 0.8rem;
    color: var(--text-primary);
    line-height: 1.3;
}

/* =====================
   HERO SECTION
   ===================== */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(rgba(10, 25, 47, 0.7), rgba(10, 25, 47, 0.8)), url('hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin-top: 120px;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

/* =====================
   SECTIONS GENERAL
   ===================== */
section {
    padding: 8rem 0;
}

.section-header {
    margin-bottom: 4rem;
}

.section-header.center {
    text-align: center;
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-secondary);
}

h1 {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.subtitle {
    display: block;
    font-family: var(--font-body);
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

/* =====================
   METHODOLOGY
   ===================== */
.method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.method-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 4px;
    transition: transform 0.3s var(--ease-out), background 0.3s ease;
}

.method-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover-bg);
}

.method-card .card-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
}

.method-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-gold);
}

.method-card p {
    color: var(--text-secondary);
}

/* =====================
   PROJECTS
   ===================== */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.project-item {
    position: relative;
    cursor: pointer;
}

.project-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 400px;
    background: #112240;
    border-radius: 4px;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
    opacity: 0.7;
}

.project-image-wrapper:hover .project-img {
    transform: scale(1.05);
    opacity: 1;
}

.project-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(10, 25, 47, 0.9), transparent);
    z-index: 10;
    text-align: right;
}

.project-overlay h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.project-overlay .tag {
    font-size: 0.8rem;
    color: var(--accent-gold);
}

/* =====================
   DISTINCTIONS
   ===================== */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.feature-list {
    list-style: none;
    margin-top: 2rem;
}

.feature-list li {
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.feature-list .icon {
    color: var(--accent-gold);
    margin-left: 1rem;
    margin-right: 0;
    font-size: 1.2rem;
}

.image-frame {
    width: 100%;
    height: 500px;
    background: var(--glass-bg);
    border: 1px solid var(--accent-gold);
    padding: 1rem;
    position: relative;
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%) sepia(10%);
}

.image-frame::after {
    content: '';
    position: absolute;
    top: 2rem;
    right: 2rem;
    left: -1rem;
    bottom: -1rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    z-index: -1;
}

/* =====================
   FOOTER
   ===================== */
footer {
    padding: 4rem 0 2rem;
    background: #020c1b;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    margin-bottom: 0.5rem;
    color: var(--accent-gold);
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: var(--text-primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-gold);
}

.footer-contact p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-form input {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
    text-align: right;
}

.btn-small {
    padding: 0.6rem 1.2rem;
    background: var(--accent-gold);
    color: #0a192f;
    border: none;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    width: 100%;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: #5d6882;
    font-size: 0.8rem;
}

/* =====================
   MODAL
   ===================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 80%;
    max-width: 900px;
    background: #000;
    padding: 0;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
    border: 1px solid var(--glass-border);
}

.close-modal {
    position: absolute;
    top: -40px;
    left: 0;
    right: auto;
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--accent-gold);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* =====================
   ANIMATIONS
   ===================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s var(--ease-out) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-out);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 900px) {
    .project-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .split-layout {
        grid-template-columns: 1fr;
    }

    .image-frame {
        height: 300px;
    }

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

@media (max-width: 600px) {
    h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 120px;
        right: 0;
        width: 100%;
        background: rgba(10, 25, 47, 0.98);
        padding: 1rem 0;
        gap: 0;
        border-top: 1px solid var(--glass-border);
    }

    .nav-links.mobile-open {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        padding: 0.8rem 1rem;
        border-bottom: 1px solid var(--glass-border);
    }

    .hamburger {
        display: flex;
    }

    .project-gallery {
        grid-template-columns: 1fr;
    }

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