/* ============================================================
   USAM - FACULTADES V5
   ============================================================ */


/* 01. UTILIDADES */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


/* 02. HERO */
.hero-facultades {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
  top: -53px;
}

.hero-facultades .hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.05);
}

.hero-facultades .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(8,26,64,.75) 0%,
    rgba(8,26,64,.55) 40%,
    rgba(8,26,64,.15) 70%,
    rgba(8,26,64,0) 100%
  );
}

.hero-facultades .hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

.hero-title {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -.5px;
  line-height: 1.1;
  color: #fff;
}

.hero-subtitle {
  max-width: 720px;
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: 22px;
  font-weight: 300;
  line-height: 1.4;
  color: #fff;
}


/* 03. MENÚ */
.facultades-menu {
  position: relative;
  z-index: 3;
  margin-top: -30px;
  background: #fff;
}

.facultades-menu-inner {
  max-width: 1400px;
  margin: auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.facultades-item {
  position: relative;
  min-width: 0;
  padding: 28px 22px 30px;
  border-radius: 2px;
  background: #fff;
  color: #0b3257;
  text-decoration: none;
  transition: background-color .25s ease, color .25s ease;
}

.facultades-item h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  color: inherit;
}

.facultades-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: inherit;
}

.facultades-item::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 22px;
  width: 60%;
  height: 6px;
  background: transparent;
}

.facultades-item:hover,
.facultades-item:focus-visible,
.facultades-item.active {
  background: #b10f2e;
  color: #fff;
}

.facultades-item:hover::before,
.facultades-item:focus-visible::before,
.facultades-item.active::before {
  background: #fff;
}


/* 04. OFERTA Y ACCIONES */
.ofertaf-wrapper {
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px 24px;
}

.ofertaf-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  margin-bottom: 36px;
}

.ofertaf-actions-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ofertaf-clear,
.ofertaf-filter-btn,
.ofertaf-all-btn,
.ofertaf-view-btn,
.ofertaf-page {
  font: inherit;
}

.ofertaf-clear {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #0b4f9c;
  font-size: 14px;
  cursor: pointer;
}

.ofertaf-filter-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border: 0;
  border-radius: 22px;
  background: #c8102e;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ofertaf-search {
  width: min(520px, 100%);
}

.ofertaf-search-input {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 56px !important;
  margin: 0 !important;
  padding: 0 56px 0 24px !important;
  border: 1.5px solid #0b4f9c !important;
  border-radius: 999px !important;
  background-color: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%230b4f9c' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.65' y1='16.65' x2='21' y2='21'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 20px center !important;
  color: #0b4f9c !important;
  font: inherit !important;
  font-size: 15px !important;
  outline: none !important;
}

.ofertaf-search-input::placeholder {
  color: #77889a;
}

.ofertaf-search-input:focus {
  box-shadow: 0 0 0 3px rgba(11,79,156,.15) !important;
}


/* 05. FILTROS */
.ofertaf-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}

.ofertaf-wrapper.filters-open .ofertaf-layout {
  grid-template-columns: 280px minmax(0, 1fr);
}

.ofertaf-sidebar {
  min-width: 0;
  padding-right: 20px;
  border-right: 1px solid #0b4f9c;
}

.ofertaf-sidebar[hidden],
.ofertaf-filter-group[hidden] {
  display: none !important;
}

.ofertaf-filter-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ofertaf-filter-group + .ofertaf-filter-group {
  margin-top: 28px;
}

.ofertaf-filter-group legend {
  width: 100%;
  margin-bottom: 10px;
  padding: 0;
  color: #081a40;
  font-size: 16px;
  font-weight: 700;
}

.ofertaf-all-btn {
  min-height: 44px;
  margin-bottom: 4px;
  padding: 5px 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #0b4f9c;
  font-size: 14px;
  cursor: pointer;
}

.ofertaf-all-btn.active {
  color: #c8102e;
  font-weight: 700;
}

.ofertaf-check-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ofertaf-check-option {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 7px;
  border-radius: 5px;
  color: #26384b;
  font-size: 14px;
  cursor: pointer;
}

.ofertaf-check-option:hover {
  background: #f3f6f9;
}

.ofertaf-check-option input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 0;
  accent-color: #c8102e;
}

/* Select único de duración.
   JS cambia el contexto entre años y meses. */
.ofertaf-duration-select {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 0 38px 0 10px;
  border: 1px solid #0b4f9c;
  border-radius: 6px;
  background-color: #fff;
  color: #081a40;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}


/* 06. RESULTADOS Y TARJETAS */
.ofertaf-content {
  min-width: 0;
}

.ofertaf-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 30px;
}

.ofertaf-title {
  margin: 0;
  color: #081a40;
  font-size: 26px;
  font-weight: 400;
}

.ofertaf-results-status {
  margin: 6px 0 0;
  color: #5e7083;
  font-size: 13px;
}

.ofertaf-view-switch {
  display: inline-flex;
  gap: 6px;
}

.ofertaf-view-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cad3de;
  border-radius: 6px;
  background: #fff;
  color: #0b4f9c;
  cursor: pointer;
}

.ofertaf-view-btn.active {
  border-color: #0b4f9c;
  background: #0b4f9c;
  color: #fff;
}

.ofertaf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}

.ofertaf-grid[data-view="list"] {
  grid-template-columns: 1fr;
}

