/* Projects Section - Optimized for Performance */

/* ===== PROJECT SLIDER ===== */
.projects-slider {
    z-index: 2;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: 0;
    margin-top: 0;
    position: relative;
    overflow: visible;
}

@media screen and (max-width: 576px) {
    .projects-slider {
        margin-top: 0;
    }
}

.projects-slider__item {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    height: auto;
    padding: 0 10px;
}

.projects-slider .swiper-wrapper {
    align-items: center;
    padding: 0 15px;
}

/* ===== OPTIMIZED PROJECT CARDS ===== */
.project-card {
    background: linear-gradient(135deg, #1a2431 0%, #2d3748 100%);
    border-radius: 1.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 420px;
    min-height: 420px;
    max-height: 420px;
    cursor: pointer;
    width: 100%;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateZ(0); /* Force GPU acceleration */
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.project-card:hover {
    transform: translateY(-4px) scale(1.01) translateZ(0);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.project-card:hover::before {
    opacity: 1;
}

.project-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.2s ease;
    position: relative;
    z-index: 2;
    transform: translateZ(0); /* Force GPU acceleration */
}

.project-card:hover .project-card-image {
    transform: scale(1.02) translateZ(0);
}

.project-card-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
}





.project-card-title {
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    color: #ffffff;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.project-card:hover .project-card-title {
    color: #fbbf24;
}

.project-card-description {
    font-size: 0.97rem;
    line-height: 1.65;
    margin-bottom: 1rem;
    flex-grow: 1;
    color: #cbd5e1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 300;
}

.project-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    color: #3b82f6;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 2px solid #3b82f6;
    text-align: center;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.97rem;
    border-radius: 999px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    font-weight: 400;
    transform: translateZ(0); /* Force GPU acceleration */
}

.project-card-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s ease;
}

.project-card-button:hover::before {
    left: 100%;
}

html[dir="rtl"] .project-card-button {
    flex-direction: row-reverse;
    direction: rtl;
}

html[dir="rtl"] .project-card-button .fa-arrow-left {
    margin-right: 0.5rem;
    margin-left: 0;
    transform: scaleX(-1);
}

html[dir="rtl"] .project-card-button .fa-arrow-right {
    display: none;
}

html[dir="rtl"] .project-card-button .fa-arrow-left {
    display: inline-block;
}

html[dir="rtl"] .project-card-button span.relative {
    margin-right: 0;
    margin-left: 0;
}

.project-card-button:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #ffffff;
    transform: translateY(-1px) translateZ(0);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ===== OPTIMIZED GRID CARDS ===== */
.all-projects-card {
    background: linear-gradient(135deg, #1a2431 0%, #2d3748 100%);
    border-radius: 1.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 420px;
    min-height: 420px;
    max-height: 420px;
    cursor: pointer;
    width: 100%;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateZ(0); /* Force GPU acceleration */
}

.all-projects-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.all-projects-card:hover {
    transform: translateY(-4px) scale(1.01) translateZ(0);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.all-projects-card:hover::before {
    opacity: 1;
}

.all-projects-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.2s ease;
    position: relative;
    z-index: 2;
    transform: translateZ(0); /* Force GPU acceleration */
}

.all-projects-card:hover img {
    transform: scale(1.02) translateZ(0);
}

.all-projects-card .project-card-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
}


.all-projects-card .project-card-title {
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    color: #ffffff;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.all-projects-card:hover .project-card-title {
    color: #fbbf24;
}

.all-projects-card .project-card-description {
    font-size: 0.97rem;
    line-height: 1.65;
    margin-bottom: 1rem;
    flex-grow: 1;
    color: #cbd5e1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 300;
}

.all-projects-card .project-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    color: #3b82f6;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 2px solid #3b82f6;
    text-align: center;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.97rem;
    border-radius: 999px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    font-weight: 400;
    transform: translateZ(0); /* Force GPU acceleration */
}

.all-projects-card .project-card-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s ease;
}

.all-projects-card .project-card-button:hover::before {
    left: 100%;
}

html[dir="rtl"] .all-projects-card .project-card-button {
    flex-direction: row-reverse;
    direction: rtl;
}

html[dir="rtl"] .all-projects-card .project-card-button .fa-arrow-left {
    margin-right: 0.5rem;
    margin-left: 0;
    transform: scaleX(-1);
}

html[dir="rtl"] .all-projects-card .project-card-button .fa-arrow-right {
    display: none;
}

html[dir="rtl"] .all-projects-card .project-card-button .fa-arrow-left {
    display: inline-block;
}

html[dir="rtl"] .all-projects-card .project-card-button span.relative {
    margin-right: 0;
    margin-left: 0;
}

.all-projects-card .project-card-button:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #ffffff;
    transform: translateY(-1px) translateZ(0);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ===== OPTIMIZED NAVIGATION ARROWS ===== */
