:root {
    --primary-blue: #0084ae;
    --secondary-orange: #f29014;
    --tertiary-cyan: #21b3cb;
    --dark-text: #1f2835;
    --light-text: #6c757d;
    --success-green: #28a745;
    --warning-orange: #fd7e14;
    --white: #ffffff;
}

* {
    font-family: 'Tajawal', sans-serif;
}

body {
    color: var(--dark-text);
    overflow-x: hidden;
}

.text-primary-custom {
    color: var(--primary-blue) !important;
}

.text-secondary-custom {
    color: var(--secondary-orange) !important;
}

.bg-primary-custom {
    background-color: var(--primary-blue) !important;
}

.bg-secondary-custom {
    background-color: var(--secondary-orange) !important;
}

.btn-primary-custom {
    background: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    color: var(--white);
    font-weight: 500;
    border-radius: 25px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background: var(--secondary-orange);
    border-color: var(--secondary-orange);
    transform: translateY(-2px);
}

.btn-secondary-custom {
    background: var(--secondary-orange);
    border: 2px solid var(--secondary-orange);
    color: var(--white);
    font-weight: 500;
    border-radius: 25px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.btn-secondary-custom:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
}

/* Navigation */
.navbar-custom {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.navbar-custom .container {
    position: relative;
}

.navbar-brand {
    margin-left: 0;
    margin-right: auto;
}

.navbar-brand img {
    height: 50px;
    max-width: 150px;
    object-fit: contain;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
    margin-left: 0;
    margin-right: 0;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2831, 40, 53, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-nav {
    margin-right: 0;
}

.navbar-nav .nav-link {
    color: var(--dark-text) !important;
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-link:hover {
    color: var(--secondary-orange) !important;
}

/* Mobile navbar fixes */
@media (max-width: 991.98px) {
    .navbar-custom {
        padding: 0.5rem 0;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        position: fixed !important;
        top: 0;
        z-index: 1030;
    }
    
    .navbar-custom .container {
        padding-left: 15px;
        padding-right: 15px;
        width: 100%;
        max-width: 100%;
        margin: 0;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
        margin: 0;
        flex: 1;
        max-width: calc(100% - 60px);
        order: 1;
    }
    
    .navbar-brand img {
        height: 40px;
        max-width: 120px;
    }
    
    .navbar-toggler {
        margin: 0;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        padding: 0.5rem;
        order: 2;
        flex: 0 0 auto;
        position: relative;
        background: transparent;
    }
    
    .navbar-collapse {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        width: 100%;
        order: 3;
        flex-basis: 100%;
    }
    
    .navbar-nav {
        width: 100%;
        text-align: right;
        margin: 0;
        padding: 0;
        flex-direction: column;
    }
    
    .navbar-nav .nav-item {
        margin-bottom: 0.5rem;
        width: 100%;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        margin: 0;
        border-radius: 8px;
        text-align: right;
        background: rgba(0, 132, 174, 0.05);
        margin-bottom: 0.25rem;
        display: block;
        width: 100%;
    }
    
    .navbar-nav .nav-link:hover {
        background: rgba(242, 144, 20, 0.1);
        color: var(--secondary-orange) !important;
    }
    
    /* CTA buttons in mobile */
    .d-flex.gap-2 {
        flex-direction: column;
        gap: 0.5rem !important;
        margin-top: 1rem;
        width: 100%;
    }
    
    .btn-primary-custom {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
        margin-bottom: 0.5rem;
    }
}

/* Extra small screens */
@media (max-width: 575.98px) {
    .navbar-custom .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .navbar-brand {
        font-size: 1rem;
        max-width: calc(100% - 50px);
    }
    
    .navbar-brand img {
        height: 35px;
        max-width: 100px;
    }
    
    .navbar-toggler {
        padding: 0.4rem;
        font-size: 0.9rem;
    }
}

/* Additional mobile fixes */
@media (max-width: 991.98px) {
    body {
        padding-top: 70px !important; /* Account for fixed navbar */
    }
    
    .navbar-custom {
        overflow-x: hidden;
        min-height: 60px;
    }
    
    .navbar-custom .container {
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .navbar-brand,
    .navbar-toggler {
        flex-shrink: 0;
    }
    
    .navbar-toggler {
        white-space: nowrap;
    }
}

/* Desktop body styling - no extra padding needed */
@media (min-width: 992px) {
    body {
        padding-top: 0 !important;
        overflow-x: hidden;
    }
}

/* Desktop navbar styling - preserve default behavior */
@media (min-width: 992px) {
    .navbar-custom {
        position: relative;
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        margin-left: 0;
        margin-right: auto;
    }
    
    .navbar-nav {
        margin-right: 0;
        flex-direction: row;
    }
    
    .navbar-nav .nav-link {
        margin: 0 10px;
        padding: 0.5rem 1rem;
    }
    
    .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
    }
}

/* Mobile-only RTL and positioning fixes */
@media (max-width: 991.98px) {
    .navbar-nav .nav-link {
        text-align: right;
        direction: rtl;
    }
    
    .navbar-brand {
        text-align: right;
        direction: rtl;
    }
    
    /* Ensure proper flex behavior on mobile */
    .navbar-custom .container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }
    
    .navbar-brand {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
    }
    
    .navbar-toggler {
        order: 2;
        flex: 0 0 auto;
        margin-left: 0.5rem;
    }
    
    .navbar-collapse {
        order: 3;
        flex: 1 1 100%;
    }
}

/* Hero Section */
.hero-section {
    min-height: 85vh;
    background: var(--primary-blue);
    display: flex;
    align-items: center;
    position: relative;
    border-radius: 30px;
    margin: 7.5% 5%;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    text-align: center;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--white);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    line-height: 1.8;
    text-align: center;
}

/* Hero buttons container */
.hero-section .d-flex {
    justify-content: center;
}

/* Hero Slider Section */
.hero-slider-section {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    min-height: 85vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    transform: translateZ(0);
    will-change: transform;
    transition: transform 0.5s ease-out;
    overflow: hidden;
}

/* Parallax effect for slider backgrounds */
.hero-slide::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.1);
    z-index: -1;
    transition: transform 0.7s ease-out;
}

