/* Import Fonts */
@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;700&display=swap');

/* Main Wrapper */
#lgallusz-section {
  margin: 0; padding: 0 0 24px; background: #fbfcfd;
  font-family: 'Open Sans', sans-serif; color: #28323d;
}
#lgallusz-section * { box-sizing: border-box; }

/* Titles & Dividers */
#lgallusz-section .department-title {
  font-family: 'Merriweather', serif; color: #003f7d; font-size: 2.15em;
  text-align: center; margin-top: 76px; margin-bottom: 42px; position: relative;
  font-weight: 700; letter-spacing: 0;
}
#lgallusz-section .department-title::after {
    content: ''; display: block; width: 56px; height: 3px;
    background: #b20933; margin: 16px auto 0; border-radius: 2px;
}
#lgallusz-section .section-divider {
    height: 1px; background: #dfe5ec; width: min(80%, 1040px); margin: 80px auto 72px;
}

/* Grid & Cards */
#lgallusz-section .professors-grid {
  display: flex; flex-wrap: wrap; justify-content: flex-start; 
  gap: 26px; margin-bottom: 50px; padding: 0 20px;
  max-width: 1200px; margin-left: auto; margin-right: auto;
}
#lgallusz-section .professor-card {
  background: #fff; padding: 32px 24px 28px; text-align: center; cursor: pointer;
  border: 1px solid #e4eaf1; border-radius: 8px; box-shadow: 0 10px 28px rgba(20,45,70,0.05);
  width: calc((100% - (2 * 26px)) / 3); flex: 0 0 calc((100% - (2 * 26px)) / 3);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  min-width: 250px; min-height: 340px; display: flex; flex-direction: column; align-items: center;
}
#lgallusz-section .professor-card:hover {
  transform: translateY(-5px); box-shadow: 0 20px 44px rgba(20,45,70,0.12); border-color: #cfd9e5;
}
#lgallusz-section .professor-card:focus-visible {
  outline: 3px solid rgba(178,9,51,0.22);
  outline-offset: 4px;
}
#lgallusz-section .professor-image {
  width: 156px; height: 156px; margin: 0 auto 22px; border-radius: 50%;
  overflow: hidden; border: 5px solid #fff; box-shadow: 0 0 0 1px #d8e0e8, 0 10px 24px rgba(20,45,70,0.1); 
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#lgallusz-section .professor-card:hover .professor-image { box-shadow: 0 0 0 3px rgba(178,9,51,0.78), 0 14px 28px rgba(20,45,70,0.13); }
#lgallusz-section .professor-image img {
  width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease;
}
#lgallusz-section .professor-card:hover .professor-image img { transform: scale(1.1); }
#lgallusz-section .card-text { flex-grow: 1; display: flex; flex-direction: column; width: 100%; }
#lgallusz-section .professor-card h3 {
  margin: 8px 0 12px; font-size: 1.32em; color: #003f7d;
  font-family: 'Merriweather', serif; font-weight: 700; line-height: 1.3;
}
#lgallusz-section .professor-card p { margin: 0; font-size: 0.94em; color: #66717d; line-height: 1.58; }
#lgallusz-section .professor-card p span {
    display: block; margin-top: 5px; font-size: 0.85em;
    text-transform: uppercase; letter-spacing: 1px; color: #999;
}

/* Modal Core */
#lgallusz-section .modal {
  display: none; position: fixed; top: 0; left: 0; width: 100vw; max-width: 100vw; height: 100%;
  z-index: 2000; overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
}
#lgallusz-section .modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(12, 38, 61, 0.78); backdrop-filter: blur(10px); z-index: 1;
}
#lgallusz-section .modal-content {
  position: relative; z-index: 2; background: #fff; margin: 56px auto;
  padding: 52px 56px 46px; border-radius: 8px; width: min(100%, 900px); max-width: 900px;
  box-shadow: 0 28px 70px rgba(0,0,0,0.32); opacity: 0; transform: translateY(18px);
  transition: opacity 0.32s ease, transform 0.32s ease; border-top: 5px solid #b20933;
}
#lgallusz-section .modal.show .modal-content { opacity: 1; transform: translateY(0); }
#lgallusz-section .close-button {
  position: absolute; top: 16px; right: 16px; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin: 0;
  border: 1px solid #e1e7ee; border-radius: 50%; background: rgba(255,255,255,0.96);
  box-shadow: 0 8px 20px rgba(20,45,70,0.1);
  font-size: 28px; line-height: 1; font-weight: 300; color: #71808f;
  cursor: pointer; transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
