
/* ==============================
   التنسيق العام للموقع
============================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #EAF6FC;
    font-family: Arial, sans-serif;
}

main {
    flex: 1;
}

/* ==============================
   الهيدر والشعار
============================== */

header {
    background-color: #071B36;
    color: #E8D3AA;
}

.brand {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 15px 30px;
}

.brand img {
    width: 110px;
    max-width: 100%;
    height: auto;
}

.site-title {
    margin: 0;
    color: #E8D3AA;
    text-align: right;
    transform: translateX(-50px);
}

/* ==============================
   شريط التنقل
============================== */

#nav {
    background-color: #FCF8E4;
    width: 100%;
}

#nav ul {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px 30px;
    list-style: none;
    padding: 15px;
    margin: 0;
}

#nav a {
    display: block;
    text-decoration: none;
    color: #071B36;
    font-size: 18px;
    font-weight: bold;
    transition: color 0.3s ease;
}

#nav a:hover {
    color: #AC8F5E;
}

#nav a.active {
    color: #AC8F5E;
}

/* ==============================
   القسم الرئيسي
============================== */

.hero {
    padding: 50px 30px;
    text-align: center;
    background-color: #F7FCFF;
    border-radius: 25px;
    margin: 35px auto;
    max-width: 1200px;
    width: calc(100% - 40px);
    box-shadow: 0 5px 20px rgba(7, 27, 54, 0.08);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 1100px;
    margin: auto;
    position: relative;
    z-index: 1;
}

.hero-text {
    text-align: right;
}

.hero-text h1 {
    color: #071B36;
}

.hero-text p {
    color: #000000;
    line-height: 1.8;
}

.hero-image img {
    display: block;
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 12px;
    margin: auto;
}

/* ==============================
   الأزرار
============================== */

.btn {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 35px;
    background-color: #071B36;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #63C7E8;
    color: #071B36;
    transform: translateY(-4px);
    box-shadow: 0 5px 15px rgba(7, 27, 54, 0.2);
}

/* ==============================
   الزخارف
============================== */

.hero::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    background: rgba(99, 199, 232, 0.15);
    border-radius: 50%;
    top: -90px;
    right: -70px;
}

.hero::after {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    background: rgba(91, 180, 140, 0.13);
    border-radius: 50%;
    bottom: -80px;
    left: -50px;
}

/* ==============================
   صفحة العناصر
============================== */

.elements-page {
    padding: 45px 30px 25px;
    min-height: 350px;
    background-color: #C8DFEC;
}

.elements-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.element-card {
    background-color: #FCF8E4;
    color: #071B36;
    min-height: 115px;
    padding: 15px;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    line-height: 1.8;
    transition: 0.3s ease;
}

.element-card:hover {
    background-color: #E8D3AA;
    transform: translateY(-5px);
}

/* ==============================
   الفوتر
============================== */

footer {
    background-color: #071B36;
    color: #E8D3AA;
    text-align: center;
    padding: 20px;
    margin-top: 0;
    width: 100%;
}

footer p {
    margin: 0;
    font-size: 25px;
}

/* ==============================
   Media Queries
   الشاشات المتوسطة
============================== */

@media (max-width: 768px) {

    .brand {
        padding: 15px;
        gap: 10px;
    }

    .brand img {
        width: 85px;
    }

    .site-title {
        transform: none;
        font-size: 20px;
    }

    #nav ul {
        gap: 12px 18px;
        padding: 12px;
    }

    #nav a {
        font-size: 16px;
    }

    .hero {
        padding: 35px 20px;
        margin: 25px auto;
    }

    .elements-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .element-card {
        font-size: 18px;
    }

    footer p {
        font-size: 20px;
    }
}

/* ==============================
   الشاشات الصغيرة
============================== */

@media (max-width: 500px) {

    .brand {
        flex-direction: column;
        text-align: center;
    }

    .site-title {
        text-align: center;
        font-size: 18px;
    }

    #nav ul {
        flex-direction: column;
        gap: 12px;
    }

    #nav a {
        font-size: 16px;
    }

    .hero {
        width: calc(100% - 24px);
        padding: 25px 15px;
    }

    .elements-page {
        padding: 30px 15px;
    }

    .elements-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0;
    }

    .element-card {
        font-size: 17px;
    }

    footer p {
        font-size: 17px;
    }
}
