/* Booka Website - Custom Styles */

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', 'Noto Sans Hebrew', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    position: relative;
    width: 56px;
    height: 28px;
    background: rgba(242, 13, 13, 0.1);
    border-radius: 9999px;
    border: 1px solid rgba(242, 13, 13, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: rgba(242, 13, 13, 0.15);
}

.theme-toggle-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    background: #f20d0d;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dark .theme-toggle-dot {
    transform: translateX(-28px);
}

.theme-toggle-icon {
    font-size: 14px !important;
    color: white;
}

/* Material Icons Settings */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.material-symbols-outlined.filled {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Custom Scrollbar */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

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

/* Hero Overlay - Different for light/dark mode */
.hero-overlay {
    background: linear-gradient(to bottom, rgba(10, 5, 5, 0.7) 0%, rgba(10, 5, 5, 0.95) 100%);
}

html:not(.dark) .hero-overlay {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.85) 100%);
}

/* Hero text color adjustments */
html:not(.dark) .hero-title,
html:not(.dark) section h1 {
    color: #0a0505 !important;
}

html:not(.dark) section p {
    color: #4b5563 !important;
}

html:not(.dark) .text-white {
    color: #0a0505 !important;
}

html:not(.dark) .text-white\/80,
html:not(.dark) .text-white\/90 {
    color: #374151 !important;
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.dark .glass {
    background: rgba(10, 5, 5, 0.4);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #f20d0d 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Hover Effects */
.card-hover {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
}

/* Button Shine Effect */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s;
}

.btn-shine:hover::after {
    transform: rotate(45deg) translateX(100%);
}

/* Animated Background Patterns */
.pattern-dots {
    background-image: radial-gradient(rgba(242, 13, 13, 0.15) 1px, transparent 1px);
    background-size: 24px 24px;
}

.pattern-grid {
    background-image: 
        linear-gradient(rgba(242, 13, 13, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(242, 13, 13, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* Pulse Glow */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(242, 13, 13, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(242, 13, 13, 0.6);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Slide Up Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out forwards;
}

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Mobile Menu - RTL (slides from right) */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    visibility: hidden;
}

.mobile-menu.active {
    transform: translateX(0);
    visibility: visible;
}

/* Feature Cards Glow */
.feature-card {
    position: relative;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(242, 13, 13, 0.3), transparent 50%);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover::before {
    opacity: 1;
}

/* Marquee Animation */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

/* Story Card Video Overlay */
.story-video-overlay {
    background: linear-gradient(135deg, rgba(242, 13, 13, 0.9), rgba(10, 5, 5, 0.9));
}

/* Pricing Card Popular Badge */
.pricing-popular {
    position: relative;
}

.pricing-popular::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #f20d0d, #ff6b6b);
    border-radius: inherit;
    z-index: -1;
}

/* Stats Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-count {
    animation: countUp 0.6s ease-out forwards;
}

/* Responsive Typography */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.1;
    }
    
    .section-title {
        font-size: 2rem !important;
    }
}

/* Custom Selection */
::selection {
    background: rgba(242, 13, 13, 0.3);
    color: inherit;
}

/* Focus States */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #f20d0d;
    outline-offset: 2px;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Phone Mockup */
.phone-mockup {
    position: relative;
    background: linear-gradient(135deg, #1a0c0c, #2a1515);
    border-radius: 40px;
    padding: 12px;
    box-shadow: 
        0 50px 100px -20px rgba(0, 0, 0, 0.5),
        0 30px 60px -30px rgba(242, 13, 13, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.phone-screen {
    border-radius: 32px;
    overflow: hidden;
    background: #0a0505;
}

.phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 28px;
    background: #0a0505;
    border-radius: 0 0 16px 16px;
    z-index: 10;
}

/* Testimonial Avatar Ring */
.avatar-ring {
    position: relative;
}

.avatar-ring::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, #f20d0d, #ff6b6b);
    border-radius: 50%;
    z-index: -1;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}

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

/* Accordion Styles */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content.active {
    max-height: 500px;
}

/* Tab Active Indicator */
.tab-indicator {
    position: absolute;
    bottom: 0;
    height: 3px;
    background: #f20d0d;
    border-radius: 3px 3px 0 0;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Light mode - Stats section */
html:not(.dark) .text-white {
    color: #0a0505 !important;
}

/* Override: Keep white text in red sections even in light mode */
html:not(.dark) section[class*="bg-primary"] .text-white,
html:not(.dark) div[class*="bg-primary"] .text-white,
html:not(.dark) .bg-primary .text-white,
html:not(.dark) .bg-primary h1,
html:not(.dark) .bg-primary h2,
html:not(.dark) .bg-primary h3,
html:not(.dark) .bg-primary p,
html:not(.dark) .bg-primary span,
html:not(.dark) .bg-primary div {
    color: white !important;
}

html:not(.dark) .bg-primary\/40 {
    background: rgba(242, 13, 13, 0.15) !important;
}

/* Light mode - Success story cards text */
html:not(.dark) .story-card .text-white {
    color: white !important;
}

html:not(.dark) .story-card .text-white\/70 {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Light mode - Trust badges and buttons */
html:not(.dark) .text-white\/60 {
    color: #6b7280 !important;
}

/* Light mode - Mobile menu text colors */
html:not(.dark) #mobile-menu * {
    color: #0a0505 !important;
}

html:not(.dark) #mobile-menu .text-primary {
    color: #f20d0d !important;
}

/* Light mode - Modal backdrop */
html:not(.dark) .story-modal-backdrop {
    background: rgba(255, 255, 255, 0.95);
}

html:not(.dark) .story-modal-content {
    background: linear-gradient(145deg, #ffffff, #f9fafb);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

html:not(.dark) .story-modal-body h2,
html:not(.dark) .story-modal-body p,
html:not(.dark) .story-modal-body div {
    color: #0a0505 !important;
}

html:not(.dark) .story-modal-author-name {
    color: #0a0505 !important;
}

/* Story Modal */
.story-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.story-modal.active {
    opacity: 1;
    visibility: visible;
}

.story-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 5, 5, 0.9);
    backdrop-filter: blur(10px);
}

.story-modal-content {
    position: relative;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    background: linear-gradient(145deg, #1a0c0c, #0a0505);
    border-radius: 2rem;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(242, 13, 13, 0.1),
        0 0 80px rgba(242, 13, 13, 0.15);
}

.story-modal.active .story-modal-content {
    transform: scale(1) translateY(0);
}

.story-modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.story-modal-close:hover {
    background: #f20d0d;
    border-color: #f20d0d;
    transform: rotate(90deg);
}

.story-modal-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.story-modal-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(10, 5, 5, 1) 100%);
}

.story-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-modal-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: #f20d0d;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 9999px;
    z-index: 5;
    animation: pulse-glow 2s ease-in-out infinite;
}