#lgallusz-section .close-button:hover { color: #b20933; border-color: #cbd5e1; box-shadow: 0 10px 24px rgba(20,45,70,0.15); }

/* Modal Content */
#lgallusz-section .modal-image-container { text-align: center; margin-bottom: 26px; }
#lgallusz-section .modal-image-container img {
  width: 176px; height: 176px; border-radius: 50%; border: 5px solid #fff;
  box-shadow: 0 0 0 1px #d8e0e8, 0 14px 34px rgba(20,45,70,0.16); object-fit: cover; display: inline-block;
}
#lgallusz-section .modal-details h2 {
  text-align: center; font-size: 2.35em; color: #003f7d;
  margin: 20px 0 10px; font-family: 'Merriweather', serif;
}
#lgallusz-section .modal-details .short-line {
  width: 86px; height: 3px; background: #b20933; margin: 0 auto 30px; border-radius: 2px;
}
#lgallusz-section .professor-info {
  max-width: 760px; background: #f8fafc; border: 1px solid #e5ebf2; border-radius: 8px;
  margin: 0 auto;
  padding: 4px 24px;
}
#lgallusz-section .professor-info p {
  display: grid; grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px; align-items: baseline; margin: 0; font-size: 1em; line-height: 1.55;
  border-bottom: 1px solid #e6edf4; padding: 13px 0;
}
#lgallusz-section .professor-info p:last-child { border-bottom: none; }
#lgallusz-section .professor-info strong { color: #003f7d; text-align: right; font-size: 0.92em; }
#lgallusz-section .professor-info span,
#lgallusz-section .professor-info a {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
#lgallusz-section .professor-info a {
  color: #003f7d;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
#lgallusz-section .divider {
  border: 0;
  border-top: 1px solid #e7e9ee;
  margin: 34px 0;
}
#lgallusz-section .modal-details h3 {
  font-family: 'Merriweather', serif;
  color: #003f7d;
  font-size: 1.55em;
  line-height: 1.3;
  margin: 0 0 18px;
}
#lgallusz-section .biography,
#lgallusz-section .accordion-content,
#lgallusz-section .pub-peek-content {
  color: #444;
  line-height: 1.7;
  font-size: 1.01em;
}
#lgallusz-section .biography p:first-child,
#lgallusz-section .accordion-content p:first-child {
  margin-top: 0;
}
#lgallusz-section .biography p:last-child,
#lgallusz-section .accordion-content p:last-child {
  margin-bottom: 0;
}
#lgallusz-section .accordion-content ul {
  margin: 0;
  padding-left: 1.2rem;
}
#lgallusz-section .accordion-content li {
  margin-bottom: 8px;
}
#lgallusz-section .loader-container {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #66717d;
}
#lgallusz-section .loader {
  width: 44px;
  height: 44px;
  border: 4px solid #edf1f5;
  border-top-color: #004b93;
  border-radius: 50%;
  animation: lgallusz-spin 0.8s linear infinite;
}
@keyframes lgallusz-spin {
  to { transform: rotate(360deg); }
}

/* Accordions */
#lgallusz-section .accordion { margin-top: 40px; }
#lgallusz-section .accordion-item {
  border: 1px solid #e2e8ef; border-radius: 8px; margin-bottom: 12px; overflow: hidden;
  box-shadow: 0 8px 20px rgba(20,45,70,0.035);
}
#lgallusz-section .modal-content .accordion-header {
  background: #fff !important; border: none !important; width: 100% !important;
  padding: 18px 20px !important; font-size: 1.05em !important; font-weight: 700 !important;
  color: #2f3a45 !important; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
}
#lgallusz-section .modal-content .accordion-header:hover { background: #f8fafc !important; color: #003f7d !important; }
#lgallusz-section .modal-content .accordion-content {
  background: #fff; max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease; padding: 0 20px;
}
#lgallusz-section .modal-content .accordion-content.active {
  max-height: 2000px !important; opacity: 1 !important; padding: 22px; border-top: 1px solid #e2e8ef;
}

/* Featured Publications (Grid) */
#lgallusz-section .publications {
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin-top: 28px;
}
#lgallusz-section .publication {
  width: calc(50% - 10px); background: #fff; padding: 24px;
  border-radius: 8px; border: 1px solid #e3e9f0; text-align: center;
  box-shadow: 0 10px 24px rgba(20,45,70,0.05);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
