:root {
    --primary: #1f8a5c;
    --primary-dark: #0f5b3d;
    --secondary: #37b980;
    --secondary-dark: #188a5a;
    --accent-yellow: #f6d860;
    --accent-pink: #f397b7;
    --accent-blue: #73c7f2;
    --text-color: #173c33;
    --muted-text: #516963;
    --bg-light: #f6f9f7;
    --surface: #ffffff;
    --surface-alt: #eff4f2;
    --surface-muted: #e5efea;
    --border-soft: rgba(17, 69, 52, 0.08);
    --shadow: 0 26px 60px rgba(20, 77, 52, 0.14);
    --shadow-soft: 0 18px 40px rgba(20, 77, 52, 0.12);
    --shadow-sm: 0 10px 28px rgba(20, 77, 52, 0.08);
    --radius-xl: 28px;
}

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

body {
    font-family: 'Cairo', sans-serif;
    color: var(--text-color);
    background: var(--bg-light);
    line-height: 1.7;
    direction: rtl;
    min-height: 100vh;
    background-image: radial-gradient(circle at 20% 15%, rgba(115, 199, 158, 0.16) 0, transparent 55%),
        radial-gradient(circle at 80% 0%, rgba(115, 199, 242, 0.18) 0, transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 249, 247, 1));
}

h1,
h2,
h3,
h4 {
    font-family: 'Lalezar', cursive;
    letter-spacing: 0.4px;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1200px, 90%);
    margin: 0 auto;
}

main {
    display: block;
}

section {
    padding: clamp(4.5rem, 8vw, 6.5rem) 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2.1rem;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Lalezar', cursive;
    letter-spacing: 0.5px;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary-dark));
    color: #fff;
}

.btn-secondary {
    background: var(--surface);
    color: var(--primary-dark);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.6);
    padding: 0.5rem 1.6rem;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 45px rgba(15, 91, 61, 0.28);
}

.btn-secondary:hover {
    color: #fff;
    background: var(--primary);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 22px 40px rgba(31, 138, 92, 0.25);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.top-bar {
    background: var(--surface-alt);
    color: var(--muted-text);
    font-size: 0.92rem;
    border-bottom: 1px solid var(--border-soft);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
}

.top-contact a,
.top-contact span {
    margin-left: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
}

.top-contact i {
    color: var(--primary);
}

.top-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.top-social a {
    color: var(--primary-dark);
    font-size: 0.95rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.top-social a:hover {
    transform: translateY(-3px);
    color: var(--surface);
    box-shadow: 0 16px 30px rgba(31, 138, 92, 0.2);
    background: var(--primary);
    border-color: transparent;
}

#auth-link.is-authenticated {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    color: #fff;
}


.main-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 18px 35px rgba(15, 91, 61, 0.08);
    position: sticky;
    top: 0;
    z-index: 50;
}

.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    gap: 2rem;
}

.logo {
    font-family: 'Lalezar', cursive;
    font-weight: 400;
    font-size: 2.2rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.6px;
}

.logo span {
    color: var(--accent-yellow);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.1rem;
    align-items: center;
    flex-direction: row-reverse;
    align-items: center;
    gap: 1rem;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    font-weight: 600;
    color: var(--muted-text);
    font-family: 'Cairo', sans-serif;
    font-size: 0.98rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    transition: color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    right: 1rem;
    bottom: 0.35rem;
    width: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--primary-dark);
    background: rgba(31, 138, 92, 0.1);
    box-shadow: var(--shadow-sm);
}

.nav-links a:hover::after {
    width: calc(100% - 2rem);
}

.nav-links a.active {
    color: var(--primary-dark);
    background: rgba(31, 138, 92, 0.12);
    box-shadow: var(--shadow-sm);
}

.nav-links a.active::before {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 20px 36px rgba(31, 138, 92, 0.18);
}

.nav-links a.active::after {
    width: calc(100% - 2rem);
}

.hero-section {
    background: linear-gradient(145deg, rgba(31, 138, 92, 0.1), rgba(115, 199, 242, 0.16));
    padding: clamp(5.5rem, 9vw, 7.5rem) 0 clamp(5rem, 8vw, 6.5rem);
    position: relative;
    overflow: hidden;
}

.hero-section::before,
.hero-section::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(0px);
}

.hero-section::before {
    width: 460px;
    height: 460px;
    top: -200px;
    left: -180px;
    background: rgba(31, 138, 92, 0.12);
}

