/* style.css — نسخه تمیز و یک‌دست */

:root {
  --primary: #39a0ed;
  --bg-dark: #0f172a;
  --bg-card: #1f2a49;
  --text-main: #e0e6f2;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Vazirmatn', sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.7;
}

/* ===== Header ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-dark);
  border-bottom: 2px solid #213666;
}

.nav-container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand__img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.brand__name {
  color: var(--primary);
  font-weight: 600;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav ul a {
  color: var(--primary);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  color: var(--primary);
}

/* ===== Slider ===== */
.slider {
  width: 90%;
  max-width: 1200px;
  height: 300px;
  margin: 40px auto;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide .text {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(0,0,0,0.4);
  padding: 10px 16px;
  border-radius: 8px;
}

/* ===== Content ===== */
main {
  margin-bottom: 80px;
}

.container {
  width: 80%;
  max-width: 1000px;
  margin: 60px auto;
  background: #020617;
  padding: 30px;
  border-radius: 14px;
}

.container h1 {
  margin-bottom: 10px;
}

.container p {
  opacity: 0.85;
  font-size: 0.9rem;
}

/* ===== Cards ===== */
.card-row {
  width: 90%;
  max-width: 1200px;
  margin: 60px auto;
  display: flex;
  gap: 20px;
  justify-content: center;
}

.card {
  width: 300px;
  background: var(--bg-card);
  padding: 20px;
  border-radius: 14px;
  text-align: center;
  color: var(--text-main);
  text-decoration: none;
  transition: transform .3s, background .3s;
}

.card:hover {
  transform: translateY(-6px);
  background: #25366b;
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 20px 0;
  border-top: 2px solid #213666;
}

footer a {
  color: var(--primary);
  text-decoration: none;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {

  .menu-toggle { display: block; }

  nav { display: none; width: 100%; }
  nav.active { display: block; }

  nav ul {
    flex-direction: column;
    background: #1a2238;
    padding: 15px;
    margin-top: 10px;
    border-radius: 12px;
  }

  .slider { height: 180px; }

  .card-row {
    flex-direction: column;
    align-items: center;
  }

  .card { width: 90%; }

  .container { width: 90%; }
}
body {
  direction: rtl;
  text-align: center;
}
img {
  display: block;
  margin: 20px auto;
}
.container {
  text-align: center;
  direction: rtl;
}
.container img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 15px auto;
  border-radius: 12px;
}
footer {
  text-align: center;
  padding: 25px 0;       /* کمی بلندتر */
  border-top: 2px solid #111;  /* خط بالای تیره */
  background-color: #0b0c12;   /* پس‌زمینه تیره‌تر */
  color: #e0e6f2;             /* متن روشن بمونه */
}

footer a {
  color: var(--primary);
  text-decoration: none;
}
body {
  background: linear-gradient(270deg, #001d35, #003249);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
button:hover {
  transform: scale(1.1);
  background-color: #001f33;
  transition: 0.3s;
}
section {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}
#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 100;
  font-size: 24px;
  border: none;
  outline: none;
  background-color: #000;
  color: #00b7ff;
  cursor: pointer;
  padding: 10px 15px;
  border-radius: 50%;
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.3s;
}

#scrollTopBtn:hover {
  opacity: 1;
  transform: scale(1.2);
}
