@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

:root {
  --blue: #0d47a1;
  --blue-dark: #062d6b;
  --gold: #ffcc33;
  --gold-hover: #ffd85f;
  --light: #f8fafc;
  --text: #1e293b;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
  position: relative;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: var(--light);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

/* منوی ناوبری بالایی */
nav {
  position: sticky;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  flex-wrap: wrap;
}
nav a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 6px 8px;
  border-radius: 6px;
  transition: 0.2s;
}
nav a:hover {
  background: #eff6ff;
  color: #d97706;
}

.nav-auth-group {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.dropdown { position: relative; display: inline-block; }
.dropdown-btn {
  background: #2563eb;
  color: #fff !important;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}
.dropdown-btn:hover { background: #1d4ed8; }
.dropdown-content {
  display: none;
  position: absolute;
  top: 105%;
  right: 0;
  background: #ffffff;
  min-width: 200px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  border-radius: 8px;
  overflow: hidden;
  z-index: 1100;
  border: 1px solid #e2e8f0;
}
.dropdown-content a {
  color: #1e293b;
  padding: 10px 14px;
  text-decoration: none;
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid #f1f5f9;
}
.dropdown-content a:hover {
  background: #eff6ff;
  color: var(--blue);
}
.dropdown:hover .dropdown-content, .dropdown:focus-within .dropdown-content {
  display: block;
}

.login-btn {
  background: var(--gold);
  color: var(--blue);
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: 0.2s;
}
.login-btn:hover { background: var(--gold-hover); }

/* هدر و بنر اصلی */
header {
  position: relative;
  width: 100%;
  background: url("media/school-photo-gallery.jpg") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  padding: 40px 16px;
}
header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(13, 71, 161, 0.88);
}

.hero-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 25px;
  flex-wrap: wrap;
}
.hero-content {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 10px 0;
}
.hero-content img {
  width: 90px;
  height: auto;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.7));
}
.hero-content h1 {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 8px;
}
.hero-content p {
  color: var(--gold);
  font-size: 1.05rem;
  font-weight: 500;
}

.hero-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  background: var(--gold);
  color: var(--blue);
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
  font-size: 0.88rem;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.btn:hover { background: var(--gold-hover); transform: translateY(-1px); }