.carousel-item.active .hero-slide::before {
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay */
    z-index: 1;
}

.hero-slider-section .container {
    position: relative;
    z-index: 2;
}

.hero-slider-section .hero-content {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.carousel-item.active .hero-content {
    opacity: 1;
    transform: translateY(0);
}

.hero-slider-section .carousel-indicators {
    bottom: 30px;
}

.hero-slider-section .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.5);
}

.hero-slider-section .carousel-indicators button.active {
    background-color: var(--secondary-orange);
}

/* Slide Progress Bar */
.carousel-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--secondary-orange);
    width: 0;
    z-index: 10;
    transition: width 0.1s linear;
}

.hero-slider-section .carousel-inner .carousel-item {
    transition: transform 1.2s cubic-bezier(0.645, 0.045, 0.355, 1); /* Smoother easing */
}

.hero-slider-section .carousel-control-prev,
.hero-slider-section .carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
    margin: 0 20px;
    transition: all 0.3s ease-in-out;
}

.hero-slider-section .carousel-control-prev {
    right: 10px;
}

.hero-slider-section .carousel-control-next {
    left: 10px;
}

.hero-slider-section .carousel-control-prev:hover,
.hero-slider-section .carousel-control-next:hover {
    opacity: 1;
    background: var(--primary-blue);
    transform: translateY(-50%) scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        margin: 10px;
        border-radius: 20px;
    }
    
    .hero-title {
        font-size: 2.5rem;
        text-align: center;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        text-align: center;
    }
    
    .hero-slide {
        min-height: 70vh;
    }
    
    .hero-slider-section .carousel-control-prev,
    .hero-slider-section .carousel-control-next {
        width: 40px;
        height: 40px;
        margin: 0 10px;
    }
}

