:root {
    --primary-color: #ea5b2b;
    --primary-color-darker: #d14d22;
    --secondary-color: #ed8633;
    --secondary-color-darker: #d97529;
    --background-color: #22666a;
    --background-color-dark: #1a4c4f;
    --text-color: white;
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-bg-hover: rgba(255, 255, 255, 0.15);
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-x: hidden;
    padding-top: 80px; /* Space for the top nav */
}

/* A wrapper to prevent any horizontal overflow issues */
.wrapper {
    width: 100%;
    overflow-x: hidden;
}

/* Styles for branches.html */
.branches-page {
    padding-top: 120px;
}

/* Splash Screen Styles */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-logo {
    max-width: 250px;
    animation: zoomIn 1.5s ease-in-out forwards;
}

@keyframes zoomIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Desktop Top Nav */
.desktop-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--background-color-dark);
    padding: 1rem 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex; /* Show by default */
}

.desktop-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.desktop-nav .navbar-brand {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-color);
    text-decoration: none;
}

.desktop-nav .nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.desktop-nav .nav-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.desktop-nav .nav-links a:hover,
.desktop-nav .nav-links a.active {
    color: var(--primary-color);
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    color: var(--text-color);
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(234, 91, 43, 0.4);
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(234, 91, 43, 0.6);
    background: linear-gradient(135deg, var(--primary-color-darker) 0%, var(--secondary-color-darker) 100%);
}

.btn-outline-custom {
    border: 2px solid var(--primary-color);
    color: var(--text-color);
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 700;
    background: transparent;
    transition: all 0.3s;
}

.btn-outline-custom:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-color);
    border-color: transparent;
    transform: translateY(-3px);
}

.hero-section {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(34, 102, 106, 0.9) 0%, var(--background-color) 100%);
    position: relative;
    overflow: hidden;
        z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(234, 91, 43, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-logo {
    max-width: 180px; /* يمكنك تعديل الحجم حسب الرغبة */
    margin-bottom: 1.5rem;
    background-color: white;
    border-radius: 50%;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(234, 91, 43, 0.25); /* Using primary color for shadow */
    animation: floatAnimation 4s ease-in-out infinite;
}

@keyframes floatAnimation {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.hero-section p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 3rem;
}

.programs-section {
    padding: 80px 0;
    background-color: rgba(0, 0, 0, 0.2);
}

.program-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.4s;
    border: 2px solid transparent;
    height: 100%;
    backdrop-filter: blur(10px);
}

.program-card:hover {
    transform: translateY(-10px);
    background: var(--card-bg-hover);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(234, 91, 43, 0.3);
}

.program-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.program-card h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.program-card p {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.7;
}

.about-section {
    padding: 80px 0;
}

.about-content {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 50px;
    backdrop-filter: blur(10px);
}

.about-content h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.about-content p {
    font-size: 1.1rem;
    line-height: 2;
    opacity: 0.95;
}

.stats-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-top: 30px;
}

.stats-box h2 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.stats-box p {
    font-size: 1.1rem;
    margin: 0;
}

/* Founder Section Styles */
.founder-section {
    padding: 80px 0;
    background-color: rgba(0, 0, 0, 0.2); /* Consistent with other sections */
}

.founder-image {
    border-radius: 15px; /* Slightly rounded corners for a photo */
    max-width: 100%;
    height: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); /* Subtle shadow */
    border: 3px solid var(--primary-color); /* A border matching the primary color */
    padding: 5px; /* Space between border and image */
}

.founder-content h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.founder-content p {
    font-size: 1.1rem;
    line-height: 1.9;
    opacity: 0.95;
    margin-bottom: 15px;
}

@media (max-width: 992px) {
    .founder-image {
        margin-top: 30px; /* Add space between text and image on smaller screens */
    }
}

.partners-section {
    padding: 80px 0;
    background-color: rgba(0, 0, 0, 0.2);
}

.partner-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.partner-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.partner-logo {
    font-size: 3rem;
    color: var(--background-color);
}

.contact-section {
    padding: 80px 0;
}

.contact-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.contact-card:hover {
    background: var(--card-bg-hover);
    transform: translateY(-5px);
}

.contact-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.contact-card p {
    font-size: 1.1rem;
    margin: 0;
}

.contact-card p a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-card p a:hover {
    color: var(--primary-color);
}

.footer {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 50px 0 20px;
    margin-top: 80px;
}

.footer h5 {
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer ul li a {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.3s;
}

.footer ul li a:hover {
    opacity: 1;
    color: var(--primary-color);
    padding-right: 5px;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.5rem;
    margin: 0 10px;
    transition: all 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    opacity: 0.7;
}

.copyright .dev-credit {
    margin-top: 10px;
    font-size: 0.9rem;
}

.copyright .dev-credit a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}
.copyright .dev-credit a:hover {
    color: var(--secondary-color);
}

/* Mobile Bottom Nav */
.mobile-nav {
    display: none; /* Hide by default on desktop */
}

.mobile-nav .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; 
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
    flex-grow: 1;
    height: 100%;
    padding: 8px 0;
}

.mobile-nav .nav-link i {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.mobile-nav .nav-link span {
    font-size: 0.8rem;
    font-weight: 600;
}

.mobile-nav .nav-link.active {
    color: var(--primary-color);
}


@media (max-width: 768px) {
    body {
        padding-top: 0; /* Remove top padding on mobile */
        padding-bottom: 70px; /* Add space for the bottom nav on mobile */
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section p {
        font-size: 1.1rem;
    }

    .hero-section .d-flex {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 2rem;
    }

    .program-card,
    .about-content,
    .contact-card {
        padding: 30px 20px;
    }

    .about-content h3 {
        font-size: 1.6rem;
    }

    .stats-box {
        padding: 20px;
    }

    .desktop-nav {
        display: none; /* Hide desktop nav on mobile */
    }
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 70px;
        background-color: var(--background-color-dark); /* Increased shadow for better visibility */
        display: flex; /* Show on mobile */
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.3); /* Increased z-index to ensure it's on top */
        z-index: 9999; /* Added border for better separation */
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Ensure no sections have z-index that could cover the nav */
    .hero-section,
    .programs-section,
    .about-section,
    .partners-section,
    .contact-section,
    .footer {
        position: relative;
        z-index: 1; /* Lower than mobile-nav */
    }

    /* Fix potential overflow issues */
    .hero-section::before {
        z-index: -1; /* Ensure the background element doesn't interfere */
    }

    /* Hide decorative element on mobile to prevent overflow */
    .hero-section::before {
        display: none;
    }
}

.branch-details {
    padding: 30px;
    flex: 1 1 50%;
}

.branch-details h3 {
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 1.5rem;
}
.branch-details p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.branch-details a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
}

.branch-map {
    flex: 1 1 50%;
    min-height: 300px;
}

.branch-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Articles Page Styles */
.articles-page, .single-article-page {
    padding-top: 120px;
}

.article-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.article-card .card-body {
    padding: 25px;
}

.article-card .card-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 15px;
}

.article-card .card-text {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

/* Single Article Page Styles */
.article-header h1 {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--primary-color);
}

.article-header .meta {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 15px;
}

.article-header .meta span {
    margin-left: 20px;
}

.article-header .meta i {
    margin-left: 8px;
}

.article-content p {
    font-size: 1.2rem;
    line-height: 2;
    margin-bottom: 1.5rem;
}

.article-content h3 {
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}