/* ================================================
   ma7aly Landing Page - Custom Styles
   ================================================ */

/* Font Families */
body[dir="rtl"],
html[dir="rtl"],
.font-cairo {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

body[dir="ltr"],
html[dir="ltr"],
.font-inter {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Exclude icon fonts from inheriting font-family */
.fa,
.fas,
.far,
.fal,
.fad,
.fab,
[class^="fa-"],
[class*=" fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
}

/* CSS Variables */
:root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
}

/* Base Styles */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.5);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Selection */
::selection {
    background-color: var(--primary-500);
    color: white;
}

/* RTL Specific Styles */
[dir="rtl"] .flip-rtl {
    transform: scaleX(-1);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

/* Navbar Transparent State */
.navbar-transparent {
    background: transparent;
}

.navbar-solid {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Fix Lighthouse: keep logo images at intrinsic aspect ratio even if HTML uses fixed height */
img#logoDark,
img#logoLight {
    height: auto !important;
}

/* Fix Lighthouse: improve text contrast on landing page elements */
.inline-block.px-4.py-2.bg-primary-600.text-white.font-semibold.rounded-full {
    --tw-bg-opacity: 1 !important;
    background-color: #1e40af !important; /* primary-800 */
}

a.inline-flex.items-center.gap-3.px-8.py-4.bg-white.text-primary-600 {
    color: #1d4ed8 !important; /* primary-700 */
}

a.inline-flex.items-center.gap-3.px-8.py-4.bg-white.text-primary-600 .text-sm {
    color: #1d4ed8 !important; /* keep small text readable */
}

footer.bg-gray-900 .text-gray-500 {
    --tw-text-opacity: 1 !important;
    color: rgba(209, 213, 219, var(--tw-text-opacity)) !important; /* gray-300 */
}

footer.bg-gray-900 a.hover\:text-primary-400:hover {
    --tw-text-opacity: 1 !important;
    color: rgba(147, 197, 253, var(--tw-text-opacity)) !important; /* primary-300 */
}

.absolute.bottom-0.left-0.w-96.h-96.bg-primary-300.rounded-full.blur-3xl {
    opacity: 0.25;
}

/* Fix Lighthouse: improve contrast for stat cards on white background */
.bg-white .text-primary-600,
.bg-white.rounded-2xl .text-primary-600,
div.bg-white.rounded-2xl.shadow-xl .text-primary-600 {
    filter: brightness(0.75);
}

/* Section Dividers */
.section-divider {
    position: relative;
}

.section-divider::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
    border-radius: 2px;
}

/* Feature Icons */
.feature-icon {
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Pricing Card */
.pricing-card {
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: scale(1.02);
}

.pricing-card.featured {
    transform: scale(1.05);
    z-index: 10;
}

/* Testimonial Cards */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

/* Loading Spinner */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Mobile Menu Animation */
.mobile-menu-enter {
    opacity: 0;
    transform: translateY(-20px);
}

.mobile-menu-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .section-padding {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

/* Focus States for Accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Print Styles */
@media print {

    nav,
    footer,
    .no-print {
        display: none !important;
    }
}

/* ================================================
   Golden Sparkle Button - Premium CTA
   ================================================ */
.btn-golden-sparkle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    color: #1a1a2e;
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 25%, #ffd700 50%, #fff8dc 75%, #ffd700 100%);
    background-size: 200% 200%;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(255, 215, 0, 0.4),
        0 0 30px rgba(255, 215, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    animation: golden-shimmer 3s ease-in-out infinite;
    text-decoration: none;
}

.btn-golden-sparkle:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 6px 25px rgba(255, 215, 0, 0.5),
        0 0 50px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    color: #1a1a2e;
    text-decoration: none;
}

/* Shimmer Animation */
@keyframes golden-shimmer {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Sparkle Effect - Before */
.btn-golden-sparkle::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.8) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    animation: sparkle-sweep 2.5s ease-in-out infinite;
}

@keyframes sparkle-sweep {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

/* Sparkle Particles */
.btn-golden-sparkle::after {
    content: '✨';
    position: absolute;
    font-size: 0.75rem;
    top: -5px;
    right: -5px;
    animation: sparkle-float 1.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sparkle-float {
    0%, 100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-5px) scale(1.2);
    }
}

/* Glow Pulse */
.btn-golden-sparkle-glow {
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, #ffd700, #ffb347, #ffd700);
    border-radius: 0.875rem;
    z-index: -1;
    animation: glow-pulse 2s ease-in-out infinite;
    filter: blur(8px);
    opacity: 0.6;
}

@keyframes glow-pulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .btn-golden-sparkle {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}