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

:root {
    /* Updated theme: switch primary from green to light blue */
    --primary-color: #5AB9EA;
    /* light blue */
    --secondary-color: #3498db;
    /* medium blue */
    --primary-hover: #49A7DE;
    /* darker for hover */
    --secondary-hover: #2980b9;
    /* existing darker blue */
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --text-color: #333;
    --white: #ffffff;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
    /* Better rendering on all devices */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: #e3f2fd;
    /* Soft blue - matches brand colors */
    transition: all 0.3s ease;
    /* Better font rendering in Firefox */
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    /* Prevent text size adjustment on mobile */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Improve touch scrolling on mobile devices */
    -webkit-overflow-scrolling: touch;
}

body.rtl {
    direction: rtl;
    font-family: 'Cairo', 'Tahoma', 'Arial', 'Segoe UI', sans-serif;
}

/* Better Arabic font support - Exclude icons */
body.rtl *:not(.fas):not(.fab):not(.far):not(.fa) {
    font-family: 'Cairo', 'Tahoma', 'Arial', 'Segoe UI', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 30px);
    /* Increased breathing room */
    width: 100%;
}

/* Navigation */
.navbar {
    background: #2c3e50;
    /* Dark background matching footer */
    box-shadow: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    /* Subtle shadow on scroll */
    padding: 0;
    /* Compact on scroll */
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 20px;
    /* Reduced from 1.2rem */
    transition: padding 0.3s ease;
}

.navbar.scrolled .container {
    padding: 0.4rem 20px;
    /* Very compact on scroll */
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    /* Slightly smaller for elegance */
    font-weight: 700;
    color: #ffffff;
    /* White logo text for dark navbar */
    letter-spacing: -0.5px;
}

.logo span {
    line-height: 1.3;
    display: block;
}

.logo i {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    /* More space */
    flex: 1;
    justify-content: center;
}

.nav-menu a {
    text-decoration: none;
    color: #ffffff;
    /* White text for dark navbar */
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 5px;
    opacity: 0.8;
}

.nav-menu a:hover {
    color: #5AB9EA;
    /* Light blue on hover */
    opacity: 1;
}

.language-switcher {
    position: relative;
    margin-left: 20px;
}

body.rtl .language-switcher {
    margin-left: 0;
    margin-right: 20px;
}

.lang-dropdown {
    position: relative;
}

.lang-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 2px solid var(--primary-color);
    background: var(--white);
    color: var(--text-color);
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    /* Subtle shadow */
}

.lang-dropdown-btn:hover {
    background: #f8f9fa;
    border-color: var(--primary-hover);
    color: var(--primary-color);
}

.lang-dropdown-btn:hover .flag-icon {
    transform: scale(1.1);
}

.dropdown-arrow {
    font-size: 0.6rem;
    transition: transform 0.3s;
    display: inline-block;
}

.lang-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.flag-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s;
}

.lang-text {
    font-size: 0.8rem;
    font-weight: 600;
}

.lang-dropdown-content {
    position: absolute;
    top: 110%;
    right: 0;
    background: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    min-width: 100px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.lang-dropdown.active .lang-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
    border-bottom: 1px solid #eee;
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: var(--primary-color);
    color: var(--white);
}

.lang-option img {
    width: 20px;
    height: 20px;
}

.lang-option span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #ffffff;
    /* White hamburger for dark navbar */
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    position: relative;
    /* Combine color and image in one shorthand to prevent overwrite */
    background: #2c3e50 url('img/hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-top: 70px;
}

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

.hero-content h1 {
    font-size: clamp(1.5rem, 5vw, 3rem);
    margin-bottom: 1rem;
    animation: fadeInDown 1s;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    font-weight: 800;
    /* Bolder headline */
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.hero-content p {
    font-size: clamp(1rem, 3vw, 1.3rem);
    /* Fluid typography */
    margin-bottom: 2rem;
    animation: fadeInUp 1s;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.5);
    font-weight: 400;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    letter-spacing: 0.5px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(44, 62, 80, 0.4), rgba(44, 62, 80, 0.8));
    /* Improved gradient for readability */
    z-index: 1;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 40px;
    /* Larger padding */
    text-decoration: none;
    border-radius: 50px;
    /* Pill shape */
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .btn {
        width: 100%;
        text-align: center;
        padding: 16px 20px;
        /* Taller touch target */
        font-size: 1.1rem;
    }
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: #2980b9;
    /* Slightly deeper blue for trust */
    color: var(--white);
    border: 2px solid transparent;
}

