
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-display: swap;
    src: url("../fonts/Roboto-Regular.woff2") format('woff2');
}

@font-face {
    font-family: 'OswaldBold';
    font-style: normal;
    font-display: swap;
    src: url("../fonts/Oswald-Bold.woff2") format('woff2');
}

@font-face {
    font-family: 'OswaldRegular';
    font-style: normal;
    font-display: swap;
    src: url("../fonts/Oswald-Regular.woff2") format('woff2');
}


*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:"Roboto", "OswaldBold";
    background:#fafafa;
    color:#222;
    min-height:100vh;
    display:flex;
    flex-direction:column;
    padding-top:65px;
}

/* =========================
   GLOBAL CONTAINER
========================= */

.container{
    width:90%;
    max-width:1300px;
    margin:auto;
}

/* =========================
   Competitions
========================= */

.competitions-section{
    padding: 32px 32x;
}

.page-title{
    font-family: 'OswaldBold';
    color: #000;
    font-size: 36px;
}

.page-desc{
    font-family: "Roboto";
    color: #737373;
    margin-top: 8px;
    margin-bottom: 25px;
    font-size: 16px;
}



/* =========================
   Search
========================= */

.search-filter-wrapper{
    display:flex;
    align-items:center;
    gap:12px;
    width:100%;
}

/* ===== Search Box ===== */
.search-box{
    flex:1;
    display:flex;
    align-items:center;
    gap:10px;
    padding:0 12px;
    height:45px;
    border:1px solid #737373;
    border-radius:12px;
    background:#fff;
    transition:0.3s;
}

.search-box i{
    color:#737373;
    font-size:16px;
}

.search-box input{
    border:none;
    outline:none;
    width:100%;
    font-size:14px;
}

.search-box:focus-within{
    border:1px solid #d41111;
}

/* ===== Filter Dropdown ===== */
.custom-select{
    position:relative;
    width:180px;
    font-family:Arial;
}

/* selected box */
.selected{
    height:45px;
    border:1px solid #737373;
    border-radius:12px;
    padding:0 12px;

    display:flex;
    align-items:center;
    justify-content:space-between;

    cursor:pointer;
    background:#fff;
    transition:0.3s;
}

.selected:hover{
    border-color:#d41111;
}

/* dropdown menu */
.menu{
    position:absolute;
    top:55px;
    left:0;
    width:100%;

    background:#fff;
    border:1px solid #737373;
    border-radius:12px;

    box-shadow:0 10px 25px rgba(0,0,0,0.08);

    display:none;
    overflow:hidden;
    z-index:1000;
}

/* items */
.item{
    padding:12px;
    cursor:pointer;
    transition:0.2s;
}

.item:hover{
    background:#d41111;
    color: #fff;
}


/* =========================
   competition-section
========================= */

.competitions-section{
    padding: 40px 0px;
    margin-bottom: 100px;
}

.competitions-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:25px;
}

.card-link{
    text-decoration:none;
    color:inherit;
    display:block;
}

.competition-card{
    background:#fff;
    border:1px solid #e0e0e0;
    border-radius:20px;
    padding:24px;
    position:relative;
    overflow:hidden;
    transition: 0.3s ease;
    cursor:pointer;
}
.competition-card:hover{
    border:1px solid #f6cfcf;
    transform: translateY(-5px);
    box-shadow: 0px 0px 10px rgba(0,0,0,0.18);
    
}

.competition-card::before{
    content:"";
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:6px;
    background:linear-gradient(
        90deg,
        #ff1d1d,
        #7f1010,
        #1a0f0f
    );
}

.card-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}

.badge{
    background:#eef4ff;
    color:#2563eb;
    padding:6px 12px;
    border-radius:999px;
    font-size:12px;
    font-weight:600;
}

.registration{
    background:#e8fff3;
    color:#059669;
}

.status{
    color:#737373;
    font-size:12px;
    letter-spacing:1px;
}

.competition-title{
    font-family:"OswaldBold";
    font-size:20px;
    margin-bottom:12px;
    color: #000;
    transition:color 0.3s ease;
}

.competition-card:hover .competition-title{
    color:#d41111;
}

.card-info{
    display:flex;
    flex-direction:column;
    gap:12px;
    color:#737373;
}

.card-info p{
    margin:0;
    color: #737373;
    font-size: 14px;
    font-family: "Roboto";
}

.card-info p i{
    margin:0;
    color: #d41111;
    font-size: 14px;
}

.competition-card hr{
    border:none;
    border-top:1px solid #e5e7eb;
    margin:24px 0;
}

.prize{
    display:flex;
    align-items:end;
    gap:4px;
}

.amount{
    font-size:18px;
    font-family: "OswaldBold";
    color:#000;
}

.prize span:last-child{
    color:#737373;
    font-family: "Roboto";
    font-size: 12px;
}



/* ===================================================
   RESPONSIVE (تنسيقات التجاوب لصفحة المسابقات)
=================================================== */

@media (max-width: 768px) {

    /* 1. الحل الجذري لمنع اختفاء كلمة Competitions تحت النافبار 👇 */
    body {
        padding-top: 170px !important; /* زيادة المسافة العلوية لتبدأ الصفحة بعد ترتيب النافبار العمودي */
    }

    /* 2. ضبط أبعاد وتنسيق النافبار في الموبايل */
    .nav-container {
        height: auto !important; /* إلغاء الارتفاع الثابت */
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 12px;
        padding: 16px 0;
    }

    .logo {
        justify-content: center;
        width: 100%;
    }

    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .nav-links a {
        padding: 6px 12px;
        font-size: 14px;
    }

    .auth-buttons {
        justify-content: center;
        width: 100%;
        margin-top: 4px;
    }

    /* =======================================
       تنسيقات محتوى صفحة المسابقات
    ======================================= */

    /* زيادة مسافة الأمان الجانبية للقسم لكي لا تلتصق العناصر بالحافة */
    .competitions-section {
        padding: 24px 8px;
    }

    /* ترتيب حاوية البحث والفلتر عمودياً */
    .search-filter-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 16px; /* مسافة مريحة بين الصندوقين */
    }

    /* ضبط شريط البحث ليكون مطابقاً لصفحة الأبطال تماماً */
    .search-box {
        width: 100%;
        height: 60px; /* الارتفاع المثالي المتناسق */
        border-radius: 8px; /* تقليل الدوران ليصبح احترافياً وغير بيضاوي */
        padding: 0 16px;
    }

    .search-box input {
        font-size: 22px; /* يمنع الـ Auto-Zoom في الموبايل */
    }

    .search-box i {
        font-size: 18px; /* تكبير أيقونة العدسة لتناسب الأبعاد الجديدة */
    }

    /* ضبط الفلتر ليكون بنفس الارتفاع والحواف */
    .custom-select {
        width: 100%;
    }

    .selected {
        width: 100%;
        height: 50px; /* نفس ارتفاع صندوق البحث */
        border-radius: 8px; /* نفس حواف صندوق البحث */
        padding: 0 16px;
        font-size: 16px;
    }

    /* ضبط مكان فتح قائمة الفلتر المنسدلة */
    .menu {
        top: 56px;
        border-radius: 8px;
    }

    /* تنسيقات العناوين والكروت */
    .page-title {
        font-size: 28px;
    }

    .page-desc {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .competition-card {
        padding: 18px;
    }
}

/* شاشات التابلت والمتوسطة */
@media (max-width: 992px) {
    .competitions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* شاشات الموبايل الصغيرة جداً */
@media (max-width: 600px) {
    .competitions-grid {
        grid-template-columns: 1fr;
    }
}