.projects-slider__arrow {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    outline: none !important;
    color: #cbd5e1;
    transition: color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
    width: 45px;
    height: 45px;
    /* Removed backdrop-filter for better performance */
    position: relative;
    z-index: 50;
    pointer-events: auto;
    transform: translateZ(0); /* Force GPU acceleration */
}

.projects-slider__arrow:focus {
    outline: none !important;
}

.projects-slider__arrow:hover {
    color: #ffffff;
    transform: scale(1.05) translateZ(0);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(147, 51, 234, 0.2) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}

.projects-slider__arrow--disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.projects-slider__arrow--disabled:hover {
    transform: none;
    box-shadow: none;
}

.projects-slider__arrow .fas {
    font-size: 18px;
}

/* Enhanced Navigation Arrows */
.projects-slider__arrow {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.projects-slider__arrow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s ease;
}

.projects-slider__arrow:hover::before {
    left: 100%;
}

/* ===== NAVIGATION CONTAINER ===== */
.projects-slider .flex.justify-center.items-center {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    flex-shrink: 0;
}

/* ===== FIXED NAVIGATION POSITIONING ===== */
.projects-slider + .flex.justify-center.items-center {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

/* Ensure the navigation container doesn't move */
.projects-slider + .flex.justify-center.items-center > * {
    flex-shrink: 0;
}

/* Lock pagination dots in center */
.projects-slider + .flex.justify-center.items-center .projects-slider__pagination {
    position: relative;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    min-width: 100px;
    flex-shrink: 0;
    flex-grow: 0;
}

/* ===== OPTIMIZED PAGINATION DOTS ===== */
.projects-slider__pagination {
    position: relative;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    min-width: 100px;
    flex-shrink: 0;
}

.projects-slider__pagination .swiper-pagination-bullet {
    width: 16px;
    height: 10px;
    display: inline-block;
    background: linear-gradient(135deg, rgba(255, 191, 0, 0.15), rgba(255, 191, 0, 0.3));
    opacity: 1;
    margin: 0 4px;
    border-radius: 5px;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 191, 0, 0.4);
    box-shadow: 0 1px 4px rgba(255, 191, 0, 0.10);
    /* Removed backdrop-filter for better performance */
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transform: translateZ(0); /* Force GPU acceleration */
}

.projects-slider__pagination .swiper-pagination-bullet:hover {
    background: linear-gradient(135deg, rgba(255, 191, 0, 0.25), rgba(255, 191, 0, 0.45));
    border-color: rgba(255, 191, 0, 0.7);
    box-shadow: 0 2px 6px rgba(255, 191, 0, 0.15);
    transform: scale(1.08) translateZ(0);
}

.projects-slider__pagination .swiper-pagination-bullet-active {
    opacity: 1;
    background: linear-gradient(135deg, #FFBF00 60%, #FFD700 100%);
    width: 24px;
    border-radius: 5px;
    border-color: #FFBF00;
    box-shadow: 0 0 0 2px rgba(255, 191, 0, 0.15);
    transform: scale(1.12) translateZ(0);
}

/* ===== COMPLETE PAGINATION LOCK ===== */
.projects-slider__pagination {
    position: relative !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: auto !important;
    min-width: 100px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
}

.projects-slider__pagination .swiper-pagination-bullet {
    position: relative !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    margin: 0 6px !important;
    flex-shrink: 0 !important;
}

.projects-slider__pagination .swiper-pagination-bullet-active {
    position: relative !important;
    transform: scale(1.05) !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    margin: 0 6px !important;
    flex-shrink: 0 !important;
}

/* Prevent Swiper from moving pagination */
.swiper-pagination {
    position: relative !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
}

/* ===== OPTIMIZED BUTTONS ===== */
.view-all-projects-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.view-all-projects-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.view-all-projects-btn:hover::before {
    left: 100%;
}

.admin-manage-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    z-index: 1000 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

.admin-manage-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s ease;
}

.admin-manage-btn:hover::before {
    left: 100%;
}

/* ===== OPTIMIZED MODAL STYLES ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    will-change: opacity, visibility;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-overlay.open .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-content {
    background: linear-gradient(135deg, #1a2431 0%, #2d3748 100%);
    border-radius: 1.5rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    will-change: transform, opacity;
}

.modal-header {
    position: relative;
    overflow: hidden;
    border-radius: 1rem 1rem 0 0;
}

.modal-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.modal-body {
    padding: 2rem;
}

/* Enhanced Modal Image Carousel */
.modal-image-carousel {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 1rem 1rem 0 0;
}

.carousel-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    height: 100%;
    position: relative;
    flex-shrink: 0;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.carousel-slide:hover img {
    transform: scale(1.05);
}

