* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Vazir', sans-serif;
  overflow-x: hidden;
}

.background {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: -2;
  transition: opacity 1s ease-in-out;
}

.bg1 {
  z-index: -2;
  opacity: 1;
}

.bg2 {
  z-index: -1;
  opacity: 0;
}

.overlay {
  background-color: rgba(0, 0, 0, 0.6);
  min-height: 100vh;
  width: 100%;
  padding: 60px 20px;
  color: white;
  text-align: center;
}

.content {
  max-width: 800px;
  margin: auto;
  transition: all 0.5s ease;
}

.content.moved {
  margin-top: -40px;
  margin-bottom: 30px;
}

h1 {
  font-size: 3em;
  color: red;
  font-weight: bold;
  margin-bottom: 10px;
  cursor: pointer;
  font-family: 'Vazir', sans-serif;
  transition: color 0.3s ease;
}

h1:hover {
  color: #ff9999;
}

.subtitle-wrapper {
  line-height: 1.4; /* Adjust for tighter spacing */
  margin-bottom: 20px; /* Optional: controls spacing below */
}

.subtitle {
  margin: 0; /* Remove default margin for tighter stacking */
  font-size: 1.5em;
  color: white;
}
.button-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
}

.button-group button {
  background-color: red;
  border: none;
  padding: 12px 25px;
  color: white;
  font-size: 1em;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-family: 'Vazir', sans-serif;
  transition: background-color 0.3s;
}

.button-group button:hover {
  background-color: darkred;
}

.section {
  display: none;
  background-color: rgba(0, 0, 0, 0.7);
  margin: 40px auto;
  max-width: 800px;
  padding: 20px;
  text-align: right;
  border-radius: 10px;
  line-height: 2;
  font-size: 1em;
}

.section a {
  color: #ffcccb;
  text-decoration: underline;
  font-weight: bold;
}

/* Grid layout for publications */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  justify-items: center;
}

.pub-card {
  background-color: rgba(255, 255, 255, 0.15);
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  transition: transform 0.3s;
  cursor: pointer;
}

.pub-card:hover {
  transform: scale(1.05);
}

.pub-card img {
  width: 100%;
  max-width: 160px;
  border-radius: 8px;
}

.pub-card p {
  margin-top: 10px;
  color: white;
  font-weight: bold;
  font-family: 'Vazir', sans-serif;
}

/* Contact section */
.contact-info-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  font-size: 1em;
  color: white;
}

.contact-info-list strong {
  color: #ffcccc;
  margin-left: 5px;
}

.contact-info {
  color: #eee;
}

.form-description {
  margin: 30px auto 10px;
  color: #ddd;
  font-weight: normal;
  line-height: 2;
  font-size: 1em;
}

/* Form container */
.form-aligned {
  max-width: 800px;
  margin: 0 auto;
}

/* Input styles (unified) */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 30px;
  font-family: 'Vazir', sans-serif;
}

.contact-form label {
  color: #fff;
  font-weight: bold;
}

.contact-form input,
.contact-form textarea {
  padding: 10px;
  border-radius: 6px;
  border: none;
  font-family: 'Vazir', sans-serif;
  font-size: 1em;
  background-color: rgba(255, 255, 255, 0.15);
  color: #ff3333;
  font-weight: bold;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid #ff3333;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #eee;
}

.contact-form button {
  background-color: red;
  color: white;
  padding: 12px;
  border: none;
  font-size: 1em;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  font-family: 'Vazir', sans-serif;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: darkred;
}

/* Thank-you message */
.thank-you-message {
  color: #b8ffb3;
  font-size: 1.6em;
  font-weight: bold;
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  border-radius: 10px;
  background-color: rgba(0, 128, 0, 0.2);
  font-family: 'Vazir', sans-serif;
  line-height: 2;
}

#form-success {
  justify-content: center;
  align-items: center;
  display: none;
}

/* Layout rows */
.inline-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 20px;
}

