/* Custom Color Scheme */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --info-color: #17a2b8;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow-color: rgba(44, 62, 80, 0.1);
}

.navbar {
    transition: all 0.3s ease-in-out;
}

.navbar-dark {
    background: var(--gradient-primary) !important;
    box-shadow: 0 2px 20px var(--shadow-color);
    backdrop-filter: blur(10px);
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.1);
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #fff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Product Cards */
.product-item {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.product-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.product-img {
    position: relative;
    overflow: hidden;
}

.product-img img {
    transition: transform 0.3s ease;
}

.product-item:hover .product-img img {
    transform: scale(1.1);
}

.product-action {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    gap: 10px;
}

.product-item:hover .product-action {
    opacity: 1;
}

.product-action .btn {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.9);
    border: none;
    color: #333;
    transition: all 0.3s ease;
}

.product-action .btn:hover {
    background: #007bff;
    color: white;
    transform: scale(1.1);
}

/* Category Cards */
.category-item {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,123,255,0.8), rgba(0,123,255,0.6));
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-item:hover .category-overlay {
    opacity: 1;
}

.category-content {
    text-align: center;
    color: white;
}

.category-content h4 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.category-content .btn {
    border-radius: 25px;
    padding: 10px 20px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.category-content .btn:hover {
    transform: scale(1.05);
}

/* Service Items - Enhanced */
.service-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border: 2px solid rgba(102, 126, 234, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
}

/* Remove any animated line at the top */
.service-item::before,
.service-item::after {
    display: none !important;
    content: none !important;
}

.service-item:hover::before,
.service-item:hover::after {
    display: none !important;
    content: none !important;
}


.service-item:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.2) !important;
    border-color: rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
}

.service-icon {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    position: relative;
}

.service-icon::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: all 0.4s ease;
}

.service-item:hover .service-icon {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.service-item:hover .service-icon::after {
    width: 120px;
    height: 120px;
}

.bg-gradient-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f0f4f8 100%);
    position: relative;
}

.bg-gradient-light::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(102, 126, 234, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(118, 75, 162, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.service-item .btn-square {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Hero Section - Static Beautiful Background */
.hero-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 30%, rgba(255,255,255,0.08) 0%, transparent 60%),
        url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.08)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.6;
    z-index: 1;
}

.hero-header::after {
    display: none;
}

.hero-header .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-weight: 800 !important;
    text-shadow: 2px 4px 8px rgba(0,0,0,0.3);
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.15rem;
    line-height: 1.8;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.hero-buttons .btn {
    border-radius: 50px;
    padding: 14px 35px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
}

.hero-buttons .btn-light {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #667eea;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25), 0 0 0 0 rgba(102, 126, 234, 0.4);
    border: 2px solid rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

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

.hero-buttons .btn-light:hover::before {
    left: 100%;
}

.hero-buttons .btn-light:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.35), 0 0 0 4px rgba(102, 126, 234, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
}