#lgallusz-section .publication:hover { transform: translateY(-3px); border-color: #cdd8e4; box-shadow: 0 15px 32px rgba(20,45,70,0.09); }
#lgallusz-section .publication img {
  width: auto; height: 220px; max-width: 100%; margin-bottom: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1); object-fit: contain;
}
#lgallusz-section .publication h4 { color: #333; font-size: 1.1em; min-height: 3em; }
#lgallusz-section .publications-title {
  margin-top: 40px;
  text-align: center;
  color: #004b93;
  font-family: 'Merriweather', serif;
  font-size: 1.8em;
}
#lgallusz-section .publication a.buy-now {
  display: inline-block; padding: 10px 22px; background: #fff; color: #a6092f;
  border: 1px solid #b20933; text-decoration: none; font-weight: 700; border-radius: 999px;
  transition: all 0.22s ease; margin-top: 15px;
}
#lgallusz-section .publication a.buy-now:hover { background: #b20933; color: #fff; }

/* --- PEEK-A-BOO SECTION (Renamed classes to ensure fresh styling) --- */
#lgallusz-section .pub-peek-container {
    margin-top: 40px;
    border-top: 1px solid #e3e9f0;
    padding-top: 20px;
    position: relative;
}

/* This div cuts off the content */
#lgallusz-section .pub-peek-wrap {
    position: relative;
    max-height: 300px; /* Limits height to show only top few items */
    overflow: hidden;
    transition: max-height 0.8s ease-in-out; /* Smooth transition */
}

/* The White Gradient Fade */
#lgallusz-section .pub-peek-wrap::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 150px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* Styling the inner lists */
#lgallusz-section .pub-peek-wrap h4 {
    color: #b20933; font-family: 'Merriweather', serif;
    margin-top: 25px; margin-bottom: 10px; font-size: 1.2em;
}
#lgallusz-section .pub-peek-wrap ul { list-style-type: none; padding-left: 0; }
#lgallusz-section .pub-peek-wrap li {
    margin-bottom: 10px; line-height: 1.5; position: relative; padding-left: 15px;
}
#lgallusz-section .pub-peek-wrap li::before {
    content: "•"; color: #b20933; position: absolute; left: 0;
}

/* Expanded State (Applied by JS) */
#lgallusz-section .pub-peek-container.expanded .pub-peek-wrap {
    max-height: 5000px; /* Allow it to grow fully */
}
#lgallusz-section .pub-peek-container.expanded .pub-peek-wrap::after {
    opacity: 0; /* Hide the fade */
}
#lgallusz-section .pub-peek-container.expanded .pub-toggle-btn {
    display: none; /* Hide the button */
}

/* The Button */
#lgallusz-section .pub-toggle-btn {
    display: block; width: 250px; margin: 0 auto;
    position: relative; top: -20px; z-index: 10;
    padding: 12px 25px; background: #003f7d; color: #fff;
    border: none; border-radius: 50px; font-size: 0.9em; font-weight: 700;
    text-transform: uppercase; cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,75,147,0.2); transition: all 0.3s ease;
}
#lgallusz-section .pub-toggle-btn:hover {
    background: #003870; transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,75,147,0.3);
}