.staff-btn { background: #00bcd4; color: #fff; }
.install-pwa-btn { background: #10b981; color: #fff; }
.install-pwa-btn:hover { background: #059669; }

/* کادر ثبت نظر و امتیاز در هدر */
.mini-feedback-box {
  flex: 1 1 340px;
  max-width: 440px;
  width: 100%;
  background: rgba(13, 71, 161, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.mini-feedback-box h3 {
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.score-badge {
  font-size: 0.8rem;
  background: rgba(255,255,255,0.2);
  padding: 3px 9px;
  border-radius: 12px;
  font-weight: 600;
  color: #fff;
}
.mini-feedback-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.form-inputs-row {
  display: flex;
  gap: 8px;
}
.mini-feedback-form input,
.mini-feedback-form select,
.mini-feedback-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.4);
  background: #ffffff;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  color: #0f172a;
}
.mini-feedback-form textarea {
  height: 70px;
  resize: none;
  line-height: 1.5;
}

.rating-picker-wrapper {
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.4);
}
.star-rating {
  direction: rtl;
  display: inline-flex;
  gap: 4px;
  font-size: 1.5rem;
  cursor: pointer;
  user-select: none;
}
.star-rating span {
  color: #f59e0b;
  transition: transform 0.15s;
}
.star-rating span:hover { transform: scale(1.15); }

.form-buttons-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}
.mini-submit-btn {
  flex: 1.3;
  background: var(--gold);
  color: var(--blue);
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  transition: 0.2s;
}
.mini-submit-btn:hover { background: var(--gold-hover); }

.view-reviews-btn {
  flex: 1;
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
  text-align: center;
  font-family: inherit;
}
.view-reviews-btn:hover { background: #ffffff; color: var(--blue); }

/* بخش‌های محتوایی */
section {
  width: 100%;
  max-width: 1080px;
  margin: 40px auto;
  padding: 0 16px;
}
.section-title {
  color: var(--blue);
  border-right: 5px solid var(--gold);
  padding-right: 12px;
  margin-bottom: 20px;
  font-size: 1.3rem;
  font-weight: 700;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  text-align: center;
}
.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  border: 1px solid #eef2f6;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.card h3 { color: var(--blue); margin-bottom: 8px; font-size: 1.1rem; }
.card p { font-size: 0.9rem; color: #475569; line-height: 1.7; margin-bottom: 10px; }
.card-icon { font-size: 2.2rem; margin-bottom: 8px; display: block; }

/* استایل ویژه و شیک برای کارت اتاق مشاور */
.card.counselor-card,
.counselor-card {
  background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%) !important;
  color: #ffffff !important;
  border: 2px solid var(--gold) !important;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(13, 71, 161, 0.25) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card.counselor-card:hover,
.counselor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(13, 71, 161, 0.35) !important;
}
.card.counselor-card h3,
.counselor-card h3 {
  color: var(--gold) !important;
  font-size: 1.2rem !important;
  font-weight: 800 !important;
}
.card.counselor-card p,
.counselor-card p {
  color: #e2e8f0 !important;
  font-size: 0.92rem !important;
}
.counselor-btn {
  background: var(--gold) !important;
  color: var(--blue-dark) !important;
  font-weight: 800 !important;
  font-size: 0.9rem !important;
  padding: 10px 18px !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}
.counselor-btn:hover {
  background: var(--gold-hover) !important;
  transform: scale(1.03);
}

/* استایل ویژه و شیک برای کارت اتاق پرورشی */
.card.cultural-card,
.cultural-card {
  background: linear-gradient(135deg, #065f46 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: 2px solid var(--gold) !important;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(5, 150, 105, 0.25) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card.cultural-card:hover,
.cultural-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(5, 150, 105, 0.35) !important;
}
.card.cultural-card h3,
.cultural-card h3 {
  color: var(--gold) !important;
  font-size: 1.2rem !important;
  font-weight: 800 !important;
}
.card.cultural-card p,
.cultural-card p {
  color: #e2e8f0 !important;
  font-size: 0.92rem !important;
}
.cultural-btn {
  background: var(--gold) !important;
  color: #064e3b !important;
  font-weight: 800 !important;
  font-size: 0.9rem !important;
  padding: 10px 18px !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}
.cultural-btn:hover {
  background: var(--gold-hover) !important;
  transform: scale(1.03);
}

/* استایل ویژه، براق و پرانرژی کارت پیش‌دبستانی (مشابه کامل مشاور و پرورشی) */
.card.preschool-card,
.preschool-card {
  background: linear-gradient(135deg, #e11d48 0%, #f97316 100%) !important;
  color: #ffffff !important;
  border: 2px solid var(--gold) !important;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(249, 115, 22, 0.35) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card.preschool-card:hover,
.preschool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.5) !important;
}
.card.preschool-card h3,
.preschool-card h3 {
  color: var(--gold) !important;
  font-size: 1.2rem !important;
  font-weight: 800 !important;
}
.card.preschool-card p,
.preschool-card p {
  color: #fff1f2 !important;
  font-size: 0.92rem !important;
}
.preschool-btn {
  background: var(--gold) !important;
  color: #881337 !important;
  font-weight: 800 !important;
  font-size: 0.9rem !important;
  padding: 10px 18px !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}
.preschool-btn:hover {
  background: var(--gold-hover) !important;
  transform: scale(1.03);
}

/* گالری شناور با حرکت افقی نرم */
.floating-gallery-wrapper {
  width: 100%;
  overflow: hidden;
  padding: 15px 0;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.floating-gallery-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: floatHorizontal 25s linear infinite;
}

.floating-gallery-wrapper:hover .floating-gallery-track {
  animation-play-state: paused;
}

.floating-card {
  flex: 0 0 280px;
  height: 200px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border: 2px solid #ffffff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.floating-card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 12px 25px rgba(13, 71, 161, 0.2);
}

.floating-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

@keyframes floatHorizontal {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(50%);
  }
}

/* دکمه شناور فعال‌سازی اعلان‌ها */
.push-notify-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #0d47a1;
  color: #ffcc33;
  border: 2px solid #ffcc33;
  border-radius: 50px;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  z-index: 999;
  transition: transform 0.2s, background 0.2s;
  font-family: inherit;
}
.push-notify-btn:hover {
  background: #062d6b;
  transform: translateY(-2px);
}

/* فوتر */
footer {
  width: 100%;
  text-align: center;
  padding: 30px 16px;
  margin-top: 50px;
  background: var(--blue-dark);
  color: white;
  font-size: 0.9rem;
}
.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.footer-map-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
}
.footer-map-btn:hover { background: var(--gold); color: var(--blue); }

.footer-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}
.footer-badges a, .footer-badges img {
  max-width: 90px;
  height: auto;
  background: #ffffff;
  border-radius: 8px;
  padding: 6px;
}

