/* Custom text-green-light utility class */
.text-green-light {
    color: #D9F4E5;
}

/* Custom styles for the slider to ensure vertical alignment and spacing */
.slick-slide {
    margin: 0 15px;
    /* Adds space between logos */
}

.slick-slide img {
    display: inline-block;
    height: 60px;
    /* Set a fixed height for all logos */
    width: auto;
    /* Maintain aspect ratio */
    margin: 0 auto;
    /* Center the image within its container */
    opacity: 1;
    transition: all 0.3s ease-in-out;
}

.slick-slide img:hover {
    opacity: 1;
    transform: scale(1.1);
    /* Slightly enlarge on hover */
}

/* Hiding slick arrows */
.slick-prev,
.slick-next {
    display: none !important;
}

/* Additional Slick Slider Fixes */
.logo-slider {
    overflow: hidden;
    white-space: nowrap;
}

.slick-track {
    display: flex;
    align-items: center;
}

.slick-slide>div {
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide-item {
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    height: 80px;
    padding: 10px 20px;
    margin: 0 10px;
}

.slide-item img {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

/* Fallback CSS Animation if Slick fails */
.logo-slider:not(.slick-initialized) {
    display: flex;
    animation: scroll-rtl 15s linear infinite;
}

.logo-slider:not(.slick-initialized) .slide-item {
    flex-shrink: 0;
    margin: 0 30px;
}

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

    100% {
        transform: translateX(-50%);
    }
}

/* Features Section Styles */
.feature-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}

.feature-icon {
    display: flex;
    width: 48px;
    height: 48px;
    padding: 12px;
    justify-content: center;
    align-items: center;
    border-radius: 28px;
    border: 8px solid #e8ecf4;
    background: #dce3ef;
    flex-shrink: 0;
}

.feature-item {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.feature-text {
    font-family: "Alexandria", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 28px;
    color: #575757;
    text-align: right;
}

.check-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .feature-card {
        text-align: center;
        /* align-items: center; */
        align-content: start;
        padding: 0 20px;
    }

    .feature-text {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .feature-card {
        gap: 20px;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
        padding: 10px;
    }

    .feature-text {
        font-size: 14px;
        line-height: 24px;
    }
}

/* Programs Section Styles */
.programs-slider {
    margin-top: 4rem;
}

.program-slide {
    padding: 0 1rem;
}

.program-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
    height: 100%;
}

.program-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    width: 100%;
    text-align: right;
}

.program-number {
    font-family: "Alexandria", sans-serif;
    font-size: 2rem;
    font-weight: 400;
    color: #2e2e2e;
}

.program-description {
    font-family: "Tajawal", sans-serif;
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.5rem;
    color: #4a4a4a;
    text-align: right;
}

.program-image {
    width: 100%;
    height: 25.5625rem;
    overflow: hidden;
    border-radius: 1.5rem;
}

.pagination-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 4rem;
}

.pagination-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 0.375rem;
    background: #dce3ef;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.pagination-dot.active {
    background: #00b34f;
}

/* Programs slider responsive adjustments */
@media (max-width: 1024px) {
    .program-card {
        text-align: center;
        align-items: center;
    }

    .program-content {
        align-items: center;
    }

    .program-description {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .program-number {
        font-size: 1.75rem;
    }

    .program-description {
        font-size: 1rem;
        line-height: 1.375rem;
    }

    .program-image {
        height: 20rem;
    }

    .programs-slider {
        margin-top: 3rem;
    }

    .pagination-dots {
        margin-top: 3rem;
    }
}

/* Overlay Program Cards Styles */
.program-image-overlay {
    position: relative;
    width: 100%;
    height: 25.5625rem;
    overflow: hidden;
    border-radius: 1.5rem;
}

.program-image-overlay img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.program-image-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg,
            rgba(20, 67, 148, 0.65) 0%,
            rgba(20, 67, 148, 0.65) 100%);
    z-index: 2;
}

.program-overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.3rem;
    text-align: center;
}

.program-overlay-title {
    font-family: "Tajawal", sans-serif;
    font-size: 2.125rem;
    font-weight: 700;
    line-height: normal;
    color: #fafafa;
    margin-bottom: 1.5rem;
}

