/* ==========================================================================
   AFMMW Base Variables & Reset
   ========================================================================== */
:root {
    /* Brand Colors derived from AFMMW Logo */
    --clr-primary: #106f3a;
    /* African Green */
    --clr-primary-light: #16934c;
    --clr-primary-dark: #0b4e28;

    --clr-secondary: #fbc02d;
    /* Gold/Yellow */
    --clr-secondary-light: #fdd835;
    --clr-secondary-dark: #f9a825;

    --clr-accent: #111111;
    /* Black from logo text */

    --clr-text-main: #333333;
    --clr-text-muted: #666666;

    --clr-bg-main: #ffffff;
    --clr-bg-light: #f8f9fa;
    --clr-bg-gradient: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-dark) 100%);

    /* Typography */
    --ff-primary: 'Tajawal', sans-serif;

    /* Spacing & Layout */
    --container-max-width: 1200px;
    --padding-section: 5rem 2rem;
    --border-radius: 8px;
    --transition-speed: 0.3s;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--ff-primary);
    color: var(--clr-text-main);
    background-color: var(--clr-bg-main);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed) ease;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--clr-accent);
    line-height: 1.3;
    font-weight: 700;
}

.text-center {
    text-align: center;
}

.bg-light {
    background-color: var(--clr-bg-light);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background-color: var(--clr-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--clr-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--clr-secondary);
    color: var(--clr-accent);
}

