/* ------------------------ Reset & Font ------------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    scroll-behavior: smooth;
}

/* ------------------------ Container ------------------------ */
.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

/* ------------------------ Header & Nav ------------------------ */
.header {
    background: #111;
    color: #fff;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
}

nav a:hover {
    color: #00bcd4;
}

#langToggle {
    background: #00bcd4;
    border: none;
    color: #fff;
    padding: 5px 10px;
    cursor: pointer;
}

/* ------------------------ Hero Section ------------------------ */
.hero {
    height: 100vh;
    background: url('../images/hero.jpg') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero .overlay {
    background: rgba(0, 0, 0, 0.6);
    padding: 40px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.btn {
    background: #00bcd4;
    padding: 10px 20px;
    color: #fff;
    text-decoration: none;
    display: inline-block;
    margin-top: 20px;
    transition: 0.3s;
}

.btn:hover {
    background: #0097a7;
}

/* ------------------------ Maly Image ------------------------ */
.hero-image {
    text-align: center;
    margin: 40px 0;
}

.maly-img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.maly-img:hover {
    transform: scale(1.05);
}

/* ------------------------ Categories Grid ------------------------ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
    aspect-ratio: 1/1;
    transform-style: preserve-3d;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.category-card:hover {
    transform: rotateY(5deg) rotateX(5deg) scale(1.05);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    text-align: center;
    padding: 10px;
    transition: 0.3s;
}

.category-card:hover .category-overlay {
    background: #00bcd4;
    font-weight: 700;
}

.btn-detail {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 12px;
    background: #fff;
    color: #111;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.category-card:hover .btn-detail {
    opacity: 1;
    transform: translateY(-5px);
}

/* ------------------------ Services ------------------------ */
.cards {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.card {
    background: #fff;
    padding: 20px;
    width: 300px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-10px);
}

/* ------------------------ Stats ------------------------ */
.stats {
    background: #111;
    color: #fff;
    padding: 60px 0;
}

.stats .container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

/* ------------------------ Footer ------------------------ */
footer {
    text-align: center;
    padding: 20px;
    background: #000;
    color: #fff;
}

/* ------------------------ Responsive ------------------------ */
@media(max-width:768px) {
    nav ul {
        flex-direction: column;
        background: #111;
        position: absolute;
        top: 60px;
        right: 0;
        width: 200px;
        display: none;
    }
}

/* 📌 جعل جميع الصور متجاوبة */
img {
  max-width: 100%; /* لا تتجاوز عرض الحاوية */
  height: auto;    /* يحافظ على النسبة بين العرض والارتفاع */
  display: block;  /* حتى يتم التحكم بالهوامش */
  margin: 0 auto;  /* توسيط الصور */
}

/* 📌 ضبط صور الكروت في قسم التصنيفات */
#categories img {
  width: 100%;      /* تأخذ كامل عرض الكارت */
  max-width: 300px; /* أقصى عرض للصورة */
  object-fit: cover; /* يضمن عدم تشويه الصورة */
  aspect-ratio: 1/1; /* يجعل الصور مربعة */
  border-radius: 8px; /* حواف دائرية جميلة */
  margin: 0 auto; /* توسيط */
}

/* 📌 تنظيم الصف بجعل الصور تظهر 3 في الصف على الشاشات الكبيرة */
@media (min-width: 992px) {
  #categories .category-item {
    width: 33.333%;
    float: left;
    padding: 10px;
  }
}

/* 📌 على أجهزة التابلت */
@media (min-width: 768px) and (max-width: 991px) {
  #categories .category-item {
    width: 50%;
    float: left;
    padding: 8px;
  }
}

/* 📌 على الموبايل */
@media (max-width: 767px) {
  #categories .category-item {
    width: 100%;
    padding: 5px;
  }
}
