/* =====================================================================
   HOME DESTACADAS — sistema de diseño armonioso + accesibilidad WCAG AA
   Paleta: verde #3fad4a | texto #1a1a1a | secundario #4a4a4a | muted #666
   ===================================================================== */

/* ---- Variables ---- */
:root {
  --hd-green:       #3fad4a;
  --hd-green-light: #edf7ee;
  --hd-red:         #c0392b;
  --hd-text:        #1a1a1a;   /* 16.1:1 sobre blanco ✓ WCAG AAA */
  --hd-text-sub:    #4a4a4a;   /* 9.7:1  sobre blanco ✓ WCAG AA  */
  --hd-text-muted:  #666666;   /* 5.7:1  sobre blanco ✓ WCAG AA  */
  --hd-border:      #e5e5e5;
  --hd-bg-soft:     #f6f7f6;
  --hd-shadow-sm:   0 2px 8px rgba(0,0,0,.07);
  --hd-shadow-md:   0 6px 20px rgba(0,0,0,.12);
  --hd-radius:      12px;
  --hd-radius-sm:   8px;
}

/* ---- Sección base ---- */
.hd-section {
  padding: 48px 0 28px;
}

.hd-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Encabezado de sección ---- */
.hd-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.hd-section-header::before {
  content: '';
  display: block;
  width: 4px;
  height: 28px;
  background: var(--hd-green);
  border-radius: 4px;
  flex-shrink: 0;
}

.hd-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--hd-text);
  letter-spacing: 0.3px;
  margin: 0;
  line-height: 1.2;
}

/* ---- Card de plaza ---- */
.hd-card-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
  border-radius: var(--hd-radius);
  outline-offset: 3px;
}

.hd-card-link:focus-visible {
  outline: 3px solid var(--hd-green);
}

.hd-card-link:hover {
  text-decoration: none;
  color: inherit;
}

.hd-card {
  position: relative;
  background: #fff;
  border-radius: var(--hd-radius);
  padding: 22px 18px 20px;
  height: 100%;
  box-shadow: var(--hd-shadow-sm);
  border: 1px solid var(--hd-border);
  border-top: 3px solid var(--hd-border);
  transition: box-shadow .22s ease, border-top-color .22s ease, transform .22s ease;
}

.hd-card-link:hover .hd-card {
  box-shadow: var(--hd-shadow-md);
  border-top-color: var(--hd-green);
  transform: translateY(-3px);
}

/* Estilo especial para "Ofertas Destacadas" */
.hd-card--featured {
  border-top-color: var(--hd-green);
}

.hd-card-link:hover .hd-card--featured {
  border-top-color: #2d8c38;
}

.hd-card-bookmark {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 18px;
  color: var(--hd-green);
  line-height: 1;
}

/* Logo empresa dentro de la card */
.hd-card-img {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  margin-bottom: 14px;
  margin-top: 4px;
}

.hd-card-img img {
  display: block;
  max-height: 72px;
  max-width: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Textos card */
.hd-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--hd-text);
  margin: 0 0 5px;
  line-height: 1.35;
  padding-right: 26px;
}

.hd-card-company {
  font-size: 13px;
  font-weight: 500;
  color: var(--hd-text-sub);
  margin: 0 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hd-card-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--hd-text-muted);
  margin: 0;
}

.hd-card-location i {
  color: var(--hd-green);
  font-size: 12px;
  flex-shrink: 0;
}

/* Badge NUEVO */
.hd-badge-nuevo {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--hd-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--hd-radius) 0 var(--hd-radius-sm) 0;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  line-height: 1;
}

/* Margen inferior en columnas de cards */
.hd-col {
  margin-bottom: 20px;
}

/* =====================================================================
   EMPRESAS DESTACADAS — carrusel
   ===================================================================== */

.hd-empresas-section {
  padding: 40px 0 32px;
}

.hd-empresas-section .hd-section-header {
  margin-bottom: 20px;
}

