.dropdown {
  --dropdown-text: currentcolor;
  --dropdown-border: currentcolor;
  --dropdown-hover: var(--light-opacity-20);
}

.dropdown {
  width: 100%;
  position: relative;
  border: none;
  background: none;
}

/* TOGGLE */
.dropdown__toggle {
  padding: 8px 16px;
  border: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: right;
  font-weight: 700;
  cursor: pointer;
  gap: 32px;
}

.dropdown__toggle:hover {
  background: var(--light-opacity-20) !important;
  color: currentColor !important;
}

.dropdown-toggle::after {
  display: none !important;
}

/* ICONO */
/* SOLO si hay items */
.dropdown--has-items .dropdown__icon {
  transition: transform 300ms ease-in-out;
  animation-duration: 300ms;
  animation-timing-function: ease-in-out;
  transform: rotate(-90deg);
}

.dropdown--has-items .dropdown__toggle[aria-expanded="true"] .dropdown__icon {
  transform: rotate(0deg);
}

/* SIN items → icono fijo */
.dropdown--no-items .dropdown__icon {
  transform: rotate(-90deg);
  /* o 0deg si prefieres */
  transition: none;
}

.dropdown__icon svg {
  width: 20px !important;
  height: 20px !important;
}

.dropdown-item__icon svg {
  transform: rotate(-90deg);
  width: 20px !important;
  height: 20px !important;
}

.ui-accordion-content {
  height: 100%;
  max-height: 210px;
}


  .button {
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: var(--ff-eyebrow);
    font-weight: 500;
    font-size: var(--fs-eyebrow);
    line-height: var(--lh-eyebrow);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--dark);
    border-radius: 61px;
    border: 2px solid var(--dark);
    &:hover{
      background-color: var(--dark);
      color: var(--white);
    }
    &.red{
      border: 2px solid var(--primary);
      background-color: var(--white);
      color: var(--primary);
      &:hover{
        background-color: var(--primary);
        color: var(--white);
      }
    }
    &.bred{
      border: 2px solid var(--primary);
      background-color: var(--primary);
      color: var(--white);
      &:hover{
        background-color: var(--white);
        color: var(--primary);
      }
    }
    &.bblack{
      background-color: var(--dark);
      color: var(--white);
      &:hover{
        background-color: var(--white);
        color: var(--dark);
        border: 2px solid var(--dark);
      }
    }
  }
  
/* TABLET */
@media (min-width: 768px) and (max-width: 1024px) {
  .ui-accordion-content {
    height: 100%;
    /* max-height: 300px; */
  }
}

@media (min-width: 1025px) {
  .ui-accordion-content {
    height: 100%;
    /* max-height: 300px; */
  }
}

/* Menu Dropdown*/
.dropdown__menu {
  width: 100%;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  overflow: hidden;
}

.collapsing {
  position: relative;
  height: 0;
  overflow: hidden;
  transition: height 300ms ease-in-out !important;
  animation-timing-function: ease-in-out !important;
  animation-duration: 300ms !important;
}

.collapse {
  transition: height 300ms ease-in-out !important;
  animation-timing-function: ease-in-out !important;
  animation-duration: 300ms !important;
}

.collapse:not(.show) {
  display: none;
}

.collapse.show {
  display: block;
}

/* ITEMS */
.dropdown__menu .dropdown-item {
  padding: 8px 2rem;
  font-weight: 500;
  font-size: 10px;
  /* letter-spacing: 0.25em; */
  background: none;
  color: var(--dropdown-text);
  border-bottom: 1px solid var(--dropdown-border);
  white-space: normal;
}

/* title */
.dropdown__title {
  color: var(--white);
  margin: 0 !important;
  word-break: break-word;
  font-size: 16px;
}

.dropdown__overlay--dark-1 {
  background-color: var(--dark-opacity-20);
}

&.dropdown--dark-1 .dropdown--menu .dropdown-item {
  color: var(--white);
}

/*VARIANTES COLOR*/
/*variantes flecha ceja externa, flecha externa, flecha lateral*/
.dropdown__toggle {
  background: var(--primary);
  color: var(--white);
}

.dropdown__toggle:hover {
  background: var(--dropdown-hover) !important;
  color: var(--white) !important;
}

/* Sin hover para variantes con fondo de color */
.dropdown--flecha-lateral .dropdown__toggle:hover,
.dropdown--flecha-externa .dropdown__toggle:hover,
.dropdown--flecha-externa-ceja .dropdown__toggle:hover {
  background: var(--primary) !important;
}