.hero-section::after {
    width: 340px;
    height: 340px;
    bottom: -160px;
    right: -140px;
    background: rgba(243, 151, 183, 0.18);
}

.hero-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: center;
    gap: clamp(2.2rem, 6vw, 3.5rem);
    position: relative;
    z-index: 1;
    direction: rtl;
}

.hero-text {
    max-width: 560px;
    color: var(--primary-dark);
    text-align: right;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-dark);
    background: rgba(31, 138, 92, 0.15);
    padding: 0.4rem 1.1rem;
    border-radius: 999px;
    margin-bottom: 1.2rem;
    letter-spacing: 0.3px;
}

.hero-eyebrow::before {
    content: "🌱";
}

.hero-text h1 {
    font-size: clamp(2.8rem, 5vw, 4rem);
    margin-bottom: 1.3rem;
    color: var(--primary-dark);
    line-height: 1.1;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--muted-text);
    margin-bottom: 2.2rem;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    flex-direction: row-reverse;
    justify-content: flex-start;
}

.hero-image {
    background-image: url('https://images.pexels.com/photos/842215/pexels-photo-842215.jpeg?auto=compress&cs=tinysrgb&w=1200');
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-xl);
    min-height: 380px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-soft);
    position: relative;
    overflow: hidden;
}

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(31, 138, 92, 0.2), rgba(255, 255, 255, 0));
}

.intro-highlights {
    margin-top: -70px;
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.highlight-card {
    padding: 2.4rem 2rem;
    border-radius: var(--radius-xl);
    color: var(--text-color);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 1.2rem;
    position: relative;
    overflow: hidden;
    text-align: right;
    border: 1px solid var(--border-soft);
}

.highlight-card::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(243, 151, 183, 0.12);
    bottom: -80px;
    left: -40px;
}

.highlight-card i {
    font-size: 1.6rem;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(31, 138, 92, 0.12);
    color: var(--primary-dark);
}

.highlight-card h3 {
    font-size: 1.28rem;
    color: var(--primary-dark);
}

.highlight-card p {
    font-size: 0.98rem;
    color: var(--muted-text);
}


.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(2.5rem, 6vw, 4rem);
    align-items: center;
    direction: rtl;
}

.experience h2 {
    font-size: clamp(2.2rem, 4vw, 2.8rem);
    margin-bottom: 1.4rem;
    color: var(--primary-dark);
}

.experience p {
    color: var(--muted-text);
    margin-bottom: 2.2rem;
    font-size: 1.02rem;
    text-align: right;
}

.experience-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--surface);
    border-radius: 22px;
    padding: 1.9rem 1.4rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
}

.stat-card h3 {
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 0.3rem;
}

.stat-card span {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--muted-text);
}

.features-banner {
    background: var(--surface-alt);
    border-block: 1px solid var(--border-soft);
    padding: clamp(3.2rem, 7vw, 4.2rem) 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.6rem;
}

.feature-card {
    background: var(--surface);
    padding: 2rem 1.8rem;
    border-radius: 24px;
    color: var(--text-color);
    display: grid;
    gap: 1rem;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
    text-align: right;
}

.feature-card i {
    font-size: 1.6rem;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(31, 138, 92, 0.12);
    color: var(--primary-dark);
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto clamp(2.4rem, 5vw, 3.2rem);
    display: grid;
    gap: 0.65rem;
    position: relative;
}

.section-header::after {
    content: "";
    width: 82px;
    height: 4px;
    border-radius: 999px;
    margin: 0.4rem auto 0;
    background: linear-gradient(90deg, var(--primary), var(--accent-blue));
}

.section-title {
    font-family: 'Lalezar', cursive;
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: var(--primary-dark);
}

.section-subtitle {
    color: var(--muted-text);
    font-size: 1.02rem;
    line-height: 1.8;
}


.school-life,
.staff {
    background: var(--surface);
}

.media,
.testimonials {
    background: var(--surface-alt);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: grid;
    grid-template-rows: 210px auto;
    border: 1px solid var(--border-soft);
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    padding: 2rem 1.8rem 2.2rem;
    display: grid;
    gap: 0.7rem;
    text-align: right;
}

.card-body h3 {
    font-size: 1.35rem;
    color: var(--primary-dark);
}

.card-body p {
    font-size: 1rem;
    color: var(--muted-text);
}

