/* ================================
   AL RUSHD ONLINE ACADEMY
   GLOBAL STYLESHEET
================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Open+Sans:wght@400;500;600;700&display=swap');

/* --- Root Variables --- */
:root {
    --primary-dark: #24323a;
    --primary-dark-2: #1b252b;
    --accent-teal: #218c8d;
    --accent-teal-dark: #176a6b;
    --accent-gold: #edaf41;
    --accent-gold-dark: #d99a2d;
    --light-bg: #f4f7f6;
    --light-bg-2: #eef4f3;
    --white: #ffffff;
    --text-dark: #333333;
    --text-muted: #666666;
    --border-light: #e6eceb;
    --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.12);
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 999px;
    --transition: all 0.3s ease;
}

/* --- Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    transition: var(--transition);
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-dark);
    line-height: 1.2;
}

p {
    color: var(--text-dark);
}

/* --- Utility --- */
.container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}

.centered {
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    text-align: center;
    margin-bottom: 55px;
}

.section-title h2 {
    font-size: 2.3rem;
    margin-bottom: 12px;
}

.section-title p {
    max-width: 720px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.02rem;
}

/* --- Header / Navbar --- */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.06);
}

.navbar {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 0;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 78px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.nav-links li {
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-dark);
    font-size: 0.98rem;
    font-weight: 700;
    position: relative;
    padding: 8px 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-teal);
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--accent-teal);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* --- Hero --- */
.hero {
    position: relative;
    padding: 110px 0 95px;
    background: linear-gradient(135deg, #ffffff 0%, #edf6f5 50%, #e7f1f0 100%);
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.hero::before {
    width: 320px;
    height: 320px;
    background: rgba(33, 140, 141, 0.08);
    top: -120px;
    right: -90px;
}

.hero::after {
    width: 240px;
    height: 240px;
    background: rgba(237, 175, 65, 0.08);
    bottom: -80px;
    left: -60px;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeInUp 0.9s ease-out;
}

.hero-content h1 {
    font-size: 3.25rem;
    margin-bottom: 22px;
}

.hero-content h1 span {
    color: var(--accent-teal);
}

.hero-content p {
    max-width: 780px;
    margin: 0 auto;
    font-size: 1.08rem;
    color: var(--text-muted);
}

.hero-btns {
    margin-top: 34px;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero.learning-hero {
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, #ffffff 0%, #f3f7f6 100%);
}

/* --- Buttons --- */
.btn,
.apply-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
}

.btn {
    padding: 15px 32px;
    border-radius: var(--radius-pill);
    background: var(--accent-teal);
    color: var(--white);
    box-shadow: 0 8px 22px rgba(33, 140, 141, 0.22);
    border: none;
}

.btn:hover {
    transform: translateY(-3px);
    background: var(--accent-teal-dark);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--accent-teal);
    border: 2px solid var(--accent-teal);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--accent-teal);
    color: var(--white);
}

.btn-gold {
    background: var(--accent-gold);
    color: var(--primary-dark);
    box-shadow: 0 8px 22px rgba(237, 175, 65, 0.26);
}

.btn-gold:hover {
    background: var(--accent-gold-dark);
    color: var(--primary-dark);
}

/* --- Intro / Two Column Section --- */
.mid-intro {
    padding: 95px 0;
    background: var(--white);
}

.mid-layout {
    display: flex;
    align-items: center;
    gap: 60px;
}

.mid-image,
.mid-text {
    flex: 1;
}

.mid-image img {
    border-radius: 24px;
    box-shadow: var(--shadow-md);
}

.mid-text {
    animation: slideInRight 0.9s ease-out;
}

.mid-text h2 {
    font-size: 2.35rem;
    margin-bottom: 18px;
}

.mid-text h3 {
    font-size: 1.35rem;
    margin-bottom: 14px;
    color: var(--accent-teal);
}

.mid-text p {
    color: var(--text-muted);
}

.check-list {
    list-style: none;
    margin-top: 28px;
}

.check-list li {
    position: relative;
    padding-left: 34px;
    margin-bottom: 14px;
    font-size: 1.04rem;
}

