/* =========================
   LAYOUT
========================= */
.esa-d {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  justify-content: space-between;
  position: relative;
}

.esa-d_content { flex: 1; }
.esa-d_sidebar  { flex: 1 1 30%; max-width: 320px; display: flex; flex-direction: column; gap: 2rem; }
.section-title  { margin: 0 0 1rem; font-size: 1.375rem; font-weight: 700; color: #1a1a1a; }

/* =========================
   FULL-WIDTH HERO
========================= */
.esa-hero {
  background: #eef3ff;
  border-radius: 18px;
  margin-bottom: 2.5rem;
}
.esa-hero__inner {
  padding: 2.5rem 1.5rem 1.75rem;
  text-align: center;
}
.esa-hero h1 { margin: 0 0 0.75rem; font-size: 2rem; font-weight: 800; color: #121212; }
.esa-hero .hero-intro { margin: 0 auto 1.25rem; max-width: 720px; color: #444; }

/* Controls inside hero */
.aboxy--hero {
  background: #fff;
  border: 1px solid #e1e1e8;
  border-radius: 12px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
  padding: 0.75rem;
  justify-content: center;
}
.directory-controls input.search {
  flex: 1 1 280px; min-width: 240px;
  padding: 0.75rem 1.5rem; border: 1px solid #cfd3df; border-radius: 20px; font-size: 1rem;
}

/* =========================
   FILTER PANEL
========================= */
.directory-filters {
  margin: 10px auto 20px;
  background:#fff; border:1px solid #e1e1e8; border-radius:12px;
  padding: 1rem 1.25rem;
}
.directory-filters fieldset {
  padding: 0;
  border: 0;
}

.esa-filter {
  display: flex;
  gap: 30px;
}

.esa-filter > div {
  flex: 1;
}

@media screen and (max-width:767px) {
  .esa-filter {
    gap: 10px;
    flex-wrap: wrap;
  }

  .esa-filter > div {
    flex: 100%;
  }

}

.choices__inner {
  background: #fff !important;
  padding: 0 !important;
  border: 0!important;
}

.choices__input {
  padding: 0 10px !important;
  width: 100% !important;
  border: 1px solid #e1e1e8 !important;
  margin-top: 5px !important;
}

.directory-filters label { display:block; margin:0.75rem 0 0.25rem; font-weight:600; }
.directory-filters select { width:100%; padding:0.55rem; border:1px solid #cfd3df; border-radius:8px; }

/* =========================
   RESOURCE CARDS
========================= */
.resource-card {
  background: #fff;
  border: 1px solid #e1e1e8;
  border-radius: 16px;
  padding: 1.75rem;
  padding-bottom: 0 !important;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: box-shadow .2s ease, transform .1s ease;
}
.resource-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-2px); }

.resource-card-header {
  display:flex; justify-content:space-between; align-items:center; gap:1rem; margin-bottom:0.5rem;
}
.resource-name { 
  font-size: 18px;
  font-family: var(--theme-font-family);
  font-weight: 600;
  color:#1a1a1a;
  text-transform: capitalize;
}
.description { font-size:14px; line-height:1.5; }
.location    { font-size:14px; margin-top:0.5rem; }
.resource-card-footer {
  margin-left: -1.25rem;
  margin-right: -1.25rem;
  border-top: 1px solid #e1e1e8;
  padding: 1rem 1.25rem;
}

.choices__list--multiple .choices__item {
  background: #004990 !important;
}

/* Featured “highlight” look */
.resource-card.is-featured {              /* soft warm tint */
  border-color: #f2c970;               /* golden border */
  box-shadow: 0 2px 0 rgba(242,201,112,.25), 0 1px 10px rgba(0,0,0,0.04);
}
.resource-card.is-featured .toggle-details {
  border-color:#c38700; color:#9b6c00;
}
.resource-card.is-featured .toggle-details:hover {
  background:#c38700; color:#fff;
}

#directory-search {
  background: #fff;
}

/* buttons & checkbox */
.select-checkbox { display:flex; align-items:center; gap:6px; font-size:0.9rem; cursor:pointer; user-select:none; }
.select-resource-input { cursor:pointer; accent-color:#1f5eff; }
.toggle-details {
  display:inline-block; margin-top:1rem; padding:0.5rem 1rem; font-size:0.95rem; border-radius:6px;
  border:1px solid #1f5eff; background:transparent; color:#1f5eff; cursor:pointer; transition:all .2s ease;
}
.toggle-details:hover { background:#1f5eff; color:#fff; }

.resource-details { margin-top:1rem; border-top:1px solid #eee; padding-top:1rem; font-size:0.9rem; color:#444; }
.resource-details p { margin:0.5rem 0; }

/* =========================
   SIDEBAR: QUICK LINKS
========================= */
.quick-links { background:#fff; border:1px solid #e1e1e8; border-radius:16px; padding:1.25rem; }
.quick-links__list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:0.75rem; }

.ql-title { font-weight:700; color:#0f172a; display:block; }
.ql-desc  { font-size:0.9rem; color:#495266; display:block; margin-top:2px; }
.ql-arrow { margin-left:auto; font-weight:700; color:#1f5eff; }

/* =========================
   PAGINATION / NO RESULTS
========================= */
.pagination { display:flex; justify-content:center; list-style:none; gap:0.5rem; padding:0; margin-top:2rem; }
.pagination li { display:inline; }
.pagination li a {
  display:block; padding:0.5rem 1rem; border-radius:6px; border:1px solid #cfd3df; color:#333; text-decoration:none;
}
.pagination li.active a { background:#1f5eff; color:#fff; border-color:#1f5eff; }

.no-results {
  background:#fff3cd; border:1px solid #ffeeba; border-radius:8px; padding:1.25rem; color:#7a5e00;
}

/* =========================
   UTILITIES / ACCESSIBILITY
========================= */
.aboxy { padding:1.25rem; border:1px solid #e1e1e8; border-radius:16px; background:#fff; }
.screen-reader-text { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 992px) {
  .esa-d_content, .esa-d_sidebar { flex: 1 1 100%; max-width: 100%; }
  .esa-hero__inner { text-align:left; padding:2rem 1rem 1.25rem; }
  .aboxy--hero { justify-content:flex-start; }
}
@media (max-width: 600px) {
  .directory-controls { gap: 0.5rem; }
  .directory-controls input.search { flex: 1 1 100%; min-width: 0; }
  .directory-controls .button { width: auto; }
}







/* Modal overlay */
.directory-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.directory-modal.is-active {
  display: flex;
}

.directory-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  cursor: pointer;
}

/* Modal content box */
.directory-modal__content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 680px;
  width: 90%;
  padding: 2rem 2.5rem;
  box-shadow: 0 15px 40px rgba(0,0,0,0.25);
  z-index: 1;
  overflow-y: auto;
  max-height: 90vh;
  animation: fadeInUp 0.25s ease;
}

@keyframes fadeInUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Close button */
.directory-modal__close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #555;
  transition: color 0.2s;
}

.directory-modal__close:hover {
  color: #000;
}

/* Inner body content */
#directory-modal-body h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

#directory-modal-body p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}



/*
.saved-resources {
  border: 1px solid #000;
  border-radius: 16px;
  padding: 30px;
  margin-top: 40px;
  background-color: #fff;
}*/

.saved-resources__list {
  margin-top: 1rem;
  max-height: 350px;
  overflow-y: auto;
}

.saved-resources__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.saved-resources__item + .saved-resources__item {
  border-top: 1px solid #eee;
}

.saved-resources__item-title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  color: #333;
  text-transform: capitalize;
  cursor: pointer;
}

.boxcard_header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.saved-resources__item-title:hover {
  color: #003470;
}

.saved-resources__item-title svg,
.directory-controls .button svg,
#clear-saved-resources svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: #004990;
  transform: translateY(2px);
}

.pagination li.active a {
  background: #004990;
}

.directory-controls .button svg,
#clear-saved-resources svg {
  color: #333;
  margin-right: 4px;
  vertical-align: middle;
}

#clear-saved-resources{
  background: #fff;
    border: 0;
    padding: 0;
    height: auto;
    min-height: 28px;
}

.saved-resources__remove {
  border: none;
  background: transparent;
  cursor: pointer;
  color: #999;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}

.saved-resources__remove:hover {
  color: #e74c3c;
}

.saved-resources__actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  border-top: 1px solid #e1e1e8;
  padding-top: 1rem;
  gap: 8px;
  flex-wrap: wrap;
}

.resource-card-footer {
  text-align: right;
  background: #F9FAFF;
  border-radius: 0 0 16px 16px;
}

.saved-resources__actions .button,
.resource-card-footer .button,
.directory-controls .button,
#clear-filters,
.button.ql-item {
  flex: 1;
  text-align: center;
  font-size: 12px;
  padding: 0 10px;
  height: 36px;
  border: 1px solid #e1e1e8;
  background: #fff;
  color: #1a1a1a;
  margin-top: 0;
  margin-bottom: 0;
}

.directory-controls .button,
#clear-filters {
  flex: none;
}

.resource-card-footer .button,
.directory-controls .button,
#clear-filters,
.button.ql-item {
  padding: 0 16px;
}

.resource-card-footer .button:hover,
.saved-resources__actions .button:hover,
.directory-controls .button:hover,
#clear-filters:hover,
.button.ql-item:hover {
  background: #fff;
  color: #004990;
}

#clear-filters {
  margin-top: 20px;
  float: right;
}