/* Carousel Navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-nav:hover {
    background: rgba(251, 191, 36, 0.9);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.carousel-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(-50%) scale(1);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

.carousel-nav i {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.carousel-nav:hover i {
    transform: scale(1.2);
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.carousel-indicator.active {
    background: #fbbf24;
    border-color: #fbbf24;
    transform: scale(1.3);
}

/* Image Counter */
.image-counter {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Project Content Sections */
.project-content {
    margin-bottom: 2rem;
}

.content-section {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: rgba(55, 65, 81, 0.3);
    border-radius: 1rem;
    border: 1px solid rgba(75, 85, 99, 0.3);
    transition: all 0.3s ease;
}

.content-section:hover {
    background: rgba(55, 65, 81, 0.5);
    border-color: rgba(251, 191, 36, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.content-section:last-child {
    margin-bottom: 0;
}

.content-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #cbd5e1;
    margin: 0;
}

.content-text:not(:last-child) {
    margin-bottom: 1rem;
}

/* Thumbnail Gallery */
.thumbnail-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(75, 85, 99, 0.3);
    max-height: 120px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
    align-items: flex-start;
}

.thumbnail-gallery::-webkit-scrollbar {
    width: 4px;
}

.thumbnail-gallery::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.3);
    border-radius: 2px;
}

.thumbnail-gallery::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 2px;
}

.thumbnail-gallery::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.thumbnail-item {
    aspect-ratio: 1;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    min-width: 60px;
    max-width: 80px;
    flex-shrink: 0;
}

.thumbnail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.thumbnail-item.active {
    border-color: #fbbf24;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.3);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.thumbnail-item:hover img {
    transform: scale(1.1);
}

/* Legacy modal-image for backward compatibility */
.modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.2s ease;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.modal-date {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.modal-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 0;
}

.modal-close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close-button:hover {
    background: rgba(239, 68, 68, 0.8);
    transform: scale(1.05);
}

/* ===== VIEW ALL MODAL CONTENT ===== */
.view-all-modal-content {
    background: linear-gradient(135deg, #1a2431 0%, #2d3748 50%, #1a2431 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
    will-change: transform, opacity;
}

.view-all-modal-content.open {
    transform: scale(1);
    opacity: 1;
}

/* All Projects Modal Pagination Dots */
#allProjectsPagination .swiper-pagination-bullet {
    width: 16px;
    height: 10px;
    display: inline-block;
    background: linear-gradient(135deg, rgba(255, 191, 0, 0.15), rgba(255, 191, 0, 0.3));
    opacity: 1;
    margin: 0 4px;
    border-radius: 5px;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 191, 0, 0.4);
    box-shadow: 0 1px 4px rgba(255, 191, 0, 0.10);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transform: translateZ(0);
}

#allProjectsPagination .swiper-pagination-bullet:hover {
    background: linear-gradient(135deg, rgba(255, 191, 0, 0.25), rgba(255, 191, 0, 0.45));
    border-color: rgba(255, 191, 0, 0.7);
    box-shadow: 0 2px 6px rgba(255, 191, 0, 0.15);
    transform: scale(1.08) translateZ(0);
}

#allProjectsPagination .swiper-pagination-bullet-active {
    opacity: 1;
    background: linear-gradient(135deg, #FFBF00 60%, #FFD700 100%);
    width: 24px;
    border-radius: 5px;
    border-color: #FFBF00;
    box-shadow: 0 0 0 2px rgba(255, 191, 0, 0.15);
    transform: scale(1.12) translateZ(0);
}

/* Enhanced All Projects Modal Styles */
#allProjectsPopup .view-all-modal-content {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#allProjectsPopup .section-title-large {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-align: center;
}

#allProjectsPopup .projects-slider__arrow {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    outline: none !important;
    color: #cbd5e1;
    transition: color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
    width: 45px;
    height: 45px;
    position: relative;
    z-index: 50;
    pointer-events: auto;
    transform: translateZ(0);
}

#allProjectsPopup .projects-slider__arrow:hover {
    color: #ffffff;
    transform: scale(1.05) translateZ(0);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(147, 51, 234, 0.2) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}

#allProjectsPopup .projects-slider__arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

#allProjectsPopup .projects-slider__arrow:disabled:hover {
    transform: none;
    box-shadow: none;
}

#allProjectsPopup .projects-slider__arrow .fas {
    font-size: 18px;
}

#allProjectsPopup .projects-slider__arrow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s ease;
}

#allProjectsPopup .projects-slider__arrow:hover::before {
    left: 100%;
}

/* ===== EQUIPMENT MODAL STYLES ===== */
#view-all-equipment-modal .view-all-modal-content {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#view-all-equipment-modal .section-title-large {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-align: center;
}

#view-all-equipment-modal .projects-slider__arrow {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    outline: none !important;
    color: #cbd5e1;
    transition: color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
    width: 45px;
    height: 45px;
    position: relative;
    z-index: 50;
    pointer-events: auto;
    transform: translateZ(0);
}

