/* ==========================================
   PropCapital.io - Custom Styles
   ========================================== */

/* ---- Base & Resets ---- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 7rem;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* RTL Arabic font override */
html[dir="rtl"] body,
html[dir="rtl"] * {
    font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
}

html[dir="ltr"] body {
    font-family: 'Inter', sans-serif;
}

/* ---- Announcement Bar ---- */
.announcement-bar {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    max-height: 50px;
}

.announcement-bar.dismissed {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.announcement-shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---- Language Dropdown ---- */
#lang-dropdown:not(.hidden) {
    animation: dropdownIn 0.15s ease forwards;
}

#lang-dropdown {
    transform-origin: top right;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: scale(0.95) translateY(-4px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

html[dir="rtl"] #lang-dropdown {
    right: auto;
    left: 0;
    transform-origin: top left;
}

/* ---- Hero Badge ---- */
.hero-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---- Hero Background ---- */
.hero-bg {
    background:
        radial-gradient(ellipse 100% 80% at 50% -10%, #111a3a 0%, #0a0f1c 70%);
}

/* ---- Hero Dot Pattern ---- */
.hero-dots {
    background-image: radial-gradient(circle, rgba(59, 130, 246, 0.18) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 0%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 0%, transparent 100%);
}

/* ---- Hero Glow Orbs (static, no blur/animation) ---- */
.hero-orb--blue {
    position: absolute;
    top: -250px;
    left: 50%;
    margin-left: -500px;
    width: 1000px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.22) 0%, rgba(59, 130, 246, 0.05) 40%, transparent 70%);
}

.hero-orb--cyan {
    position: absolute;
    bottom: 0;
    right: -100px;
    width: 650px;
    height: 650px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(56, 189, 248, 0.03) 40%, transparent 70%);
}

.hero-orb--purple {
    position: absolute;
    top: 30%;
    left: -100px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.10) 0%, rgba(56, 189, 248, 0.03) 40%, transparent 70%);
}

/* ---- Hero Spotlight ---- */
.hero-spotlight {
    background: radial-gradient(ellipse 55% 45% at 50% 0%, rgba(59, 130, 246, 0.18), transparent 100%);
}

/* ---- Hero Vignette ---- */
.hero-vignette {
    background: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 30%, rgba(10, 15, 28, 0.7) 100%);
}

/* ---- Hero Bottom Fade ---- */
.hero-bottom-fade {
    height: 160px;
    background: linear-gradient(to top, #0a0f1c, transparent);
}

/* ---- Section Background Patterns ---- */
.section-grid-pattern {
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.15) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 0%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 0%, transparent 100%);
}

.section-dot-pattern {
    background-image: radial-gradient(circle, rgba(56, 189, 248, 0.4) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 0%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 0%, transparent 100%);
}

.section-line-pattern {
    background-image: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.3) 0px,
        rgba(255, 255, 255, 0.3) 1px,
        transparent 1px,
        transparent 80px
    );
}

/* ---- Trader Carousel Infinite Scroll ---- */
@keyframes scrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-scroll-left {
    animation: scrollLeft 55s linear infinite;
}

.animate-scroll-left:hover {
    animation-play-state: paused;
}

/* ---- Glassmorphism Cards ---- */
.glass-card {
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-2px);
}

/* ---- Bento Cards ---- */
.bento-card {
    background: rgba(30, 41, 59, 0.4);
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.bento-card:hover {
    background: rgba(30, 41, 59, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(59, 130, 246, 0.08);
}

/* ---- Placeholder Boxes ---- */
.placeholder-box {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(15, 22, 41, 0.8));
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

/* ---- Navbar ---- */
#navbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    transition: background 0.35s ease, border-bottom-color 0.35s ease, box-shadow 0.35s ease;
}

#navbar.scrolled {
    background: rgba(10, 15, 28, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ---- Nav Links ---- */
.nav-link {
    position: relative;
    transition: color 0.2s ease, background 0.2s ease;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #38bdf8);
    border-radius: 1px;
    transition: width 0.25s ease, left 0.25s ease;
}

.nav-link:hover::after {
    width: 60%;
    left: 20%;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
    color: white;
}

.nav-link.active::after {
    width: 60%;
    left: 20%;
}

/* ---- Hero Gradient Text ---- */
.hero-gradient-text {
    background: linear-gradient(135deg, #38bdf8 0%, #3b82f6 40%, #38bdf8 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

/* ---- Hero CTA Primary ---- */
.hero-cta-primary {
    background: linear-gradient(135deg, #3b82f6, #38bdf8);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3), 0 0 60px rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
}

.hero-cta-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.hero-cta-primary:hover::before {
    left: 100%;
}

.hero-cta-primary:hover {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5), 0 0 80px rgba(59, 130, 246, 0.15);
}


/* ---- Price Tabs ---- */
.price-tab {
    color: rgba(148, 163, 184, 1);
}

.price-tab.active {
    background: linear-gradient(135deg, #3b82f6, #38bdf8);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* ---- Pricing Cards ---- */
.pricing-card {
    position: relative;
    overflow: visible;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.06);
}

.pricing-card.popular {
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(56, 189, 248, 0.06);
    box-shadow: 0 0 40px rgba(56, 189, 248, 0.06);
}

.pricing-card.popular:hover {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 0 50px rgba(56, 189, 248, 0.1);
}

/* ---- FAQ Accordion ---- */
.faq-item {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.faq-item.active {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(30, 41, 59, 0.6);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    text-align: left;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.2s;
}

html[dir="rtl"] .faq-question {
    text-align: right;
}

.faq-question:hover {
    color: #3b82f6;
}

.faq-question svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: #94a3b8;
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
    color: #3b82f6;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-answer-inner {
    padding: 0 1.5rem 1.25rem;
    color: #94a3b8;
    font-size: 0.875rem;
    line-height: 1.75;
}

/* ---- Scroll Animations ---- */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
}

/* ---- Fade-in Animations for Hero ---- */
.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.delay-100 {
    animation-delay: 0.1s;
    opacity: 0;
}

.delay-200 {
    animation-delay: 0.2s;
    opacity: 0;
}

.delay-300 {
    animation-delay: 0.3s;
    opacity: 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Gradient Text Helper ---- */
.gradient-text {
    background: linear-gradient(90deg, #3b82f6, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Testimonials Carousel ---- */
#testimonial-track {
    will-change: transform;
}

/* ---- RTL Specific Overrides ---- */
html[dir="rtl"] .hero-cta-primary::before {
    left: auto;
    right: -100%;
}

html[dir="rtl"] .hero-cta-primary:hover::before {
    right: 100%;
    left: auto;
}

html[dir="rtl"] #testimonial-prev svg,
html[dir="rtl"] #testimonial-next svg {
    transform: scaleX(-1);
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0f1c;
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

/* ---- Selection Color ---- */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: white;
}

/* ---- Mobile Menu Animation ---- */
#mobile-menu {
    transition: opacity 0.3s ease;
}

#mobile-menu.open {
    display: block;
}

/* ---- Responsive Tweaks ---- */
@media (max-width: 768px) {
    .hero-grid-bg {
        background-size: 40px 40px;
    }

    #testimonial-track > div {
        width: 100% !important;
    }
}

@media (max-width: 640px) {
    /* glass-card uses solid backgrounds, no backdrop-filter needed */
}

/* ---- Smooth lang switch transition ---- */
[data-i18n],
[data-i18n-placeholder] {
    transition: opacity 0.15s ease;
}

.lang-switching [data-i18n],
.lang-switching [data-i18n-placeholder] {
    opacity: 0;
}