.dropdown__menu .dropdown-item {
  border-color: var(--dropdown-border);
}

.dropdown__menu .dropdown-item .eyebrow {
  color: var(--primary);
}

.dropdown__menu .dropdown-item:hover {
  background: var(--dropdown-hover);
}


/*VARIANTES COLOR*/
/*variantes flecha ceja externa, flecha externa, flecha lateral*/
:where(html[data-theme="dark"]) .dropdown__toggle {
  background: var(--primary);
  color: var(--dropdown-text)
}

:where(html[data-theme="dark"]) .dropdown__toggle:hover {
  /* background: var(--dropdown-hover); */
  color: var(--dropdown-text) !important;
}

:where(html[data-theme="dark"]) .dropdown__menu .dropdown-item .eyebrow {
  color: var(--white) !important;
}

:where(html[data-theme="dark"]) .dropdown__menu .dropdown-item {
  color: var(--dropdown-text);
  border-color: var(--dropdown-border);
}

:where(html[data-theme="dark"]) .dropdown__menu .dropdown-item:hover {
  background: var(--dropdown-hover);
  color: var(--dropdown-text);
}

/*VARIANTES*/
/* menu*/
.dropdown--menu .dropdown__toggle {
  padding: 8px 40px 8px 16px;
  background: none;
  border-bottom: 1px solid var(--dropdown-border);
}

.dropdown--menu .dropdown__menu .dropdown-item {
  padding: 12px 40px 12px 16px;
  text-align: right;
  gap: 32px;
  display: flex;
  justify-content: right;
  align-items: center;
  text-transform: uppercase;
  color: var(--white) !important;
  border-color: var(--white) !important;
}

.dropdown--menu .dropdown-item__icon {
  display: none;
}

/*flecha-externa*/
.dropdown--flecha-externa .dropdown__menu .dropdown-item {
  gap: 32px;
  display: flex;
  justify-content: right;
  align-items: center;
  text-transform: none;
}