.btn-primary:hover {
    background: #2471a3;
    transform: translateY(-4px);
    /* Higher lift */
    box-shadow: 0 10px 25px rgba(41, 128, 185, 0.4);
    /* Matching shadow color */
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--secondary-hover);
}

/* Section Styles */
section {
    padding: 80px 0;
}

section:nth-child(even) {
    background-color: #f0f8ff;
    /* Very light blue to complement body background */
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.underline {
    width: 100px;
    height: 4px;
    background: var(--primary-color);
    margin: 0 auto;
}

/* About Section */
.about {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
    padding: 40px 0;
    /* Significantly reduced section padding */
}

.about::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(90, 185, 234, 0.1);
    border-radius: 50%;
    z-index: 0;
}

.about::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    z-index: 0;
}

.about .container {
    position: relative;
    z-index: 1;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-top: 0.5rem;
    font-weight: 300;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
}

.about-main-card {
    background: white;
    padding: 2rem;
    /* Reduced padding */
    border-radius: 15px;
    /* Slightly reduced radius */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    /* Lighter shadow */
    text-align: center;
    margin-bottom: 2rem;
    /* Reduced margin */
    transition: transform 0.3s;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.about-main-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.about-icon {
    width: 60px;
    /* Reduced */
    height: 60px;
    /* Reduced */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    /* Reduced margin */
    animation: pulse 2s infinite;
}

.about-icon i {
    font-size: 2rem;
    /* Reduced */
    color: white;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.about-main-card h3 {
    font-size: 1.5rem;
    /* Reduced */
    color: var(--dark-color);
    margin-bottom: 0.8rem;
    /* Reduced */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -moz-background-clip: text;
    -moz-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.about-description {
    font-size: 1.05rem;
    /* Reduced */
    line-height: 1.6;
    /* Reduced */
    color: #555;
    max-width: 800px;
    /* Reduced width */
    margin: 0 auto;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.about-text h3 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Unified Card Style for Stats and Features */
.stats,
.about-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
    align-items: stretch;
}

@media (max-width: 992px) {

    .stats,
    .about-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {

    .stats,
    .about-features {
        grid-template-columns: 1fr;
    }
}

.stat-item,
.feature-item {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    border: none;
}

/* Background Colors - Stats */
/* 2023 - Soft Neutral */
.stat-item:nth-child(1) {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

/* 100% - Soft Blue */
.stat-item:nth-child(2) {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

/* 24/7 - Soft Teal */
.stat-item:nth-child(3) {
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
}

/* Background Colors - Features */
/* Focus Soudan - Soft Sand */
.feature-item:nth-child(1) {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
}

/* Action Humanitaire - Soft Coral */
.feature-item:nth-child(2) {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
}

/* Social Development - Soft Green */
.feature-item:nth-child(3) {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.stat-item:hover,
.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.8);
    /* Semi-transparent white */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.stat-icon i {
    font-size: 1.8rem;
    color: var(--primary-color);
    /* Icon color */
}

/* Feature Icons - maintain gradient or simplifying to solid for readability */
.feature-item i {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -moz-background-clip: text;
    -moz-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.stat-item h4 {
    font-size: 3rem;
    /* Larger numbers */
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-weight: 800;
    line-height: 1;
    background: none;
    -webkit-text-fill-color: var(--dark-color);
    /* Reset gradient text */
}

.stat-item p,
.feature-item p {
    font-size: 1rem;
    color: #555;
    font-weight: 500;
    line-height: 1.6;
}

.feature-item h4 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

/* Mission Section */
/* Mission Section */
.mission-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: stretch;
    /* Equal height */
}

@media (max-width: 992px) {
    .mission-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .mission-grid {
        grid-template-columns: 1fr;
    }
}

.mission-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    /* Soft rounded corners */
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    /* Soft shadow */
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.02);
    height: 100%;
}

/* Card 1: Social Development (Soft Blue) */
.mission-card:nth-child(1) {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

/* Card 2: Women & Children (Soft Rose) */
.mission-card:nth-child(2) {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
}

/* Card 3: Refugees (Soft Peach/Orange) */
.mission-card:nth-child(3) {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}

/* Card 4: Food Aid (Soft Green) */
.mission-card:nth-child(4) {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

/* Card 5: Sudan Families (Soft Yellow/Sand) */
.mission-card:nth-child(5) {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
}

/* Card 6: Emergency (Soft Red/Coral) */
.mission-card:nth-child(6) {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
}

.mission-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    /* Deeper soft shadow */
}

.mission-card i {
    font-size: 3.5rem;
    /* Slightly larger icons */
    margin-bottom: 1.5rem;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

/* Override generic icon colors for harmony if needed, or keep original */
.mission-card:nth-child(1) i {
    color: #1565c0;
}

.mission-card:nth-child(2) i {
    color: #c2185b;
}

.mission-card:nth-child(3) i {
    color: #ef6c00;
}

.mission-card:nth-child(4) i {
    color: #2e7d32;
}

.mission-card:nth-child(5) i {
    color: #f9a825;
}

.mission-card:nth-child(6) i {
    color: #c62828;
}

.mission-card:hover i {
    transform: scale(1.1);
}

.mission-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.mission-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    /* Darker grey for better contrast on colors */
    font-weight: 500;
    margin-top: auto;
    /* Push text down if needed, but flex handles spacing */
}

/* Programs Section */
/* Programs Section */
.programs {
    background: #f9fbfd;
    /* Lighter background for freshness */
    padding: 80px 0;
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: stretch;
}

@media (max-width: 992px) {
    .programs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .programs-grid {
        grid-template-columns: 1fr;
    }
}

.program-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    /* Softer shadow */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.03);
    /* Subtle border */
    height: 100%;
}

.program-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.program-card img {
    width: 100%;
    height: 220px;
    /* Reduced height for balance */
    object-fit: cover;
    transition: transform 0.5s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.program-card:hover img {
    transform: scale(1.03);
    /* Subtle zoom */
}

/* Add overlay to images for consistency */
.program-image-wrapper {
    position: relative;
    overflow: hidden;
}

.program-content {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.program-content h3 {
    font-size: 1.35rem;
    /* Slightly smaller title */
    color: var(--dark-color);
    margin-bottom: 0.8rem;
    font-weight: 700;
    line-height: 1.35;
}

.program-content p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #555;
    font-size: 0.95rem;
    /* Refined font size */
    flex-grow: 1;
    /* Push button to bottom */
}

.program-content .btn {
    align-self: flex-start;
    padding: 10px 25px;
    /* Compact button */
    font-size: 0.9rem;
    border-radius: 50px;
    margin-top: auto;
    /* Ensure alignment at bottom */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    /* Space for arrow */
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: none;
}

.program-content .btn::after {
    content: '\f061';
    /* FontAwesome arrow right */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.program-content .btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

.program-content .btn:hover::after {
    transform: translateX(4px);
}

/* Video Section */
.videos {
    background: var(--white);
}

/* Universal fluid grid - adapts to ANY screen size automatically */
.videos-grid {
    display: grid;
    /* Compact columns for smaller video cards */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: clamp(1rem, 3vw, 1.5rem);
    /* Fluid gap that scales with viewport */
    width: 100%;
}

.video-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    width: 100%;
    max-width: 100%;
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Universal responsive video wrapper - works on ALL devices */
.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    background: #000;
    overflow: hidden;
    display: block;
    contain: layout;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Shows full video on all screens */
    display: block;
    max-width: 100%;
    max-height: 100%;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}


.video-wrapper video::-webkit-media-controls-panel {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
}

/* Firefox video controls styling */
.video-wrapper video::-moz-media-controls {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
}

.video-content {
    padding: 1.5rem;
    background: var(--white);
}

.video-content h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 0.8rem;
}

.video-content p {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
}

/* Feedback Section */
.feedback {
    background: var(--light-color);
}

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

.feedback-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
    border: 2px solid transparent;
    position: relative;
}

.feedback-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

/* Delete button for user feedback */
.delete-feedback-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.3s;
    opacity: 0;
    z-index: 10;
}

.user-feedback:hover .delete-feedback-btn {
    opacity: 1;
}

.delete-feedback-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

body.rtl .delete-feedback-btn {
    right: auto;
    left: 10px;
}

.feedback-card .stars {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    margin-bottom: 1.5rem;
    direction: ltr;
    /* Force LTR for stars in both languages */
}

.feedback-card .stars i,
.feedback-card .stars .star {
    color: #ffc107;
    font-size: 1.5rem;
}

.feedback-card .stars .star {
    font-family: Arial, sans-serif;
    line-height: 1;
}

.feedback-card p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
    font-style: italic;
}

