.appellate-advocacy-block {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.appellate-advocacy-block__title {
  font-size: 36px;
  font-weight: 600;
  color: #2F3941;
  margin-bottom: 2rem;
  font-family: 'Open Sans', sans-serif;
}

@media (max-width: 768px) {
  .appellate-advocacy-block__title {
    font-size: 28px;
  }
}

/* Opinions Container */
.appellate-advocacy-opinions {
  display: flex;
  flex-direction: column;
}

/* Featured Items */
.appellate-advocacy-opinions__featured {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.appellate-advocacy-opinions__featured-item {
  display: flex;
}

/* Design ref: https://www.figma.com/design/5Zx1PwmFROCRUf200tw02s/Legal-AidDC-web-v1?node-id=4876-1142 */
.featured-card {
  background: white;
  border: 1px solid #295e63;
  border-radius: 15px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  padding: 30px;
  display: grid;
  grid-template-columns: 160px 1fr;
  grid-template-areas:
    "image badge"
    "image title"
    "description description"
    "footer footer";
  column-gap: 22px;
  row-gap: 20px;
  align-items: start;
  flex: 1;
  height: 100%;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(41, 94, 99, 0.15);
}

/* `.featured-card__content` only exists in markup to group title/description/
   footer - `display: contents` drops its own box so those children can be
   placed directly into the grid areas defined above. */
.featured-card__content {
  display: contents;
}

.featured-card__badge {
  width: fit-content;
  grid-area: badge;
  align-self: start;
  background: #295e63;
  color: white;
  padding: 6px 9px;
  border-radius: 3px;
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.48px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.featured-card__badge::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  background: url("../images/featured-badge-icon.svg") no-repeat center;
  background-size: contain;
}

.featured-card__image {
  grid-area: image;
  width: 160px;
  height: 115px;
  overflow: hidden;
  background: #f0f0f0;
  border-radius: 8px;
  position: relative;
}

.featured-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-card__image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #295e63 0%, #3d7d84 100%);
}

.featured-card__image-placeholder svg {
  width: 100%;
  height: 100%;
}

.featured-card__title {
  grid-area: title;
  font-family: "Open Sans", sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
  margin: 0;
  color: #295e63;
  align-self: end;
}

.featured-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}

.featured-card__title a:hover {
  color: #1a4448;
}

.featured-card__description {
  grid-area: description;
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #646f78;
  line-height: 27px;
  margin: 0;
}

.featured-card__footer {
  grid-area: footer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media screen and (max-width: 998px) {
  .featured-card__footer {
    flex-direction: column;
    gap: 15px;
  }
}


.featured-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #295e63;
  border-radius: 2px;
  padding: 9px 18px;
  color: #295e63;
  text-decoration: none;
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 16px;
  transition: color 0.3s, background-color 0.3s;
}

.featured-card__link::after {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  background-color: currentColor;
  -webkit-mask: url("../images/arrow-narrow-right.svg") no-repeat center;
  mask: url("../images/arrow-narrow-right.svg") no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  transform: rotate(180deg);
}

.featured-card__link:hover {
  background-color: #295e63;
  color: white;
}

.featured-card__date {
  font-family: "Roboto", sans-serif;
  font-size: 17px;
  font-weight: 400;
  color: #646f78;
  line-height: 27px;
}
/* END Featured Items */

/* Exposed Filters */
.appellate-advocacy-block__filters {
  padding: 0;
  background: transparent;
  width: 100%;
}

.appellate-advocacy-block__filters .views-exposed-form {
  display: flex !important;
  align-items: flex-end;
  gap: 25px;
  width: 100%;
}

.appellate-advocacy-block__filters .form-item,
.appellate-advocacy-block__filters .js-form-item {
  margin: 0;
  padding: 0 !important;
  flex: 1;
}

.appellate-advocacy-block__filters .form-item.form-item__textfield {
  flex: 2;
}

/* Per mockup (node-id=4790-726), the "Search" submit button is not shown. */
.appellate-advocacy-block__filters .form-actions {
  display: none;
}

/* Visually hide the redundant field label text (not the whole form item -
   the theme's `label` element wraps both the label text AND the input/select,
   so hiding `label` itself would hide the field controls too). None of the
   filters show a visible label in the mockup - Year and Search rely on
   their placeholder text, Service Area shows "- Any -". */
.appellate-advocacy-block__filters .field-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.appellate-advocacy-block__filters .form-input,
.appellate-advocacy-block__filters .form-select {
  width: 100% !important;
  min-width: 0;
  height: 48px;
  margin: 0;
  padding: 0 50px 0 25px;
  border: 1px solid #d8dcde;
  border-radius: 5px;
  background-color: #fff;
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 27px;
  color: #646f78;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-sizing: border-box;
}

.appellate-advocacy-block__filters .form-select {
  background-image: url("../images/chevron-down.svg");
  background-repeat: no-repeat;
  background-position: right 25px center;
  background-size: 18px 18px;
}

.appellate-advocacy-block__filters [name="search"] {
  width: 100% !important;
  background-image: url("../images/search-icon.svg");
  background-repeat: no-repeat;
  background-position: right 25px center;
  background-size: 17px 16px;
}