#view-all-equipment-modal .projects-slider__arrow:hover {
    color: #ffffff;
    transform: scale(1.05) translateZ(0);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(147, 51, 234, 0.2) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}

#view-all-equipment-modal .projects-slider__arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

#view-all-equipment-modal .projects-slider__arrow:disabled:hover {
    transform: none;
    box-shadow: none;
}

#view-all-equipment-modal .projects-slider__arrow .fas {
    font-size: 18px;
}

#view-all-equipment-modal .projects-slider__arrow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s ease;
}

#view-all-equipment-modal .projects-slider__arrow:hover::before {
    left: 100%;
}

/* Equipment Modal Pagination Dots */
#allEquipmentPagination .swiper-pagination-bullet {
    width: 16px;
    height: 10px;
    display: inline-block;
    background: linear-gradient(135deg, rgba(255, 191, 0, 0.15), rgba(255, 191, 0, 0.3));
    opacity: 1;
    margin: 0 4px;
    border-radius: 5px;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 191, 0, 0.4);
    box-shadow: 0 1px 4px rgba(255, 191, 0, 0.10);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transform: translateZ(0);
}

#allEquipmentPagination .swiper-pagination-bullet:hover {
    background: linear-gradient(135deg, rgba(255, 191, 0, 0.25), rgba(255, 191, 0, 0.45));
    border-color: rgba(255, 191, 0, 0.7);
    box-shadow: 0 2px 6px rgba(255, 191, 0, 0.15);
    transform: scale(1.08) translateZ(0);
}

#allEquipmentPagination .swiper-pagination-bullet-active {
    opacity: 1;
    background: linear-gradient(135deg, #FFBF00 60%, #FFD700 100%);
    width: 24px;
    border-radius: 5px;
    border-color: #FFBF00;
    box-shadow: 0 0 0 2px rgba(255, 191, 0, 0.15);
    transform: scale(1.12) translateZ(0);
}

/* ===== NEWS MODAL STYLES ===== */
#view-all-news-modal .view-all-modal-content {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#view-all-news-modal .section-title-large {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-align: center;
}

#view-all-news-modal .projects-slider__arrow {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    outline: none !important;
    color: #cbd5e1;
    transition: color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
    width: 45px;
    height: 45px;
    position: relative;
    z-index: 50;
    pointer-events: auto;
    transform: translateZ(0);
}

#view-all-news-modal .projects-slider__arrow:hover {
    color: #ffffff;
    transform: scale(1.05) translateZ(0);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(147, 51, 234, 0.2) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}

#view-all-news-modal .projects-slider__arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

#view-all-news-modal .projects-slider__arrow:disabled:hover {
    transform: none;
    box-shadow: none;
}

#view-all-news-modal .projects-slider__arrow .fas {
    font-size: 18px;
}

#view-all-news-modal .projects-slider__arrow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s ease;
}

#view-all-news-modal .projects-slider__arrow:hover::before {
    left: 100%;
}

/* News Modal Pagination Dots */
#allNewsPagination .swiper-pagination-bullet {
    width: 16px;
    height: 10px;
    display: inline-block;
    background: linear-gradient(135deg, rgba(255, 191, 0, 0.15), rgba(255, 191, 0, 0.3));
    opacity: 1;
    margin: 0 4px;
    border-radius: 5px;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 191, 0, 0.4);
    box-shadow: 0 1px 4px rgba(255, 191, 0, 0.10);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transform: translateZ(0);
}

#allNewsPagination .swiper-pagination-bullet:hover {
    background: linear-gradient(135deg, rgba(255, 191, 0, 0.25), rgba(255, 191, 0, 0.45));
    border-color: rgba(255, 191, 0, 0.7);
    box-shadow: 0 2px 6px rgba(255, 191, 0, 0.15);
    transform: scale(1.08) translateZ(0);
}

#allNewsPagination .swiper-pagination-bullet-active {
    opacity: 1;
    background: linear-gradient(135deg, #FFBF00 60%, #FFD700 100%);
    width: 24px;
    border-radius: 5px;
    border-color: #FFBF00;
    box-shadow: 0 0 0 2px rgba(255, 191, 0, 0.15);
    transform: scale(1.12) translateZ(0);
}

/* ===== OPTIMIZED FULLSCREEN IMAGE OVERLAY ===== */
.fullscreen-image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.fullscreen-image-overlay.active {
    opacity: 1;
    visibility: visible;
}

.fullscreen-image-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
}

.fullscreen-close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    padding: 15px;
    line-height: 1;
    z-index: 10000;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.fullscreen-close-btn:hover {
    background: rgba(239, 68, 68, 0.8);
    transform: scale(1.1);
}

.fullscreen-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 50%;
    z-index: 10000;
    transition: all 0.3s ease;
}