.card-body span {
    font-weight: 700;
    color: var(--secondary-dark);
    font-size: 0.95rem;
}

.media .card-body span {
    color: var(--accent-pink);
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.2rem;
}

.staff-card {
    background: var(--surface);
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    text-align: center;
    display: grid;
    grid-template-rows: 240px auto;
    border: 1px solid var(--border-soft);
}

.staff-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-card .staff-info {
    padding: 1.8rem 1.4rem 2.2rem;
    display: grid;
    gap: 0.6rem;
}

.staff-card h3 {
    font-size: 1.4rem;
    color: var(--primary-dark);
}

.staff-card span {
    color: var(--secondary-dark);
    font-weight: 700;
}

.staff-card p {
    color: var(--muted-text);
    font-size: 0.95rem;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 2.4rem 2.1rem;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 1.1rem;
    position: relative;
    border: 1px solid var(--border-soft);
    overflow: hidden;
    text-align: right;
}

.testimonial-card::before {
    content: '\201C';
    font-size: 5rem;
    color: rgba(31, 138, 92, 0.15);
    position: absolute;
    top: -20px;
    left: 24px;
}

.testimonial-card p {
    color: var(--muted-text);
    font-size: 1rem;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-direction: row-reverse;
    text-align: right;
}

.testimonial-author img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(124, 208, 255, 0.5);
}

.contact {
    background: var(--surface-muted);
    color: var(--text-color);
    padding: clamp(3.5rem, 7vw, 4.5rem) 0;
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 2px dashed rgba(31, 138, 92, 0.2);
    top: -120px;
    right: -120px;
    opacity: 0.5;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.8rem;
    position: relative;
    z-index: 1;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    background: var(--surface);
    padding: 1.6rem 1.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    flex-direction: row-reverse;
    text-align: right;
    border: 1px solid var(--border-soft);
}

.contact-item i {
    font-size: 1.8rem;
    background: rgba(31, 138, 92, 0.12);
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
}

.contact-item h4 {
    font-size: 1.18rem;
    margin-bottom: 0.35rem;
}

.footer {
    background: #0f3d2b;
    color: #f0f7f4;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer::before {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    bottom: -70px;
    left: -70px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2.8rem 0;
    gap: 2.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.footer-social {
    display: flex;
    gap: 0.8rem;
}

.footer-social a {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease;
    color: #f0f7f4;
}

.footer-social a:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.2);
}

.footer .logo {
    color: #f0f7f4;
}

.footer .logo span {
    color: var(--accent-yellow);
}

.footer p {
    color: rgba(240, 247, 244, 0.85);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.25);
    text-align: center;
    padding: 1.2rem 0;
    font-size: 0.95rem;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(12, 53, 36, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.modal[aria-hidden="false"] {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background: #fff;
    padding: 2.5rem;
    border-radius: 22px;
    width: min(420px, 100%);
    position: relative;
    box-shadow: 0 45px 80px rgba(12, 53, 36, 0.28);
    border: 3px solid rgba(47, 191, 113, 0.15);
}

.modal-close {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(47, 191, 113, 0.12);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--primary-dark);
}

/* Auth page */
body[data-page="auth"] {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, rgba(55, 194, 142, 0.18), transparent 55%),
        radial-gradient(circle at bottom left, rgba(115, 199, 242, 0.18), transparent 60%),
        linear-gradient(180deg, #f6f9f7 0%, #ffffff 60%, #f6f9f7 100%);
}

.auth-wrapper {
    width: min(480px, 90%);
    margin: 4rem auto;
}

.auth-card {
    background: var(--surface);
    border-radius: 28px;
    padding: clamp(2.5rem, 5vw, 3.5rem);
    box-shadow: 0 35px 80px rgba(16, 84, 58, 0.18);
    display: grid;
    gap: 1.8rem;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    inset: -120px -180px auto auto;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(55, 194, 142, 0.18) 0%, transparent 65%);
    pointer-events: none;
}

.auth-brand p {
    color: var(--muted-text);
    font-weight: 600;
}

.auth-form {
    display: grid;
    gap: 1.2rem;
}

.auth-form label {
    display: grid;
    gap: 0.6rem;
    font-weight: 600;
    color: var(--text-color);
}

