/* تنسيقات إضافية فوق Tailwind */

html {
    scroll-behavior: smooth;
}

.portfolio-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.portfolio-item.hidden-item {
    display: none;
}

.filter-btn.active {
    background-color: #0f172a;
    color: white;
}

/* الشريط العلوي المتحرك (Ticker) */
.ticker-wrap {
    overflow: hidden;
    white-space: nowrap;
}

.ticker-track {
    display: inline-flex;
    align-items: center;
    width: max-content;
    animation: ticker-scroll 28s linear infinite;
    padding: 8px 0;
}

.ticker-wrap:hover .ticker-track {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 1.75rem;
    position: relative;
}

.ticker-item::after {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, 0.15);
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ticker-track {
        animation: none;
    }
}

/* قائمة الجوال - تحديد الموضع والمظهر صراحة بدل الاعتماد فقط على Tailwind */
#mobileMenu {
    position: fixed;
    top: var(--header-h, 64px);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    overflow-y: auto;
    background: linear-gradient(to bottom, #020617, #0f172a);
}

#mobileMenu.hidden {
    display: none;
}

/* قائمة الجوال - الرابط النشط */
.mobile-nav-link.active {
    color: #f59e0b;
    border-bottom-color: #f59e0b !important;
}

body.menu-open {
    overflow: hidden;
}

/* أكورديون الأسئلة الشائعة */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.faq-icon {
    transition: transform 0.2s ease;
}

/* تحسين مظهر الفيديو */
video {
    background: #000;
}

/* ============================================ */
/* كشف تدريجي عند التمرير (Scroll Reveal) */
/* ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================ */
/* الشريط الفاصل المميز (وحي شريط صالون الحلاقة التقليدي) */
/* ============================================ */
.barber-divider {
    height: 10px;
    background: repeating-linear-gradient(
        -45deg,
        var(--primary, #b9862f) 0, var(--primary, #b9862f) 14px,
        #120e0a 14px, #120e0a 28px
    );
}

/* بطاقات تفاعلية: استجابة لمسية عند الضغط على الجوال */
.tap-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tap-card:active {
    transform: scale(0.98);
}

/* شريحات آراء العملاء القابلة للتمرير على الجوال */
.testimonial-scroller {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.testimonial-scroller > * {
    scroll-snap-align: center;
}
.testimonial-scroller::-webkit-scrollbar { display: none; }
.testimonial-scroller { scrollbar-width: none; }

/* الشريط السفلي الثابت على الجوال: مساحة آمنة لأجهزة iPhone ذات الحافة (Home Indicator) */
#mobileActionBar {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (max-width: 1023px) {
    body { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0)); }
}
.slot-btn {
    transition: all 0.15s ease;
}

.slot-btn.taken {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
}

.slot-btn.selected {
    background-color: var(--primary, #d97706) !important;
    color: var(--on-primary, #fff) !important;
    border-color: var(--primary, #d97706) !important;
}

.spinner {
    border: 3px solid var(--primary-soft, rgba(217, 119, 6, 0.2));
    border-top-color: var(--primary, #d97706);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
