/* ==================================================
   MHDPlus - Main Stylesheet (رنگ‌ها از :root در header.php می‌آیند)
   ================================================== */

/* ===== تنظیمات پایه ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--background-color); /* ✅ از تنظیمات */
  color: var(--text-color);             /* ✅ از تنظیمات */
  font-family: 'Vazirmatn', sans-serif;
  line-height: 1.6;
  direction: rtl;
  min-height: 100vh;
  padding-top: 75px;
  overflow-x: hidden;
}

/* ===== هدر اصلی ===== */
.main-header {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--header-bg); /* ✅ از تنظیمات */
  backdrop-filter: blur(12px);
  padding: 0 5%;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  border-bottom: 1px solid var(--border-light);
}

.logo-container {
  display: flex;
  align-items: center;
}

.site-logo {
  height: 40px;
  transition: transform 0.3s ease;
}

.site-logo:hover {
  transform: scale(1.05);
}

.main-nav ul {
  display: flex;
  gap: 1.8rem;
  list-style: none;
}

.main-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s;
  font-size: 1rem;
}

.main-nav a:hover,
.main-nav a.active {
  color: white;
  background: var(--button-bg);
  box-shadow: 0 4px 12px var(--shadow-light);
}

/* ===== دکمه‌های یک‌رنگ — بدون گرادیان ===== */
.btn,
.btn-submit,
.btn-send-ticket,
.logout-btn,
.filters-bar button,
.file-btn,
.upload-btn,
a.btn,
button.btn,
.ticket-item a,
.ticket-item button,
.btn-logout {
    background: var(--button-bg) !important;      /* ✅ رنگ اصلی */
    color: white !important;                     /* ✅ متن سفید */
    border: 2px solid var(--button-border) !important; /* ✅ حاشیه قابل تنظیم */
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover,
.btn-submit:hover,
.logout-btn:hover,
.filters-bar button:hover,
.file-btn:hover,
.upload-btn:hover,
a.btn:hover,
button.btn:hover,
.ticket-item a:hover,
.ticket-item button:hover,
.btn-logout:hover {
    background: var(--button-hover) !important;  /* ✅ hover */
    border-color: var(--button-border) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ===== موبایل ===== */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  .main-nav { display: none; }
  .main-nav.mobile-open {
    display: block;
    width: 100%;
    margin-top: 10px;
    text-align: center;
  }
  .main-nav.mobile-open ul {
    flex-direction: column;
    gap: 0.8rem;
  }
}

/* ===== محتوا ===== */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.page-title {
  font-size: 2rem;
  margin: 1.5rem 0 1.8rem;
  color: var(--title-color); /* ✅ از تنظیمات */
  position: relative;
  padding-bottom: 0.5rem;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 4px;
  background: var(--button-bg);
  border-radius: 2px;
}

/* ===== کادرها — با حاشیه قابل تنظیم ===== */
.card {
  background: var(--card-bg); /* ✅ از تنظیمات */
  backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 2px solid var(--card-border) !important; /* ✅ حاشیه قابل تنظیم */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}

.card h2 {
  color: var(--title-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* ===== فرم‌ها ===== */
.form-group {
  margin-bottom: 1.4rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--text-color);
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--card-border); /* ✅ هماهنگ با کادرها */
  background: rgba(0,0,0,0.25);
  color: var(--text-color);
  font-size: 1rem;
  outline: none;
  transition: border 0.3s, box-shadow 0.3s;
  direction: rtl;
  text-align: right;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--button-bg);
  box-shadow: 0 0 0 3px var(--shadow-light);
}

/* ===== آلرت‌ها ===== */
.alert {
  padding: 0.9rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 500;
}

.alert-success {
  background: var(--shadow-light);
  color: var(--button-bg);
  border: 1px solid var(--card-border);
}

.alert-error {
  background: rgba(200, 50, 50, 0.15);
  color: #ff9999;
  border: 1px solid rgba(200,50,50,0.3);
}

/* ===== اسلایدر ===== */
.hero-slider {
  position: relative;
  width: 100vw;
  height: 40vh;
  max-height: 500px;
  overflow: hidden;
  margin: 0 -5vw 3rem;
  left: 50%;
  margin-left: -50vw;
}

.slide {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.slide.active {
  opacity: 1;
}

.slide-bg {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.slide-overlay {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

.slide-content {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 2rem 5vw;
  color: white;
  z-index: 2;
  text-align: right;
}

@media (min-width: 769px) {
  .slide-content h2 { font-size: 1.76rem; margin-bottom: 0.8rem; color: white; }
  .slide-content p { font-size: 0.96rem; opacity: 0.9; }
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 3;
}

.slider-arrow:hover {
  background: var(--button-bg);
  color: white;
}

.slider-arrow.prev { right: 2rem; }
.slider-arrow.next { left: 2rem; }

.slider-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
  z-index: 3;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
}

.dot.active {
  background: var(--button-bg);
}

/* ===== خدمات ===== */
.services-section {
  padding: 3rem 0;
  background: rgba(0,0,0,0.1);
  margin-bottom: 3rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2.5rem;
  color: var(--title-color);
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 60px;
  height: 4px;
  background: var(--button-bg);
  border-radius: 2px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 2rem;
}

@media (max-width: 768px) {
  .services-grid { grid-template-columns: 1fr; }
}

.service-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s;
  border: 2px solid var(--card-border); /* ✅ حاشیه قابل تنظیم */
}

.service-card:hover {
  transform: translateY(-5px);
}

.icon-box {
  width: 70px;
  height: 70px;
  background: var(--shadow-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--button-bg);
  font-size: 1.8rem;
}

.service-card h3 {
  color: var(--title-color);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.service-card p {
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== فوتر ===== */
.footer-pro {
  background: var(--footer-bg); /* ✅ از تنظیمات */
  padding: 3rem 5%;
  margin-top: 3rem;
  border-top: 1px solid var(--border-light);
  width: 100%;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.footer-col h3 {
  color: white;
  margin: 0;
  font-size: 1.3rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--button-bg);
  border-radius: 2px;
}

.footer-col p {
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
  max-width: 300px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.footer-col a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: var(--button-bg);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.social-links a {
  width: 38px;
  height: 38px;
  background: var(--shadow-light);
  color: var(--button-bg);
  border-radius: 50%;
  transition: all 0.3s;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-links a:hover {
  background: var(--button-bg);
  color: var(--background-color);
  transform: translateY(-3px);
}

.footer-divider {
  height: 1px;
  background: var(--border-light);
  margin: 2rem auto;
  max-width: 1400px;
}

.footer-copyright {
  text-align: center;
  padding-top: 2rem;
  color: var(--text-light);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-light);
  margin: 2rem auto 0;
  max-width: 1400px;
}

/* ===== واکنش‌گرا ===== */
@media (max-width: 900px) {
  .main-nav ul { gap: 1.2rem; }
  .page-title { font-size: 1.7rem; }
}

@media (max-width: 480px) {
  .btn, .btn-submit { padding: 0.8rem; font-size: 0.95rem; }
  .card { padding: 1.5rem; }
}