/* Exposed Filters - End */

/* Regular Cards */
.appellate-advocacy-opinions__regular {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.regular-card {
  background: white;
  border: 1px solid #d8dcde;
  border-radius: 15px;
  padding: 30px;
  transition: box-shadow 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.regular-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.regular-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.regular-card__tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #fff;
  color: #646F78;
  font-size: 16px;
  font-weight: 500;
  border-radius: 30px;
  border: 1px solid #F5BA6D;
}

.regular-card__title {
  font-family: "Open Sans", sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
  margin: 0 0 15px 0;
  color: #295e63;
}

.regular-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}

.regular-card__title a:hover {
  color: #1a4448;
}

.regular-card__description {
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #646f78;
  line-height: 27px;
  margin-bottom: 20px;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

.regular-card__footer {
  margin-bottom: 30px;
}

.regular-card__date {
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #646f78;
  line-height: 27px;
}

.regular-card__link {
  color: #295e63;
  text-decoration: underline;
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  transition: color 0.3s;
}

.regular-card__link::after {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  background-color: currentColor;
  -webkit-mask: url("../images/arrow-narrow-right.svg") no-repeat center;
  mask: url("../images/arrow-narrow-right.svg") no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  transform: rotate(180deg);
}

.regular-card__link:hover {
  color: #1a4448;
}
/* Regular Cards - End */

/* Empty State */
.appellate-advocacy-opinions__empty {
  text-align: center;
  padding: 4rem 2rem;
  margin-top: 2rem;
}

.appellate-advocacy-opinions__empty .empty-message {
  font-family: "Roboto", sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: #646f78;
  margin: 0;
}
/* Empty State - End */

/* Pager */
.appellate-advocacy-block__pager {
  margin-top: 2rem;
  text-align: center;
}
.appellate-advocacy-block__pager nav.pager {
  margin-bottom: 0px;
}
/* Pager End */

/* View All Button */
.view-all-button {
  text-align: center;
  padding: 1.5rem 0;
}

.view-all-button a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #295e63;
  color: white;
  border: 1px solid #295e63;
  border-radius: 2px;
  padding: 12px 15px;
  text-decoration: none;
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.5px;
  transition: background-color 0.3s, color 0.3s;
  border-radius: 5px;
}

.view-all-button a:hover {
  background: white;
  color: #295e63;
}
/* View All Button - End */

/* CTA Banner */
.cta-banner-containerwidth-wrapper {
  width: 100%;
  background: #ebf1f2;
  margin: 3rem 0;
}

.cta-banner.type-1 {
  background: #ebf1f2;
  padding: 32px 40px;
  border-radius: 4px;
}

.cta-banner .container-inner {
  gap: 2rem;
  align-items: flex-start;
}

.cta-banner .banner-title {
  margin-bottom: 20px;
}

.cta-banner .banner-title .headline {
  color: #295e63;
  font-family: 'Open Sans', sans-serif;
  font-size: 30px;
  font-weight: 600;
  line-height: 40px;
  margin-bottom: 0;
}

.cta-banner .banner-description {
  color: #2f3941;
  font-family: 'Roboto', sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 32px;
  max-width: 600px;
}

.cta-banner .banner-description p {
  margin-bottom: 0;
  line-height: 32px;
}

.cta-banner .banner-cta {
  align-items: flex-start;
}

.cta-banner .cta-button .btn {
  min-width: 160px;
  padding: 12.8px 20.8px;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 20px;
  white-space: nowrap;
  background: white;
  border: 1px solid #d8dcde;
  border-radius: 4px;
  color: #2f3941;
  text-transform: capitalize;
}

.page-impact-litigation-cases .cta-banner-containerwidth-wrapper .cta-banner.type-1 .container {
  padding-left: 0 !important;
}

@media (min-width: 768px) {
    .page-impact-litigation-cases .cta-banner.type-1 .container {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
}

@media (max-width: 1023px) {
  .cta-banner .container-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .cta-banner .banner-description {
    margin: 0 auto 2rem;
  }
  .cta-banner .banner-cta {
    justify-content: center;
  }
}
/* CTA Banner - End */

body.path-impact-litigation-cases .appellate-advocacy-block,
body.page-appellate-advocacy .appellate-advocacy-block {
  padding: 0;
}

@media (min-width: 1440px) {
  body.path-impact-litigation-cases main>div.container,
  body.page-appellate-advocacy main>div.container {
    padding-left: 0 !important;
  }
}

body.page-appellate-advocacy .my-xsmall {
    margin-top: 0 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .appellate-advocacy-opinions__featured {
    grid-template-columns: 1fr;
  }

  .appellate-advocacy-opinions__regular {
    grid-template-columns: 1fr;
  }

  .appellate-advocacy-block__filters .views-exposed-form {
    flex-direction: column;
    align-items: stretch;
  }

  .appellate-advocacy-block__filters .form-item,
  .appellate-advocacy-block__filters .js-form-item {
    width: 100%;
  }

  .appellate-advocacy-block__filters .form-input,
  .appellate-advocacy-block__filters .form-select,
  .appellate-advocacy-block__filters [name="search"] {
    width: 100%;
    min-width: 0;
  }
}