/* Alam School App - Premium Glassmorphism Light Theme */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&family=Outfit:wght@300;400;600;800&display=swap');

:root {
    /* Premium Light Theme Palette - Bolder and More Vibrant */
    --bg-main: #f0f4f8;
    /* Crisp, slightly cooler background */
    --bg-secondary: #ffffff;
    --text-primary: #0f172a;
    /* Deep slate */
    --text-secondary: #334155;
    /* Darker secondary text for better contrast */
    --text-muted: #64748b;
    /* Less faded muted text */

    /* Vibrant Gradients & Accents */
    --accent-primary: #1d4ed8;
    /* Stronger Royal Blue */
    --accent-secondary: #059669;
    /* Richer Emerald */
    --accent-gradient: linear-gradient(135deg, #1d4ed8 0%, #4338ca 100%);
    --emerald-gradient: linear-gradient(135deg, #059669 0%, #047857 100%);
    --warm-gradient: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);

    /* Glassmorphism values */
    --glass-bg: rgba(255, 255, 255, 0.85);
    /* Slightly darker glass for contrast */
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 20px 60px 0 rgba(31, 38, 135, 0.25);
    /* Huge glassy shadow */

    /* Micro-animation timing */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.7;
    direction: rtl;
    /* Right to left for Arabic */
    overflow-x: hidden;
    /* Prevent horizontal scroll from decorative elements */
}

/* Background Gradients (Aesthetic details) */
body::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(248, 250, 252, 0) 70%);
    z-index: -1;
    pointer-events: none;
    border-radius: 50%;
}

body::after {
    content: '';
    position: absolute;
    top: 20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, rgba(248, 250, 252, 0) 70%);
    z-index: -1;
    pointer-events: none;
    border-radius: 50%;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* -------------------------------------
 * Header / Navbar (Glassmorphism)
 * ------------------------------------- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 18px 0;
    transition: var(--transition-smooth);
}

header.scrolled {
    padding: 12px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    transition: var(--transition-bounce);
}

.logo:hover {
    transform: scale(1.02);
}

.logo i {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.2));
}

.logo span {
    font-weight: 300;
    color: var(--text-secondary);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 16px;
    position: relative;
    padding: 8px 0;
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--accent-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: width var(--transition-smooth);
}

.nav-links a:hover::after {
    width: 100%;
    right: auto;
    left: 0;
}

.tagline {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    letter-spacing: 1px;
    font-weight: 600;
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent-primary);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

/* -------------------------------------
 * Hero Section
 * ------------------------------------- */
.masthead {
    padding: 180px 0 100px;
    position: relative;
    overflow: hidden;
}

.masthead .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.intro-text {
    flex: 1.1;
    z-index: 2;
}

.badge-new {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.02);
    margin-bottom: 24px;
    animation: slideDownFade 0.8s ease-out forwards;
}

.badge-new span.pulse {
    width: 8px;
    height: 8px;
    background: var(--accent-secondary);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

.intro-text h1 {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -1px;
    animation: slideUpFade 0.8s ease-out 0.1s both;
}

.intro-text h1 span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
}

/* Underline decoration */
.intro-text h1 span::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 12px;
    background: rgba(29, 78, 216, 0.25);
    /* Stronger underline */
    border-radius: 4px;
    z-index: -1;
    transform: rotate(-2deg);
}

.intro-text p {
    font-size: 22px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-weight: 400;
    line-height: 1.6;
    max-width: 90%;
    animation: slideUpFade 0.8s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    animation: slideUpFade 0.8s ease-out 0.3s both;
}

/* -------------------------------------
 * Graphics & Dashboard Mockup
 * ------------------------------------- */
.intro-graphic {
    flex: 1;
    position: relative;
    perspective: 1000px;
    animation: floatIn 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s both;
}