/*flecha-externa ceja*/
.dropdown--flecha-externa-ceja .dropdown__toggle {
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dropdown--flecha-externa-ceja .dropdown__menu .dropdown-item {
  text-align: left;
  gap: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: none;
}

.dropdown__text {
  display: flex;
  flex-direction: column;
}

.dropdown__items {
  display: flex;
  flex-direction: column;
}

/*flecha-lateral*/
.dropdown--flecha-lateral .dropdown__toggle {
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dropdown--flecha-lateral .dropdown__menu .dropdown-item {
  text-align: left;
  gap: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: none;
}

.dropdown-item h3 {
  margin: 0;
}

.dropdown--menu .dropdown-item__icon {
  transform: rotate(-90deg);
}

.dropdown__text {
  display: flex;
  flex-direction: column;
}

.dropdown__items {
  display: flex;
  flex-direction: column;
  word-break: break-word;
  font-family: var(--headings-font-family) !important;
}

/*dropdown texto*/
.dropdown--texto .dropdown__toggle {
  background: none;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid currentColor;
  color: var(--dropdown-text);
}

.dropdown--texto .dropdown__toggle {
  background-color: transparent !important;
  color: var(--dropdown-text) !important;
}

.dropdown--texto .dropdown__title {
  color: var(--dropdown-text);
}


.dropdown__text {
  display: flex;
  flex-direction: column;
}

.dropdown__description {
  padding: 8px 16px;
  border-bottom: 1px solid var(--dropdown-border);
}

/* TABLET */
@media (min-width: 768px) and (max-width: 1024px) {
  .dropdown__menu .dropdown-item {
    font-size: 14px;
    line-height: 20px;
  }

  .dropdown--menu .dropdown__toggle,
  .dropdown__menu .dropdown__toggle,
  .dropdown__toggle {
    padding: 16px 24px;
  }

  .dropdown--menu .dropdown__menu .dropdown-item,
  .dropdown__menu .dropdown-item,
  .dropdown-item {
    padding: 16px 1.5rem;
  }

  .dropdown__description {
    padding: 16px 24px;
  }

  /* Iconos en tablet deben ser 35px como en desktop */
  .dropdown__icon svg {
    width: 35px !important;
    height: 35px !important;
  }

  .dropdown-item__icon svg {
    width: 35px !important;
    height: 35px !important;
  }

  .dropdown__title {
    font-size: 20px;
  }
}

/* DESKTOP */
@media (min-width: 1025px) {
  .dropdown__menu .dropdown-item {
    font-size: 16px;
  }

  .dropdown--menu .dropdown__toggle,
  .dropdown__menu .dropdown__toggle,
  .dropdown__toggle {
    padding: 16px 0;
    min-height: 67px;
  }

  .dropdown--menu .dropdown__menu .dropdown-item,
  .dropdown__menu .dropdown-item,
  .dropdown-item {
    padding: 16px 4rem;
  }

  .dropdown__icon svg {
    width: 35px !important;
    height: 35px !important;
  }

  .dropdown-item__icon svg {
    width: 35px !important;
    height: 35px !important;
  }

  .dropdown__description {
    padding: 16px 0;
  }

  .dropdown__title {
    font-size: 32px;
  }
}

/* EXTRA LARGE DESKTOP */
@media (min-width: 1921px) {
  .dropdown--menu .dropdown__menu .dropdown-item,
  .dropdown__menu .dropdown-item,
  .dropdown-item {
    padding: 16px 8rem;
  }
}

.view-programs-to-school {
  font-family: var(--font-family-base) !important;

  .ui-accordion-header {
    padding: .5rem 3rem .5rem 1rem;
    background-color: var(--primary);
    color: var(--white);
    border: 0;
    border-radius: 0;
    margin: 0;
    border-bottom: 1px solid var(--white);
    font-weight: var(--fw-heading);
    font-size: var(--fs-h2);
    line-height: var(--lh-h2);
    position: relative;
  }

  .ui-accordion-content {
    padding: 0;
    border: 0;

    .views-field-title {
      border-bottom: 1px solid #1E1E1E;

      a {
        color: var(--secondary);
        font-size: var(--fs-h4);
        line-height: var(--lh-h4);
        font-weight: var(--fw-heading);
        text-decoration: none;
        padding: .5rem 3rem .5rem 1rem;
        width: 100%;
        display: flex;
        align-items: center;
        position: relative;
        transition: background-color 0.3s ease;

        &::after {
          content: '';
          position: absolute;
          right: 1rem;
          top: 50%;
          transform: translateY(-50%);
          width: 20px;
          height: 20px;
          display: inline-block;
          background-color: currentColor;
          mask-image: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.27271 22.2159L16.7273 11.6705L7.27271 1.125" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>');
          mask-size: contain;
          mask-repeat: no-repeat;
          mask-position: center;
        }
      }
    }
  }

  .ui-icon {
    background-image: none !important;
  }

  .icon-arrow-down {
    position: absolute;
    right: 1rem;
    top: 60%;
    transform: translateY(-45%) rotate(0deg);
    width: 20px !important;
    height: 20px !important;
    display: inline-block;
    background-color: currentColor;
    mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 35 35" xmlns="http://www.w3.org/2000/svg"><path d="M1.71504 0V7.36067H22.4353L0 29.796L5.204 35L27.6393 12.5647V33.285H35V0H1.71504Z" fill="black"/></svg>');
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    transition: transform 0.3s ease;
  }

  .ui-state-active .icon-arrow-down {
    transform: translateY(-50%) rotate(90deg);
  }

  /* TABLET */
  @media (min-width: 768px) and (max-width: 1024px) {

    .ui-accordion-header,
    .ui-accordion-content .views-field-title a {
      padding: 1rem 6rem 1rem 1.5rem;
    }

    .icon-arrow-down {
      right: 1.5rem;
      width: 35px !important;
      height: 35px !important;
    }

    .ui-accordion-content .views-field-title a::after {
      right: 1.5rem;
      width: 24px !important;
      height: 24px !important;
    }
  }

  /* DESKTOP */
  @media (min-width: 1025px) {

    .ui-accordion-header,
    .ui-accordion-content .views-field-title a {
      min-height: 67px;
      padding: 1rem 8rem 1rem 4rem;
    }

    .icon-arrow-down {
      right: 4rem;
      width: 35px !important;
      height: 35px !important;
    }

    .ui-accordion-content .views-field-title a::after {
      right: 4rem;
      width: 24px !important;
      height: 24px !important;
    }
  }

  /* DARK MODE */
  :where(html[data-theme="dark"]) & {
    .ui-accordion-content {
      background-color: #000;
    }

    .ui-accordion-content .views-field-title {
      border-bottom: 1px solid var(--white);
    }

    .ui-accordion-content .views-field-title a {
      color: var(--white);

      &:hover {
        background-color: var(--light-opacity-20);
      }
    }
  }
}

[data-component-id="usfq_theme:icon"] {
  color: inherit !important;
}