/* ====== style.css – HITmed Website ====== */

/* --- بارگذاری فونت وزیرمتن --- */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700;900&display=swap');

/* --- متغیرهای رنگ و اندازه --- */
:root {
  --primary: #0D3B66;
  --primary-dark: #07223D;
  --accent: #F4A261;
  --accent-light: #F9CDAD;
  --medical-green: #2A9D8F;
  --medical-green-light: #D8F3E6;
  --white: #FFFFFF;
  --off-white: #F8F9FA;
  --gray-light: #E9ECEF;
  --gray: #6C757D;
  --dark: #1A1A2E;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1.2);
}

/* --- ریست و پایه --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Vazirmatn', sans-serif;
  color: #333;
  background-color: var(--white);
  line-height: 1.8;
  overflow-x: hidden;
  direction: rtl;
}

/* --- کلاس‌های کمکی --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

/* --- هدر و ناوبری --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: background 0.3s;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo img {
  height: 48px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  text-decoration: none;
  font-weight: 500;
  color: var(--dark);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: var(--transition);
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  background-color: rgba(13,59,102,0.06);
}

/* --- منوی کشویی --- */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  min-width: 240px;
  padding: 0.75rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s ease;
  z-index: 999;
  border: 1px solid var(--gray-light);
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 0.6rem 1.5rem;
  font-weight: 400;
  color: var(--dark);
  border-radius: 0;
  background: none !important;
}

.dropdown-menu a:hover {
  background-color: var(--off-white);
  color: var(--primary);
}

/* --- دکمه همبرگری موبایل --- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 3px;
  background: var(--dark);
  border-radius: 3px;
  transition: var(--transition);
}

/* --- بخش Hero --- */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(13,59,102,0.88) 0%, rgba(42,157,143,0.8) 100%),
              url('../images/hero-bg.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  color: var(--white);
  text-align: center;
  position: relative;
  margin-top: 0;
}

.hero .container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding-top: 4rem;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.3;
  text-shadow: 0 4px 12px rgba(0,0,0,0.3);
  max-width: 700px;
}

.hero p {
  font-size: 1.3rem;
  font-weight: 300;
  max-width: 650px;
  line-height: 2;
  text-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.hero .btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--dark);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: #e68a3e;
  border-color: #e68a3e;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(244,162,97,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255,255,255,0.3);
}

/* --- عنوان بخش‌ها --- */
.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--gray);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* --- کارت‌ها (خدمات، پروژه‌ها) --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--gray-light);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.card-icon {
  font-size: 2.5rem;
  background: var(--off-white);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
}

.card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

.card p {
  color: var(--gray);
  line-height: 1.9;
  font-weight: 400;
}

.card .features {
  list-style: none;
  width: 100%;
  margin-top: 0.5rem;
}

.card .features li {
  padding: 0.3rem 0;
  font-size: 0.9rem;
  color: #555;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card .features li::before {
  content: "✓";
  color: var(--medical-green);
  font-weight: bold;
  margin-left: 0.3rem;
}

/* --- بخش چرا HITmed --- */
.why-hitmed {
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  margin-top: 3rem;
  text-align: center;
}

.why-hitmed p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
  color: #444;
}

/* --- پروژه‌ها و محصولات --- */
.project-card {
  background: var(--white);
  border-right: 6px solid var(--medical-green);
  border-radius: var(--radius-sm);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.project-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(-4px);
}

.project-card h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

/* --- تیم --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
  text-align: center;
}

.team-member img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-light);
  box-shadow: var(--shadow-md);
  margin-bottom: 1rem;
  transition: var(--transition);
}

.team-member:hover img {
  transform: scale(1.05);
  border-color: var(--accent);
}

.team-member h4 {
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.2rem;
}

.team-member span {
  font-size: 0.9rem;
  color: var(--gray);
  display: block;
}

/* --- فرم‌ها --- */
.contact-form,
.consultation-form {
  max-width: 650px;
  margin: 2rem auto;
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--dark);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--gray-light);
  border-radius: 10px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.3s;
  background: var(--off-white);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,59,102,0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.radio-group label {
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
}

.form-submit {
  text-align: center;
}

/* --- فوتر --- */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer h4 {
  color: var(--white);
  margin-bottom: 1rem;
  font-weight: 700;
}

.footer a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  transition: 0.2s;
}

.footer a:hover {
  color: var(--accent);
}

.footer .address p {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
}

/* --- انیمیشن‌های اسکرول --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- تنظیمات ریسپانسیو --- */
@media (max-width: 992px) {
  html { font-size: 15px; }

  .hero h1 {
    font-size: 2.8rem;
  }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 80px;
    right: 0;
    width: 280px;
    height: calc(100vh - 80px);
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 2rem;
    box-shadow: -8px 0 24px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
  }

  .nav.nav-open {
    transform: translateX(0);
  }

  .nav .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0.25rem 1rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    display: none;
  }

  .nav .dropdown:hover .dropdown-menu,
  .nav .dropdown.active .dropdown-menu {
    display: block;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    min-height: 90vh;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }
}