.graphic-wrapper {
    position: relative;
    transform: rotateY(-15deg) rotateX(5deg);
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.intro-graphic:hover .graphic-wrapper {
    transform: rotateY(-5deg) rotateX(2deg);
}

.app-screenshot {
    width: 100%;
    height: auto;
    border-radius: 20px;
    display: block;
    box-shadow:
        -30px 45px 90px rgba(0, 0, 0, 0.25),
        /* Massive drop shadow */
        0 0 0 1px rgba(255, 255, 255, 0.9) inset,
        0 0 0 8px rgba(255, 255, 255, 0.6);
    background: white;
}

/* Floating aesthetic elements */
.float-element {
    position: absolute;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px 24px;
    box-shadow: var(--glass-shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateZ(50px);
}

.float-top-left {
    top: -20px;
    right: -30px;
    animation: float 6s ease-in-out infinite;
}

.float-bottom-right {
    bottom: -30px;
    left: -40px;
    animation: float 5s ease-in-out infinite alternate;
}

.float-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--emerald-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.float-text h4 {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 2px 0;
}

.float-text p {
    font-size: 12px;
    font-family: 'Outfit', sans-serif;
    color: var(--accent-secondary);
    font-weight: 600;
    margin: 0;
}

/* -------------------------------------
 * Features Grid - Bento Box Style
 * ------------------------------------- */
.main-content {
    padding: 100px 0;
    background: white;
    position: relative;
    border-radius: 40px 40px 0 0;
    box-shadow: 0 -30px 80px rgba(0, 0, 0, 0.08);
    /* Stronger top shadow for separation */
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-subtitle {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: inline-block;
    background: rgba(37, 99, 235, 0.08);
    padding: 6px 16px;
    border-radius: 20px;
}

.section-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Varying card sizes for bento effect */
.bento-item {
    background: var(--bg-main);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    /* Base shadow instead of flat */
}

.bento-item:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.18);
    /* Extreme pop-out shadow */
    background: #ffffff;
    border-color: rgba(37, 99, 235, 0.25);
}

.bento-item.large {
    grid-column: span 2;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    /* Stronger faint blue tint */
}

.bento-item.tall {
    grid-row: span 2;
}

.bento-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    /* Floating icon shadow */
    transition: var(--transition-bounce);
}

.bento-item:hover .bento-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Icon specific colors */
.bento-item:nth-child(1) .bento-icon {
    color: var(--accent-primary);
}

.bento-item:nth-child(2) .bento-icon {
    color: var(--accent-secondary);
}

.bento-item:nth-child(3) .bento-icon {
    color: #f59e0b;
}

.bento-item:nth-child(4) .bento-icon {
    color: #ec4899;
}

.bento-item:nth-child(5) .bento-icon {
    color: #8b5cf6;
}

.bento-content h3 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.bento-content p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

/* Subtle corner decoration */
.bento-decorator {
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.bento-item:hover .bento-decorator {
    transform: scale(1.5);
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
}

/* -------------------------------------
 * Download Section (Premium Card)
 * ------------------------------------- */
.download-section {
    padding: 120px 0;
    background: var(--bg-main);
    position: relative;
    overflow: hidden;
}

.download-card-premium {
    max-width: 900px;
    margin: 0 auto;
    background: var(--accent-gradient);
    border-radius: 32px;
    padding: 60px;
    color: white;
    text-align: center;
    position: relative;
    box-shadow: 0 40px 100px -10px rgba(29, 78, 216, 0.6);
    /* Massive glowing shadow */
    overflow: hidden;
}

/* Glass shine effect over the card */
.download-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: shine 4s infinite;
}

.download-icon-large {
    font-size: 64px;
    margin-bottom: 24px;
    display: inline-block;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}

.download-card-premium h2 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.download-card-premium p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* -------------------------------------
 * Buttons (Premium Inputs)
 * ------------------------------------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: white;
    color: var(--accent-primary);
    padding: 18px 40px;
    border-radius: 100px;
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    /* Stronger button shadow */
    transition: var(--transition-bounce);
    border: 2px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    /* Massive hover shadow */
}

.btn-primary i {
    font-size: 20px;
    transition: transform var(--transition-fast);
}

.btn-primary:hover i {
    transform: translateY(3px);
    /* Download arrow down */
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-primary);
    padding: 16px 36px;
    border-radius: 100px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid rgba(15, 23, 42, 0.1);
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.2);
    transform: translateY(-2px);
}

.sys-req {
    margin-top: 24px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

/* -------------------------------------
 * Footer
 * ------------------------------------- */
footer {
    background: white;
    padding: 60px 0 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-logo i {
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.copyright {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    font-size: 14px;
}

/* -------------------------------------
 * Keyframe Animations
 * ------------------------------------- */
@keyframes slideDownFade {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes float {
    0% {
        transform: translateY(0) translateZ(50px);
    }

    50% {
        transform: translateY(-10px) translateZ(50px);
    }

    100% {
        transform: translateY(0) translateZ(50px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes shine {
    0% {
        left: -100%;
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    40% {
        left: 200%;
        opacity: 0;
    }

    100% {
        left: 200%;
        opacity: 0;
    }
}

/* -------------------------------------
 * Responsive Adjustments
 * ------------------------------------- */
@media (max-width: 1024px) {
    .masthead .container {
        flex-direction: column;
        text-align: center;
    }

    .intro-text h1 {
        font-size: 52px;
    }

    .intro-text p {
        max-width: 100%;
        margin: 0 auto 40px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .float-element {
        display: none;
        /* Hide floating elements on smaller screens */
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-item.large {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Hide nav on mobile for simplicity */
    }

    .intro-text h1 {
        font-size: 40px;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-item.large,
    .bento-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
    }
}