/* ========================================
   E-COM Delivery - Custom Styles
   Glassmorphism + Animations
   ======================================== */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* RTL Support for Arabic */
html[dir="rtl"] body {
    font-family: 'Cairo', sans-serif;
}

html[dir="ltr"] body {
    font-family: 'Poppins', sans-serif;
}

/* ========================================
   Glassmorphism Effects
   ======================================== */

.glass-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.glass-card-hover {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card-hover:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(235, 28, 36, 0.15);
    border-color: rgba(235, 28, 36, 0.2);
}

.glass-card-dark {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========================================
   Navigation Links
   ======================================== */

.nav-link {
    position: relative;
    color: #374151;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #eb1c24;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #eb1c24;
}

.nav-link:hover::after {
    width: 100%;
}

html[dir="rtl"] .nav-link::after {
    left: auto;
    right: 0;
}

/* Mobile Navigation Links */
.mobile-nav-link {
    position: relative;
    display: flex;
    align-items: center;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: #eb1c24;
    border-radius: 2px;
    transition: height 0.3s ease;
}

.mobile-nav-link:hover::before {
    height: 60%;
}

html[dir="rtl"] .mobile-nav-link::before {
    left: auto;
    right: 0;
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s ease forwards;
}

.animate-slide-up-delay {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.animate-slide-up-delay-2 {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ========================================
   Form Styles
   ======================================== */

input:focus,
textarea:focus,
select:focus {
    border-color: #eb1c24;
    box-shadow: 0 0 0 4px rgba(235, 28, 36, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}

select option {
    padding: 12px;
}

/* Custom Select Arrow */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23374151'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5rem;
    padding-right: 3rem;
}

html[dir="rtl"] select {
    background-position: left 1rem center;
    padding-right: 1rem;
    padding-left: 3rem;
}

/* ========================================
   Button Effects
   ======================================== */

button,
a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active {
    transform: scale(0.98);
}

/* ========================================
   Scrollbar Customization
   ======================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #eb1c24;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c41820;
}

/* ========================================
   Section Backgrounds
   ======================================== */

#stats {
    position: relative;
    overflow: hidden;
}

#stats::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 768px) {
    .glass-nav {
        padding: 0.5rem 0;
    }
    
    h1 {
        font-size: 2.5rem !important;
    }
    
    .glass-card-hover:hover {
        transform: translateY(-4px);
    }
}

/* ========================================
   Loading States
   ======================================== */

.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Success Message Animation
   ======================================== */

#success-message {
    animation: slideUp 0.5s ease forwards;
}

/* ========================================
   Footer Styles
   ======================================== */

footer a:hover {
    transform: translateX(5px);
}

html[dir="rtl"] footer a:hover {
    transform: translateX(-5px);
}

/* ========================================
   Selection Color
   ======================================== */

::selection {
    background: #eb1c24;
    color: white;
}

::-moz-selection {
    background: #eb1c24;
    color: white;
}

