:root {
  --primary-blue: rgba(37, 99, 235, 0.95);
  --primary-dark: #1e40af;
  --dark-gray: #374151;
  --light-gray: #f8fafc;
  --border-color: #e5e7eb;
  --text-dark: rgba(11, 14, 19, 0.87);
  --hover-blue: #3b82f6;
}

* {
  font-family: 'Vazirmatn', sans-serif;
}

body {
  background-color: var(--light-gray);
  color: var(--text-dark);
  line-height: 1.6;
}

/* Accordion */
.accordion-item .accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.accordion-item.active .accordion-content {
  max-height: 1000px; /* برای محتوای متغیر */
}

/* Line Clamp */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.section-title {
  font-family: 'IRANSans', sans-serif;
}

.animate-fade-in {
  animation: fade-in 0.8s ease-out forwards;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}


/* Header */
.main-header {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.navbar {
  padding: 0.8rem 0;
}

.brand-logo {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary-blue);
  text-decoration: none;
  letter-spacing: -0.5px;
  transition: all 0.3s ease;
}

.brand-logo:hover {
  color: var(--hover-blue);
  transform: translateY(-3px);
}

.navbar-nav .nav-link {
  color: var(--text-dark);
  font-weight: 400;
  padding: 0.5rem 1.9rem;
  margin: 0 0.4rem;
  border-radius: 11px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  background-color: var(--primary-blue);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.navbar-nav .nav-link i {
  font-size: 0.6rem;
}

/* Dropdown */
.dropdown-menu {
  border: none;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}

.dropdown-item {
  padding: 0.7rem 1.5rem;
  color: var(--text-dark);
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.dropdown-item:hover {
  background-color: var(--primary-blue);
  color: white;
}

.dropdown-item i {
  color: var(--primary-blue);
  width: 16px;
  transition: color 0.3s ease;
}

.dropdown-item:hover i {
  color: white;
}

/* Auth Buttons */
.auth-buttons {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.btn-register {
  background-color: var(--primary-blue);
  color: white;
  border: 2px solid var(--primary-blue);
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-register:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-login {
  background-color: white;
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-login:hover {
  background-color: var(--primary-blue);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* User Profile */
.user-profile {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: linear-gradient(135deg, var(--primary-blue), var(--hover-blue));
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 25px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.user-profile i {
  font-size: 1.1rem;
}

.btn-logout {
  background-color: #ef4444;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.btn-logout:hover {
  background-color: #dc2626;
  transform: translateY(-1px);
}

.btn-profile {
  background-color: white;
  color: var(--primary-blue);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.btn-profile:hover {
  background-color: var(--light-gray);
}

/* Toggle */
.navbar-toggler {
  border: none;
  padding: 0.5rem;
  border-radius: 6px;
  background-color: var(--primary-blue);
  color: white;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Main Content */
main {
  min-height: 60vh;
  padding: 2rem 0;
}

/* Footer */
.main-footer {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  color: white;
  padding: 3rem 0 1.5rem 0;
  margin-top: 4rem;
}

.footer-section h5 {
  color: white;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-section h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-blue), var(--hover-blue));
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.7rem;
}

.footer-links a {
  color: #d1d5db;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
}

.footer-links a:hover {
  color: var(--primary-blue);
  transform: translateX(-3px);
}

.footer-links i {
  color: var(--primary-blue);
  width: 16px;
  font-size: 0.9rem;
}

.contact-info p {
  color: #d1d5db;
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.contact-info i {
  color: var(--primary-blue);
  width: 18px;
  font-size: 1rem;
}

.footer-bottom {
  border-top: 1px solid #4b5563;
  padding-top: 1.5rem;
  margin-top: 2rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.9rem;
}

/* Scrollbar */
.majors-scroll-bar {
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-blue) var(--light-gray);
}

.majors-scroll-bar::-webkit-scrollbar {
  height: 6px;
}

.majors-scroll-bar::-webkit-scrollbar-thumb {
  background-color: var(--primary-blue);
  border-radius: 3px;
}

/* Responsive */
@media (max-width: 991.98px) {
  .navbar-nav {
    background-color: white;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .auth-buttons {
    margin-top: 1rem;
    justify-content: center;
  }

  main {
    padding: 1.5rem 0;
  }

  .footer-section {
    margin-bottom: 2rem;
  }

  .footer-section h5::after {
    right: 50%;
    transform: translateX(50%);
  }
}

@media (max-width: 576px) {
  .brand-logo {
    font-size: 1.5rem;
  }

  .auth-buttons {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .btn-register,
  .btn-login {
    width: 100%;
    text-align: center;
  }

  .main-footer {
    padding: 2rem 0 1rem 0;
  }
}

/* Hover Dropdown for Large Screens */
@media (min-width: 992px) {
  .nav-item.dropdown:hover > .dropdown-menu {
    display: block;
    margin-top: 0;
  }
}

/* Others */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

html {
  scroll-behavior: smooth;
}

.nav-link:focus,
.btn-register:focus,
.btn-login:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}
/* Typography */
.section-title {
  font-family: 'IRANSans', sans-serif;
  font-size: 2.5rem;
  color: #003366;
}

.name {
  font-size: 1.125rem;
  font-weight: bold;
  color: #004080;
}

.type, .bio {
  font-size: 0.875rem;
  color: #555;
}

/* Consultant Card */
.consultant-card {
  background-color: #f0f8ff;
  border-radius: 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 50, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.consultant-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 50, 0.2);
}

/* Avatar Image */
.avatar img {
  aspect-ratio: 1;
  object-fit: cover;
}

/* Button */
.btn-view {
  transition: background-color 0.3s ease;
}

/* Animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.8s ease-out forwards;
}
