/* Testimonials Page Premium Styles 2026 */
:root {
    --accent-gold: #F5B301;
    --bg-dark: #0F172A;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #FFFFFF;
    --text-secondary: #94A3B8;
}

/* Page Header */
.page-head {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-head::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(245, 179, 1, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.page-head h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F5B301 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    font-family: 'Almarai', 'Cairo', sans-serif;
}

.page-head p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Readex Pro', 'Cairo', sans-serif;
}

/* Feedback Gallery */
.feedback-gallery {
    padding: 80px 0;
    background: #0F172A;
    position: relative;
}

.gallery-header {
    text-align: center;
    margin-bottom: 60px;
}

.gallery-kicker {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(245, 179, 1, 0.1);
    border: 1px solid rgba(245, 179, 1, 0.2);
    border-radius: 100px;
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.gallery-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 800;
    font-family: 'Almarai', 'Cairo', sans-serif;
}

.gallery-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Client Logos */
.client-logos {
    margin-bottom: 80px;
    position: relative;
    padding: 20px 0;
}

.client-logos__scroller {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    cursor: grab;
}

.client-logos__scroller::-webkit-scrollbar {
    display: none;
}

.client-logos__item {
    flex: 0 0 auto;
    width: 160px;
    height: 90px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.client-logos__item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(245, 179, 1, 0.3);
    transform: translateY(-5px);
}

.client-logos__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(1) brightness(1.5);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.client-logos__item:hover .client-logos__img {
    filter: none;
    opacity: 1;
}

/* Gallery Grid - Optimized for Horizontal Screenshots */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    grid-auto-rows: min-content;
    gap: 30px;
    margin-bottom: 80px;
}

.gallery-item {
    cursor: pointer;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Bento Grid Sizing - Optimized for Horizontal Content */
@media (min-width: 1024px) {
    .gallery-item:nth-child(4n+1) {
        grid-column: span 2;
    }
}

.gallery-card {
    width: 100%;
    height: auto;
    position: relative;
    aspect-ratio: 3 / 1;
    /* Perfect match for horizontal screenshots (approx 1000x330) */
}

.gallery-image {
    width: 100%;
    height: 100%;
    position: relative;
    background: #ffffff;
    /* White background to blend seamlessly with screenshots */
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* CRITICAL: ensures all text in the screenshot is readable */
    padding: 15px;
    transition: transform 0.6s ease;
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
}

.gallery-item:hover .image-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

.overlay-icon {
    color: var(--accent-gold);
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.gallery-item:hover .overlay-icon {
    transform: translateY(0);
}

/* Gallery CTA */
.gallery-cta {
    text-align: center;
    padding-top: 40px;
}

.gallery-cta p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: linear-gradient(135deg, #F5B301 0%, #F59E0B 100%);
    color: #0F172A;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(245, 179, 1, 0.2);
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(245, 179, 1, 0.3);
}

/* Modal Styling */
.gallery-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    padding: 20px;
}

.gallery-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.gallery-modal-content {
    background: #1E293B;
    border-radius: 32px;
    border: 1px solid var(--border-glass);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(30px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gallery-modal.is-open .gallery-modal-content {
    transform: scale(1) translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background: var(--accent-gold);
    color: #0F172A;
    transform: rotate(90deg);
}

.modal-image-container {
    width: 100%;
    background: #000;
    display: flex;
    justify-content: center;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
}

.modal-details {
    padding: 30px;
    background: #1E293B;
}

.modal-platform {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(245, 179, 1, 0.1);
    color: var(--accent-gold);
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 12px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 8px;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .gallery-grid {
        grid-auto-rows: 200px;
        gap: 15px;
    }

    .gallery-item:nth-child(n) {
        grid-row: span 1 !important;
        grid-column: span 1 !important;
    }

    .page-head h1 {
        font-size: 2rem;
    }
}