/* Mobile optimizations for smaller devices */
@media (max-width: 576px) {
    .hero-slide {
        min-height: 60vh; /* Reduced height for better mobile experience */
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .hero-content {
        padding: 1.5rem;
    }
    
    /* Larger tap targets for mobile */
    .nav-link, 
    .btn,
    .gallery-nav-btn,
    .carousel-control-prev,
    .carousel-control-next {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Enhanced interactive elements */
.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: -1;
}

.btn:hover::before {
    transform: translateX(0);
}

/* Better focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid rgba(0, 89, 148, 0.3);
    outline-offset: 2px;
}

/* Add hover effects to cards */
.benefits-card,
.feature-service-card,
.testimonial-card,
.partner-benefit-card,
.gallery-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.6s ease;
}

/* Staggered animation delays for benefit cards */
.benefits-card:nth-child(1) {
    transition-delay: 0.1s;
}
.benefits-card:nth-child(2) {
    transition-delay: 0.2s;
}
.benefits-card:nth-child(3) {
    transition-delay: 0.3s;
}
.benefits-card:nth-child(4) {
    transition-delay: 0.4s;
}

/* Enhanced whitespace between sections */
section {
    padding: 5rem 0;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
}

/* Visual hierarchy improvements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

h1 {
    font-weight: 900;
}

.display-5 {
    font-weight: 800;
}

/* Increase contrast for better readability */
.text-light-text {
    color: #5a6268 !important; /* Darker than original for better contrast */
}

.hero-subtitle {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Stronger shadow for better contrast on image backgrounds */
}

/* Touch-friendly gallery */
@media (max-width: 991px) {
    .gallery-card,
    .gallery-image,
    .gallery-overlay {
        cursor: pointer;
    }
    
    .gallery-content {
        padding: 1rem;
    }
    
    .gallery-image {
        height: 220px; /* Slightly smaller images on mobile */
    }
    
    /* Improved touch feedback */
    .gallery-card:active {
        transform: scale(0.98);
    }
}

/* Benefits Section */
.benefits-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 89, 148, 0.1);
}

.benefits-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.benefits-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    margin-bottom: 1rem;
}

.benefits-icon i {
    font-size: 2rem;
    color: var(--white);
}

.benefits-highlight-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-right: 4px solid var(--primary-blue);
    transition: all 0.3s ease;
}

.benefits-highlight-card:hover {
    transform: translateX(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.benefits-highlight-icon {
    width: 50px;
    height: 50px;
    background: var(--secondary-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.benefits-highlight-icon i {
    font-size: 1.2rem;
    color: var(--white);
}

.text-dark-text {
    color: var(--dark-text) !important;
}

.text-light-text {
    color: var(--light-text) !important;
}

/* Gallery Section */
.gallery-filter-btn {
    border-color: var(--primary-blue) !important;
    color: var(--primary-blue) !important;
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.gallery-filter-btn:hover,
.gallery-filter-btn.active {
    background-color: var(--primary-blue) !important;
    color: var(--white) !important;
    border-color: var(--primary-blue) !important;
}

.gallery-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.5s ease;
    background: var(--white);
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.33, 1, 0.68, 1);
}

.gallery-card:hover .gallery-image img {
    transform: scale(1.15);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 89, 148, 0.85);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: translateY(20px);
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}

.gallery-content {
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
}

.gallery-card:hover .gallery-content {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.1s;
}

.gallery-content h5 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.gallery-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.2rem;
}

.gallery-content .btn {
    transform: translateY(10px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transition-delay: 0s;
}

.gallery-card:hover .gallery-content .btn {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.2s;
}

.gallery-content .btn:nth-child(2) {
    transition-delay: 0.1s;
}

.gallery-card:hover .gallery-content .btn:nth-child(2) {
    transition-delay: 0.3s;
}

.gallery-item {
    transition: opacity 0.3s ease;
}

.gallery-item.hide {
    opacity: 0;
    transform: scale(0.8);
}

/* Features Section */
.feature-service-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 89, 148, 0.1);
}

