/* Custom CSS for Baitul Maqdis Landing Page */

/* Smooth Animations */
* {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    max-width: 100vw;
}

html {
    overflow-x: hidden;
}

/* Arabic Typography Enhancement */
.font-arabic {
    direction: rtl;
    text-align: right;
}

/* Custom Gradient Background */
.bg-palestine-pattern {
    background-image: 
        linear-gradient(135deg, rgba(238, 42, 53, 0.05) 0%, rgba(0, 165, 80, 0.05) 100%),
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(212, 175, 55, 0.03) 35px, rgba(212, 175, 55, 0.03) 70px);
}

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

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

/* Book Cover 3D Effect */
.book-cover-wrapper {
    perspective: 1000px;
}

.book-cover-wrapper img {
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.book-cover-wrapper:hover img {
    transform: rotateY(-10deg) rotateX(5deg);
}

/* Payment Card Selection */
.payment-radio:checked + .payment-card {
    border-color: #50A2B8;
    background: linear-gradient(135deg, rgba(80, 162, 184, 0.1) 0%, rgba(80, 162, 184, 0.05) 100%);
    box-shadow: 0 4px 15px rgba(80, 162, 184, 0.2);
    transform: scale(1.05);
}

.payment-card {
    transition: all 0.3s ease;
}

/* Feature Cards Hover Effect */
.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
}

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

/* Islamic Pattern Border */
.islamic-border {
    border-image: repeating-linear-gradient(
        45deg,
        #D4AF37,
        #D4AF37 10px,
        transparent 10px,
        transparent 20px
    ) 10;
}

/* Scroll Indicator Pulse */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.5;
        transform: translateY(10px);
    }
}

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

/* Navbar Scroll Effect */
.navbar-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Price Tag Pulse */
@keyframes price-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Gold Text Shimmer */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.text-shimmer {
    background: linear-gradient(90deg, #E0B255 0%, #f0c468 50%, #E0B255 100%);
    background-size: 1000px 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(0, 165, 80, 0.1);
    border-top: 3px solid #00A550;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Input Focus Effect */
input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(80, 162, 184, 0.1);
}

/* Button Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Card Stack Effect */
.card-stack {
    position: relative;
}

.card-stack::before,
.card-stack::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    border-radius: inherit;
    z-index: -1;
}

.card-stack::before {
    transform: rotate(-2deg);
    background: rgba(212, 175, 55, 0.2);
}

.card-stack::after {
    transform: rotate(2deg);
    background: rgba(0, 165, 80, 0.2);
}

/* Testimonial Card Hover */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Islamic Geometric Pattern */
.islamic-pattern {
    background-image: 
        linear-gradient(30deg, transparent 47%, rgba(212, 175, 55, 0.05) 47%, rgba(212, 175, 55, 0.05) 53%, transparent 53%),
        linear-gradient(150deg, transparent 47%, rgba(0, 165, 80, 0.05) 47%, rgba(0, 165, 80, 0.05) 53%, transparent 53%);
    background-size: 50px 50px;
}

/* Smooth Page Transitions */
.page-transition {
    animation: fadeIn 0.5s ease-in;
}

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

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #50A2B8 0%, #E0B255 100%);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Mobile Menu Animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Palestine Flag Colors Accent */
.palestine-accent {
    border-left: 4px solid;
    border-image: linear-gradient(to bottom, #50A2B8 0%, #FFFFFF 33%, #E0B255 66%, #50A2B8 100%) 1;
}

/* Quantity Input Spinner */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    height: 40px;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #50A2B8 0%, #E0B255 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #3d8ba3 0%, #d4a03d 100%);
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    /* Prevent horizontal scroll on mobile */
    body, html {
        overflow-x: hidden;
        max-width: 100%;
        position: relative;
    }
    
    /* Ensure containers don't overflow */
    .container {
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Better spacing for mobile */
    section {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .payment-card {
        border-width: 3px;
    }
    
    button {
        border: 2px solid currentColor;
    }
}

/* Courier Selection Styles */
.courier-option {
    transition: all 0.3s ease;
}

.courier-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.courier-option.selected {
    border-color: #EE2A35 !important;
    background: linear-gradient(135deg, rgba(238, 42, 53, 0.05), rgba(238, 42, 53, 0.1));
    box-shadow: 0 0 0 3px rgba(238, 42, 53, 0.1);
}

.courier-option.selected::after {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #EE2A35;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.courier-option {
    position: relative;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment if you want to add dark mode support */
    /*
    body {
        background: #1a1a1a;
        color: #ffffff;
    }
    */
}