.fullscreen-nav-btn:hover {
    background: rgba(139, 92, 246, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.fullscreen-prev {
    left: 30px;
}

.fullscreen-next {
    right: 30px;
}


/* ===== RTL SUPPORT ===== */
html[dir="rtl"] .admin-manage-btn {
    direction: rtl;
}

html[dir="rtl"] .project-card-description {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .popup-title {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .popup-description {
    direction: rtl;
    text-align: right;
}

/* RTL Modal Support */
html[dir="rtl"] .modal-close-button {
    right: auto;
    left: 1rem;
}

html[dir="rtl"] .modal-title {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .modal-description {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .view-all-modal-content {
    direction: rtl;
}

html[dir="rtl"] .view-all-modal-content .text-center {
    text-align: center;
}

html[dir="rtl"] .pagination-controls {
    direction: rtl;
}

html[dir="rtl"] .pagination-controls .space-x-4 > * + * {
    margin-right: 1rem;
    margin-left: 0;
}

html[dir="rtl"] .all-projects-card .project-card-content {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .all-projects-card .project-card-title {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .all-projects-card .project-card-description {
    direction: rtl;
    text-align: right;
}

/* Additional RTL Modal Improvements */
html[dir="rtl"] .modal-header-overlay {
    text-align: right;
}

html[dir="rtl"] .modal-date {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .fullscreen-close-btn {
    right: auto;
    left: 2rem;
}

html[dir="rtl"] .fullscreen-prev {
    right: auto;
    left: 2rem;
}

html[dir="rtl"] .fullscreen-next {
    left: auto;
    right: 2rem;
}

/* RTL Support for Enhanced Modal */
html[dir="rtl"] .carousel-prev {
    right: 1rem;
    left: auto;
}

html[dir="rtl"] .carousel-next {
    left: 1rem;
    right: auto;
}

html[dir="rtl"] .image-counter {
    right: auto;
    left: 1rem;
}

html[dir="rtl"] .carousel-nav i {
    transform: scaleX(-1);
}

html[dir="rtl"] .carousel-nav:hover i {
    transform: scaleX(-1) scale(1.2);
}

html[dir="rtl"] .thumbnail-gallery {
    direction: rtl;
}

html[dir="rtl"] .content-section {
    text-align: right;
}

html[dir="rtl"] .content-text {
    text-align: right;
}


html[dir="rtl"] .carousel-slide {
    direction: ltr; /* Keep images in LTR direction */
}


/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .project-card {
        height: 380px;
        min-height: 380px;
        max-height: 380px;
    }

    .project-card-image {
        height: 160px;
    }

    .project-card-content {
        padding: 1rem;
    }

    .project-card-title {
        font-size: 1.1rem;
    }

    .modal-content {
        max-width: 95vw;
        margin: 1rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }
    
    /* All Projects Modal Mobile Responsive */
    .all-projects-card {
        height: 380px;
        min-height: 380px;
        max-height: 380px;
    }
    
    .all-projects-card img {
        height: 160px;
    }
    
    .all-projects-card .project-card-content {
        padding: 1rem;
    }
    
    .all-projects-card .project-card-title {
        font-size: 1.1rem;
    }
    
    .all-projects-card .project-card-description {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .all-projects-card .project-card-button {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    #allProjectsPagination .swiper-pagination-bullet {
        width: 14px;
        height: 8px;
        margin: 0 3px;
    }
    
    #allProjectsPagination .swiper-pagination-bullet-active {
        width: 20px;
    }
    
    /* Enhanced All Projects Modal Mobile Responsive */
    #allProjectsPopup .section-title-large {
        font-size: 2rem;
    }
    
    #allProjectsPopup .projects-slider__arrow {
        width: 40px;
        height: 40px;
    }
    
    #allProjectsPopup .projects-slider__arrow .fas {
        font-size: 16px;
    }
    
    /* Equipment Modal Mobile Responsive */
    #view-all-equipment-modal .section-title-large {
        font-size: 2rem;
    }
    
    #view-all-equipment-modal .projects-slider__arrow {
        width: 40px;
        height: 40px;
    }
    
    #view-all-equipment-modal .projects-slider__arrow .fas {
        font-size: 16px;
    }
    
    #allEquipmentPagination .swiper-pagination-bullet {
        width: 14px;
        height: 8px;
        margin: 0 3px;
    }
    
    #allEquipmentPagination .swiper-pagination-bullet-active {
        width: 20px;
    }
    
    /* News Modal Mobile Responsive */
    #view-all-news-modal .section-title-large {
        font-size: 2rem;
    }
    
    #view-all-news-modal .projects-slider__arrow {
        width: 40px;
        height: 40px;
    }
    
    #view-all-news-modal .projects-slider__arrow .fas {
        font-size: 16px;
    }
    
    #allNewsPagination .swiper-pagination-bullet {
        width: 14px;
        height: 8px;
        margin: 0 3px;
    }
    
    #allNewsPagination .swiper-pagination-bullet-active {
        width: 20px;
    }
    
    /* Enhanced Modal Responsive */
    .modal-image-carousel {
        height: 300px;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
    }
    
    .carousel-nav i {
        font-size: 1rem;
    }
    
    .carousel-prev {
        left: 0.5rem;
    }
    
    .carousel-next {
        right: 0.5rem;
    }
    
    .carousel-indicators {
        bottom: 0.5rem;
        gap: 0.25rem;
    }
    
    .carousel-indicator {
        width: 10px;
        height: 10px;
    }
    
    .image-counter {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.25rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .content-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .content-text {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .thumbnail-gallery {
        grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
        gap: 0.4rem;
        margin-top: 1rem;
        padding-top: 1rem;
        max-height: 100px;
    }
    
    .thumbnail-item {
        min-width: 50px;
        max-width: 70px;
        border-radius: 0.375rem;
    }
}

@media (max-width: 480px) {
    .project-card {
        height: 360px;
        min-height: 360px;
        max-height: 360px;
    }

    .project-card-image {
        height: 140px;
    }

    .project-card-title {
        font-size: 1rem;
    }

    .modal-title {
        font-size: 1.3rem;
    }

    .projects-slider__pagination {
        margin-top: 15px;
    }

    .projects-slider__pagination .swiper-pagination-bullet {
        width: 14px;
        height: 8px;
        margin: 0 3px;
    }

    .projects-slider__pagination .swiper-pagination-bullet-active {
        width: 20px;
    }
    
    /* All Projects Modal Small Screen Responsive */
    .all-projects-card {
        height: 360px;
        min-height: 360px;
        max-height: 360px;
    }
    
    .all-projects-card img {
        height: 140px;
    }
    
    .all-projects-card .project-card-title {
        font-size: 1rem;
    }
    
    .all-projects-card .project-card-description {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .all-projects-card .project-card-button {
        padding: 0.5rem 0.7rem;
        font-size: 0.85rem;
    }
    
    #allProjectsPagination .swiper-pagination-bullet {
        width: 12px;
        height: 7px;
        margin: 0 2px;
    }
    
    #allProjectsPagination .swiper-pagination-bullet-active {
        width: 18px;
    }
    
    /* Enhanced All Projects Modal Small Screen Responsive */
    #allProjectsPopup .section-title-large {
        font-size: 1.8rem;
    }
    
    #allProjectsPopup .projects-slider__arrow {
        width: 35px;
        height: 35px;
    }
    
    #allProjectsPopup .projects-slider__arrow .fas {
        font-size: 14px;
    }
    
    /* Equipment Modal Small Screen Responsive */
    #view-all-equipment-modal .section-title-large {
        font-size: 1.8rem;
    }
    
    #view-all-equipment-modal .projects-slider__arrow {
        width: 35px;
        height: 35px;
    }
    
    #view-all-equipment-modal .projects-slider__arrow .fas {
        font-size: 14px;
    }
    
    #allEquipmentPagination .swiper-pagination-bullet {
        width: 12px;
        height: 7px;
        margin: 0 2px;
    }
    
    #allEquipmentPagination .swiper-pagination-bullet-active {
        width: 18px;
    }
    
    /* News Modal Small Screen Responsive */
    #view-all-news-modal .section-title-large {
        font-size: 1.8rem;
    }
    
    #view-all-news-modal .projects-slider__arrow {
        width: 35px;
        height: 35px;
    }
    
    #view-all-news-modal .projects-slider__arrow .fas {
        font-size: 14px;
    }
    
    #allNewsPagination .swiper-pagination-bullet {
        width: 12px;
        height: 7px;
        margin: 0 2px;
    }
    
    #allNewsPagination .swiper-pagination-bullet-active {
        width: 18px;
    }
    
    /* Enhanced Modal Mobile Responsive */
    .modal-image-carousel {
        height: 250px;
    }
    
    .carousel-nav {
        width: 35px;
        height: 35px;
    }
    
    .carousel-nav i {
        font-size: 0.875rem;
    }
    
    .carousel-indicators {
        bottom: 0.25rem;
        gap: 0.2rem;
    }
    
    .carousel-indicator {
        width: 8px;
        height: 8px;
    }
    
    .image-counter {
        top: 0.25rem;
        right: 0.25rem;
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .content-section {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .content-text {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .thumbnail-gallery {
        grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
        gap: 0.3rem;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        max-height: 80px;
    }
    
    .thumbnail-item {
        min-width: 40px;
        max-width: 60px;
        border-radius: 0.25rem;
    }
    
    /* RTL Mobile Responsive for Enhanced Modal */
    html[dir="rtl"] .carousel-prev {
        right: 0.25rem;
        left: auto;
    }
    
    html[dir="rtl"] .carousel-next {
        left: 0.25rem;
        right: auto;
    }
    
    html[dir="rtl"] .image-counter {
        right: auto;
        left: 0.25rem;
    }
}


/* ===== ULTIMATE PAGINATION LOCK ===== */
.projects-slider__pagination,
.projects-slider__pagination.swiper-pagination,
.swiper-pagination.projects-slider__pagination {
    position: relative !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: auto !important;
    min-width: 100px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    float: none !important;
}

.projects-slider__pagination .swiper-pagination-bullet,
.swiper-pagination-bullet {
    position: relative !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    margin: 0 6px !important;
    flex-shrink: 0 !important;
    float: none !important;
}

.projects-slider__pagination .swiper-pagination-bullet-active,
.swiper-pagination-bullet-active {
    position: relative !important;
    transform: scale(1.05) !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    margin: 0 6px !important;
    flex-shrink: 0 !important;
    float: none !important;
}

.swiper-pagination {
    position: relative !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
}

.projects-slider__pagination[style] {
    position: relative !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    float: none !important;
}

.projects-slider__pagination .swiper-pagination-bullet[style] {
    position: relative !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    float: none !important;
    margin: 0 6px !important;
}

/* RTL Support for Navigation Controls */
html[dir="rtl"] .news-slider__pagination {
    direction: rtl;
}

html[dir="rtl"] .news-slider__arrow .fa-arrow-right,
html[dir="rtl"] .news-slider__arrow .fa-arrow-left {
    transform: scaleX(-1);
}

html[dir="rtl"] .project-card-button {
    flex-direction: row-reverse;
    direction: rtl;
}

html[dir="rtl"] .project-card-button .fa-arrow-left {
    margin-right: 0.5rem;
    margin-left: 0;
    transform: scaleX(-1);
}

html[dir="rtl"] .project-card-button .fa-arrow-right {
    display: none;
}

html[dir="rtl"] .project-card-button .fa-arrow-left {
    display: inline-block;
}

html[dir="rtl"] .project-card-button span.relative {
    margin-right: 0;
    margin-left: 0;
}

html[dir="rtl"] .projects-slider__pagination {
    direction: rtl;
}

html[dir="rtl"] .projects-slider__arrow .fa-arrow-right,
html[dir="rtl"] .projects-slider__arrow .fa-arrow-left {
    transform: scaleX(-1);
}

html[dir="rtl"] .news-slider__pagination .swiper-pagination-bullet {
    margin-left: 6px;
    margin-right: 6px;
}

html[dir="rtl"] .projects-slider__pagination .swiper-pagination-bullet {
    margin-left: 6px;
    margin-right: 6px;
}

/* Optimized fade-in animation */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    will-change: transform, opacity;
}

.fade-in-up.active-animation {
    opacity: 1;
    transform: translateY(0);
}

/* Performance optimizations */
.project-card,
.all-projects-card,
.projects-slider__arrow,
.modal-content,
.fullscreen-image-overlay {
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* ===== ENHANCED MODAL STYLES - CGL DESIGN ===== */

/* Modal Animation Classes */
#tableManagerPopup.show,
#editModal.show,
#addModal.show {
    opacity: 1;
    visibility: visible;
}

#tableManagerPopup.show > div,
#editModal.show > div,
#addModal.show > div {
    transform: scale(1);
    opacity: 1;
}