.resource-card-footer .button:last-child {
  margin-left: 4px;
}

.saved-resources__actions .button svg,
.resource-card-footer .button svg {
  width: 18px;
  margin-right: 4px;
}

.empty-message {
  color: #777;
  font-size: 0.9rem;
  text-align: center;
  margin-top: 1rem;
}


#email-list {
  pointer-events: auto !important;
  position: relative;
  z-index: 10;
}




/* Highlight animation for the saved resources box */
@property --border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0turn;
}

.saved-resources.highlight {
  position: relative;
  border: solid 3px transparent;
  border-radius: 1rem;
  padding: 1rem;
  --border-angle: 0turn;
  --main-bg: conic-gradient(
    from var(--border-angle),
    #fafafa,
    #f9f9f9 40%,
    #fafafa 80%
  );
  --gradient-border: conic-gradient(from var(--border-angle),
    transparent 25%,
    #08f,
    #f03,
    transparent 99%
  );
  background:
    var(--main-bg) padding-box,
    var(--gradient-border) border-box;
  animation: border-spin 3s linear infinite;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

@keyframes border-spin {
  to {
    --border-angle: 1turn;
  }
}

/* Tooltip styling */
.saved-resources.highlight::after {
  content: "✨ Your saved resources are here!";
  position: absolute;
  top: -2.2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  animation: fadeIn 0.6s ease forwards 0.3s;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}


/*.saved-resources.highlight {
  position: relative;
  border-radius: 1em;
  border: 3px solid transparent;
  animation: border-rotate 3s linear infinite;
  background:
    conic-gradient(from var(--angle), transparent 25%, #08f, #f03 99%, transparent) border-box;
  --angle: 0turn;
}
@keyframes border-rotate { to { --angle: 1turn; } }
.highlight-tooltip {
  position: absolute;
  top: -32px;
  right: 0;
  background: #333;
  color: #fff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
button#copy-link.copied {
  background: #4caf50;
  color: #fff;
  transition: background 0.3s ease;
}
*/

.save-resource-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.save-resource-btn:hover {
  background: ;
  transform: scale(1.15);
}

.heart-icon {
  width: 18px;
  height: 16px;
  stroke: #666;
  fill: transparent;
  transition: fill 0.3s ease, stroke 0.3s ease, transform 0.3s ease;
}

.save-resource-btn.saved .heart-icon {
  fill: #e63946;
  stroke: #e63946;
  transform: scale(1.1);
}



.boxcard {
  border: 1px solid #e1e1e8;
  padding: 1.25rem;
  border: 1px solid #e1e1e8;
  border-radius: 16px;
  background: #fff;
}

.boxcard:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.esa-featured {
  margin-bottom: 10px;
}

.esa-featured-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.esa-featured-boxes > .resource-card {
  flex: 1;
}


@media screen and (max-width:679px) {
  .esa-featured-boxes {
    gap: 10px;
  }

  .esa-featured-boxes > .resource-card {
    flex: 100%;
  }

}

.directory-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}


#clear-saved-resources {
  background: #fff;
  border: 0;
}

.modal-title {
  text-transform: capitalize;
}