/* Feedback Form */
.feedback-form-container {
    max-width: 600px;
    margin: 3rem auto 0;
}

.feedback-form-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary-color);
}

.feedback-form-card h3 {
    text-align: center;
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
}

.rating-input {
    margin-bottom: 1.5rem;
    text-align: center;
}

.rating-input label {
    display: block;
    font-size: 1rem;
    color: var(--dark-color);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 0.3rem;
    direction: ltr;
    /* Force LTR for star display */
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating label {
    font-size: 2.5rem;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0;
    font-family: 'Font Awesome 5 Free', 'Font Awesome 6 Free', sans-serif;
    font-weight: 900;
}

.star-rating label::before {
    content: '\f005';
    /* Font Awesome star icon */
    font-family: 'Font Awesome 5 Free', 'Font Awesome 6 Free';
    font-weight: 400;
    /* Regular star (outline) */
}

.star-rating label:hover::before,
.star-rating label:hover~label::before,
.star-rating input[type="radio"]:checked~label::before {
    font-weight: 900;
    /* Solid star */
    color: #ffc107;
}

.star-rating label:hover,
.star-rating label:hover~label,
.star-rating input[type="radio"]:checked~label {
    color: #ffc107;
    transform: scale(1.1);
}

.feedback-form-card .form-group {
    margin-bottom: 1.5rem;
}

.feedback-form-card textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

.feedback-form-card textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.char-count {
    display: block;
    text-align: right;
    color: #999;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.feedback-form-card button[type="submit"] {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
}

.feedback-success {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-radius: 10px;
    animation: fadeIn 0.5s;
}

.feedback-success i {
    font-size: 3rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.feedback-success p {
    font-size: 1.2rem;
    color: #155724;
    font-weight: 600;
    margin: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Donation Section */
/* Donation Section - Visual Polish */
.donate {
    background: linear-gradient(135deg, #eef7fc 0%, #f4f6f9 100%);
    /* Soft background instead of dark blue */
    padding: 40px 0;
    /* Reduced from 70px for more compact layout */
    color: var(--dark-color);
}

.donate .section-header h2 {
    color: var(--primary-color);
    /* Restore brand color for title */
}

.donate .section-header p {
    color: #666;
    /* Use standard grey for subtitle */
}

.bank-info-container {
    max-width: 1000px;
    /* Consolidate width for better readability */
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 2rem;
}

.bank-card {
    background: #ffffff;
    padding: 1.5rem;
    /* Reduced padding (was 2.5rem) */
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    /* Softer shadow */
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    height: auto;
    /* Allow auto height */
}

/* Distinct Background Colors */
.bank-info-container .bank-card:nth-child(1) {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
    /* Soft Pink */
    border: 1px solid #f48fb1;
}

.bank-info-container .bank-card:nth-child(2) {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    /* Soft Purple */
    border: 1px solid #ce93d8;
}

.bank-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

.bank-icon {
    width: 60px;
    height: 60px;
    background: rgba(90, 185, 234, 0.1);
    /* Subtle brand tint */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
}

.bank-icon i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.bank-card h3 {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.bank-subtitle {
    display: block;
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    /* Reduced bottom margin */
    font-weight: 400;
}

.bank-detail-item {
    background: rgba(255, 255, 255, 0.6);
    /* Semi-transparent overlay */
    padding: 0.8rem 0;
    /* Reduced padding */
    margin-bottom: 0.2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: center;
    border-radius: 8px;
    /* Slight rounding for items */
}

.bank-detail-item:last-child {
    border-bottom: none;
}

.detail-content h4 {
    font-size: 0.8rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.account-number,
.iban-number,
.bic-number {
    font-family: 'Roboto Mono', 'Courier New', monospace;
    /* Monospace for data */
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
    margin: 0.1rem 0;
    /* Tighter spacing */
    display: block;
    word-break: break-all;
}

.copy-btn {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid rgba(90, 185, 234, 0.3);
    padding: 6px 16px;
    font-size: 0.85rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.copy-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

@media (max-width: 768px) {
    .bank-info-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .bank-card {
        padding: 1.5rem;
    }
}




.copy-btn i {
    font-size: 0.6rem;
}

.donation-note {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: right;
}

.donation-note i {
    font-size: 1.5rem;
    color: #ffc107;
    flex-shrink: 0;
}

.donation-note p {
    color: #856404;
    margin: 0;
    font-size: 1rem;
}

.donation-note-bottom {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 6px;
    padding: 0.5rem 0.8rem;
    margin: 0.8rem auto;
    max-width: 1400px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: right;
}

.donation-note-bottom i {
    font-size: 0.9rem;
    color: #ffc107;
    flex-shrink: 0;
}

.donation-note-bottom p {
    color: #856404;
    margin: 0;
    font-size: 0.7rem;
    font-weight: 500;
}

.donation-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.donation-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.amount-btn {
    padding: 15px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.amount-btn:hover,
.amount-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

#custom-amount {
    grid-column: 1 / -1;
    padding: 15px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(90, 185, 234, 0.1);
    transform: translateY(-2px);
}

/* Contact Section */
.contact-content-new {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.contact-image {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.contact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.contact-image:hover img {
    transform: scale(1.05);
}

.contact-card {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-card-header {
    text-align: center;
    margin-bottom: 1rem;
}

.contact-card-header i {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -moz-background-clip: text;
    -moz-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.3rem;
}

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

.contact-details {
    margin-bottom: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem;
    margin-bottom: 0.6rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s;
}

.contact-item:hover {
    transform: translateX(-3px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1rem;
    color: white;
}

.whatsapp-link {
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.whatsapp-link:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.5);
}

.contact-text {
    flex: 1;
    text-align: right;
}

.contact-text h4 {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.contact-text p {
    font-size: 0.9rem;
    color: var(--dark-color);
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
}

.social-links {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    padding-top: 0.8rem;
    border-top: 2px solid #f0f0f0;
}

.social-links a {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.social-links a:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-links a img {
    transition: all 0.3s;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.info-item h4 {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: var(--white);
    text-align: center;
    padding: 0.2rem 0;
    /* Extremely compact footer */
}

.footer .site-credit {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    opacity: 0.9;
}

.footer .credit-link {
    color: var(--secondary-color);
    text-decoration: underline;
}

.footer .credit-link:hover {
    color: var(--primary-color);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */

/* Large Tablets and Small Desktops (1024px and below) */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .nav-menu {
        gap: 1.5rem;
    }

    .mission-grid,
    .programs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bank-info-container {
        gap: 1.5rem;
    }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    /* Add space between language switcher and hamburger on mobile */
    .language-switcher {
        margin-right: 12px;
        /* space to its right (towards hamburger) */
    }

    body.rtl .language-switcher {
        margin-right: 0;
        margin-left: 12px;
        /* mirror spacing for RTL */
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu li {
        padding: 1rem 0;
        border-bottom: 1px solid #eee;
    }

    .nav-menu.active {
        left: 0;
    }

    body.rtl .nav-menu {
        left: auto;
        right: -100%;
    }

    body.rtl .nav-menu.active {
        right: 0;
    }

    .logo span {
        font-size: 1.2rem;
    }

    /* hero h1 and p use fluid clamp() - no need to override */


    .mission-grid,
    .programs-grid,
    .videos-grid,
    .feedback-grid {
        grid-template-columns: 1fr;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .bank-info-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .bank-card {
        padding: 0.8rem;
    }

    .contact-content-new {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-image {
        max-height: 300px;
    }

    .contact-card {
        padding: 1.5rem;
    }

    .feedback-form-card {
        padding: 1.5rem;
    }

    .star-rating label {
        font-size: 2rem;
    }
}

/* Mobile Devices (480px and below) */
@media (max-width: 480px) {
    .logo {
        font-size: 1rem;
    }

    .logo img {
        width: 28px !important;
        height: 28px !important;
    }

    .logo span {
        font-size: 1rem;
    }

    .language-switcher {
        margin-left: 10px;
        margin-right: 12px;
        /* keep extra spacing from hamburger on small phones */
    }

    body.rtl .language-switcher {
        margin-right: 10px;
        margin-left: 12px;
    }

    .lang-dropdown-btn {
        padding: 4px 8px;
        gap: 4px;
    }

    .flag-icon {
        width: 16px !important;
        height: 16px !important;
    }

    .lang-text {
        font-size: 0.7rem;
    }

    .dropdown-arrow {
        font-size: 0.5rem;
    }

    /* hero uses fluid typography with clamp() - scales automatically */

    .btn {
        padding: clamp(8px, 2vw, 10px) clamp(16px, 4vw, 20px);
        font-size: clamp(0.85rem, 2vw, 0.9rem);
    }

    .section-header h2 {
        font-size: clamp(1.5rem, 4vw, 1.8rem);
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .stat-card h3 {
        font-size: 2rem;
    }

    .stat-card p {
        font-size: 0.9rem;
    }

    .bank-card h3 {
        font-size: 1rem;
    }

    /* Video grid - already fluid with auto-fit, no need to override */
    .video-card {
        width: 100%;
    }

    /* Enhanced mobile video controls */
    .video-wrapper video::-webkit-media-controls {
        background: rgba(0, 0, 0, 0.1);
    }

    .video-wrapper video::-webkit-media-controls-panel {
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    }

    .video-wrapper video::-webkit-media-controls-play-button {
        background-color: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
    }

    /* Gallery responsive improvement */
    .gallery-container {
        padding: 20px 10px;
    }

    .bank-name {
        font-size: 0.95rem;
    }

    .bank-detail-item {
        flex-direction: column;
        text-align: center;
        padding: 0.6rem;
    }

    .account-name {
        font-size: 1rem;
    }

    .account-name-fr {
        font-size: 0.9rem;
    }

    .account-number {
        font-size: 1.05rem;
    }

    .iban-number {
        font-size: 1rem;
        word-break: break-all;
    }

    .bic-number {
        font-size: 1.1rem;
    }

    .copy-btn {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    .donation-note-bottom {
        flex-direction: column;
        text-align: center;
        padding: 0.5rem;
    }

    .donation-note-bottom i {
        font-size: 0.8rem;
    }

    .donation-note-bottom p {
        font-size: 0.7rem;
    }

    .contact-card-header h3 {
        font-size: 1.1rem;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        padding: 0.6rem;
    }

    .contact-icon {
        width: 35px;
        height: 35px;
    }

    .contact-icon img {
        width: 30px !important;
        height: 30px !important;
    }

    .contact-text h4 {
        font-size: 0.9rem;
    }

    .contact-text p {
        font-size: 0.85rem;
    }

    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .feedback-form-card {
        padding: 1.2rem;
    }

    .feedback-form-card h3 {
        font-size: 1.2rem;
    }

    .star-rating label {
        font-size: 1.8rem;
    }

    .feedback-form-card textarea {
        font-size: 0.95rem;
    }
}

/* Firefox-specific fixes */
@-moz-document url-prefix() {
    .video-wrapper {
        position: relative;
        width: 100%;
        padding-bottom: 56.25%;
        background: #000;
        overflow: hidden;
        /* Force aspect ratio in Firefox */
    }

    .video-wrapper video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Ensure proper grid alignment in Firefox */
    .videos-grid,
    .feedback-grid,
    .programs-grid,
    .mission-grid {
        display: -moz-grid;
        display: grid;
    }

    /* Fix flexbox in Firefox */
    .navbar .container,
    .nav-menu,
    .stars {
        display: -moz-box;
        display: flex;
    }
}

/* Extra Small Devices (360px and below) */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }

    .logo span {
        font-size: clamp(0.8rem, 2vw, 0.85rem);
    }

    /* hero and section headers use fluid clamp() - scale automatically */

    .mission-card h3,
    .program-card h3 {
        font-size: clamp(0.95rem, 2.5vw, 1rem);
    }

    .mission-card p,
    .program-card p {
        font-size: 0.85rem;
    }

    /* Partner flags responsive */
    .footer-flags {
        gap: 20px !important;
    }

    .footer-flags img {
        width: 60px !important;
    }

    /* Social media icons responsive */
    .footer a[href*="facebook"],
    .footer a[href*="youtube"] {
        width: 35px !important;
        height: 35px !important;
    }

    .footer a[href*="facebook"] img,
    .footer a[href*="youtube"] img {
        width: 24px !important;
        height: 24px !important;
    }

    /* Video optimization for extra small screens */
    .videos-grid {
        gap: 1rem;
        padding: 0 5px;
    }

    .video-card {
        border-radius: 8px;
    }

    .video-wrapper {
        border-radius: 8px;
        padding-bottom: 56.25%;
        /* Maintain aspect ratio */
    }

    .video-wrapper video {
        border-radius: 8px;
        /* Ensure video is always visible and properly sized */
        min-height: 200px;
        object-fit: contain;
    }
}

/* ============================================
   UNIVERSAL RESPONSIVE DESIGN
   Works on ALL devices automatically
   ============================================ */

/* Landscape orientation optimization - Universal for all devices */
@media (orientation: landscape) and (max-height: 600px) {
    .hero {
        min-height: 70vh;
        padding: 60px 0;
    }

    .navbar {
        padding: 8px 0;
    }
}

/* High DPI displays - Universal (Retina, AMOLED, etc.) */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Touch device optimizations - Universal */
@media (hover: none) and (pointer: coarse) {

    /* Touch devices */
    .video-wrapper video {
        -webkit-tap-highlight-color: transparent;
    }

    button,
    a {
        -webkit-tap-highlight-color: rgba(90, 185, 234, 0.3);
    }

    /* Larger touch targets */
    button,
    .btn,
    a {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Footer Enhancements */
.footer-flags img {
    transition: all 0.3s ease;
    cursor: pointer;
}

.footer-flags img:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
}

/* Social media icons enhancement */
.social-links a,
.footer a[href*="facebook"],
.footer a[href*="youtube"] {
    transition: all 0.3s ease !important;
}

.social-links a:hover,
.footer a[href*="facebook"]:hover,
.footer a[href*="youtube"]:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3) !important;
}

/* Improve focus states for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* ============================================
   GALLERY STYLES (New Grid & Lightbox)
   ============================================ */

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

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 30px;
}

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* Soft shadow */
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #fff;
    aspect-ratio: 4/3;
    /* Enforce consistent aspect ratio */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    /* Deep shadow */
}

.gallery-item:hover img {
    transform: scale(1.05);
    /* Zoom effect */
}

/* Hover Overlay */
.gallery-item .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.overlay-content {
    color: white;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .overlay-content {
    transform: translateY(0);
}

.overlay i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.overlay span {
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid white;
    padding: 8px 16px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: #eee;
    text-align: center;
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Lightbox Navigation - Improved Positioning */
.lightbox-nav {
    position: fixed;
    /* Fixed relative to viewport, not image */
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    /* Darker background for contrast */
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
    padding: 0;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10002;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-close:hover {
    background: rgba(239, 68, 68, 0.8);
    transform: rotate(90deg);
    border-color: rgba(239, 68, 68, 0.8);
}

.lightbox-prev {
    left: 30px !important;
    right: auto !important;
}

.lightbox-next {
    right: 30px !important;
    left: auto !important;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .lightbox-prev {
        left: 10px !important;
        right: auto !important;
    }

    .lightbox-next {
        right: 10px !important;
        left: auto !important;
    }
}

/* ============================================
   EVENTS SECTION
   ============================================ */
.events {
    background: #fdfdfd;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.event-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.event-date {
    background: var(--primary-color);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.event-date span {
    font-size: 1.1rem;
}

.event-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.event-content h3 {
    margin-bottom: 10px;
    color: var(--dark-color);
    font-size: 1.2rem;
}

.event-location {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-content p {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 0.95rem;
    flex-grow: 1;
}

.event-content .btn {
    align-self: flex-start;
}

/* ============================================
   MEDIA SECTION (Tabs)
   ============================================ */
.media-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 12px 30px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary-color);
    color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: grid;
    /* Assumes grid layout for contents */
}

/* Ensure merged gallery/video grids look good */
#media-photos.tab-content {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

#media-videos.tab-content {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    width: 100%;
}

@media (max-width: 992px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .events-grid {
        grid-template-columns: 1fr;
    }

    .media-tabs {
        gap: 10px;
    }

    .tab-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Admin Nav Link */
.admin-nav-link {
    color: var(--dark-color);
    font-size: 1.2rem;
    padding: 5px 10px;
    margin-right: 15px;
    transition: all 0.3s;
    opacity: 0.7;
}

.admin-nav-link:hover {
    color: var(--primary-color);
    opacity: 1;
    transform: scale(1.1);
}

body.rtl .admin-nav-link {
    margin-right: 0;
    margin-left: 15px;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 999;
}

.scroll-to-top.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}


/* Admin Footer Button */
.btn-admin-footer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-admin-footer:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* ============================================
   CONTACT SECTION STYLES (Added Fix)
   ============================================ */
.contact-content-new {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.contact-image {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.contact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.contact-card {
    flex: 1;
    min-width: 300px;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-hover);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-card-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

.contact-card-header h3 {
    color: var(--dark-color);
    font-size: 1.5rem;
    margin-top: 10px;
    display: block;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateX(5px);
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(90, 185, 234, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.5rem;
}

.contact-text {
    flex: 1;
}

.contact-text h4 {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 4px;
    font-weight: 600;
}

.contact-text p {
    font-size: 1.05rem;
    color: var(--dark-color);
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    word-break: break-all;
}

/* RTL Support for Contact */
body.rtl .contact-item {
    text-align: right;
    flex-direction: row-reverse;
}

/* ============================================
   CONTACT SECTION STYLES (Added Fix)
   ============================================ */
.contact-content-new {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.contact-image {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.contact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.contact-card {
    flex: 1;
    min-width: 300px;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-hover);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-card-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

.contact-card-header h3 {
    color: var(--dark-color);
    font-size: 1.5rem;
    margin-top: 10px;
    display: block;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateX(5px);
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(90, 185, 234, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.5rem;
}

.contact-text {
    flex: 1;
}

.contact-text h4 {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 4px;
    font-weight: 600;
}

.contact-text p {
    font-size: 1.05rem;
    color: var(--dark-color);
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    word-break: break-all;
}

/* RTL Support for Contact */
body.rtl .contact-item {
    text-align: right;
    flex-direction: row-reverse;
}

body.rtl .contact-item:hover {
    transform: translateX(-5px);
}

body.rtl .contact-text h4,
body.rtl .contact-text p {
    text-align: right;
}

/* ============================================
   NEW CONTACT SECTION LAYOUT STYLES
   ============================================ */

/* Single Contact Card */
.contact-card-single {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-top: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Left Side - Logo and Basic Info */
.contact-left-side {
    background: #f8f9fa;
    padding: 40px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.contact-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.contact-association-name {
    font-size: 1.4rem;
    color: #1e3a8a;
    font-weight: 700;
    margin-bottom: 25px;
    line-height: 1.4;
}

.contact-basic-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.contact-basic-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--dark-color);
}

.contact-basic-item i {
    font-size: 1.1rem;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

/* Right Side - Contact Information Details */
.contact-right-side {
    padding: 35px 30px;
    background: white;
}

.contact-info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.contact-info-header i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.contact-info-header h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    font-weight: 700;
    margin: 0;
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-info-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
}

.contact-info-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-info-icon i {
    font-size: 1.8rem;
}

.contact-info-icon i.fa-envelope {
    color: #EA4335;
}

.contact-info-icon i.fa-phone {
    color: #2ecc71;
}

.contact-info-icon i.fa-whatsapp {
    color: #25D366;
}

.contact-info-icon i.fa-map-marker-alt {
    color: #e74c3c;
}

.contact-info-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.contact-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-value {
    font-size: 1rem;
    color: var(--dark-color);
    font-weight: 600;
    line-height: 1.4;
}

/* Social Media Links in Contact Card */
.contact-social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.contact-social-links .social-icon {
    display: inline-flex;
    width: 45px;
    height: 45px;
    background: #ffffff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-social-links .social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.contact-social-links .social-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* RTL Support for New Contact Layout */
body.rtl .contact-info-header {
    flex-direction: row-reverse;
}

body.rtl .contact-info-row {
    flex-direction: row-reverse;
}

body.rtl .contact-basic-info {
    text-align: right;
}

body.rtl .contact-basic-item {
    flex-direction: row-reverse;
}

/* Responsive Styles for Contact Section */
@media (max-width: 768px) {
    .contact-card-single {
        grid-template-columns: 1fr;
    }

    .contact-left-side,
    .contact-right-side {
        padding: 25px 20px;
    }

    .contact-logo {
        width: 100px;
        height: 100px;
    }

    .contact-logo img {
        width: 65px;
        height: 65px;
    }

    .contact-association-name {
        font-size: 1.2rem;
    }

    .contact-info-header h3 {
        font-size: 1.1rem;
    }

    .contact-info-icon {
        width: 40px;
        height: 40px;
    }

    .contact-info-icon i {
        font-size: 1.5rem;
    }

    .contact-value {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {

    .contact-left-side,
    .contact-right-side {
        padding: 20px 15px;
    }

    .contact-association-name {
        font-size: 1.1rem;
    }

    .contact-basic-item {
        font-size: 0.85rem;
    }

    .contact-info-row {
        gap: 10px;
    }

    .contact-label {
        font-size: 0.7rem;
    }

    .contact-value {
        font-size: 0.85rem;
    }
}