/* Enhanced Tab Styles - CGL Design */
.tab-button {
    position: relative;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
}

.tab-button.active-tab {
    background: linear-gradient(135deg, #FFBF00, #FFD700);
    color: #1a1a1a;
    /* box-shadow: 0 8px 25px rgba(255, 191, 0, 0.4); */
    font-weight: 600;
}

.tab-button:not(.active-tab):hover {
    background: rgba(255, 191, 0, 0.1);
    color: #FFD700;
    transform: translateY(-2px);
}

/* Enhanced Table Styles - CGL Design */
#tableManagerPopup table tbody tr {
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

#tableManagerPopup table tbody tr:hover {
    transform: translateX(6px);
}

/* Enhanced Button Styles */
#tableManagerPopup button,
#editModal button,
#addModal button {
    /* position: relative; */
    overflow: hidden;
}

#tableManagerPopup button::before,
#editModal button::before,
#addModal button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

#tableManagerPopup button:hover::before,
#editModal button:hover::before,
#addModal button:hover::before {
    left: 100%;
}

/* Enhanced Input Styles - CGL Design */
#tableManagerPopup input,
#editModal input,
#addModal input,
#editModal textarea,
#addModal textarea {
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

#tableManagerPopup input:focus,
#editModal input:focus,
#addModal input:focus,
#editModal textarea:focus,
#addModal textarea:focus {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 191, 0, 0.3);
    border-color: #FFD700;
}