.hero-buttons .btn-outline-light {
    border: 2px solid rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.hero-buttons .btn-outline-light::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.hero-buttons .btn-outline-light:hover::before {
    left: 100%;
}

.hero-buttons .btn-outline-light:hover {
    transform: translateY(-4px) scale(1.02);
    background: rgba(255,255,255,0.25);
    border-color: #ffffff;
    box-shadow: 0 12px 35px rgba(0,0,0,0.25);
}

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

/* Enhanced Container Styles */
.container {
    position: relative;
}

.container-fluid {
    position: relative;
}

/* Carousel */
.carousel-item img {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-control-prev {
    left: 20px;
}

.carousel-control-next {
    right: 20px;
}

/* Badges */
.badge {
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* Buttons */
.btn {
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
}

/* Cards */
.card {
    border-radius: 15px;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

/* Forms */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Pagination */
.pagination .page-link {
    border-radius: 10px;
    margin: 0 2px;
    border: none;
    color: #007bff;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: #007bff;
    color: white;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.footer-item h4 {
    color: #fff;
    font-weight: bold;
    margin-bottom: 20px;
}

.footer-item .btn-link {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-item .btn-link:hover {
    color: #007bff;
}

/* Back to Top */
.back-to-top {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-header h1 {
        font-size: 2rem;
    }
    
    .product-action {
        opacity: 1;
        position: static;
        transform: none;
        justify-content: center;
        margin-top: 10px;
    }
    
    .category-overlay {
        opacity: 1;
    }
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* RTL Support */
[dir="rtl"] .nav-link::after {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

[dir="rtl"] .carousel-control-prev {
    left: auto;
    right: 20px;
}

[dir="rtl"] .carousel-control-next {
    right: auto;
    left: 20px;
}

.dropdown-menu {
    animation: fadeIn 0.3s ease;
    border-radius: 8px;
}

/* Pulse animation for cart badge */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Enhanced form styles */
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

/* Enhanced button styles */
.btn {
    position: relative;
    overflow: hidden;
}

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

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Enhanced card hover effects */
.card:hover {
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

/* Newsletter section */
.bg-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
}

/* Enhanced navbar */
.navbar-brand {
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color: white !important;
    font-size: 1.8rem;
}

/* إزالة المسافة بين الشعار وقائمة التنقل */
.navbar.navbar-expand-lg .navbar-brand {
    margin-right: 0 !important;
    padding-right: 0 !important;
}

.navbar.navbar-expand-lg .navbar-collapse {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.navbar.navbar-expand-lg .navbar-nav.me-auto,
.navbar.navbar-expand-lg .navbar-nav.ms-auto {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
}

.navbar .container-fluid {
    gap: 0 !important;
}

@media (min-width: 992px) {
    .navbar-expand-lg .navbar-brand {
        margin-right: 0 !important;
    }
    
    .navbar-expand-lg .navbar-collapse {
        margin-left: 0 !important;
    }
    
    .navbar-expand-lg .navbar-nav.me-auto {
        margin-left: 0 !important;
        margin-right: auto !important;
    }
    
    .navbar-expand-lg .navbar-nav.ms-auto {
        margin-right: 0 !important;
        margin-left: auto !important;
    }
}

/* Custom Button Colors */
.btn-primary {
    background: var(--gradient-primary) !important;
    border: none !important;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: all 0.3s ease;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-color);
}

.btn-secondary {
    background: var(--gradient-secondary) !important;
    border: none !important;
    color: white !important;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
}

.btn-success {
    background: var(--gradient-success) !important;
    border: none !important;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary) !important;
    border-color: transparent !important;
    color: white !important;
    transform: translateY(-2px);
}

/* Custom Badge Colors */
.badge {
    background: var(--gradient-secondary) !important;
    color: white !important;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.badge.bg-danger {
    background: var(--gradient-secondary) !important;
}

.badge.bg-primary {
    background: var(--gradient-primary) !important;
}

/* Custom Card Colors */
.card {
    border: none !important;
    border-radius: 15px !important;
    box-shadow: 0 5px 20px var(--shadow-color) !important;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--shadow-color) !important;
}

.card-header {
    background: var(--gradient-primary) !important;
    color: white !important;
    border: none !important;
    padding: 15px 20px;
}

/* Custom Form Colors */
.form-control {
    border: 2px solid var(--light-color) !important;
    border-radius: 10px !important;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--secondary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25) !important;
}

/* Custom Pagination Colors */
.pagination .page-link {
    border: none !important;
    color: var(--primary-color) !important;
    padding: 10px 15px;
    margin: 0 2px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: var(--gradient-primary) !important;
    color: white !important;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: var(--gradient-primary) !important;
    color: white !important;
    box-shadow: 0 4px 15px var(--shadow-color);
}

/* Product grid improvements */
.product-item .card-body {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Enhanced pagination */
.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    margin: 0 2px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    color: #007bff;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

/* Enhanced footer */
.footer {
    margin-top: auto;
}

.footer-item h4 {
    position: relative;
    padding-bottom: 10px;
}

.footer-item h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: #007bff;
}

/* Enhanced hero section */
.hero-header {
    position: relative;
    overflow: hidden;
}

.hero-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.hero-header .container {
    position: relative;
    z-index: 2;
}

/* Enhanced carousel */
.carousel-item img {
    transition: transform 0.3s ease;
}

.carousel-item:hover img {
    transform: scale(1.05);
}

/* Enhanced search */
.input-group .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.input-group .btn {
    border-color: #007bff;
    background-color: #007bff;
    color: white;
}

.input-group .btn:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Enhanced dropdown */
.dropdown-item {
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: #007bff;
    color: white;
    transform: translateX(5px);
}

/* Enhanced badges */
.badge {
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Enhanced alerts */
.alert {
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Enhanced tables */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.table thead th {
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

/* Enhanced modals */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    border-radius: 15px 15px 0 0;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 15px 15px;
}

.dropdown-item {
    transition: all 0.3s ease;
    padding: 10px 20px;
}

.dropdown-item:hover,
.dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

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