/* پنجره‌های مودال */
.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
  padding: 14px;
}
.video-modal-content {
  width: 100%;
  max-width: 650px;
  background: #0f172a;
  padding: 20px;
  border-radius: 14px;
  position: relative;
  border: 1px solid #334155;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.6);
  max-height: 90vh;
  overflow-y: auto;
}
.close-btn {
  position: absolute;
  top: 10px;
  left: 12px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 10;
}
.staff-player { width: 100%; max-height: 380px; border-radius: 10px; background: #000; }
.staff-tab-btn {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--gold);
  cursor: pointer;
  font-family: inherit;
}

.reviews-scrollable-container {
  max-height: 440px;
  overflow-y: auto;
  padding-left: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.review-card-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px;
  text-align: right;
  color: #fff;
}
.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 6px;
}
.review-user-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.review-date-badge { font-size: 0.75rem; color: #94a3b8; direction: ltr; font-family: monospace, Tahoma; }

/* قوانین اختصاصی موبایل (زیر ۷۶۸ پیکسل) */
@media screen and (max-width: 768px) {
  body {
    font-size: 16px;
  }
  nav {
    padding: 8px 6px !important;
    gap: 6px !important;
    justify-content: center !important;
  }
  nav a {
    font-size: 0.78rem !important;
    padding: 4px 6px !important;
  }
  .dropdown-btn {
    font-size: 0.78rem !important;
    padding: 5px 8px !important;
  }
  .login-btn {
    font-size: 0.75rem !important;
    padding: 5px 7px !important;
  }
  .nav-auth-group {
    width: 100% !important;
    margin-top: 4px !important;
    gap: 4px !important;
  }

  header {
    padding: 25px 12px !important;
  }
  .hero-container {
    flex-direction: column !important;
    gap: 18px !important;
  }
  .hero-content {
    flex: 1 1 100% !important;
    padding: 0 !important;
  }
  .hero-content h1 {
    font-size: 1.45rem !important;
  }
  .hero-content p {
    font-size: 0.9rem !important;
  }
  .hero-content img {
    width: 75px !important;
  }
  .hero-buttons {
    margin-top: 14px !important;
    gap: 6px !important;
    width: 100% !important;
  }
  .btn {
    font-size: 0.8rem !important;
    padding: 8px 12px !important;
  }

  .mini-feedback-box {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 14px 12px !important;
    border-radius: 12px !important;
  }
  .form-inputs-row {
    flex-direction: column !important;
    gap: 8px !important;
  }
  
  .mini-feedback-form input,
  .mini-feedback-form select,
  .mini-feedback-form textarea {
    font-size: 16px !important;
    padding: 10px !important;
    border-radius: 7px !important;
  }
  .mini-feedback-form textarea {
    height: 65px !important;
  }

  .star-rating {
    font-size: 1.6rem !important;
    gap: 4px !important;
  }
  .mini-submit-btn,
  .view-reviews-btn {
    padding: 10px 8px !important;
    font-size: 0.82rem !important;
  }

  section {
    margin: 25px auto !important;
    padding: 0 12px !important;
  }
  .section-title {
    font-size: 1.15rem !important;
    margin-bottom: 14px !important;
  }
  .features {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .floating-card {
    flex: 0 0 220px !important;
    height: 160px !important;
  }
  .floating-gallery-track {
    animation-duration: 20s !important;
  }

  .video-modal {
    padding: 10px !important;
  }
  .video-modal-content {
    padding: 16px 12px !important;
    border-radius: 12px !important;
  }

  .push-notify-btn {
    bottom: 15px !important;
    right: 15px !important;
    padding: 8px 14px !important;
    font-size: 0.78rem !important;
  }
}