/* Enhanced Description Field Styles - CGL Design */
.description-field-wrapper {
    background: linear-gradient(135deg, rgba(55, 65, 81, 0.3), rgba(31, 41, 55, 0.3));
    border: 1px solid rgba(255, 191, 0, 0.3);
    transition: all 0.3s ease;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.description-field-wrapper:hover {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 8px 25px rgba(255, 191, 0, 0.3);
    transform: translateY(-3px);
    background: linear-gradient(135deg, rgba(55, 65, 81, 0.4), rgba(31, 41, 55, 0.4));
}

/* Enhanced Modal Backdrop */
#tableManagerPopup,
#editModal,
#addModal {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Enhanced Table Header - CGL Design */
#tableManagerPopup thead th {
    position: relative;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
    border-bottom: 2px solid rgba(255, 191, 0, 0.3);
}

#tableManagerPopup thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #FFBF00, #FFD700);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

#tableManagerPopup thead th:hover::after {
    transform: scaleX(1);
}

#tableManagerPopup thead th:hover {
    background: linear-gradient(135deg, rgba(255, 191, 0, 0.1), rgba(255, 215, 0, 0.1));
}

/* Ensure sticky header works properly */
#tableManagerPopup .overflow-y-auto {
    position: relative;
}

#tableManagerPopup thead {
    position: sticky;
    top: 0;
    z-index: 20;
}