/* Message from Lecturer */
#lgallusz-section .message-from-lecturer {
    margin-top: 60px; text-align: center; border-top: 1px solid #e3e9f0; padding-top: 40px;
}
#lgallusz-section .message-from-lecturer h3 {
    font-family: 'Merriweather', serif; color: #003f7d; font-size: 1.8em; margin-bottom: 28px;
}
#lgallusz-section .video-container {
    position: relative; width: 100%; max-width: 100%;
    padding-bottom: 56.25%; height: 0; border-radius: 8px;
    overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.1); background: #000;
}
#lgallusz-section .video-container iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;
}
#lgallusz-section .back-to-lecturers {
    display: inline-block; margin-top: 40px; color: #788592;
    text-decoration: none; font-weight: 600; transition: color 0.3s;
}
#lgallusz-section .back-to-lecturers:hover { color: #b20933; }
#lgallusz-section .modal-error-message {
  text-align: center;
  padding: 4rem 2rem;
}
#lgallusz-section .modal-error-message h3 {
  color: #003f7d;
  font-family: 'Merriweather', serif;
  margin: 0 0 1rem;
}
#lgallusz-section .modal-error-message p {
  color: #66717d;
  margin: 0 auto;
  max-width: 360px;
}
#lgallusz-section .modal-error-message button {
  margin-top: 24px;
  padding: 10px 24px;
  background: #003f7d;
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 992px) {
  #lgallusz-section .professor-card { width: calc((100% - 26px) / 2); flex: 0 0 calc((100% - 26px) / 2); }
}
@media (max-width: 650px) {
  html,
  body {
    max-width: 100vw;
    overflow-x: hidden;
  }
  #lgallusz-section .department-title { font-size: 1.85em; margin-top: 54px; margin-bottom: 30px; }
  #lgallusz-section .section-divider { margin: 56px auto; }
  #lgallusz-section .professors-grid { justify-content: center; gap: 20px; padding: 0 16px; }
  #lgallusz-section .professor-card { width: 100%; flex: 0 0 100%; max-width: 450px; min-height: 0; padding: 28px 22px 26px; }
  #lgallusz-section .modal { padding: 12px; }
  #lgallusz-section .modal-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 34px 18px 30px;
    margin: 12px 0;
    border-radius: 8px;
    overflow: hidden;
  }
  #lgallusz-section .close-button { top: 10px; right: 10px; width: 38px; height: 38px; font-size: 30px; }
  #lgallusz-section .modal-image-container { margin-bottom: 18px; }
  #lgallusz-section .modal-image-container img { width: 136px; height: 136px; }
  #lgallusz-section .modal-details,
  #lgallusz-section .professor-info,
  #lgallusz-section .biography,
  #lgallusz-section .accordion,
  #lgallusz-section .publications,
  #lgallusz-section .pub-peek-container,
  #lgallusz-section .message-from-lecturer {
    width: min(100%, 280px);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  #lgallusz-section .modal-details h2 { font-size: 1.9em; line-height: 1.2; margin-top: 14px; }
  #lgallusz-section .modal-details .short-line { margin-bottom: 22px; }
  #lgallusz-section .professor-info p {
    grid-template-columns: 1fr;
    gap: 2px;
    font-size: 0.98em;
    line-height: 1.45;
    padding: 10px 0;
  }
  #lgallusz-section .professor-info { padding: 2px 18px; }
  #lgallusz-section .professor-info strong { text-align: left; white-space: normal; }
  #lgallusz-section .professor-info span,
  #lgallusz-section .professor-info a,
  #lgallusz-section .biography,
  #lgallusz-section .accordion-content,
  #lgallusz-section .pub-peek-content {
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  #lgallusz-section .divider { margin: 24px 0; }
  #lgallusz-section .modal-details h3 { font-size: 1.35em; margin-bottom: 16px; }
  #lgallusz-section .accordion { margin-top: 28px; }
  #lgallusz-section .modal-content .accordion-header {
    padding: 16px !important;
    font-size: 1em !important;
    text-align: left;
    gap: 16px;
  }
  #lgallusz-section .modal-content .accordion-content.active { padding: 16px; }
  #lgallusz-section .publication { width: 100%; }
  #lgallusz-section .publication h4 { min-height: 0; }
  #lgallusz-section .pub-toggle-btn { width: min(100%, 250px); }
  .page-intro { padding: 2.4rem 1.25rem; }
  .main-heading { font-size: 1.85em; }
}
#lgallusz-section .professors-grid.blurred { filter: blur(5px); pointer-events: none; }
/* Container Spacing */
.page-intro {
    padding: 3.4rem 2rem 3.1rem;
    background-color: #fff;
    text-align: center;
    border-bottom: 1px solid #e3e9f0;
}

.intro-content {
    max-width: 800px; /* Reduced width for better readability on vertical lists */
    margin: 0 auto;
}

/* --- HEADING STYLE --- */
.main-heading {
    font-family: 'Merriweather', serif;
    color: #003f7d;
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 1.8rem;
    position: relative;
    display: inline-block;
}

/* The Red Underline decoration (matches the screenshot style) */
.main-heading::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #d31145; /* Red underline */
    margin: 15px auto 0;
}

/* --- BODY TEXT --- */
.intro-description {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400; /* Regular */
    font-size: 1.06rem;
    color: #55616d;
    line-height: 1.7;
    margin-bottom: 2.1rem;
}

/* --- VERTICAL LIST STYLING --- */
.benefits-list {
    display: flex;
    flex-direction: column; /* Stacks items one under another */
    gap: 0.85rem; /* Space between items */
    text-align: left;
}

.benefit-item {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400; /* Regular */
    font-size: 1rem;
    line-height: 1.65;
    color: #3f4a55;
    position: relative;
    padding-left: 1.5rem; /* Space for the bullet */
}

/* Red Bullet Point */
.benefit-item::before {
    content: "•";
    color: #d31145; /* Red bullet */
    font-size: 1.5rem;
    line-height: 1rem; /* Adjusts vertical alignment of bullet */
    position: absolute;
    left: 0;
    top: 5px; /* Fine-tune vertical position */
}
