/* فایل: css/style.css */
/* پایه و فونت */
* {
  font-family: 'Vazirmatn', sans-serif;
  box-sizing: border-box;
}
html, body {
  height: 100%;
  margin: 0;
}
body {
  background-image: url('../images/background.jpg');
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  direction: rtl;
  color: #333;
  display: flex;
  flex-direction: column;
}
header {
  background-color: #A8D5BA;
  padding: 20px;
  text-align: center;
  position: relative;
}
.university-logo {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
  position: absolute;
  left: 32px;
  top: 24px;
  background: #fff;
  box-shadow: 0 2px 8px #0001;
  border: 2px solid #e0e0e0;
  z-index: 10;
  padding: 0;
}

/* Desktop navigation - visible by default */
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  font-size: 1.05rem;
  margin-top: 10px;
}
nav a {
  margin: 0 10px;
  text-decoration: none;
  color: #1b3d2f;
  font-weight: bold;
  transition: color 0.3s, transform 0.2s;
}
nav a:hover {
  color: #2ecc71;
  transform: scale(1.1);
}

/* Hamburger menu button - hidden on desktop */
.hamburger-menu {
  display: none;
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1000;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.hamburger-menu:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hamburger-dot {
  width: 6px;
  height: 6px;
  background-color: #1b3d2f;
  border-radius: 50%;
}

/* Dropdown menu - hidden on desktop */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 32px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 999;
  border: 1px solid #e0e0e0;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 12px 20px;
  text-decoration: none;
  color: #1b3d2f;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
  border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu a:last-child {
  border-bottom: none;
  border-radius: 0 0 12px 12px;
}

.dropdown-menu a:first-child {
  border-radius: 12px 12px 0 0;
}

.dropdown-menu a:hover {
  background-color: #f8f9fa;
  color: #2ecc71;
}
main {
  flex: 1;
  padding: 40px 20px;
  text-align: center;
}
footer {
  background: linear-gradient(90deg, #A8D5BA, #2f5743);
  text-align: center;
  padding: 10px;
  position: relative;
  bottom: 0;
  width: 100%;
}
.container,
.gallery-container-main,
.professors-container-main {
  background: rgba(255,255,255,0.96);
  border-radius: 18px;
  box-shadow: 0 4px 24px #0001;
  padding: 1.5rem 1.5rem 2.5rem 1.5rem;
  margin: 2rem auto;
  max-width: 1300px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: auto;
}
.logo, .university-logo, .poster img, .gallery-img, .professor-img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
.logo {
  display: block;
  margin: 0 auto 20px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 2px 8px #0001;
  transition: transform 0.3s;
}
.logo:hover {
  transform: scale(1.1);
}
.section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: bold;
  margin: 2rem 0 1.5rem 0;
  color: #236d3c;
  letter-spacing: 1px;
  word-break: break-word;
}
.about-box {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px #0001;
  padding: 2.2rem 2rem 1.5rem 2rem;
  max-width: 800px;
  margin: 2rem auto 0 auto;
  text-align: justify;
  border: 1.5px solid #e0f2e9;
}
#main2 h2 {
  color: #2f5743;
  margin-bottom: 20px;
}
#main2 p {
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto 20px auto;
  text-align: justify;
}
.gallery-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
}
.gallery-img {
  width: 250px;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.gallery-img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.posters {
  margin: 2rem 0;
  background: #f9f9f9;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px #0001;
}
.posters h3 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #2d6a4f;
}
.posters-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}
.poster {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px #0002;
  padding: 1.5rem 1rem;
  width: 340px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.2s;
}
.poster img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.2rem;
}
.poster p {
  font-size: 1.08rem;
  color: #222;
  margin-top: 0.5rem;
  line-height: 2.1;
  flex: 1;
  text-align: justify;
}
.articles-container {
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin-top: 30px;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}
.article {
  background: white;
  border: 1px solid #ddd;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s;
  width: 400px;
  text-align: center;
}
.article:hover {
  background-color: #e3f2fd;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: scale(1.05);
}
.article h3 {
  margin: 0;
  font-size: 1.5em;
  color: #2c3e50;
}
.article h4 {
  font-size: 20px;
  color: #2c3e50;
  margin-bottom: 10px;
}
.article p {
  font-size: 16px;
  color: #34495e;
  line-height: 1.6;
}
.date {
  color: #7f8c8d;
  font-size: 0.9em;
  margin-top: 10px;
}
.summary {
  margin-top: 10px;
  color: #34495e;
  font-size: 1em;
}
.read-more {
  margin-top: 15px;
  color: #2ecc71;
  text-decoration: none;
  font-weight: bold;
}
.read-more:hover {
  text-decoration: underline;
}
.professor-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
}
.professor {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s, box-shadow 0.3s;
  width: 400px;
  text-align: center;
}
.professor:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.professor-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin-bottom: 15px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s;
}
.professor-img:hover {
  transform: scale(1.1);
}
ul {
  list-style-type: none;
  padding: 0;
}
ul li {
  margin-top: 10px;
}
ul li a {
  color: #2ecc71;
  text-decoration: none;
  font-weight: bold;
}
ul li a:hover {
  text-decoration: underline;
}
.scholar {
  text-align: center;
}
.scholar .googlescholar {
  text-decoration-line: none;
  color: #2ecc71;
}
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}
.pagination a {
  color: #2c3e50;
  background: #f0f9f4;
  padding: 10px 15px;
  margin: 5px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: background 0.3s, transform 0.2s;
}
.pagination a:hover {
  background: #A8D5BA;
  transform: scale(1.1);
}
.jozve {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.2rem auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px #0001;
  padding: 1.2rem 2.5rem;
  max-width: 340px;
  font-size: 1.15rem;
  transition: box-shadow 0.2s;
}
.jozve a {
  color: #236d3c;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
}
.jozve a:hover {
  color: #1b5e20;
  text-decoration: underline;
}
.contact-card {
  max-width: 500px;
  margin: 2.5rem auto 2rem auto;
  background: #f8fff8;
  border-radius: 18px;
  box-shadow: 0 4px 24px #0001;
  padding: 2.2rem 2rem 1.5rem 2rem;
  text-align: right;
  border: 1.5px solid #e0f2e9;
}
.contact-card h3 {
  text-align: center;
  color: #236d3c;
  font-size: 1.5rem;
  margin-bottom: 1.7rem;
  letter-spacing: 1px;
}
.contact-list p {
  margin: 1.1rem 0;
  font-size: 1.08rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.contact-icon {
  color: #2d6a4f;
  font-size: 1.3rem;
  margin-left: 0.7rem;
  display: inline-flex;
  align-items: center;
}
.contact-list a {
  color: #219150;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
}
.contact-list a:hover {
  color: #1b5e20;
  text-decoration: underline;
}
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0,0,0,0.85);
}
.modal-content {
  margin: auto;
  display: block;
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 4px 32px #0008;
}
.close {
  position: absolute;
  top: 30px;
  left: 40px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1100;
}
#caption {
  margin: 20px auto 0 auto;
  text-align: center;
  color: #fff;
  font-size: 1.2rem;
}
@media (max-width: 600px) {
  .about-box {
    li {
    display: block; /* Ensures each list item takes its own line */
    width: 100%; /* Optional: ensures it takes full available width */
    }
  }
  
  /* Mobile header adjustments */
  header {
    height: 80px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .university-logo {
    width: 56px;
    height: 56px;
    left: 16px;
    top: 12px;
  }
  
  /* Hide desktop navigation on mobile */
  nav {
    display: none !important;
  }
  
  /* Show hamburger menu on mobile */
  .hamburger-menu {
    display: block !important;
    right: 16px;
  }
  
  /* Show dropdown menu on mobile */
  .dropdown-menu {
    display: block !important;
    right: 16px;
    min-width: 180px;
    max-width: calc(100vw - 32px);
  }
  
  /* Ensure dropdown shows properly when toggled on mobile */
  .dropdown-menu.show {
    display: block !important;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
    .logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
  }
  header h1 {
    font-size: 1.2rem;
    margin: 0 0 12px 0; /* فاصله پایین کمتر شد */
    width: 100%;
    text-align: center;
    padding-right: 8px;
    padding-left: 8px;
    word-break: break-word;
    position: relative;
    top: 75px; /* عنوان کمی بالاتر */
  }
  .contact-card {
    max-width: 98vw;
    padding: 1.2rem 0.7rem 1rem 0.7rem;
    border-radius: 10px;
    margin: 1.2rem auto 1rem auto;
    font-size: 1rem;
  }
  .contact-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  .contact-list p {
    font-size: 0.98rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
  .contact-icon {
    font-size: 1.1rem;
    margin-left: 0.3rem;
  }
    .members-slider {
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
    width: 100%;
  }
  
  .member-card {
    min-width: 280px;
    max-width: 320px;
    width: 90%;
    padding: 1rem 1.5rem;
    margin: 0 auto;
    box-sizing: border-box;
  }
  
  .member-img {
    height: 120px;
    width: 100%;
    margin-bottom: 0.8rem;
    object-fit: contain;
  }
  
  .member-card h3 {
    font-size: 1rem;
    margin: 0.3rem 0 0.5rem 0;
  }
  
  .member-date {
    font-size: 0.85rem;
  }
  
  .slider-btn {
    display: none;
  }
  
  .members-section {
    margin-bottom: 2rem;
  }
  
  .members-section h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }
}
.members-slider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0;
}
.slider-btn {
  background: #A8D5BA;
  border: none;
  color: #236d3c;
  font-size: 2.2rem;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  box-shadow: 0 2px 8px #0001;
}
.slider-btn:hover {
  background: #236d3c;
  color: #fff;
}
.member-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px #0001;
  padding: 3rem 4rem;
  text-align: center;
  width: 100%;
  margin: 0 auto;
  transition: box-shadow 0.2s;
}
.member-img {
  width: 100%;
  height: 240px;
  border-radius: 8px;
  object-fit: contain;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px #0002;
}
.member-card h3 {
  margin: 0.5rem 0 0.7rem 0;
  color: #236d3c;
  font-size: 1.3rem;
}
.member-date {
  color: #7f8c8d;
  font-size: 1rem;
}
.university-img {
  padding: 80px;
}