.auth-form input[type="password"] {
    padding: 0.95rem 1.1rem;
    border-radius: 16px;
    border: 1px solid rgba(31, 138, 92, 0.28);
    font-size: 1rem;
    background: #f9fdfa;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

.auth-form input[type="password"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(55, 194, 142, 0.15);
}

.auth-hint {
    font-size: 0.95rem;
    color: var(--muted-text);
}

.auth-error {
    color: #d64545;
    min-height: 1.4rem;
    font-weight: 600;
}

.auth-submit {
    width: 100%;
}

.auth-links {
    display: flex;
    justify-content: flex-end;
}

.auth-links .btn-secondary {
    background: var(--surface-alt);
    color: var(--primary);
    border: 1px solid rgba(31, 138, 92, 0.2);
}

/* Dashboard */
body[data-page="dashboard"] {
    background: #f2f6f4;
}

.dashboard-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    background: linear-gradient(180deg, rgba(246, 249, 247, 0.8), rgba(246, 249, 247, 1));
}

.dashboard-sidebar {
    background: linear-gradient(180deg, #0f4d32, #0b3824);
    color: #fff;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    position: relative;
    overflow: hidden;
}

.dashboard-sidebar::after {
    content: '';
    position: absolute;
    inset: auto -80px -120px auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, transparent 65%);
}

.dashboard-sidebar .logo span {
    color: #ffe27a;
}

.dashboard-menu h3 {
    font-size: 0.95rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    opacity: 0.75;
}

.admin-tabs {
    list-style: none;
    display: grid;
    gap: 0.75rem;
    padding: 0;
    margin: 0;
}

.admin-tabs li {
    list-style: none;
}

.admin-tabs li a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.admin-tabs li a i {
    font-size: 1.1rem;
}

.admin-tabs li.active a,
.admin-tabs li a.active,
.admin-tabs li a:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    transform: translateX(-6px);
}

.sidebar-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    transition: transform 0.3s ease, color 0.3s ease;
}

.sidebar-link:hover {
    transform: translateX(-4px);
    color: #fff;
}

.dashboard-main {
    padding: 2.5rem 3rem;
    display: grid;
    gap: 2rem;
}

.dashboard-topbar {
    background: var(--surface);
    border-radius: 24px;
    padding: 2rem 2.4rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.dashboard-topbar h1 {
    font-size: 2rem;
}

.dashboard-topbar p {
    color: var(--muted-text);
    font-weight: 600;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-topbar .btn-outline {
    border: 1px solid rgba(31, 138, 92, 0.35);
    color: var(--primary);
    background: transparent;
    box-shadow: none;
}

.dashboard-topbar .btn-outline:hover {
    background: rgba(31, 138, 92, 0.1);
    color: var(--primary-dark);
}

.dashboard-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.quick-action {
    padding: 1rem 1.2rem;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid rgba(31, 138, 92, 0.18);
    color: var(--primary-dark);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quick-action:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(31, 138, 92, 0.18);
}

.quick-action.is-active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 16px 30px rgba(31, 138, 92, 0.28);
}

.quick-action.is-active:hover {
    transform: none;
    box-shadow: 0 16px 30px rgba(31, 138, 92, 0.28);
}

.dashboard-insights .insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}

.insight-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 1.8rem;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
}

.insight-card--wide {
    grid-column: span 2;
}

.insight-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(31, 138, 92, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.3rem;
}

.insight-label {
    font-size: 0.95rem;
    color: var(--muted-text);
    display: block;
    margin-bottom: 0.4rem;
}

.insight-card strong {
    font-size: 1.8rem;
    color: var(--primary-dark);
}

.dashboard-content {
    background: transparent;
}

.admin-content {
    display: block;
}

.admin-tab {
    display: none;
}

