/* EON Research Library WordPress Plugin CSS - Scoped */
.eon-research-lib {
  --ink: #1c3763;
  --purple: #8B86F7;
  --line: #DEE7F8;
  --surface: #ffffff;
  --surface-2: #fbfbfe;
  --shadow: 0 10px 30px rgba(17, 35, 77, .06);
  --shadow-hover: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
  --radius: 10px;
}

/* Netflix Scroll Shelf */
.eon-research-lib .shelf-row {
  padding: 60px 0 20px;
  position: relative;
  width: 100%;
}
.eon-research-lib .shelf-row.alt {
  background-color: var(--surface-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.eon-research-lib .shelf-container {
  max-width: 1320px; /* Container width changed from 1240px to 1320px */
  margin: 0 auto;
  padding: 0 20px; /* Padding changed from 28px to 20px */
}
.eon-research-lib .shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.eon-research-lib .shelf-header h2 {
  margin: 0;
  font-family: "Poppins", sans-serif; /* Font-family Poppins */
  font-size: 35px; /* Font-size 35px */
  font-weight: 600; /* Font-weight 600 */
  line-height: 52px; /* Line-height 52px */
  color: var(--ink); /* Color #1c3763 */
  letter-spacing: -.01em;
}
.eon-research-lib .shelf-header h2 span {
  color: var(--purple); /* Color #8B86F7 */
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-transform: none;
  background: none;
  padding: 0;
  margin-left: 10px;
  letter-spacing: normal;
  display: inline;
}
.eon-research-lib .shelf-nav {
  display: flex;
  gap: 8px;
}
.eon-research-lib .shelf-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--purple); /* Border color #8B86F7 */
  background: var(--ink); /* Background color #1c3763 */
  color: #ffffff; /* Font/icon color #ffffff */
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
}
.eon-research-lib .shelf-arrow:hover:not([disabled]) {
  background: var(--purple); /* Hover background #8B86F7 */
  border-color: var(--purple);
  color: #ffffff;
  transform: scale(1.05);
}
.eon-research-lib .shelf-arrow[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.eon-research-lib .carousel-view {
  position: relative;
  overflow: hidden;
  margin: -20px -10px 0;
  padding: 20px 10px 30px;
}
.eon-research-lib .carousel-track {
  display: flex;
  gap: 10px; /* Space between slides changed to 10px */
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 20px 10px;
  margin: -20px -10px;
}
.eon-research-lib .carousel-track::-webkit-scrollbar {
  display: none;
}

/* Card Styling */
.eon-research-lib .subject-card {
  flex: 0 0 230px; /* Desktop width for 5 full slides + 80px offset */
  border: 1px solid var(--line); /* Border color #DEE7F8 */
  border-radius: var(--radius); /* Border-radius 10px */
  overflow: hidden;
  background: var(--surface); /* Background #ffffff */
  box-shadow: var(--shadow);
  transition: transform .24s cubic-bezier(.2,.75,.25,1), box-shadow .24s ease, border-color .24s ease;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.eon-research-lib .subject-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover); /* Hover shadow 0px 0px 10px 0px rgba(0,0,0,0.2) */
  border-color: var(--purple); /* Hover border color #8B86F7 */
}
.eon-research-lib .card-image-wrap {
  height: 200px; /* Image height should be 200px */
  overflow: hidden;
  background: #07152f;
  border-bottom: 1px solid var(--line);
  position: relative;
  flex-shrink: 0;
}
.eon-research-lib .card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.eon-research-lib .subject-card:hover .card-image {
  transform: scale(1.05);
}
.eon-research-lib .card-body {
  padding: 20px; /* Padding changed from 16px to 20px */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1; /* Stretch to fill card height */
}
.eon-research-lib .card-body h3 {
  margin: 0 0 12px;
  font-family: "Poppins", sans-serif; /* Font Poppins */
  font-size: 16px; /* Font size 16px */
  font-weight: 600; /* Font weight 600 */
  line-height: 26px; /* Line height 26px */
  color: var(--ink); /* Color #1c3763 */
}
.eon-research-lib .explore-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--purple); /* Color #8B86F7 */
  font-family: "Open Sans", sans-serif; /* Font Open Sans */
  font-size: 14px; /* Font size 14px */
  font-weight: 700; /* Font weight 700 */
  line-height: 24px; /* Line height 24px */
  display: inline-flex;
  align-items: center;
  gap: 10px; /* Space between text and arrow is 10px */
  cursor: pointer;
  margin-top: auto; /* Push explore button to the bottom */
}
.eon-research-lib .explore-btn svg {
  width: 14px; /* Arrow size 14px */
  height: 14px;
  color: var(--purple); /* Arrow color #8B86F7 */
  transition: transform 0.2s ease;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}