.story-modal-body {
    padding: 2rem;
    margin-top: -4rem;
    position: relative;
    z-index: 5;
}

.story-modal-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.story-modal-stat {
    flex: 1;
    text-align: center;
    padding: 1rem;
    background: rgba(242, 13, 13, 0.1);
    border-radius: 1rem;
    border: 1px solid rgba(242, 13, 13, 0.2);
}

.story-modal-stat-value {
    font-size: 1.75rem;
    font-weight: 900;
    color: #f20d0d;
    display: block;
}

.story-modal-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.25rem;
}

.story-modal-quote {
    position: relative;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    border-right: 4px solid #f20d0d;
    margin-bottom: 1.5rem;
}

.story-modal-quote::before {
    content: '"';
    position: absolute;
    top: -0.5rem;
    right: 1rem;
    font-size: 4rem;
    color: rgba(242, 13, 13, 0.2);
    font-family: Georgia, serif;
    line-height: 1;
}

.story-modal-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.story-modal-author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 1rem;
    background: linear-gradient(135deg, #f20d0d, #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.story-modal-cta {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Light mode - Keep white text on red backgrounds */
html:not(.dark) .bg-primary,
html:not(.dark) .bg-primary *:not(.bg-white):not([class*="bg-gray"]):not([class*="bg-black"]) {
    color: white !important;
}

html:not(.dark) .bg-primary button,
html:not(.dark) .bg-primary a {
    color: white !important;
}

/* Elements with red background should have white text in light mode too */
html:not(.dark) [class*="bg-primary"] {
    color: white !important;
}

/* Light mode - Feature cards hover */
html:not(.dark) .feature-card:hover {
    box-shadow: 0 10px 40px rgba(242, 13, 13, 0.15);
}

/* Light mode - Testimonial and story cards */
html:not(.dark) .card-hover:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* Light mode - Pattern overlays */
html:not(.dark) .pattern-dots,
html:not(.dark) .pattern-grid {
    opacity: 0.2 !important;
}

/* Light mode - Theme toggle in light mode */
html:not(.dark) .theme-toggle {
    background: rgba(242, 13, 13, 0.1);
    border-color: rgba(242, 13, 13, 0.2);
}

html:not(.dark) .theme-toggle-dot {
    background: #f59e0b;
}

@media (max-width: 640px) {
    .story-modal-content {
        border-radius: 1.5rem;
    }
    
    .story-modal-image {
        height: 200px;
    }
    
    .story-modal-body {
        padding: 1.5rem;
    }
    
    .story-modal-stats {
        flex-wrap: wrap;
    }
    
    .story-modal-stat {
        flex: 1 1 calc(50% - 0.5rem);
    }
    
    .story-modal-cta {
        flex-direction: column;
    }
}
