/* Mejoras de tipografía y contraste global */

body {
  font-size: 16px;
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(148, 163, 184, 0.16), transparent 55%),
    radial-gradient(circle at bottom right, rgba(15, 23, 42, 0.96), #020617 80%);
}

.imd-section__header h2 {
  font-size: 2.1rem;
}

.imd-section__header p,
.imd-about__text p,
.imd-process__step p,
.imd-services__item p,
.imd-industries__item p,
.imd-product-card__body p,
.imd-quote__layout p {
  font-size: 0.98rem;
}

/* Hero: más contraste sobre el video */

.imd-hero__video video {
  filter: none;
}

.imd-hero__bg {
  display: none;
}

.imd-hero__content {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  backdrop-filter: none;
}

.imd-hero__content h1,
.imd-hero__content p,
.imd-hero__content .imd-hero__kicker {
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.imd-hero__highlight {
  color: var(--imd-accent);
}

.imd-hero__content h1 {
  color: #f9fafb;
}

.imd-hero__subtitle {
  color: #e5e7eb;
}

.imd-hero__kicker {
  color: rgba(229, 231, 235, 0.85);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

/* Reordenar columnas del hero: tarjeta a la izquierda, texto a la derecha (solo escritorio) */

@media (min-width: 901px) {
  .imd-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.2fr);
    gap: 2.4rem;
    align-items: center;
  }

  .imd-hero__content {
    order: 2;
  }

  .imd-hero__visual {
    order: 1;
  }
}

/* Tarjetas de producto: superficie más clara y texto más legible */

.imd-product-card {
  background:
    radial-gradient(circle at top left, rgba(55, 65, 81, 0.3), transparent 55%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.97), rgba(15, 23, 42, 0.9));
  border-radius: var(--imd-radius-md);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(37, 99, 235, 0.55);
}

.imd-product-card__body h3 {
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.imd-product-card__material {
  color: var(--imd-accent);
  font-weight: 500;
}

.imd-product-card__image-label {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.8));
  backdrop-filter: blur(10px);
  font-size: 0.78rem;
}

/* Tarjetas de industrias y servicios, alineadas con el estilo del catálogo */

.imd-industries__item,
.imd-services__item {
  background:
    radial-gradient(circle at top left, rgba(55, 65, 81, 0.32), transparent 55%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.97), rgba(15, 23, 42, 0.9));
  border-radius: var(--imd-radius-md);
  border: 1px solid rgba(31, 41, 55, 0.95);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.9);
}

.imd-industries__item h3,
.imd-services__item h3 {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.imd-industries__item p,
.imd-services__item p {
  color: var(--imd-text-soft);
}

/* Modal: más separación del fondo */

.imd-modal__dialog {
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
  border-radius: 1.4rem;
}

/* Navegación: mejor legibilidad */

.imd-header__nav a {
  font-size: 0.9rem;
}

.imd-header__nav a:hover {
  color: var(--imd-text);
}

.imd-header__lang {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.imd-lang-switch {
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: transparent;
  color: var(--imd-text-soft);
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  cursor: pointer;
}

.imd-lang-switch--active {
  background: var(--imd-primary-soft);
  color: var(--imd-text);
  border-color: var(--imd-accent);
}

/* Separación suave entre secciones en el fondo oscuro */

.imd-section:nth-of-type(odd) {
  background:
    radial-gradient(circle at top left, rgba(31, 41, 55, 0.85), #020617 70%),
    radial-gradient(circle at bottom right, rgba(15, 23, 42, 0.9), #020617 100%);
}

.imd-section:nth-of-type(even) {
  background:
    radial-gradient(circle at top right, rgba(31, 41, 55, 0.78), #020617 65%),
    radial-gradient(circle at bottom left, rgba(15, 23, 42, 0.9), #020617 100%);
}

/* Buscador del catálogo */

.imd-catalog__search {
  max-width: 420px;
  margin: 0 0 1.5rem;
}

.imd-catalog__search-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: var(--imd-text);
  font-size: 0.9rem;
  outline: none;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.7);
}

.imd-catalog__search-input::placeholder {
  color: var(--imd-text-muted);
}

.imd-catalog__search-input:focus {
  border-color: var(--imd-accent);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.5), 0 18px 40px rgba(15, 23, 42, 0.9);
}

.imd-catalog__empty {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: var(--imd-text-muted);
}

/* Conmutador de idiomas (bloques largos) */

.lang-en {
  display: none;
}

html[lang="en"] .lang-es {
  display: none;
}

html[lang="en"] .lang-en {
  display: block;
}

/* Barra de confianza en cotización */

.imd-trust-bar {
  margin: 0 0 1.8rem;
  padding: 0.9rem 1rem;
  border-radius: var(--imd-radius-md);
  background: radial-gradient(circle at left, rgba(37, 99, 235, 0.22), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(37, 99, 235, 0.38);
  color: var(--imd-text-soft);
  font-size: 0.86rem;
}

.imd-trust-bar__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
}

.imd-trust-bar__list li strong {
  color: var(--imd-accent);
}

@media (max-width: 640px) {
  .imd-trust-bar__list {
    flex-direction: column;
  }
}

/* Cantidad en el modal de ficha técnica */

.imd-modal__qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.imd-modal__qty label {
  font-size: 0.85rem;
  color: var(--imd-text-soft);
}

.imd-modal__qty input {
  width: 80px;
  padding: 0.3rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
  color: var(--imd-text);
  font-size: 0.85rem;
}

/* Botón flotante de carrito de cotización */

.imd-cart-fab {
  position: fixed;
  right: 1.5rem;
  bottom: 5.8rem;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--imd-primary), var(--imd-accent));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.95);
  z-index: 60;
}