.eon-research-lib .subject-card:hover .explore-btn svg {
  transform: translateX(4px);
}

/* Dots Styling */
.eon-research-lib .slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px; /* Space between slider and dots is 20px */
}
.eon-research-lib .slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #cccccc;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.eon-research-lib .slider-dot.active {
  background-color: #000000;
  transform: scale(1.1);
}

/* Responsive / Mobile styling */
@media (max-width: 768px) {
  .eon-research-lib .shelf-header h2 {
    font-size: 26px;
    line-height: 38px;
  }
  .eon-research-lib .shelf-nav {
    display: none !important; /* Hide header arrows on mobile */
  }
  .eon-research-lib .subject-card {
    flex: 0 0 260px; /* No offset slide on mobile screen (each card is 260px, fits mobile viewport nicely) */
  }
  .eon-research-lib .carousel-view {
    overflow: visible; /* Let mobile overlay arrows float outside bounds if needed */
  }
  .eon-research-lib .mobile-arrows {
    display: block !important;
  }
  .eon-research-lib .mobile-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--purple);
    background: var(--ink);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
  }
  .eon-research-lib .mobile-arrow.prev {
    left: -10px; /* Positioned left center of the slider */
  }
  .eon-research-lib .mobile-arrow.next {
    right: -10px; /* Positioned right center of the slider */
  }
  .eon-research-lib .mobile-arrow:hover {
    background: var(--purple);
  }
  .eon-research-lib .mobile-arrow[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
  }
}

@media (min-width: 769px) {
  .eon-research-lib .mobile-arrows {
    display: none !important;
  }
}

/* Modal Styling - Fixed on viewport */
.eon-research-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(10,18,42,.52);
  backdrop-filter: blur(7px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .2s ease;
}
.eon-research-modal-backdrop.open {
  display: flex;
  opacity: 1;
}
.eon-research-modal-backdrop .resource-modal {
  width: min(570px, 100%);
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 32px 90px rgba(4,15,44,.28);
  transform: translateY(12px) scale(.98);
  transition: transform .22s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
}
.eon-research-modal-backdrop.open .resource-modal {
  transform: translateY(0) scale(1);
}
.eon-research-modal-backdrop .modal-head {
  padding: 24px 26px 18px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid #eceef6;
  background: linear-gradient(135deg, #fff, #f5f3ff);
}
.eon-research-modal-backdrop .modal-head-copy {
  min-width: 0;
  flex: 1;
}
.eon-research-modal-backdrop .modal-label {
  margin: 0 0 6px;
  color: var(--purple);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
  display: block;
}
.eon-research-modal-backdrop .modal-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--ink);
  font-family: inherit;
}
.eon-research-modal-backdrop .modal-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}
.eon-research-modal-backdrop .close-modal {
  width: 38px;
  height: 38px;
  border: 1px solid #dfe3f0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  padding: 0;
}
.eon-research-modal-backdrop .close-modal:hover {
  transform: rotate(90deg);
  background: #f6f5ff;
  border-color: var(--purple);
  color: var(--purple);
}
.eon-research-modal-backdrop .resource-grid {
  padding: 22px 26px 27px;
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 13px;
}
.eon-research-modal-backdrop .resource-link {
  min-height: 96px;
  border: 1px solid #dde2f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.eon-research-modal-backdrop .resource-link:hover, 
.eon-research-modal-backdrop .resource-link:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 13px 28px rgba(25,43,83,.12);
  border-color: #aaa2ff;
  background: #fbfaff;
  outline: none;
}
.eon-research-modal-backdrop .resource-link.disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
  background: #fbfbfe;
  border-color: #dfe4f2;
}
.eon-research-modal-backdrop .resource-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f0eeff;
  color: var(--purple);
  display: grid;
  place-items: center;
}
.eon-research-modal-backdrop .resource-icon svg {
  width: 25px;
  height: 25px;
}
.eon-research-modal-backdrop .resource-text strong {
  display: block;
  font-size: 15px;
  color: var(--ink);
  font-family: inherit;
}
.eon-research-modal-backdrop .resource-text span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .eon-research-modal-backdrop .resource-grid {
    grid-template-columns: 1fr;
  }
}