/* Enhanced Action Buttons - CGL Design */
.edit-button,
.delete-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.edit-button:hover,
.delete-button:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.edit-button::before,
.delete-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.edit-button:hover::before,
.delete-button:hover::before {
    left: 100%;
}

.edit-button {
    background: linear-gradient(135deg, #FFBF00, #FFD700) !important;
    color: #1a1a1a !important;
}

.delete-button {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: white !important;
}

/* Enhanced Empty State - CGL Design */
#tableManagerPopup tbody tr td[colspan="3"] {
    background: linear-gradient(135deg, rgba(55, 65, 81, 0.2), rgba(31, 41, 55, 0.2));
    border-radius: 24px;
    margin: 30px;
    border: 2px solid rgba(255, 191, 0, 0.2);
    backdrop-filter: blur(10px);
}

#tableManagerPopup tbody tr td[colspan="3"]:hover {
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 8px 25px rgba(255, 191, 0, 0.2);
    transform: scale(1.02);
    transition: all 0.3s ease;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    #tableManagerPopup > div,
    #editModal > div,
    #addModal > div {
        width: 98% !important;
        max-width: none !important;
        margin: 1% !important;
    }
    
    #tableManagerPopup .p-6,
    #editModal .p-8,
    #addModal .p-8 {
        padding: 1rem !important;
    }
    
    #tableManagerPopup table th,
    #tableManagerPopup table td {
        padding: 0.75rem 0.5rem !important;
        font-size: 0.875rem !important;
    }
}

/* Loading Animation - Updated to use unified yellow spinner */
.project-card.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.project-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 191, 0, 0.2);
    border-top: 2px solid #FFBF00;
    border-radius: 50%;
    animation: sectionSpin 1s linear infinite;
}

/* Legacy loading class for backward compatibility */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 191, 0, 0.2);
    border-top: 2px solid #FFBF00;
    border-radius: 50%;
    animation: sectionSpin 1s linear infinite;
}

/* CGL Brand Colors and Effects */
.cgl-glow {
    box-shadow: 0 0 20px rgba(255, 191, 0, 0.3);
}

.cgl-glow:hover {
    box-shadow: 0 0 40px rgba(255, 191, 0, 0.6);
}

/* Enhanced Focus States - CGL Design */
#tableManagerPopup *:focus,
#editModal *:focus,
#addModal *:focus {
    outline: none;
    /* ring: 3px;
    ring-color: #FFD700;
    ring-offset: 3px; */
}

/* CGL Typography Enhancements */
#tableManagerPopup,
#editModal,
#addModal {
    font-family: 'Montserrat', sans-serif;
}

#tableManagerPopup h1,
#editModal h2,
#addModal h2 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

#tableManagerPopup p,
#editModal p,
#addModal p {
    font-weight: 400;
    line-height: 1.6;
}

/* Enhanced Hover Effects */
#tableManagerPopup *:hover,
#editModal *:hover,
#addModal *:hover {
    transition: all 0.2s ease;
}

/* Try Again Button - Amber version of project card button */
.try-again-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
    border: 2px solid #f59e0b;
    text-align: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.97rem;
    border-radius: 999px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    font-weight: 400;
    transform: translateZ(0); /* Force GPU acceleration */
    cursor: pointer;
}

.try-again-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s ease;
}

.try-again-button:hover::before {
    left: 100%;
}

.try-again-button:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: #ffffff;
    transform: translateY(-1px) translateZ(0);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.try-again-button:active {
    transform: translateY(0) translateZ(0);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

/* RTL Support for Try Again Button */
html[dir="rtl"] .try-again-button {
    flex-direction: row-reverse;
    direction: rtl;
}