.btn-secondary:hover {
    background-color: var(--clr-secondary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Section Shared elements */
.section {
    padding: var(--padding-section);
}

.section-header {
    margin-bottom: 3.5rem;
}

.subtitle {
    display: inline-block;
    color: var(--clr-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    position: relative;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.divider {
    height: 4px;
    width: 60px;
    background-color: var(--clr-secondary);
    margin: 0 auto;
    border-radius: 2px;
}

.section-desc {
    max-width: 700px;
    margin: 1rem auto 0;
    color: var(--clr-text-muted);
    font-size: 1.1rem;
}

/* ==========================================================================
   Header (Navbar)
   ========================================================================== */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 0;
    transition: padding var(--transition-speed) ease;
}

.navbar.scrolled {
    padding: 0.25rem 0;
    box-shadow: var(--shadow-md);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    height: 60px;
    /* Adjust based on logo proportions */
    width: auto;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--clr-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    /* RTL alignment */
    width: 0;
    height: 3px;
    background-color: var(--clr-secondary);
    transition: width var(--transition-speed) ease;
    border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.lang-switch {
    background: transparent;
    border: none;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    color: var(--clr-text-main);
    padding: 0.5rem 1rem;
    transition: color var(--transition-speed) ease;
}

.lang-switch:hover {
    color: var(--clr-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--clr-accent);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ==========================================================================
   Hero Section & Swiper
   ========================================================================== */
.hero {
    position: relative;
    color: white;
    overflow: hidden;
}

.swiper-slide {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
}

/* Individual Slide Backgrounds */

.slide-1 {
    background: linear-gradient(135deg, rgba(11, 78, 40, 0.20) 0%, rgba(0, 0, 0, 0.4) 100%), url('slider1.png') center/cover no-repeat;
}

.slide-2 {
    background: linear-gradient(135deg, rgba(249, 168, 37, 0.3) 0%, rgba(158, 180, 79, 0.3) 100%), url('slider1.png') center/cover no-repeat;
}

.slide-3 {
    background: linear-gradient(135deg, rgba(22, 147, 76, 0.40) 0%, rgba(11, 78, 40, 0.40) 100%), url('slider1.png') center/cover no-repeat;
}


.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Pattern placeholder or subtle texture */
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.reverse-layout {
    flex-direction: row-reverse;
}

.hero-brand {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-large-logo {
    max-width: 400px;
    width: 100%;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
    animation: float 6s ease-in-out infinite;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.swiper-slide-active .hero-brand,
.swiper-slide-active .hero-text {
    animation: fadeUp 1s ease forwards;
}

.swiper-slide-active .hero-text {
    animation-delay: 0.2s;
    opacity: 0;
    /* starts hidden for fadeUp animation */
}

/* Swiper Controls Customization */
.swiper-pagination-bullet {
    background: white;
    opacity: 0.5;
    width: 12px;
    height: 12px;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--clr-secondary);
}

.swiper-button-next,
.swiper-button-prev {
    color: white;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    color: var(--clr-secondary);
}

.hero h1 {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.hero h1 span {
    color: var(--clr-secondary);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.about-content p {
    margin-bottom: 1rem;
    color: var(--clr-text-muted);
    font-size: 1.1rem;
}

.check-list {
    margin-top: 2rem;
}

.check-list li {
    position: relative;
    padding-right: 2rem;
    /* RTL padding */
    margin-bottom: 1rem;
    font-weight: 500;
}

.check-list li::before {
    content: '✓';
    position: absolute;
    right: 0;
    top: 0;
    color: white;
    background-color: var(--clr-primary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.image-wrapper {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background-color: white;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.abstract-miners {
    background: radial-gradient(circle, var(--clr-secondary-light) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    padding: 3rem;
}

.watermark-logo {
    max-width: 250px;
    opacity: 0.9;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    animation: float 6s ease-in-out infinite;
}

/* ==========================================================================
   Cards/Sectors Section (Grid display)
   ========================================================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2.5rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    border-bottom: 4px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--clr-primary);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--clr-primary);
    background: var(--clr-bg-light);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.feature-card p {
    color: var(--clr-text-muted);
}

/* ==========================================================================
   Leadership Section
   ========================================================================== */
.leadership-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.office-info {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    border-right: 4px solid var(--clr-secondary);
    /* RTL border */
    box-shadow: var(--shadow-md);
}

.office-info h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.office-info p {
    margin-bottom: 1.5rem;
    color: var(--clr-text-muted);
}

.text-link {
    color: var(--clr-primary);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.text-link:hover {
    color: var(--clr-primary-dark);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--clr-accent);
    color: white;
    padding-top: 5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    height: 80px;
    margin-bottom: 1.5rem;
    background: white;
    padding: 5px;
    border-radius: 50%;
}

.footer-brand p {
    color: #cccccc;
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
}

.social-links a:hover {
    background: var(--clr-primary);
}

.footer-links h4,
.footer-contact h4 {
    color: var(--clr-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links a:hover {
    color: var(--clr-secondary);
    padding-right: 5px;
}

/* RTL padding effect */

.footer-contact address p {
    color: #cccccc;
    margin-bottom: 0.5rem;
}

.footer-contact strong {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    font-size: 0.9rem;
    color: #999999;
}

/* ==========================================================================
   News Section
   ========================================================================== */
.news-content {
    max-width: 900px;
    margin: 0 auto;
}

.news-card {
    display: flex;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-date {
    background-color: var(--clr-primary);
    color: white;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 150px;
    text-align: center;
}

.news-date .day {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.news-date .month {
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 5px;
}

.news-date .year {
    font-size: 1rem;
    opacity: 0.8;
}

.news-body {
    padding: 2rem;
    flex: 1;
}

.news-body h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--clr-primary);
}

.news-location {
    color: var(--clr-secondary-dark);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.news-excerpt {
    font-size: 1.1rem;
    color: var(--clr-text-main);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-style: italic;
    border-left: 4px solid var(--clr-secondary);
    padding-left: 1rem;
}

html[dir="rtl"] .news-excerpt {
    border-left: none;
    border-right: 4px solid var(--clr-secondary);
    padding-left: 0;
    padding-right: 1rem;
}

.news-note {
    font-size: 0.95rem;
    color: var(--clr-text-muted);
    font-weight: 500;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media screen and (max-width: 900px) {

    .nav-links,
    .lang-switch {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-text {
        text-align: center;
        margin: 0 auto;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .news-card {
        flex-direction: column;
    }

    .news-date {
        flex-direction: row;
        gap: 15px;
        padding: 1.5rem;
        min-width: unset;
    }
}