﻿/* ====================================
   المتغيرات الأساسية
==================================== */
:root {
    --primary-color: #28a745;
    --secondary-color: #ffc107;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

/* ====================================
   Hero Section
==================================== */
.hero {
    background: linear-gradient(224deg, #0dcaf0 0%, #20c997 50%, #ffc107b5 100%) !important;
}

    .hero h1 {
        font-weight: 800;
        margin-bottom: 20px;
    }

    .hero p {
        font-size: 1.2rem;
        margin-bottom: 30px;
    }

.btn-get-started {
    background: var(--primary-color);
    color: white;
    padding: 12px 40px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

    .btn-get-started:hover {
        background: #218838;
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

/* ====================================
   القائمة (Navbar)
==================================== */
.navmenu ul li a {
    font-weight: 600;
}

/* ====================================
   أيقونة السلة
==================================== */
.cart-icon {
    position: relative;
    margin-right: 15px;
}

.cart-count {
    position: absolute;
    top: -8px;
    left: -8px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ====================================
   الهيدر عند السكرول
==================================== */
.scrolled .header {
    background: linear-gradient(224deg, #0dcaf0 0%, #20c997 50%, #ffc107b5 100%) !important;
}

.header .container-fluid {
    display: flex !important;
    justify-content: space-between !important;
}

/* ====================================
   الخلفيات المتدرجة
==================================== */
.accent-background,
.hero,
.page-title {
    background: linear-gradient(224deg, #0dcaf0 0%, #20c997 50%, #ffc107b5 100%) !important;
}

/* ====================================
   صفحات الحساب (Login, Register, etc)
==================================== */
.account-section,
.login-section,
.register-section,
.forgot-section,
.reset-section,
.confirm-section,
.lockout-section,
.accessdenied-section,
.logout-section {
    min-height: 100vh;
    background: linear-gradient(224deg, #0dcaf0 0%, #20c997 50%, #ffc107b5 100%);
    padding: 80px 0;
}

.account-card,
.login-card,
.register-card,
.forgot-card,
.reset-card,
.confirm-card,
.lockout-card,
.accessdenied-card,
.logout-card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.modern-input {
    border-radius: 10px !important;
    border: 1.5px solid #ccc !important;
    padding: 12px 14px !important;
    transition: all .2s ease-in-out;
}

    .modern-input:focus {
        border-color: #20c997 !important;
        box-shadow: 0 0 8px rgba(32, 201, 151, .4) !important;
    }

.btn-gradient {
    background: linear-gradient(90deg, #20c997, #0dcaf0);
    color: #fff !important;
    border: none;
    border-radius: 12px;
    padding: 12px;
    transition: all .2s ease;
}

    .btn-gradient:hover {
        opacity: .9;
        transform: translateY(-2px);
    }

.btn-gradient-success {
    background: linear-gradient(90deg, #28a745, #20c997);
    color: #fff !important;
    border: none;
    border-radius: 12px;
    padding: 12px;
    transition: all .2s ease;
}

    .btn-gradient-success:hover {
        opacity: .9;
        transform: translateY(-2px);
    }

.btn-gradient-warning {
    background: linear-gradient(90deg, #ffc107, #ffda6a);
    color: #000 !important;
    border: none;
    border-radius: 12px;
    padding: 12px;
    transition: all .2s ease;
}

    .btn-gradient-warning:hover {
        opacity: .9;
        transform: translateY(-2px);
    }

/* ====================================
   زر تسجيل الخروج
==================================== */
.logout-form {
    margin: 0;
    padding: 0;
}

.logout-link {
    background: none;
    border: none;
    color: white !important;
    font-weight: 600;
    padding: 10px 15px;
    cursor: pointer;
    transition: 0.3s;
}

    .logout-link:hover {
        color: #ffd700 !important;
        text-decoration: underline;
    }

/* ====================================
   تحسينات الموبايل
==================================== */
@media (max-width: 768px) {
    /* Hero */
    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .hero p {
        font-size: 1rem;
    }

    .btn-get-started {
        padding: 10px 30px;
        font-size: 0.95rem;
    }

    /* صفحات الحساب */
    .account-section,
    .login-section,
    .register-section {
        padding: 60px 15px;
    }

    .account-card,
    .login-card,
    .register-card {
        padding: 20px;
    }

    /* الأزرار */
    .btn-gradient,
    .btn-gradient-success,
    .btn-gradient-warning {
        padding: 10px;
        font-size: 0.95rem;
    }

    /* الحقول */
    .modern-input {
        padding: 10px 12px !important;
        font-size: 0.95rem;
    }
}

/* ====================================
   تحسينات للشاشات الصغيرة جداً
==================================== */
@media (max-width: 576px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .btn-get-started {
        padding: 8px 25px;
        font-size: 0.9rem;
    }

    .page-title h1 {
        font-size: 1.5rem;
    }

    .cart-icon i {
        font-size: 1.3rem;
    }

    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
}

/* ====================================
   إصلاح الأزرار في الموبايل
==================================== */
@media (max-width: 768px) {
    .btn {
        white-space: normal;
        word-wrap: break-word;
    }

    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .btn-sm {
        padding: 5px 10px;
        font-size: 0.85rem;
    }
}

/* ====================================
   إصلاح البطاقات
==================================== */
@media (max-width: 768px) {
    .card {
        margin-bottom: 20px;
    }

    .card-header {
        padding: 15px;
    }

    .card-body {
        padding: 15px;
    }
}

/* ====================================
   إصلاح الجداول في الموبايل
==================================== */
@media (max-width: 768px) {
    .table-responsive {
        border: 0;
    }

    .table {
        font-size: 0.85rem;
    }

        .table td,
        .table th {
            padding: 8px;
        }
}

/* ====================================
   إصلاح النماذج
==================================== */
@media (max-width: 768px) {
    .form-control,
    .form-select {
        font-size: 16px; /* منع التكبير التلقائي في iOS */
    }

    .form-label {
        font-size: 0.95rem;
    }
}

/* ====================================
   إصلاح الـ Footer
==================================== */
@media (max-width: 768px) {
    .footer .footer-top {
        padding: 40px 0;
    }

    .footer h4 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .footer ul li {
        padding: 5px 0;
        font-size: 0.9rem;
    }

    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

/* ====================================
   إصلاح الـ Breadcrumb
==================================== */
@media (max-width: 576px) {
    .breadcrumb {
        font-size: 0.85rem;
    }

    .breadcrumb-item + .breadcrumb-item::before {
        padding: 0 5px;
    }
}

/* ====================================
   تحسين الأداء
==================================== */
* {
    -webkit-tap-highlight-color: transparent;
}

img {
    image-rendering: -webkit-optimize-contrast;
}

button,
a {
    touch-action: manipulation;
}