.check-list li::before {
    content: "✔";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-gold);
    font-weight: 800;
}

/* --- Generic Features Section --- */
.features {
    padding: 90px 0;
    background: var(--light-bg);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 38px 30px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.feature-card .icon,
.teacher-img {
    width: 88px;
    height: 88px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #f2f7f7 0%, #eef4f3 100%);
    color: var(--accent-teal);
}

.feature-card h3 {
    font-size: 1.28rem;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-muted);
}

.teacher-img {
    font-size: 2.8rem;
}

/* --- CTA Section --- */
.cta {
    padding: 85px 0;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-dark-2) 100%);
    color: var(--white);
}

.cta h2 {
    color: var(--white);
    font-size: 2.3rem;
    margin-bottom: 14px;
}

.cta p {
    max-width: 700px;
    margin: 0 auto 28px;
    color: rgba(255, 255, 255, 0.82);
}

/* --- About Page --- */
.vision-mission {
    display: flex;
    gap: 28px;
    margin-top: -55px;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
}

.vm-card {
    flex: 1;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-lg);
    border-top: 6px solid var(--accent-teal);
}

.vm-card.mission {
    border-top-color: var(--accent-gold);
}

.vm-card h3 {
    font-size: 1.45rem;
    margin-bottom: 14px;
}

.vm-card p {
    color: var(--text-muted);
}

.ceo-section {
    padding: 95px 0;
    background: var(--light-bg);
}

.ceo-quote {
    margin-top: 16px;
    font-style: italic;
    font-size: 1.08rem;
    color: #555;
    padding-left: 18px;
    border-left: 4px solid var(--accent-gold);
}

/* --- Tutoring / Quran / Exam Prep Shared Blocks --- */
.tutoring-highlight {
    margin-top: -55px;
    position: relative;
    z-index: 2;
}

.tutoring-card {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-dark-2) 100%);
    color: var(--white);
    border-radius: 24px;
    padding: 40px 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    box-shadow: var(--shadow-lg);
}

.tutoring-info {
    flex: 1;
}

.tutoring-info h2 {
    color: var(--accent-gold);
    font-size: 2rem;
    margin-bottom: 10px;
}

.tutoring-info p {
    color: rgba(255, 255, 255, 0.85);
}

.tutoring-action {
    flex-shrink: 0;
}

/* --- Course / Program Section --- */
.course-section,
.learning-section {
    padding: 95px 0;
    background: var(--light-bg);
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.course-card {
    background: var(--white);
    border-radius: 22px;
    padding: 34px 28px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.course-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #f7faf9 0%, #edf3f2 100%);
    color: var(--accent-teal);
}

.course-icon.primary {
    color: #ff7675;
}

.course-icon.secondary {
    color: var(--accent-teal);
}

.course-icon.higher {
    color: var(--accent-gold);
}

.course-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.course-subtitle {
    color: var(--accent-teal);
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.course-desc {
    color: var(--text-muted);
    font-size: 0.96rem;
    line-height: 1.75;
    flex-grow: 1;
    margin-bottom: 24px;
}

.card-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.apply-link {
    width: 100%;
    padding: 13px 16px;
    border-radius: 10px;
    background: var(--accent-teal);
    color: var(--white);
    box-shadow: 0 8px 18px rgba(33, 140, 141, 0.15);
}

.apply-link:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.download-link {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    align-self: center;
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 2px;
}

.download-link:hover {
    color: var(--accent-teal);
}

/* --- Library / Resources Variations --- */
.library-card {
    border-top: 5px solid var(--accent-teal);
    justify-content: space-between;
    min-height: 370px;
}

.under-construction {
    background: rgba(255, 255, 255, 0.72);
    border: 2px dashed #ccd7d5;
    box-shadow: none;
    cursor: default;
}

.under-construction:hover {
    transform: none;
    box-shadow: none;
}

.tag-coming-soon {
    display: inline-block;
    margin-top: 16px;
    align-self: center;
    padding: 7px 16px;
    border-radius: 999px;
    background: #ecefef;
    color: #707070;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

/* --- Floating CTA --- */
.floating-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999;
    max-width: 250px;
    text-decoration: none;
    text-align: center;
    font-weight: 800;
    line-height: 1.35;
    padding: 16px 22px;
    border-radius: var(--radius-pill);
    background: var(--accent-gold);
    color: var(--primary-dark);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.floating-btn:hover {
    transform: translateY(-4px);
    background: var(--accent-gold-dark);
    color: var(--primary-dark);
}

/* --- Footer --- */
footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-dark-2) 100%);
    color: rgba(255, 255, 255, 0.82);
    text-align: center;
    padding: 34px 0;
}