.program-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.program-feature {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.feature-text-white {
    font-family: "Alexandria", sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.75rem;
    color: #fafafa;
    text-align: right;
}

.program-cta-button {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 18.3125rem;
    height: 3.25rem;
    padding: 0.625rem 1.5rem;
    border-radius: 1.5rem;
    border: 0.747px solid #00b34f;
    background: #00b34f;
    margin: 0 auto;
    cursor: pointer;
    transition: all 0.3s ease;
}

.program-cta-button:hover {
    background: #009a43;
    border-color: #009a43;
    transform: translateY(-2px);
}

.program-cta-button span {
    font-family: "Alexandria", sans-serif;
    font-size: 1.125rem;
    font-weight: 400;
    color: #fff;
}

.program-cta-button svg {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

/* Responsive adjustments for overlay cards */
@media (max-width: 768px) {
    .program-overlay-content {
        padding: 2rem 1.5rem;
    }

    .program-overlay-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .feature-text-white {
        font-size: 0.875rem;
        line-height: 1.5rem;
    }

    .program-cta-button {
        width: 16rem;
        height: 2.75rem;
    }

    .program-cta-button span {
        font-size: 1rem;
    }

    .program-features {
        margin-bottom: 1.5rem;
    }
}

/* Video Modal Styles */
#video-modal {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

#video-modal.hidden {
    animation: fadeOut 0.3s ease-out;
}

#video-modal>div {
    animation: slideIn 0.3s ease-out;
    max-height: 90vh;
    max-width: 90vw;
}

#video-modal video {
    outline: none;
    border-radius: 8px;
}

#close-video-modal {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#close-video-modal:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

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

/* Responsive video modal */
@media (max-width: 768px) {
    #video-modal>div {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }

    #close-video-modal {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
    }

    #close-video-modal svg {
        width: 20px;
        height: 20px;
    }
}

/* Custom Video Controls Styling */
#testimonial-video {
    outline: none;
    border-radius: 12px;
}

/* Webkit browsers (Chrome, Safari, Edge) */
#testimonial-video::-webkit-media-controls-panel {
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    border-radius: 0 0 12px 12px;
    padding: 12px 16px;
}

#testimonial-video::-webkit-media-controls-play-button {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    padding: 8px;
    margin-right: 8px;
    transition: all 0.3s ease;
}

#testimonial-video::-webkit-media-controls-play-button:hover {
    background-color: rgba(0, 179, 79, 0.8);
    /* Brand green */
    transform: scale(1.1);
}

#testimonial-video::-webkit-media-controls-timeline {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    height: 6px;
    margin: 0 10px;
}

#testimonial-video::-webkit-media-controls-current-time-display,
#testimonial-video::-webkit-media-controls-time-remaining-display {
    color: #ffffff;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

#testimonial-video::-webkit-media-controls-volume-slider {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    height: 4px;
}

#testimonial-video::-webkit-media-controls-mute-button,
#testimonial-video::-webkit-media-controls-fullscreen-button {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 6px;
    margin-left: 6px;
    transition: all 0.3s ease;
}

#testimonial-video::-webkit-media-controls-mute-button:hover,
#testimonial-video::-webkit-media-controls-fullscreen-button:hover {
    background-color: rgba(0, 179, 79, 0.8);
    /* Brand green */
    transform: scale(1.05);
}

/* Firefox specific styles */
#testimonial-video::-moz-video-controls {
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    border-radius: 0 0 12px 12px;
}

/* Custom progress bar styling for better brand alignment */
#testimonial-video::-webkit-media-controls-timeline::-webkit-slider-thumb {
    background: #00B34F;
    /* Brand primary color */
    border-radius: 50%;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#testimonial-video::-webkit-media-controls-timeline::-webkit-slider-runnable-track {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    height: 6px;
}

/* Volume slider customization */
#testimonial-video::-webkit-media-controls-volume-slider::-webkit-slider-thumb {
    background: #00B34F;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    border: 1px solid #ffffff;
}

/* Custom overlay controls for better mobile experience */
.video-custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    padding: 16px;
    border-radius: 0 0 12px 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#testimonial-video:hover+.video-custom-controls,
.video-custom-controls:hover {
    opacity: 1;
}

/* Enhanced video container styling */
.video-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Loading spinner for video */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #00B34F;
    border-radius: 50%;
    animation: videoSpin 1s linear infinite;
    z-index: 10;
}

@keyframes videoSpin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Mobile optimizations for video controls */
@media (max-width: 768px) {
    #testimonial-video::-webkit-media-controls-panel {
        padding: 8px 12px;
    }

    #testimonial-video::-webkit-media-controls-play-button {
        padding: 6px;
        margin-right: 6px;
    }

    #testimonial-video::-webkit-media-controls-current-time-display,
    #testimonial-video::-webkit-media-controls-time-remaining-display {
        font-size: 11px;
    }

    #testimonial-video::-webkit-media-controls-timeline {
        height: 4px;
        margin: 0 6px;
    }

    #testimonial-video::-webkit-media-controls-timeline::-webkit-slider-thumb {
        width: 12px;
        height: 12px;
    }
}

/* Progress bar initial state */
.progress-bar-initial {
    width: 0%;
}