.feature-service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-image {
    height: 250px;
    overflow: hidden;
}

.feature-image img {
    object-fit: cover;
    transition: transform 0.3s ease;
}

.feature-service-card:hover .feature-image img {
    transform: scale(1.05);
}

.feature-content .feature-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-content .feature-icon i {
    font-size: 1.2rem;
    color: var(--white);
}

.features-cta-card {
    background: var(--secondary-orange);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.features-cta-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--secondary-orange);
    z-index: -1;
}

/* Testimonials Section */
.testimonial-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 89, 148, 0.1);
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: 15px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.testimonial-text {
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Mobile testimonials fix */
@media (max-width: 991.98px) {
    /* On mobile, show only one testimonial card per slide by hiding the others */
    #testimonialsCarousel .carousel-item .col-12:not(:first-child) {
        display: none;
    }
    
    /* Make sure the visible testimonial takes full width */
    #testimonialsCarousel .carousel-item .col-12:first-child {
        margin-bottom: 0;
    }
    
    /* Show different testimonials on each slide for mobile */
    #testimonialsCarousel .carousel-item:nth-child(1) .col-12:nth-child(1) { display: block; }
    #testimonialsCarousel .carousel-item:nth-child(1) .col-12:nth-child(2),
    #testimonialsCarousel .carousel-item:nth-child(1) .col-12:nth-child(3) { display: none; }
    
    #testimonialsCarousel .carousel-item:nth-child(2) .col-12:nth-child(1),
    #testimonialsCarousel .carousel-item:nth-child(2) .col-12:nth-child(3) { display: none; }
    #testimonialsCarousel .carousel-item:nth-child(2) .col-12:nth-child(2) { display: block; }
    
    #testimonialsCarousel .carousel-item:nth-child(3) .col-12:nth-child(1),
    #testimonialsCarousel .carousel-item:nth-child(3) .col-12:nth-child(2) { display: none; }
    #testimonialsCarousel .carousel-item:nth-child(3) .col-12:nth-child(3) { display: block; }
    
    /* Improve mobile testimonial card spacing */
    #testimonialsCarousel .testimonial-card {
        margin-bottom: 0;
        max-width: 100%;
    }
    
    /* Adjust carousel controls for mobile */
    #testimonialsCarousel .carousel-control-prev,
    #testimonialsCarousel .carousel-control-next {
        width: 40px;
        height: 40px;
    }
    
    #testimonialsCarousel .carousel-control-prev {
        right: -20px;
    }
    
    #testimonialsCarousel .carousel-control-next {
        left: -20px;
    }
    
    /* Ensure testimonials section doesn't overflow on mobile */
    #testimonialsCarousel .carousel-inner {
        overflow: hidden;
    }
    
    /* Smooth transition for mobile testimonials */
    #testimonialsCarousel .carousel-item {
        transition: transform 0.4s ease-in-out;
    }
}

/* Desktop view - hide mobile indicators */
@media (min-width: 992px) {
    .carousel-indicators-mobile {
        display: none !important;
    }
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-blue);
    border: none;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-control-prev {
    right: -25px;
    left: auto;
}

.carousel-control-next {
    left: -25px;
    right: auto;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-blue);
}

/* Counter Section */
.counter-section {
    background: var(--primary-blue);
    position: relative;
    overflow: hidden;
}

.counter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
}

.counter-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.counter-card:hover {
    transform: translateY(-10px);
}