.admin-tab.active {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.admin-section {
    background: var(--surface);
    border-radius: 20px;
    padding: 1.6rem;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 1.2rem;
}

.admin-section--wide {
    grid-column: span 2;
}

.admin-form {
    display: grid;
    gap: 1rem;
}

.admin-form label {
    display: grid;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form textarea,
.admin-form select {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(31, 138, 92, 0.25);
    background: #f9fdfa;
    font-size: 0.95rem;
}

.admin-form input[type="file"] {
    border: 1px dashed rgba(31, 138, 92, 0.3);
    padding: 0.9rem;
    border-radius: 14px;
    background: rgba(31, 138, 92, 0.08);
}

.input-preview {
    width: 100%;
    border-radius: 12px;
    margin-top: 0.6rem;
    max-height: 160px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.list-item {
    display: grid;
    gap: 1rem;
    padding: 1.6rem;
    border-radius: 16px;
    background: var(--surface-alt);
    border: 1px solid var(--border-soft);
    margin-bottom: 1.2rem;
}

.list-item .btn {
    justify-self: flex-start;
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        flex-direction: row;
        align-items: center;
        gap: 1.2rem;
        padding: 1.8rem;
        overflow-x: auto;
        position: sticky;
        top: 0;
        z-index: 20;
    }

    .dashboard-menu h3 {
        display: none;
    }

    .admin-tabs {
        display: flex;
        gap: 0.6rem;
    }

    .admin-tabs li {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .dashboard-main {
        padding: 1.8rem;
    }

    .dashboard-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-tab.active {
        grid-template-columns: 1fr;
    }

    .admin-section--wide {
        grid-column: span 1;
    }

    .insight-card--wide {
        grid-column: span 1;
    }
}

@media (max-width: 700px) {
    .top-bar .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

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

    .hero-text {
        margin: 0 auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .highlight-grid,
    .features-grid,
    .experience-stats,
    .card-grid,
    .staff-grid,
    .testimonial-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .experience-right img {
        border-radius: 20px;
        box-shadow: var(--shadow);
    }
}

/* ==== صفحات فرعية ==== */
.page-hero {
    padding: clamp(5rem, 8vw, 6.5rem) 0 clamp(3.5rem, 6vw, 4.5rem);
    background: linear-gradient(140deg, rgba(31, 138, 92, 0.12), rgba(115, 199, 242, 0.16));
    position: relative;
    overflow: hidden;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 10%, rgba(243, 151, 183, 0.15) 0, transparent 55%),
        radial-gradient(circle at 80% 0%, rgba(122, 222, 173, 0.2) 0, transparent 60%);
    z-index: 0;
}

.page-hero .hero-content {
    position: relative;
    z-index: 1;
}

.page-hero .hero-image {
    background-size: cover;
    background-position: center;
    min-height: 340px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
}

.groups-hero {
    background: linear-gradient(140deg, rgba(31, 138, 92, 0.12), rgba(94, 208, 162, 0.2));
}

.camp-hero {
    background: linear-gradient(140deg, rgba(115, 199, 242, 0.2), rgba(31, 138, 92, 0.12));
}

.levels-hero {
    background: linear-gradient(140deg, rgba(246, 216, 96, 0.16), rgba(31, 138, 92, 0.12));
}

.contact-hero {
    background: linear-gradient(140deg, rgba(31, 138, 92, 0.1), rgba(243, 151, 183, 0.18));
}

.groups-section,
.camp-highlights,
.levels-section,
.contact-page-section,
.contact-form-section {
    padding: clamp(4rem, 7vw, 5.5rem) 0;
}

.groups-section,
.levels-section,
.contact-page-section {
    background: var(--surface);
}

.camp-highlights,
.contact-form-section {
    background: var(--surface-alt);
}

.groups-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 1.1rem;
    border-radius: 999px;
    background: rgba(31, 138, 92, 0.12);
    border: 1px solid var(--border-soft);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.95rem;
}

.tag-chip--title {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
    color: #fff;
    border-color: transparent;
}

.groups-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.group-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-soft);
}

.group-card::after {
    content: "";
    position: absolute;
    inset: -120px -40px auto auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(115, 199, 242, 0.18), transparent 70%);
    z-index: 0;
}

.group-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.group-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    background: rgba(47, 191, 113, 0.16);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}

.group-teacher {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    color: var(--secondary-dark);
    background: rgba(94, 208, 162, 0.15);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
}

