﻿:root {
    --primary-color: #0f172a;
    --secondary-color: #06b6d4;
    --accent-color: #f59e0b;
    --bg-light: #f8fafc;
    --text-dark: #333;
    --text-light: #fff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* الهيدر */
header {
    background-color: var(--primary-color);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    position: relative;
    z-index: 1000;
}

.logo {
    color: var(--accent-color);
    font-size: 28px;
    font-weight: 800;
    text-decoration: none;
}

/* القائمة العلوية للشاشات الكبيرة */
.nav-links {
    display: flex;
    list-style: none;
    height: 100%;
    margin: 0;
    padding: 0;
}

    .nav-links > li {
        position: relative;
        display: flex;
        align-items: center;
        height: 100%;
    }

        .nav-links > li > a {
            color: var(--text-light);
            text-decoration: none;
            font-weight: 600;
            padding: 0 15px;
            height: 100%;
            display: flex;
            align-items: center;
            transition: color 0.3s;
        }

            .nav-links > li > a:hover {
                color: var(--secondary-color);
            }

/* القائمة المنسدلة */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 80px;
    right: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 0 0 8px 8px;
    list-style: none;
    overflow: hidden;
    z-index: 1001;
}

.nav-links > li:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    color: var(--text-dark);
    padding: 12px 20px;
    display: block;
    text-decoration: none;
    border-bottom: 1px solid #f1f1f1;
    transition: background 0.3s;
}

    .dropdown-menu li a:hover {
        background: var(--bg-light);
        color: var(--secondary-color);
    }

/* زر قائمة الجوال (مخفي في الكمبيوتر) */
.menu-toggle {
    display: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
}

/* البنر */
.banner {
    width: 100%;
    height: 400px;
    position: relative;
    background: #000;
}

    .banner img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        top: 0;
        right: 0;
        opacity: 0;
        transition: opacity 1s ease-in-out;
    }

        .banner img.active {
            opacity: 1;
        }

/* الأقسام والصناديق */
.section-title {
    text-align: center;
    margin: 50px 0 30px;
    color: var(--primary-color);
    font-size: 32px;
    padding: 0 15px;
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 0 5%;
    margin-bottom: 40px;
}

.boxes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 0 5%;
    margin-bottom: 40px;
}

.box {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
}

    .box:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    }

    .box img {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }

    .box h3 {
        padding: 15px;
        font-size: 18px;
    }

.btn {
    background: var(--secondary-color);
    color: #fff;
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    display: inline-block;
}

/* العدادات والفوتر */
.counters {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    background: var(--primary-color);
    color: #fff;
    padding: 50px 5%;
    text-align: center;
}

.counter-box h3 {
    font-size: 40px;
    color: var(--accent-color);
}

footer {
    background: var(--primary-color);
    color: var(--text-light);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px 5%;
    border-top: 2px solid var(--accent-color);
}

    footer a {
        color: var(--secondary-color);
        text-decoration: none;
        margin-right: 15px;
    }

/* 📱 إعدادات الجوال (شاشات أصغر من 992px) */
@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none; /* مخفية افتراضياً في الجوال */
        flex-direction: column;
        position: absolute;
        top: 80px;
        right: 0;
        width: 100%;
        background: var(--primary-color);
        height: auto;
        padding: 10px 0;
        border-top: 1px solid #1e293b;
    }

        /* كلاس يضاف بالجافاسكريبت لإظهار القائمة */
        .nav-links.show-mobile-menu {
            display: flex;
        }

        .nav-links > li {
            width: 100%;
            height: auto;
            display: block;
        }

            .nav-links > li > a {
                padding: 15px 5%;
                width: 100%;
                justify-content: space-between;
                border-bottom: 1px solid #1e293b;
            }

            /* تعديل القائمة المنسدلة في الجوال */
            .nav-links > li:hover .dropdown-menu {
                display: none; /* نلغي تأثير Hover في الجوال */
            }

            .nav-links > li.active-dropdown .dropdown-menu {
                display: block;
            }

    .dropdown-menu {
        position: relative;
        top: 0;
        width: 100%;
        background: #1e293b;
        box-shadow: none;
        border-radius: 0;
    }

        .dropdown-menu li a {
            color: #fff;
            border-bottom: 1px solid #334155;
            padding-right: 10%;
        }

            .dropdown-menu li a:hover {
                background: #334155;
            }

    /* تصغير البنر والخطوط */
    .banner {
        height: 250px;
    }

    .section-title {
        font-size: 26px;
    }

    /* توسيط الفوتر */
    footer {
        justify-content: center;
        text-align: center;
    }
}

.page-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 40px;
    font-size: 32px;
    border-bottom: 3px solid var(--secondary-color);
    display: inline-block;
    padding-bottom: 10px;
}

.title-wrapper {
    text-align: center;
}

.container {
    max-width: 1000px;
    margin: 50px auto;
    padding: 0 20px;
}

.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.branch-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: 0.4s;
    text-decoration: none;
    color: var(--text-dark);
    text-align: center;
    display: flex;
    flex-direction: column;
}

    .branch-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    }

.branch-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 4px solid var(--secondary-color);
}

.branch-content {
    padding: 30px;
}

    .branch-content h3 {
        color: var(--primary-color);
        font-size: 26px;
        margin-bottom: 10px;
    }

    .branch-content p {
        color: #64748b;
        font-size: 16px;
        margin-bottom: 20px;
    }

.btn-enter {
    display: inline-block;
    background: var(--secondary-color);
    color: #fff;
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: bold;
    transition: 0.3s;
    width: 100%;
}

.branch-card:hover .btn-enter {
    background: var(--primary-color);
}


.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.template-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    text-align: center;
    border-top: 5px solid #ccc;
}

    .template-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    }

/* تلوين حواف البطاقات حسب الفئة */
.card-basic {
    border-top-color: #64748b;
}

.card-silver {
    border-top-color: #94a3b8;
}

.card-gold {
    border-top-color: #fbbf24;
}

.template-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    border-bottom: 1px solid #e2e8f0;
}

.template-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.template-title {
    color: var(--primary-color);
    font-size: 22px;
    margin-bottom: 5px;
}

.template-price {
    color: var(--price-color);
    font-weight: 900;
    font-size: 24px;
    margin-bottom: 20px;
}

.action-btns {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn-preview, .btn-buy {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

.btn-preview {
    background: #e2e8f0;
    color: var(--primary-color);
}

    .btn-preview:hover {
        background: #cbd5e1;
    }

.btn-buy {
    background: var(--secondary-color);
    color: #fff;
}

    .btn-buy:hover {
        background: var(--primary-color);
    }
