/* ===== Fonts ===== */
body[dir="rtl"] {
    font-family: 'Tajawal', sans-serif;
}

body[dir="ltr"] {
    font-family: 'Poppins', sans-serif;
}

/* ===== Color Variables (Based on Logo) ===== */
:root {
    --primary-color: #1E847F; /* Dark Teal/Turquoise from logo */
    --secondary-color: #000000; /* Black background */
    --accent-color: #2BA5A0; /* Lighter teal for accents */
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-light: #f8f9fa;
    --transition: all 0.3s ease;
}

/* ===== Preloader ===== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hide {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    width: 150px;
    height: auto;
    margin-bottom: 30px;
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(30, 132, 127, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;
}

/* ===== Language Switcher ===== */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.85);
    padding: 8px;
    border-radius: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

body[dir="ltr"] .language-switcher {
    right: auto;
    left: 20px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-light);
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    text-decoration: none;
}

.language-switcher a.lang-btn {
    text-decoration: none;
}

.lang-btn i {
    font-size: 16px;
}

.lang-btn.active {
    background: var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 3px 10px rgba(30, 132, 127, 0.4);
}

.lang-btn:hover:not(.active) {
    background: rgba(30, 132, 127, 0.3);
    color: var(--text-light);
}

.lang-btn:active {
    transform: scale(0.95);
}

/* ===== Navigation ===== */
.navbar {
    background: rgba(0, 0, 0, 0.95) !important;
    padding: 15px 0;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.98) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-light) !important;
}

.logo-img {
    width: 50px;
    height: auto;
}

.brand-text {
    color: var(--primary-color);
}

.navbar-nav .nav-link {
    color: var(--text-light) !important;
    font-weight: 500;
    margin: 0 10px;
    padding: 8px 15px !important;
    border-radius: 5px;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(30, 132, 127, 0.1);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-nav .lang-nav-link {
    background: rgba(30, 132, 127, 0.2);
    border-radius: 5px;
    margin: 0 5px;
    padding: 8px 15px !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-nav .lang-nav-link:hover {
    background: var(--primary-color);
    color: var(--text-light) !important;
}

.navbar-nav .lang-nav-link i {
    font-size: 1rem;
}

.navbar-nav .lang-nav-link::after {
    display: none;
}

/* ===== Hero Section ===== */
.hero-section {
    margin-top: 76px;
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero-section .carousel-item {
    height: 100vh;
}

.hero-section .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4);
}

.carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.8);
    animation: fadeInUp 1.2s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(30, 132, 127, 0.7);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: var(--transition);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: var(--primary-color);
    opacity: 1;
}

.carousel-control-prev {
    left: 30px;
}

.carousel-control-next {
    right: 30px;
}

/* ===== Section Styling ===== */
.section-padding {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    position: relative;
}

.title-divider {
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    margin: 0 auto 30px;
    border-radius: 2px;
}

body[dir="rtl"] .title-divider {
    background: linear-gradient(to left, var(--primary-color), var(--accent-color));
}

.bg-light {
    background-color: var(--bg-light) !important;
}

/* ===== About Section ===== */
.about-content {
    padding: 20px;
}

.about-heading {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 30px;
}

.about-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 10px;
    border-right: 4px solid var(--primary-color);
    transition: var(--transition);
}

body[dir="ltr"] .info-item {
    border-right: none;
    border-left: 4px solid var(--primary-color);
}

.info-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(30, 132, 127, 0.2);
}

body[dir="ltr"] .info-item:hover {
    transform: translateX(5px);
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 30px;
    text-align: center;
}

.about-image img {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.about-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(30, 132, 127, 0.3);
}

/* ===== Vision & Mission Section ===== */
.vision-card,
.mission-card {
    background: var(--text-light);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.vision-card:hover,
.mission-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(30, 132, 127, 0.2);
}

.vision-icon,
.mission-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2.2rem;
    color: var(--text-light);
    box-shadow: 0 5px 20px rgba(30, 132, 127, 0.3);
}

.vision-mission-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.vision-text,
.mission-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin: 0;
    flex-grow: 1;
}

/* ===== Values Section ===== */
.value-card {
    background: var(--text-light);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    height: 100%;
    border-top: 4px solid var(--primary-color);
}

.value-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(30, 132, 127, 0.2);
}

.value-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--text-light);
}

.value-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.value-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0;
}

/* ===== Contact Section ===== */
.contact-card {
    background: var(--text-light);
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    margin-bottom: 20px;
    background: var(--bg-light);
    border-radius: 10px;
    border-right: 4px solid var(--primary-color);
    transition: var(--transition);
}

body[dir="ltr"] .contact-item {
    border-right: none;
    border-left: 4px solid var(--primary-color);
}

.contact-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(30, 132, 127, 0.2);
}

body[dir="ltr"] .contact-item:hover {
    transform: translateX(5px);
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
    width: 50px;
    text-align: center;
    padding-top: 5px;
}

.contact-item h5 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.contact-item p {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.6;
}

/* ===== Footer ===== */
.footer {
    background: var(--secondary-color);
    padding: 40px 0;
    text-align: center;
}

.footer-logo {
    width: 100px;
    height: auto;
    margin-bottom: 20px;
}

.footer-text {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
}

/* ===== Map Section ===== */
.map-container {
    margin-top: 50px;
}

.map-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.map-wrapper {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 3px solid var(--primary-color);
    transition: var(--transition);
}

.map-wrapper:hover {
    box-shadow: 0 15px 40px rgba(30, 132, 127, 0.3);
    transform: translateY(-5px);
}

.map-iframe {
    width: 100%;
    height: 450px;
    border: none;
    display: block;
}

.map-link {
    margin-top: 20px;
}

.btn-map {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(30, 132, 127, 0.3);
}

.btn-map:hover {
    background: var(--accent-color);
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(30, 132, 127, 0.4);
}

.btn-map i {
    font-size: 1rem;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-padding {
        padding: 60px 0;
    }

    .vision-card,
    .mission-card,
    .contact-card {
        padding: 30px 20px;
    }

    .vision-mission-title {
        font-size: 1.5rem;
    }

    .vision-text,
    .mission-text {
        font-size: 1rem;
    }

    .vision-icon,
    .mission-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }

    .about-text,
    .vision-text,
    .mission-text {
        font-size: 1rem;
    }

    .language-switcher {
        top: 10px;
        right: 10px;
    }

    body[dir="ltr"] .language-switcher {
        left: 10px;
        right: auto;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }

    .carousel-control-prev {
        left: 10px;
    }

    .carousel-control-next {
        right: 10px;
    }

    .map-title {
        font-size: 1.5rem;
    }

    .map-iframe {
        height: 300px;
    }
}

/* ===== Smooth Scroll ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Animation on Scroll ===== */
.fade-in {
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

