/* ===== BODY & GLOBAL ===== */
html {
  scroll-behavior: smooth;
}
.responsive-nav {
  background-color: #111;
  color: #fff;
  padding: 10px 20px;
  font-family: 'Tahoma', sans-serif;
  border-bottom: 1px solid #333;
}

.nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-title {
  font-size: 18px;
  font-weight: bold;
}

.nav-toggle {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

#nav-menu {
  display: flex;
  gap: 20px;
  list-style: none;
  padding: 10px 0;
  margin: 0;
  flex-wrap: wrap;
}

#nav-menu li a {
  color: #000000;
  text-decoration: none;
  font-weight: bold;
  margin-left: 50px;
  padding: 13px;
  border-radius: 12px;
  transition: 0.3s;
}

#nav-menu li a:hover {
  background-color: #a2cdff86;
  color: #fff;
}

/* 📱 شاشة صغيرة */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  #nav-menu {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
  }

  #nav-menu.active {
    display: flex;
  }
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(rgba(212, 212, 212, 0.856), rgba(0, 0, 0, 0.185)), url(img/bg.jpg);
  background-repeat: no-repeat;
  background-size: 100%;
  background-attachment: fixed;
  padding: 30px;
  text-align: center;
  color: #333;
}

/* ===== HEADINGS ===== */
h1, h2 {
  color: rgb(34, 34, 34);
  text-align: center;
  margin-bottom: 20px;
}

/* ===== NAVIGATION ===== */
nav {
  background: linear-gradient(to right, rgb(135, 189, 135), rgb(187, 116, 116));
  padding: 10px 0;
  border-radius: 5px;
  margin-bottom: 30px;
  box-shadow: 10px 10px 10px black;
}

.nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.nav li a {
  text-decoration: none;
  color: black;
  font-size: 1.1em;
  font-weight: bold;
  padding: 8px 12px;
  border-radius: 5px;
  transition: 0.2s;
}

.nav li a:hover {
  background-color: rgb(164, 45, 45);
  color: white;
}

/* ===== SECTIONS & GRID ===== */
.gtd {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  justify-content: center;
  padding: 10px;
}

section {
  background-color: hsla(0, 0%, 100%, 0.637);
  width: 100%;
  text-align: center;
  padding: 20px;
  border-radius: 10px;
  transition: 0.3s;
  box-sizing: border-box;
}

section img {
  width: 100%;
  height: 250px;
  border-radius: 10px;
  transition: 0.2s;
}

section p {
  margin-top: 15px;
  font-size: 24px;
  font-weight: bold;
}

section:hover {
  background: transparent;
  backdrop-filter: blur(5px);
  border-color: white;
}

section img:hover {
  transform: scale(1.1);
}

/* ===== LINKS ===== */
a {
  text-decoration: none;
  color: inherit;
}

.top-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: rgba(255, 152, 152, 0.623);
  padding: 10px 15px;
  border-radius: 60px 60px;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 10px 10px 10px black;
  z-index: 100;
  transition: 0.3s;
}

.top-button:hover {
  filter: contrast(400%);
  color: white;
}

/* ===== FOOTER SCROLLING TEXT ===== */
.end-1 {
  width: 100%;
  overflow: hidden;
  background-color: #2222228c;
  color: white;
  padding: 10px 0;
  border-radius: 10px;
  direction: rtl;
  position: relative;
}

.end-2 {
  display: inline-block;
  white-space: nowrap;
  font-size: 20px;
  font-weight: bold;
  animation: scroll-text 13s linear infinite;
  padding-right: 27%;
}

@keyframes scroll-text {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .gtd {
    grid-template-columns: 1fr; /* سطر واحد */
  }

  .nav {
    flex-direction: column;
    align-items: center;
  }

  nav {
    width: 50%;
    margin-left: 100px;
  }

  .nav li {
    width: 50%;
    text-align: center;
  }

  .nav li a {
    display: block;
    width: 100%;
  }

  section {
    width: 90%;
  }

  body {
    background-size: cover;
  }
}

/* ===== STARS RATING STYLE ===== */
.stars-container {
  display: inline-block;
  user-select: none;
  font-size: 40px;
  cursor: pointer;
  color: gray;
  position: relative;
  direction: ltr; /* لأن النجوم بالإنجليزي */
}

.star {
  display: inline-block;
  padding: 0 8px;
  position: relative;
}

.star:hover,
.star.hovered,
.star.selected {
  color: #ffa500; /* برتقالي */
}

.star-number {
  display: block;
  font-size: 16px;
  color: #555;
  margin-top: 4px;
  user-select: none;
}

/* ===== RATING RESULT ===== */
#rating-result {
  margin-top: 20px;
  font-weight: bold;
  font-size: 18px;
  color: #444;
}

/* ===== BUTTONS ===== */
button {
  margin-top: 30px;
  padding: 12px 25px;
  font-size: 16px;
  background-color: #4285f4;
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #3367d6;
}

/* ===== LOGIN HEADER ===== */
.login-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
  align-items: center;
  padding: 10px 20px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.login-btn, .logout-btn {
  padding: 6px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #fff;
}

.login-btn {
  background-color: #4285F4;
}

.logout-btn {
  background-color: #e74c3c;
}

#user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

#user-info img {
  border-radius: 50%;
  width: 35px;
  height: 35px;
}

/* ===== COMMENTS ===== */
.comment-box {
  max-width: 700px;
  margin: 30px auto;
  background: #fff;
  padding: 25px 30px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  direction: rtl;
}

.comment-form {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.comment-form img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid #ccc;
}

#comment-input {
  flex: 1;
  min-height: 80px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  resize: vertical;
  font-size: 15px;
}

.comment {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-top: 20px;
}

.comment img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #ddd;
}

.comment p {
  background: #f7f7f7;
  padding: 12px 16px;
  border-radius: 10px;
  max-width: 520px;
  font-size: 15px;
  line-height: 1.6;
  color: #333;
}