.imd-cart-fab:hover {
  filter: brightness(1.07);
}

@media (max-width: 640px) {
  .imd-cart-fab {
    right: 1rem;
    bottom: 5.5rem;
    padding-inline: 1.1rem;
  }
}

/* Botón flotante de sugerencias */

.imd-feedback-fab {
  position: fixed;
  left: 1.5rem;
  bottom: 1.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.96);
  color: var(--imd-text);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  z-index: 60;
}

.imd-feedback-fab:hover {
  filter: brightness(1.08);
}

@media (max-width: 640px) {
  .imd-feedback-fab {
    left: 1rem;
    bottom: 1.4rem;
    font-size: 0.75rem;
    padding-inline: 0.9rem;
  }
}

/* Resumen flotante del carrito */

.imd-cart-summary {
  position: fixed;
  right: 1.5rem;
  bottom: 9.6rem;
  max-width: 260px;
  padding: 0.75rem 0.9rem;
  border-radius: var(--imd-radius-md);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: var(--imd-text-soft);
  font-size: 0.8rem;
  box-shadow: var(--imd-shadow-soft);
  display: none;
  z-index: 55;
}

.imd-cart-summary strong {
  color: var(--imd-text);
  display: block;
  margin-bottom: 0.35rem;
}

.imd-cart-summary ul {
  list-style: none;
  margin: 0 0 0.4rem;
  padding: 0;
}

.imd-cart-summary li {
  margin: 0.05rem 0;
}

.imd-cart-summary__hint {
  margin: 0;
  color: var(--imd-text-muted);
}

.imd-cart-fab--has-items:hover + .imd-cart-summary,
.imd-cart-fab--has-items:focus-visible + .imd-cart-summary {
  display: block;
}

@media (max-width: 640px) {
  .imd-cart-summary {
    right: 1rem;
    bottom: 9.2rem;
    max-width: 240px;
  }
}

/* Ajustes mobile generales */

@media (max-width: 640px) {
  .imd-section {
    padding: 3.5rem 1.25rem 3.25rem;
  }

  .imd-hero__content h1 {
    font-size: 1.9rem;
  }

  .imd-hero__subtitle {
    font-size: 0.95rem;
  }

  .imd-contact__map iframe {
    min-height: 280px;
  }

  .imd-hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .imd-hero__actions .imd-btn {
    width: 100%;
    justify-content: center;
  }

  .imd-catalog__filters {
    row-gap: 0.4rem;
  }

  .imd-quote__layout {
    row-gap: 1.8rem;
  }
}

/* Ajustes de lectura en escritorio amplio */

@media (min-width: 1200px) {
  .imd-section__header h2 {
    font-size: 2.3rem;
  }

  .imd-hero__content h1 {
    font-size: 2.6rem;
  }
}

/* Formulario de cotización: aspecto más claro y estados marcados */

.imd-form__field input,
.imd-form__field select,
.imd-form__field textarea {
  border-radius: 0.7rem;
  border-color: rgba(55, 65, 81, 0.95);
}

.imd-form__field input:focus,
.imd-form__field select:focus,
.imd-form__field textarea:focus {
  border-color: var(--imd-primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.7), 0 18px 40px rgba(15, 23, 42, 0.9);
}

.imd-form__field--error input,
.imd-form__field--error select,
.imd-form__field--error textarea {
  border-color: #f97373;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.6);
}

.imd-form__message--error {
  color: #fecaca;
}

.imd-form__message--success {
  color: #bbf7d0;
}

/* Chips y filtros del catálogo */

.imd-catalog__filters .imd-chip {
  border-radius: 999px;
  border-width: 1px;
}

.imd-catalog__filters .imd-chip:hover {
  border-color: var(--imd-accent);
  color: var(--imd-text);
}

.imd-catalog__filters .imd-chip.imd-chip--active {
  background: linear-gradient(135deg, var(--imd-primary), var(--imd-accent));
  color: #fff;
  border-color: transparent;
}