/* Wrapper externo que contiene botones + swiper */
.hd-swiper-outer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hd-empresas-swiper {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
}

.hd-empresa-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Link del logo empresa */
.hd-empresa-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--hd-radius);
  outline-offset: 3px;
  transition: background .2s, transform .2s;
}

.hd-empresa-link:focus-visible {
  outline: 3px solid var(--hd-green);
}

.hd-empresa-link:hover {
  background: #fff;
  transform: translateY(-3px);
  box-shadow: var(--hd-shadow-sm);
}

.hd-empresa-link img {
  max-height: 64px;
  max-width: 130px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: grayscale(10%);
  transition: filter .22s;
}

.hd-empresa-link:hover img {
  filter: grayscale(0%);
}

/* Botones de navegación externos — Font Awesome icons */
.hd-nav-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--hd-green);
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  cursor: pointer;
  transition: background .2s, color .2s, transform .15s;
  outline-offset: 3px;
}

.hd-nav-btn:focus-visible {
  outline: 3px solid var(--hd-green);
}

.hd-nav-btn:hover {
  background: var(--hd-green);
  color: #fff;
  transform: scale(1.1);
}

.hd-nav-btn.swiper-button-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

/* Tablet grande ≤ 992px */
@media (max-width: 992px) {
  .hd-title {
    font-size: 18px;
  }

  .hd-card-title {
    font-size: 14px;
  }

  .hd-empresa-link {
    height: 84px;
  }

  .hd-empresa-link img {
    max-height: 58px;
    max-width: 120px;
  }
}

/* Tablet ≤ 768px */
@media (max-width: 768px) {
  .hd-section {
    padding: 36px 0 20px;
  }

  .hd-container {
    padding: 0 16px;
  }

  .hd-title {
    font-size: 17px;
  }

  .hd-section-header {
    margin-bottom: 22px;
  }

  .hd-card {
    padding: 18px 14px 16px;
  }

  .hd-card-img {
    height: 62px;
  }

  .hd-card-img img {
    max-height: 62px;
    max-width: 120px;
  }

  .hd-card-title {
    font-size: 14px;
  }

  .hd-card-company {
    font-size: 12px;
  }

  .hd-card-location {
    font-size: 12px;
  }

  .hd-empresas-section {
    padding: 30px 0 24px;
  }

  .hd-empresa-link {
    height: 78px;
  }

  .hd-empresa-link img {
    max-height: 52px;
    max-width: 108px;
  }

  .hd-nav-btn {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
}

/* Móvil ≤ 576px */
@media (max-width: 576px) {
  .hd-section {
    padding: 28px 0 16px;
  }

  .hd-container {
    padding: 0 14px;
  }

  .hd-title {
    font-size: 15px;
  }

  .hd-section-header::before {
    height: 22px;
    width: 3px;
  }

  .hd-section-header {
    gap: 10px;
    margin-bottom: 18px;
  }

  .hd-card {
    padding: 16px 12px 14px;
    border-radius: var(--hd-radius-sm);
  }

  .hd-card-link {
    border-radius: var(--hd-radius-sm);
  }

  .hd-card-img {
    height: 58px;
  }

  .hd-card-img img {
    max-height: 58px;
    max-width: 110px;
  }

  .hd-card-title {
    font-size: 13px;
  }

  .hd-card-company,
  .hd-card-location {
    font-size: 12px;
  }

  .hd-card-bookmark {
    font-size: 16px;
    top: 12px;
    right: 12px;
  }

  .hd-badge-nuevo {
    font-size: 10px;
    padding: 3px 9px;
  }

  .hd-col {
    margin-bottom: 14px;
  }

  .hd-swiper-outer {
    gap: 6px;
  }

  .hd-empresa-link {
    height: 66px;
    padding: 8px 8px;
  }

  .hd-empresa-link img {
    max-height: 46px;
    max-width: 86px;
  }

  .hd-nav-btn {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
}