footer p {
    color: inherit;
    font-size: 0.98rem;
}

/* --- Animations --- */
.fade-in {
    animation: fadeInUp 0.8s ease-out both;
}

.reveal {
    animation: fadeInUp 0.8s ease-out both;
}

.slide-up {
    animation: slideUpFade 0.8s ease-out both;
}

.pulse {
    animation: pulseAnim 3s infinite;
}

.course-card:nth-child(1) { animation-delay: 0.05s; }
.course-card:nth-child(2) { animation-delay: 0.1s; }
.course-card:nth-child(3) { animation-delay: 0.15s; }
.course-card:nth-child(4) { animation-delay: 0.2s; }
.course-card:nth-child(5) { animation-delay: 0.25s; }
.course-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(34px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(44px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseAnim {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.04);
    }
}

/* --- Responsive --- */
@media (max-width: 1100px) {
    .nav-links {
        gap: 18px;
    }

    .nav-links a {
        font-size: 0.93rem;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .feature-grid,
    .course-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mid-layout {
        gap: 40px;
    }
}

@media (max-width: 900px) {
    .navbar {
        flex-direction: column;
        justify-content: center;
        gap: 12px;
        padding: 14px 0;
    }

    .logo img {
        height: 68px;
    }

    .nav-links {
        justify-content: center;
        gap: 14px 20px;
    }

    .hero {
        padding: 90px 0 80px;
    }

    .hero-content h1 {
        font-size: 2.45rem;
    }

    .mid-layout,
    .vision-mission,
    .tutoring-card {
        flex-direction: column;
    }

    .mid-layout {
        text-align: center;
    }

    .check-list {
        text-align: left;
        max-width: 540px;
        margin-left: auto;
        margin-right: auto;
    }

    .tutoring-card {
        text-align: center;
        padding: 34px 28px;
    }

    .tutoring-info h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 700px) {
    .container {
        width: min(100% - 28px, 1200px);
    }

    .hero-content h1 {
        font-size: 2.1rem;
    }

    .hero-content p,
    .section-title p,
    .mid-text p,
    .course-desc,
    .feature-card p {
        font-size: 0.98rem;
    }

    .mid-text h2,
    .section-title h2,
    .cta h2 {
        font-size: 1.9rem;
    }

    .feature-grid,
    .course-grid {
        grid-template-columns: 1fr;
    }

    .hero-btns {
        flex-direction: column;
        align-items: center;
    }

    .btn,
    .btn-outline,
    .btn-gold {
        width: 100%;
        max-width: 320px;
    }

    .vision-mission {
        margin-top: 28px;
        margin-bottom: 60px;
    }

    .tutoring-highlight {
        margin-top: 30px;
    }

    .library-card {
        min-height: auto;
    }

    .floating-btn {
        right: 16px;
        left: 16px;
        bottom: 16px;
        max-width: none;
        padding: 14px 18px;
        font-size: 0.95rem;
    }
}

@media (max-width: 520px) {
    .logo img {
        height: 58px;
    }

    .nav-links {
        gap: 10px 16px;
    }

    .nav-links a {
        font-size: 0.9rem;
    }

    .hero {
        padding: 78px 0 70px;
    }

    .hero-content h1 {
        font-size: 1.85rem;
    }

    .feature-card,
    .course-card,
    .vm-card {
        padding: 28px 22px;
    }

    .mid-intro,
    .features,
    .course-section,
    .learning-section,
    .ceo-section,
    .cta {
        padding: 75px 0;
    }
}