/* Elrahbeen.Web custom styles — Tailwind utilities are compiled to wwwroot/css/tailwind.css (see package.json). */

body {
    font-family: 'Cairo', sans-serif;
}

::selection {
    background-color: #059669;
    color: #ffffff;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- Bold gradient blobs used across hero / auth panels --- */
@keyframes blob-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.animate-blob {
    animation: blob-float 12s infinite ease-in-out;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

@keyframes gradient-pan {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-gradient-pan {
    background-size: 200% 200%;
    animation: gradient-pan 6s ease infinite;
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
    animation: fade-up 0.7s ease-out both;
}

/* --- Hero Swiper overrides --- */
.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    width: 52px;
    height: 52px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: background-color 0.2s ease;
}

.hero-swiper .swiper-button-next:hover,
.hero-swiper .swiper-button-prev:hover {
    background: rgba(255, 255, 255, 0.25);
}

.hero-swiper .swiper-button-next::after,
.hero-swiper .swiper-button-prev::after {
    font-size: 16px;
    font-weight: 700;
}

.hero-swiper .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.45;
    width: 10px;
    height: 10px;
    transition: all 0.3s ease;
}

.hero-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: linear-gradient(90deg, #34d399, #059669);
    width: 32px;
    border-radius: 9999px;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.section-eyebrow::before {
    content: '';
    display: block;
    width: 28px;
    height: 3px;
    border-radius: 9999px;
    background: linear-gradient(90deg, #34d399, #059669);
}

/* Centered section eyebrows hide the side bar on mobile for cleaner RTL layout */
.section-eyebrow--center::before {
    display: none;
}

@media (min-width: 640px) {
    .section-eyebrow--center::before {
        display: block;
    }
}

/* --- Community story cards: horizontal snap scroll on mobile --- */
.story-cards-track {
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 1023px) {
    .story-card {
        scroll-snap-align: center;
    }
}

@media (min-width: 1024px) {
    .story-card {
        min-height: 22rem;
    }
}

/* --- Google Sign-In: custom button (hidden official iframe behind it) --- */
.google-signin-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.google-signin-btn {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    border-radius: 1rem;
    border: 2px solid #e5e7eb;
    background-color: #ffffff;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #374151;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.google-signin-btn:hover {
    border-color: #d1d5db;
    background-color: #f9fafb;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.google-signin-btn:active {
    transform: scale(0.99);
}

.google-signin-btn:focus-visible {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.15);
}

.google-signin-btn__icon {
    display: flex;
    height: 1.375rem;
    width: 1.375rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

.google-signin-btn__icon svg {
    height: 100%;
    width: 100%;
}

.google-signin-btn__text {
    line-height: 1.25;
}

/* Dashboard dark theme variant */
.google-signin-btn--dark {
    border-color: #374151;
    background-color: #030712;
    color: #e5e7eb;
    box-shadow: none;
}

.google-signin-btn--dark:hover {
    border-color: #4b5563;
    background-color: #111827;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.google-signin-btn--dark:focus-visible {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

/* --- Home page: bottom activity ticker (marquee) ---
   Two identical passes are rendered back to back in the markup; translating exactly -50%
   scrolls through the first pass and loops seamlessly into the second. */
.activity-ticker {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.activity-ticker-track {
    display: flex;
    width: max-content;
    animation: ticker-scroll 40s linear infinite;
}

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

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

/* --- Home page: hero live pulse (single rotating line) --- */
.hero-pulse-rotate {
    overflow: hidden;
}

.hero-pulse-item {
    position: absolute;
    inset-inline: 0;
    top: 0;
    opacity: 0;
    transform: translateY(0.35rem);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

.hero-pulse-item.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
    .hero-pulse-item {
        position: static;
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .hero-pulse-item:not(:first-child) {
        display: none;
    }
}

/* --- Home page: htmx-driven sections ---
   htmx already injects the base .htmx-indicator show/hide rules; this just keeps the
   empty results container from rendering as a stray box before the first keystroke. */
#omni-search-results:empty {
    display: none;
}

/* --- Accessibility: respect reduced-motion preference globally --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