.group-description {
    color: var(--muted-text);
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.group-details {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    color: var(--muted-text);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.group-details li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.group-details li i {
    color: var(--primary);
    font-size: 1rem;
}

.group-details .detail-label {
    color: var(--primary-dark);
    font-weight: 700;
}

.group-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    position: relative;
    z-index: 1;
}

.group-card .card-actions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.camp-highlights-grid {
    display: grid;
    gap: 1.75rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.camp-highlight-card {
    background: var(--surface);
    border-radius: 26px;
    padding: 2.1rem;
    text-align: center;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid var(--border-soft);
}

.icon-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 18px 30px rgba(31, 138, 92, 0.2);
}

.camp-highlight-card h3 {
    font-size: 1.4rem;
    color: var(--primary-dark);
}

.camp-highlight-card p {
    color: var(--muted-text);
    line-height: 1.8;
}

.levels-section {
    padding-bottom: 4.5rem;
}

.levels-list {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.level-card {
    background: var(--surface);
    border-radius: 32px;
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border: 1px solid var(--border-soft);
}

.level-toggle {
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.1rem;
    cursor: pointer;
    text-align: right;
    font: inherit;
    color: inherit;
}

.level-toggle:focus-visible {
    outline: 3px solid rgba(31, 138, 92, 0.35);
    border-radius: 999px;
    outline-offset: 4px;
}

.level-toggle-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.level-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.level-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(47, 191, 113, 0.16);
    color: var(--secondary-dark);
    font-weight: 700;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    font-size: 0.9rem;
    width: fit-content;
}

.level-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(31, 138, 92, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary);
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.level-card.is-open .level-icon {
    transform: rotate(-180deg);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
}

.level-summary {
    color: var(--muted-text);
    line-height: 1.8;
}

.level-details {
    border-top: 1px dashed var(--border-soft);
    padding-top: 1.2rem;
    display: grid;
    gap: 1rem;
}

.level-card:not(.is-open) .level-details {
    display: none;
}

.sublevel-card {
    background: var(--surface-alt);
    border-radius: 24px;
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    border: 1px solid var(--border-soft);
}

.sublevel-card h4 {
    font-size: 1.12rem;
    color: var(--primary-dark);
}

.sublevel-card p {
    color: var(--muted-text);
    line-height: 1.7;
}

.track-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.track-chip {
    display: inline-flex;
    gap: 0.45rem;
    align-items: baseline;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    color: var(--primary-dark);
    font-weight: 600;
    line-height: 1.5;
}

.track-chip strong {
    font-weight: 800;
}

.empty-sub {
    color: var(--muted-text);
    font-style: italic;
}

.contact-page-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.contact-card {
    background: var(--surface);
    border-radius: 28px;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
    border: 1px solid var(--border-soft);
}

.contact-card h3 {
    font-size: 1.35rem;
    color: var(--primary-dark);
}

.contact-page-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.contact-page-list li {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.contact-page-list li i {
    color: var(--secondary-dark);
    font-size: 1.1rem;
}

.hours-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.hours-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-alt);
    padding: 0.75rem 1.1rem;
    border-radius: 16px;
    font-weight: 600;
    color: var(--muted-text);
    border: 1px solid var(--border-soft);
}

.map-wrapper {
    width: 100%;
    height: 260px;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--surface-alt);
    border: 1px solid var(--border-soft);
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.contact-form-section {
    padding-bottom: 4.5rem;
}

.contact-form {
    background: var(--surface);
    border-radius: 32px;
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    border: 1px solid var(--border-soft);
}

.contact-form .form-grid,
.admin-form .form-grid {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.contact-form label,
.admin-form label {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.contact-form input,
.contact-form textarea,
.admin-form input,
.admin-form textarea,
.admin-form select {
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 0.85rem 1rem;
    font-family: 'Cairo', sans-serif;
    background: var(--surface-alt);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(31, 138, 92, 0.15);
    background: #fff;
}

.contact-form textarea {
    min-height: 160px;
    resize: vertical;
}

.contact-form-note {
    color: var(--muted-text);
}

.empty-state {
    text-align: center;
    color: var(--muted-text);
    font-weight: 600;
    padding: 2rem 1rem;
    background: var(--surface-alt);
    border-radius: 24px;
    margin-top: 1.5rem;
    border: 1px solid var(--border-soft);
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 22px;
    box-shadow: var(--shadow);
    overflow: hidden;
    min-width: 720px;
}

.admin-table th,
.admin-table td {
    padding: 1rem 1.2rem;
    text-align: right;
    border-bottom: 1px solid rgba(47, 191, 113, 0.12);
    font-size: 0.95rem;
}

.admin-table th {
    background: rgba(47, 191, 113, 0.12);
    font-family: 'Lalezar', cursive;
    font-size: 1rem;
    color: var(--primary-dark);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table .btn {
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    box-shadow: none;
}

.admin-table .empty-row {
    text-align: center;
    font-weight: 600;
    color: var(--muted-text);
}

@media (max-width: 768px) {
    .groups-grid,
    .camp-highlights-grid,
    .levels-list,
    .contact-page-grid {
        gap: 1.5rem;
    }

    .contact-form,
    .group-card,
    .level-card {
        padding: 1.8rem;
    }
}
