/* ---------------- MOBILE FIXES FOR PUBLICATIONS PAGE ---------------- */
@media screen and (max-width: 768px) {

  /* The main publication container */
  .publication-div {
    width: 95% !important;
    margin: 20px auto !important;
    padding: 20px !important;
    margin-left: 0 !important;
    background-color: #7ea2cf17;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }

  /* Stack image and text vertically */
  .publication-content {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 15px !important;
  }

  /* Resize and center the image */
  .publication-image img {
    width: 80% !important;   /* smaller image */
    height: auto !important;
    margin: 0 auto !important;
    border-radius: 8px;
  }

  /* Text block adjustments */
  .publication-text {
    margin: 0 auto !important;
    width: 90% !important;
    text-align: center !important;
  }

  .publication-text h3 {
    font-size: 1.2em !important;
    margin-bottom: 10px !important;
  }

  .publication-text h4 {
    font-size: 1em !important;
    margin-bottom: 10px !important;
  }

  .publication-text p {
    font-size: 0.95em !important;
    line-height: 1.5 !important;
    text-align: center !important;
  }
}

/* Publications page styles */
.publication-div {
    margin-left: 10%;
    width: 80%;                     /* Set the width of the main div */
    margin-top: 5%;
    color: var(--dark-blue);
    line-height: 1.5;
    display: flex;                  /* Use flexbox for layout */
    flex-direction: column;         /* Stack rows for smaller screens */
    gap: 50px;                      /* Add spacing between rows */
    background-color: #7ea2cf17; /* Light blueish background */
    border-radius: 12px;         /* Rounded corners */
    padding: 30px;               /* Padding inside the block */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* Optional: subtle shadow */
}

.publication-content {
    display: flex;                  /* Use flexbox to align image and text */
    align-items: center;            /* Vertically align items */
    gap: 20px;                      /* Add space between image and text */
}

.publication-image img {
    /* max-width: 150px;               Limit the size of the image */
    width: 500px;                    /* Ensure it scales responsively */
    height: auto;                   /* Maintain aspect ratio */
    border-radius: 8px;
}

.publication-text {
    flex: 1;                        /* Allow text to take up remaining space */
    margin-left: 10px;
    margin-right: 10px;
}

.publication-text h3 {
    margin: 0 0 10px;               /* Add space below the title */
    font-size: 1.5em;
    color: var(--dark-blue);
}

.publication-text p {
    margin: 0;
    font-size: 1em;
    line-height: 1.6;
}


.publication-list {
    /* background-color: #eef4fc; */
    padding: 30px;
    border-radius: 12px;
    margin: 40px auto;
    width: 80%;
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); */
  }
  
  .publication-list h2 {
    color:var(--dark-blue);
    margin-bottom: 20px;
    text-align: center;
  }
  .publication-list h1 {
    color:var(--dark-blue);
    margin-bottom: 20px;
    text-align: center;
  }

  .publication-list h3 {
    color: var(--dark_blue);
    margin-bottom: 50px;
    margin-top: -20px;
    text-align: center;
  }
  
  .publication {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #d3dce6;
  }
  
  .pub-year {
    font-size: 1.5em;
    color: #023367;
    margin-top: 40px;
    margin-bottom: 10px;
    border-bottom: 1px solid #c2d4ea;
    padding-bottom: 5px;
  }
  
  .year-group {
    list-style: none;
    padding-left: 0;
  }
  
  .pub-title {
    margin: 0 0 5px;
    color: var(--dark-blue);
    font-size: 1em;
    line-height: 1.4;
  }
  
  .italic {
    font-style: italic;
  }
  
  .journal {
    font-weight: bold;  }
  
  .publication a {
    text-decoration: none;
    font-size: 0.95em;
  }
  
  .publication a:hover {
    text-decoration: underline;
  }
  
.pub-toggle {
  cursor: pointer;
  font-size: 1.2em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  color: #406187;
}

#master-toggle-icon {
  margin-right: 8px;
  transition: transform 0.3s ease;
}