/* --- Global Variables & Base Styles --- */
:root {
    --primary-color: #0d2c40; /* Dark Blue */
    --secondary-color: #e85a4f; /* Coral */
    --accent-blue: #80c2d7; /* Light Teal */
    --light-gray: #f7f9fa;
    --text-color: #333333;
    --text-light: #5f6c7b;
    --header-bg: #ffffff;
    --footer-bg: #0d2c40;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --card-hover-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.8;
    margin: 0;
    padding: 0;
    background: #ffffff;
    color: var(--text-color);
    text-align: right; /* RTL support */
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Animations --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* --- Header & Navigation --- */
.main-header {
    background: var(--header-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-img { height: 60px; transition: transform 0.3s ease; }
.logo-img:hover { transform: scale(1.05); }

.nav-link {
    color: var(--primary-color);
    text-decoration: none;
    padding: 10px 15px;
    font-size: 1.1em;
    font-weight: bold;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -5px;
    right: 50%;
    transform: translateX(50%);
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}
.nav-link:hover::after { width: 80%; }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.btn i { margin-right: 8px; }
.btn-primary { background-color: var(--secondary-color); color: white; border-color: var(--secondary-color); }
.btn-secondary { background-color: transparent; color: var(--primary-color); border-color: var(--primary-color); }
.btn-secondary:hover { background-color: var(--primary-color); color: white; }

/* --- Hero Section --- */
.hero-section {
    position: relative;
    padding: 120px 0;
    color: white;
    text-align: right;
    height: 90vh;
    display: flex;
    align-items: center;
}
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.pexels.com/photos/3184418/pexels-photo-3184418.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1');
    background-size: cover;
    background-position: center;
    z-index: -2;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(13, 44, 64, 0.8) 0%, rgba(13, 44, 64, 0.5) 100%);
    z-index: -1;
}
.hero-text { max-width: 60%; }
.hero-subtitle { color: var(--accent-blue); font-weight: bold; font-size: 1.2em; }
.hero-text h1 { font-size: 3.5em; margin: 10px 0; font-weight: 900; }
.hero-description { font-size: 1.2em; margin-bottom: 40px; max-width: 80%; }
.hero-buttons .btn { margin-left: 15px; }

.scroll-down-arrow {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 2em;
    animation: bounce 2s infinite;
}
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); } 40% { transform: translateX(-50%) translateY(-20px); } 60% { transform: translateX(-50%) translateY(-10px); } }

/* --- General Section Styling --- */
.section-padding { padding: 80px 0; }
.section-light { background-color: var(--light-gray); }
.section-title { text-align: center; font-size: 2.8em; color: var(--primary-color); margin-bottom: 20px; font-weight: 900; }
.section-intro { max-width: 750px; margin: 0 auto 50px auto; font-size: 1.15em; color: var(--text-light); text-align: center; }

/* --- Features Section --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.feature-card {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover { transform: translateY(-10px); box-shadow: var(--card-hover-shadow); }
.feature-card i {
    font-size: 3em;
    color: var(--secondary-color);
    margin-bottom: 20px;
}
.feature-card h3 { font-size: 1.4em; color: var(--primary-color); }

/* --- About Snippet --- */
.about-snippet-section { background-color: white; }
.about-snippet-content { display: flex; align-items: center; gap: 50px; }
.about-snippet-image { flex: 1; }
.about-snippet-image img { width: 100%; border-radius: var(--border-radius); box-shadow: var(--card-shadow); }
.about-snippet-text { flex: 1.2; }
.section-subtitle { color: var(--secondary-color); font-weight: bold; }
.about-snippet-text h2 { font-size: 2.5em; color: var(--primary-color); margin-top: 10px; }
.about-snippet-text p { margin-bottom: 30px; color: var(--text-light); }

/* --- Partners Section --- */
.partners-section {
    padding: 60px 0;
    background: white;
    overflow: hidden;
}
.logos {
    display: flex;
    width: fit-content;
}
.logos-slide {
    display: flex;
    align-items: center;
    animation: 35s scroll infinite linear;
}
.logos img {
    height: 60px;
    margin: 0 40px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}
.logos img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* --- Testimonial Section --- */
.testimonial-section {
    padding: 100px 0;
    background-image: linear-gradient(rgba(13, 44, 64, 0.7), rgba(13, 44, 64, 0.7)), url('https://images.pexels.com/photos/1181298/pexels-photo-1181298.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    text-align: center;
}
.testimonial-section blockquote {
    font-size: 1.8em;
    font-weight: bold;
    max-width: 800px;
    margin: 0 auto;
    border: none;
    padding: 0;
}
.testimonial-section cite {
    display: block;
    margin-top: 20px;
    font-size: 1.1em;
    font-style: normal;
    color: var(--accent-blue);
}

/* --- Call to Action Section --- */
.cta-section {
    padding: 60px 0;
    text-align: center;
    background: var(--light-gray);
}
.cta-section h2 { font-size: 2.2em; color: var(--primary-color); margin-bottom: 10px; }
.cta-section p { font-size: 1.2em; color: var(--text-light); margin-bottom: 30px; }

/* --- Training Page --- */
.training-grid-home {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.training-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.training-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-hover-shadow);
}
.card-image-wrapper {
    height: 220px;
    overflow: hidden;
}
.training-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.training-card:hover img {
    transform: scale(1.1);
}
.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.card-content h3 { margin-top: 0; color: var(--primary-color); font-size: 1.3em; }
.card-content p { flex-grow: 1; margin-bottom: 20px; color: var(--text-light); }

/* --- Contact & Other Pages --- */
/* (Styles from previous CSS are mostly compatible) */
.contact-details i {
    font-size: 1.5em;
    color: var(--secondary-color);
    margin-left: 15px;
    margin-top: 5px;
}
.contact-details li {
    display: flex;
    align-items: flex-start;
}

/* --- Messages --- */
.message-container { padding-top: 20px; }
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.alert-success { color: #2b6834; background-color: #d4edda; border: 1px solid #c3e6cb; }
.close-btn { cursor: pointer; font-size: 1.5em; font-weight: bold; }

/* --- Footer --- */
.main-footer {
    background: var(--footer-bg);
    color: #e0e0e0;
    padding: 40px 0 20px 0;
    margin-top: 80px;
}
.footer-content {
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #2a4c63;
}
.footer-content h4 { font-size: 1.5em; margin: 0 0 10px; }
.social-links a {
    color: white;
    font-size: 1.2em;
    margin: 0 10px;
    transition: color 0.3s ease;
}
.social-links a:hover { color: var(--secondary-color); }
.footer-bottom { text-align: center; }
.footer-bottom p { margin: 5px 0; font-size: 0.9em; }
.footer-bottom a { color: var(--accent-blue); text-decoration: none; }

/* --- Responsive --- */
@media (max-width: 992px) {
    .hero-text { max-width: 100%; text-align: center; }
    .hero-content { flex-direction: column-reverse; }
    .training-grid-home { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .main-header .container { flex-direction: column; gap: 15px; }
    .hero-text h1 { font-size: 2.5em; }
    .hero-text .slogan { font-size: 1.3em; }
    .features-grid, .training-grid-home { grid-template-columns: 1fr; }
}