/* Custom styles for مجيب website */
body {
    font-family: 'Tajawal', sans-serif;
    scroll-behavior: smooth;
    /* Fix for mobile scroll issues */
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
}

.gradient-bg {
    background: linear-gradient(to right, #667eea, #764ba2);
    /* Removed background-attachment: fixed to fix mobile scroll issues */
}

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Subtle glow utility for icons/cards */
.soft-glow {
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.0), 0 0 0 0 rgba(59, 130, 246, 0.0);
}
.soft-glow:hover {
    box-shadow: 0 10px 30px -10px rgba(124, 58, 237, 0.35), 0 6px 20px -12px rgba(59, 130, 246, 0.35);
    transition: box-shadow 300ms ease;
}

/* Accent ring behind icons */
.icon-ring {
    position: relative;
}
.icon-ring::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 9999px;
    background: radial-gradient(closest-side, rgba(124, 58, 237, 0.28), rgba(59, 130, 246, 0.18), transparent 70%);
    filter: blur(8px);
    z-index: 0;
}
.icon-ring > * {
    position: relative;
    z-index: 1;
}

/* Dotted divider */
.dotted-divider {
    border-top: 1px dashed rgba(255, 255, 255, 0.18);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

/* Smooth FAQ accordion animation */
.faq-answer {
    overflow: hidden;
    height: 0;
    transition: height 300ms ease;
    will-change: height;
}


div#smartassist-iframe-container {
    outline: 1px solid #fff !important;
}


/* Outline white button style used for language and video buttons */
.btn-outline-white {
    background-color: transparent !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
}
.btn-outline-white:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Mobile-specific fixes for smooth scrolling */
@media (max-width: 768px) {
    body {
        /* Ensure smooth scrolling on mobile */
        -webkit-overflow-scrolling: touch;
        /* Prevent white flash during scroll */
        background-color: #667eea;
    }
    
    /* Ensure all sections have consistent background */
    main, section {
        background: inherit;
    }
    
    /* Fix for iOS Safari scroll bounce */
    html {
        height: 100%;
        overflow-x: hidden;
    }
    
    body {
        min-height: 100%;
        position: relative;
    }
    
    /* Reduce spacing between header and hero section on mobile */
    .hero-section {
        padding-top: 6rem !important; /* Reduced from pt-32 (8rem) to 6rem */
        padding-bottom: 3rem !important; /* Reduced from pb-16 (4rem) to 3rem */
        min-height: 80vh !important; /* Reduced from min-h-screen to 80vh */
    }
    
    /* Increase spacing between hero and next section on mobile */
    #problem {
        padding-top: 8rem !important; /* Increased from 4rem to 5.5rem (additional 1.5rem) */
        padding-bottom: 5rem !important; /* Increased from pb-20 (5rem) to 5rem */
    }
}


/* Brand image overlay for consistent visual identity */
.brand-overlay {
    position: relative;
}
.brand-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    /* Gradient aligned with site brand colors */
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.45), rgba(118, 75, 162, 0.45));
    mix-blend-mode: multiply; /* Enhances color harmony without flattening highlights */
    pointer-events: none; /* Keep image interactions intact */
}

/* Utility: disable brand overlay when true colors are needed */
.no-brand-overlay::after {
    display: none !important;
}

/* Testimonials Slider Styles */
.testimonials-slider {
    position: relative;
}

.testimonials-container {
    position: relative;
}

.testimonials-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

/* RTL support for testimonials */
html[dir="rtl"] .testimonials-track,
html[lang="ar"] .testimonials-track {
    direction: rtl;
}

/* Ensure proper display in RTL */
html[dir="rtl"] .testimonial-slide,
html[lang="ar"] .testimonial-slide {
    direction: ltr; /* Reset direction for content inside slides */
}

/* Fix text alignment for Arabic testimonials */
html[dir="rtl"] .testimonial-slide .text-right,
html[lang="ar"] .testimonial-slide .text-right {
    text-align: right; /* Ensure right alignment in Arabic */
    direction: rtl; /* Set RTL direction for Arabic text */
}

/* Fix margin direction for testimonials in Arabic */
html[dir="rtl"] .testimonial-slide .flex.items-center.justify-center,
html[lang="ar"] .testimonial-slide .flex.items-center.justify-center {
    margin-left: 0.5rem; /* Add smaller margin to the left in Arabic */
    margin-right: 0; /* Remove margin from the right */
}

.testimonial-slide {
    flex-shrink: 0;
    width: 100%;
}

.testimonial-nav {
    z-index: 10;
    opacity: 0.7;
    transition: all 0.3s ease;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.testimonial-nav:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}

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

.testimonial-nav:not(:disabled):hover {
    transform: translateY(-50%) scale(1.05);
}

.testimonial-dot {
    transition: all 0.3s ease;
}

.testimonial-dot.active {
    background-color: rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.2);
}

/* Desktop testimonials slider improvements */
@media (min-width: 769px) {
    .testimonials-slider {
        padding: 0 2rem; /* Add padding for navigation buttons */
    }
    
    .testimonial-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .testimonial-nav:first-of-type {
        left: -1.5rem; /* Position closer to the container */
    }
    
    .testimonial-nav:last-of-type {
        right: -1.5rem; /* Position closer to the container */
    }
}

/* Mobile responsiveness for testimonials */
@media (max-width: 768px) {
    .testimonial-nav {
        display: none; /* Hide navigation arrows on mobile */
    }
    
    .testimonials-slider {
        padding: 0 1rem; /* Add padding for touch scrolling */
    }
    
    .testimonial-slide {
        padding: 0 0.5rem;
    }
    
    .glass-card {
        padding: 1.5rem !important; /* Reduce padding on mobile */
    }
    
    /* Fix FAQ cards height on mobile when closed */
    details.faq-item.glass-card.rounded-lg.overflow-hidden {
        padding: 5px !important;
    }
    
    .testimonial-dots {
        margin-top: 1rem !important;
    }
}

/* --- New, Robust Testimonials Slider Styles --- */

.testimonials-track {
    /* Enable horizontal scrolling */
    overflow-x: auto;
    /* Enable snapping behavior */
    scroll-snap-type: x mandatory;
    /* Make the scroll animation smooth when triggered by buttons */
    scroll-behavior: smooth;

    /* Hide scrollbar across all browsers */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.testimonials-track::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.testimonial-slide {
    /* This is crucial: makes each slide exactly 100% of the container's width */
    flex: 0 0 100%;
    width: 100%;
    /* Defines the snapping point for each slide */
    scroll-snap-align: start;
}

/* Global fix for fixed header covering section titles */
section[id] {
    scroll-margin-top: 90px;
  }


  /*
 * تعديل لتقليل ارتفاع الهيدر على الأجهزة الذكية
*/
@media (max-width: 768px) {
    header .container {
        padding-top: 0rem !important;
        padding-bottom: 0rem !important;
    }
}