.ofertaf-card {
  min-width: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 20px;
  border-radius: 30px;
  background: #f1f1f1;
}

.ofertaf-grid[data-view="list"] .ofertaf-card {
  grid-template-columns: 220px minmax(0, 1fr);
}

.ofertaf-card-media img {
  width: 100%;
  height: 140px;
  display: block;
  object-fit: cover;
  border-radius: 20px;
}

.ofertaf-info {
  min-width: 0;
}

.ofertaf-card-title {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.3;
}

.ofertaf-card-title a {
  color: #0b4f9c;
  text-decoration: none;
}

.ofertaf-card-title a:hover {
  text-decoration: underline;
}

.ofertaf-card-meta {
  margin: 0 0 8px;
  color: #0b4f9c;
  font-size: 12px;
  line-height: 1.45;
}

.ofertaf-card-description {
  margin: 0 0 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: #303b46;
  font-size: 13px;
  line-height: 1.45;
}

.ofertaf-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-red {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 20px;
  background: #c8102e;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}


/* 07. ESTADOS DE FORMACIÓN CONTINUA */
.program-status {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.program-status--open {
  border-color: #91c9a8;
  background: #e8f6ee;
  color: #155f35;
}

.program-status--upcoming,
.program-status--scheduled {
  border-color: #a8c7e8;
  background: #edf5fc;
  color: #174f86;
}

.program-status--closed {
  border-color: #c9ced4;
  background: #f2f3f4;
  color: #454f59;
}

.program-status--ongoing {
  border-color: #dfc475;
  background: #fff6dd;
  color: #684a00;
}

.program-status--finished {
  border-color: #c7c7c7;
  background: #eee;
  color: #4b4b4b;
}

.program-status--not-scheduled {
  border-color: #bdc6d0;
  background: #f5f7f9;
  color: #43566a;
}


/* 08. PAGINACIÓN Y CARGA */
.ofertaf-pagination {
  margin-top: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
}

.ofertaf-pagination[hidden] {
  display: none !important;
}

.ofertaf-page {
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: #0b4f9c;
  cursor: pointer;
}

.ofertaf-page.active {
  background: #c8102e;
  color: #fff;
  font-weight: 700;
}

.ofertaf-page:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.ofertaf-empty,
.ofertaf-error {
  grid-column: 1 / -1;
  padding: 38px 24px;
  border-radius: 20px;
  background: #f1f1f1;
  color: #081a40;
  text-align: center;
}

.ofertaf-wrapper.is-loading .ofertaf-grid {
  opacity: .48;
  pointer-events: none;
}

.ofertaf-reveal {
  animation: ofertafReveal .45s ease both;
}

@keyframes ofertafReveal {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* 09. EXPERIENCIA */
.expe-estudiante-fa {
  padding: 46px 0 60px;
}

.expe-estudiante-fa__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

.expe-estudiante-fa__title {
  margin: 0 0 10px;
  color: #081a40;
  font-size: 56px;
  font-weight: 800;
}

.expe-estudiante-fa__lead {
  max-width: 980px;
  margin: 0 0 26px;
  color: #134582;
  font-size: 20px;
  line-height: 1.4;
}

.expe-estudiante-fa__image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
}


/* 10. ACCESIBILIDAD */
.facultades-item:focus-visible,
.ofertaf-clear:focus-visible,
.ofertaf-filter-btn:focus-visible,
.ofertaf-all-btn:focus-visible,
.ofertaf-check-option input:focus-visible,
.ofertaf-duration-select:focus-visible,
.ofertaf-view-btn:focus-visible,
.ofertaf-page:focus-visible,
.btn-red:focus-visible,
.ofertaf-card-title a:focus-visible {
  outline: 3px solid #1976d2;
  outline-offset: 3px;
}


/* 11. RESPONSIVE */
@media (max-width: 1100px) {
  .hero-facultades {
    height: 440px;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-subtitle {
    font-size: 20px;
  }

  .facultades-menu-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ofertaf-wrapper.filters-open .ofertaf-layout {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 28px;
  }

  .ofertaf-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero-facultades {
    height: 380px;
  }

  .hero-title {
    font-size: 34px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .facultades-menu-inner {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }

  .ofertaf-wrapper {
    padding: 40px 16px;
  }

  .ofertaf-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ofertaf-search {
    width: 100%;
  }

  .ofertaf-wrapper.filters-open .ofertaf-layout {
    grid-template-columns: 1fr;
  }

  .ofertaf-sidebar {
    padding: 20px;
    border: 1px solid #d5dee8;
    border-radius: 16px;
  }

  .ofertaf-card,
  .ofertaf-grid[data-view="list"] .ofertaf-card {
    grid-template-columns: 1fr;
  }

  .ofertaf-card-media img {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .ofertaf-heading-row {
    align-items: flex-start;
  }

  .expe-estudiante-fa__title {
    font-size: 34px;
  }

  .expe-estudiante-fa__lead {
    font-size: 16px;
  }
}

@media (min-width: 1921px) {
  .facultades-menu-inner {
    max-width: 1640px;
  }

  .ofertaf-wrapper,
  .expe-estudiante-fa__inner {
    max-width: 1580px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ofertaf-reveal {
    animation: none;
  }

  .facultades-item {
    transition: none;
  }
}