.inline-pair > div {
  flex: 1 1 48%;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Radio buttons */
.radio-group {
  display: flex;
  flex-direction: row;
  gap: 15px;
  margin-top: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.radio-group label {
  color: white;
}







.about-content {
  line-height: 2;
  color: white;
  font-size: 1em;
}

.about-title {
  color: red;
  font-size: 1.8em;
  margin-bottom: 20px;
  font-weight: bold;
}

.about-list {
  margin-top: 20px;
  margin-bottom: 30px;
  padding-right: 20px;
  list-style: none;
}

.about-list li {
  margin-bottom: 10px;
  position: relative;
  padding-right: 20px;
  text-align: right;
}

.about-list li::before {
  content: "●";
  position: absolute;
  right: 0;
  color: #ff3333;
  font-size: 1.1em;  /* 👈 increase this value */
  top: 4px;
}


.form-cta {
  margin-top: 30px;
  font-weight: bold;
  color: #ffcccb;
  text-align: center;
}

.cta-button {
  display: inline-block;
  background-color: rgba(255, 51, 51, 0.1);  /* light transparent red */
  color: #ff3333;
  border: 1px solid #ff3333;
  padding: 5px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background-color: rgba(255, 51, 51, 0.25);
  color: #fff;
}

a {
  text-decoration: none !important;
}





.pub-card {
  cursor: pointer;
  transition: box-shadow 0.3s ease;
  position: relative; /* Required for image layering */
  z-index: 0;
}

.pub-card img {
  width: 100%;
  max-width: 160px;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.pub-card.active-pub {
  z-index: 2;
}

.pub-card.active-pub img {
  transform: scale(1.3); /* Increased for clarity */
}

.popup-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.85); /* 👈 dark overlay */
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}


.popup-content {
  position: relative;
  background-color: transparent; /* 👈 was dark gray */
  padding: 0;                    /* remove internal padding */
  border-radius: 0;
  max-width: 90%;
  max-height: 90vh;
  text-align: center;
  box-shadow: none;             /* 👈 remove red glow */
  overflow-y: auto;
}


.popup-content img {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 8px;
  margin-bottom: 20px;
}

.popup-close {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 28px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
}

.popup-download a {
  display: inline-block;
  background-color: rgba(255, 51, 51, 0.1);
  color: #ff3333;
  border: 1px solid #ff3333;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2em;
  transition: background-color 0.3s ease;
}

.popup-download a:hover {
  background-color: rgba(255, 51, 51, 0.25);
  color: white;
}

.popup-content::-webkit-scrollbar {
  width: 8px;
}

.popup-content::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.popup-img-wrapper {
  position: relative;
  display: inline-block;
  margin-top: 40px; /* Give room for close button above image */
}

.popup-img-wrapper img {
  display: block;
  max-width: 100%;
  max-height: 60vh;
  border-radius: 8px;
}

.popup-close {
  position: absolute;
  top: -30px;
  left: 0;
  font-size: 24px;
  font-weight: bold;
  color: white;
  background-color: transparent;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  z-index: 10000; /* <- ADD THIS */
}

.pub-card p {
  font-family: 'Vazir', sans-serif;
  font-feature-settings: "ss02";
  unicode-bidi: isolate;
  direction: rtl;
}




.guidelines-columns {
  display: flex;
  flex-direction: row-reverse; /* Keep RTL layout: image on left, links on right */
  gap: 30px;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 30px;
  flex-wrap: wrap;
}

.guidelines-image {
  flex: 0.5;
  min-width: 200px;
  margin-left: 50px; /* 👈 This moves the image toward the center */
}

.guidelines-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.guidelines-links {
  flex: 1;  /* keep links column the same */
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 300px;
}

/* 📱 Responsive stacking on small screens */
@media (max-width: 768px) {
  .guidelines-columns {
    flex-direction: column;
    align-items: center;
  }

  .guidelines-links {
    align-items: center;
    max-width: none;
    width: 100%;
  }

  .guidelines-image {
    width: 100%;
  }

  .guidelines-links .cta-button {
    width: 90%;
    text-align: center;
  }
}

.download-icon {
  margin-right: 6px;
  font-size: 1.6em;
  vertical-align: middle;
}



@media (max-width: 600px) {
  .button-group {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 6px;
  }

  .button-group button {
    font-size: 0.8em;
    padding: 8px 12px;
  }
}


.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px; /* Default space under the logo */
  transition: margin-bottom 0.7s ease; /* Animate the spacing */
}

.logo-container.tight {
  margin-bottom: -80px; /* Closer to the tabs when subtitle is gone */
}

.site-logo {
  max-width: 300px;
  height: auto;
}


#mainContent {
  margin-top: 130px; /* This controls home spacing */
  transition: margin-top 0.7s ease;
}

#mainContent.moved {
  margin-top: 0; /* Once a tab is clicked, content moves up */
}


#subtitle-wrapper {
  opacity: 1;
  transition: opacity 0.7s ease;
}

#subtitle-wrapper.hidden {
  opacity: 0;
  pointer-events: none;
}