.counter-icon {
    width: 80px;
    height: 80px;
    background: var(--secondary-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.counter-icon i {
    font-size: 2rem;
    color: var(--white);
}

.counter-number {
    font-size: 3rem;
    margin: 1rem 0;
    color: var(--dark-text);
    font-weight: bold;
}

.counter-card h3,
.counter-card p {
    color: var(--dark-text) !important;
}

.stats-highlight-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stats-icon {
    width: 60px;
    height: 60px;
    background: var(--secondary-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stats-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.stats-number {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
    font-weight: bold;
}

.stats-highlight-card h4,
.stats-highlight-card p {
    color: var(--dark-text) !important;
}

/* Partners Section */
.partner-logo-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-logo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.partner-logo {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.partner-logo-card:hover .partner-logo {
    filter: grayscale(0%);
}

/* Partners Auto-Play Slider */
.partners-slider-container {
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
    background: var(--white);
    border-radius: 20px;
    padding: 2rem 0;
    width: 100%;
    direction: ltr; /* Force LTR for animation consistency */
}

.partners-slider {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.partners-track {
    display: flex;
    gap: 3rem;
    align-items: center;
    width: max-content;
    animation: scroll-rtl 40s linear infinite;
}

.partners-track:hover {
    animation-play-state: paused;
}

.partner-slide {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    height: 100px;
    opacity: 1 !important;
    transform: none !important;
    will-change: transform; /* Optimize for animation */
}

.partner-slide .partner-logo-card {
    margin: 0;
    width: 100%;
    padding: 1rem 2rem;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-slide .partner-logo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.partner-slide .partner-logo {
    max-width: 150px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    transition: all 0.3s ease;
    background: var(--white);
    padding: 10px;
    border-radius: 8px;
    opacity: 1 !important;
    transform: none !important;
}

.partner-slide:hover .partner-logo {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Animation for continuous scrolling */
@keyframes scroll-rtl {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Responsive adjustments for partners slider */
@media (max-width: 768px) {
    .partner-slide {
        min-width: 150px;
    }
    
    .partners-track {
        animation-duration: 30s;
        gap: 2rem;
    }
    
    .partner-slide .partner-logo-card {
        padding: 1.5rem;
        height: 80px;
    }
    
    .partner-slide .partner-logo {
        max-height: 50px;
        max-width: 120px;
    }
}

@media (max-width: 576px) {
    .partner-slide {
        min-width: 120px;
    }
    
    .partners-track {
        animation-duration: 25s;
        gap: 1.5rem;
    }
    
    .partner-slide .partner-logo-card {
        padding: 1rem;
        height: 60px;
    }
    
    .partner-slide .partner-logo {
        max-height: 40px;
        max-width: 100px;
        padding: 5px;
    }
}

.partner-benefit-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 89, 148, 0.1);
}

.partner-benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.benefit-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.benefit-icon i {
    font-size: 2rem;
    color: var(--white);
}

/* Contact Section */
.contact-form-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 89, 148, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-form-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.form-floating > label {
    color: var(--light-text);
}

.form-control,
.form-select {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.25rem rgba(0, 89, 148, 0.25);
    transform: translateY(-2px);
}

.form-control:hover,
.form-select:hover {
    border-color: rgba(0, 89, 148, 0.5);
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.1rem;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    transform: scale(1.1);
}

.form-check-label {
    padding-right: 0.5rem;
}

.quick-contact-card {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    border-right: 4px solid transparent;
}

.quick-contact-card:hover {
    transform: translateX(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-right-color: var(--primary-blue);
}

.contact-method {
    display: flex;
    align-items: center;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.quick-contact-card:hover .contact-icon {
    transform: scale(1.1);
    background: var(--secondary-orange);
}

.contact-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.contact-info-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.info-item:hover {
    transform: translateX(-5px);
}

.info-item i {
    font-size: 1.2rem;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 89, 148, 0.1);
    border-radius: 50%;
    margin-left: 1rem;
    color: var(--primary-blue);
    transition: all 0.3s ease;
}

.info-item:hover i {
    background: var(--primary-blue);
    color: var(--white);
    transform: scale(1.1);
}

/* Footer */
.footer {
    position: relative;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--secondary-orange);
    color: var(--white);
    transform: translateY(-2px);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--light-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-blue);
}

.contact-item {
    display: flex;
    align-items: center;
}

/* Gallery Filter Tabs - Mobile Friendly */
.gallery-filter-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.gallery-filter-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gallery-filter-tabs::-webkit-scrollbar {
    display: none;
}

.gallery-filter-tab {
    flex-shrink: 0;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-blue);
    background: var(--white);
    color: var(--dark-text);
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.gallery-filter-tab:hover,
.gallery-filter-tab.active {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 89, 148, 0.3);
}

.gallery-filter-scroll-indicator {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-blue);
    color: var(--white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    animation: pulse 2s infinite;
}

/* Gallery Slider */
.gallery-slider-container {
    position: relative;
    overflow: hidden;
    margin: 2rem 0;
    direction: ltr; /* Ensure consistent behavior */
}

.gallery-slider {
    display: flex;
    transition: transform 0.5s ease;
    gap: 1.5rem;
}

/* RTL support for gallery slider */
[dir="rtl"] .gallery-slider-container {
    direction: rtl;
}

[dir="rtl"] .gallery-slider {
    direction: ltr; /* Keep flex direction consistent but adjust transform */
}

.gallery-slide {
    flex: 0 0 auto;
    width: 100%;
}

@media (min-width: 768px) {
    .gallery-slide {
        width: calc(50% - 0.75rem);
    }
}

@media (min-width: 992px) {
    .gallery-slide {
        width: calc(33.333% - 1rem);
    }
}

.gallery-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 300px;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-image img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-content {
    text-align: center;
    padding: 1rem;
}

.gallery-content h5 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.gallery-content p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Gallery Navigation */
.gallery-navigation {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
}

/* RTL Navigation positioning */
[dir="rtl"] .gallery-navigation {
    flex-direction: row-reverse;
}

.gallery-nav-btn {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.gallery-nav-btn:hover {
    background: var(--secondary-orange);
    transform: scale(1.1);
}

.gallery-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* RTL Navigation icon fixes */
[dir="rtl"] .gallery-nav-btn.prev i {
    transform: scaleX(-1);
}

[dir="rtl"] .gallery-nav-btn.next i {
    transform: scaleX(-1);
}

/* Gallery Dots */
.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--light-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-dot.active,
.gallery-dot:hover {
    background: var(--primary-blue);
    transform: scale(1.2);
}

/* Project Details */
.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.feature-tag {
    background: var(--primary-blue);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-specs {
    margin-top: 1rem;
}

.spec-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.spec-item:last-child {
    border-bottom: none;
}

/* Modal Enhancements */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 15px 15px 0 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    .gallery-filter-tab {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }

    .gallery-filter-tab i {
        font-size: 0.7rem;
    }

    .gallery-slide {
        width: 100%;
    }

    .gallery-nav-btn {
        width: 40px;
        height: 40px;
    }

    .gallery-filter-scroll-indicator {
        display: block;
    }
}

@media (min-width: 768px) {
    .gallery-filter-scroll-indicator {
        display: none;
    }
}

/* Animation for filter tabs */
@keyframes pulse {
    0%, 100% {
        opacity: 0.8;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-50%) scale(1.1);
    }
}

/* Hide/Show slides based on filter */
.gallery-slide {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.gallery-slide.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Enhanced button styles */
.btn-primary-custom {
    background: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    color: var(--white);
    font-weight: 500;
    border-radius: 25px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background: var(--secondary-orange);
    border-color: var(--secondary-orange);
    transform: translateY(-2px);
}

.btn-secondary-custom {
    background: var(--secondary-orange);
    border: 2px solid var(--secondary-orange);
    color: var(--white);
    font-weight: 500;
    border-radius: 25px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.btn-secondary-custom:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
}