/* Incremental responsive fixes kept separate until the legacy Sass build is refreshed. */

/* One talent card per row in portrait tablet widths. */
@media (max-width: 1200px) {
  .fyc-talent .content .flex-container {
    display: block;
  }

  .fyc-talent .content .flex-container .card.card-picture {
    display: flex;
    flex: 0 0 auto;
    width: calc(100% - 32px);
    max-width: none;
    margin: 16px;
  }

  .fyc-talent .content .flex-container .card-picture .card-image {
    flex: 0 0 35%;
    max-height: 260px;
    overflow: hidden;
  }

  .fyc-talent .content .flex-container .card-picture .card-image img {
    width: 100%;
    height: 260px;
    object-fit: cover;
  }
}

@media (max-width: 600px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  #modal_home,
  #modal_home .panel-modal,
  #modal_home .modal-body,
  #modal_home .row,
  #modal_home .acuerdo,
  #modal_home .logos_large {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  #modal_home {
    left: 12px;
    right: 12px;
    width: auto !important;
    max-width: none !important;
  }

  /* Keep the decorative edge flush with the hero; the legacy -1px offset
     exposes a hairline of the hero background below the white chevron. */
  .chevron-bottom::after {
    bottom: 0;
  }

  .chevron-bottom + section {
    margin-top: -1px;
  }

  .jumbotron .jumbotron-title {
    width: 280px !important;
    max-width: calc(100vw - 48px) !important;
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(24px, 7vw, 30px) !important;
    line-height: 1.1;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .jumbotron .scroll-down {
    left: 0;
    right: 0;
    width: auto;
  }

  .grid.grid-6-6 {
    display: block;
  }

  .contact > .container > .grid > .col,
  .contact .grid .col-06,
  .contact form,
  .contact form .form-control {
    width: calc(100vw - 32px) !important;
    min-width: 0;
    max-width: 100%;
  }

  /* The legacy grid has -16px side margins and 16px column gutters. Reset
     both at the narrow breakpoint so the contact content has a real gutter
     instead of cancelling the padding visually. */
  .contact > .container {
    width: 100%;
    max-width: 100%;
    padding-left: 24px;
    padding-right: 24px;
  }

  .contact > .container > .grid {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .contact > .container > .grid > .col {
    padding-left: 0;
    padding-right: 0;
  }

  .contact .instructions {
    width: 100% !important;
    padding-left: 32px;
  }

  .contact .instructions li {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .contact .categorias ul.icons {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1.25rem !important;
  }

  .categorias ul.icons li {
    min-width: 0;
  }

  .requisitos,
  .requisitos .grid-9-3,
  .requisitos .grid-9-3 > div {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .requisitos .grid-9-3 {
    display: block;
  }

  .requisitos ul.checks {
    column-count: 1;
    padding-left: 40px;
  }

  .requisitos .btn {
    max-width: 100%;
    white-space: normal;
  }

  .cc-window.cc-banner {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }

  .cc-banner .cc-message {
    width: 100%;
    margin: 0 0 12px;
  }

  .cc-banner .cc-compliance {
    display: block;
    width: 100%;
  }

  .cc-banner .cc-btn {
    width: 100%;
    min-width: 0;
    margin: 0;
    white-space: normal;
  }

  /* The service cards are fixed-size circles. At 360–600px a nowrap row
     makes the third card paint outside the viewport. */
  .fyc-lms .circle-block {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    margin-top: 48px;
  }

  .fyc-lms .circle-block .circle-item {
    flex: 0 0 auto;
    width: 160px;
    max-width: 100%;
    margin: 0 auto 56px;
  }

  .fyc-lms .circle-block .circle-item:last-child {
    margin-bottom: 24px;
  }

  /* Talent solution cards must become full-width cards before the legacy
     flex row reaches the 360px-only mobile rule. */
  .fyc-talent .content .flex-container {
    display: block;
  }

  .fyc-talent .content .flex-container .card.card-picture {
    display: flex;
    flex: 0 0 auto;
    width: calc(100% - 32px);
    max-width: none;
    margin: 16px;
    flex-direction: column;
  }

  .fyc-talent .content .flex-container .card-picture .card-image {
    flex: 0 0 auto;
    width: 100%;
    height: 180px;
    max-height: 180px;
  }

  .fyc-talent .content .flex-container .card-picture .card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .chevron-bottom + section {
    margin-top: -1px;
  }

  .main-footer {
    background-image: none;
  }

  .main-footer .company .container {
    display: block;
    text-align: center;
  }

  .main-footer .company .fyc-logo svg {
    margin: 0 auto 24px;
  }

  .main-footer .company .oficinas {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
  }

  .main-footer .company .certificados {
    justify-content: center;
  }

  .main-footer .property .container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .main-footer .legal nav {
    justify-content: center;
    flex-wrap: wrap;
  }
}

.modal {
  width: min(720px, calc(100% - 24px));
  max-width: none;
  box-sizing: border-box;
}

#modal_home {
  width: calc(100vw - 24px) !important;
  max-width: calc(100vw - 24px) !important;
}

.modal .panel-modal,
.modal .modal-body,
.modal .row,
.modal .col-6,
.modal .acuerdo,
.modal .contenido_acuerdo {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.modal .panel-modal {
  width: 100%;
}

.modal .modal-body img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .modal {
    top: 16px;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 32px);
  }

  .modal .modal-body {
    padding: 20px 16px;
  }

  .modal .row {
    display: block;
  }

  .modal .col-6 {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .modal .acuerdo h3 {
    font-size: clamp(24px, 8vw, 36px);
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .modal .acuerdo {
    width: 100% !important;
    max-width: 100% !important;
    flex-direction: column;
  }

  .modal .acuerdo img,
  .modal .acuerdo .contenido_acuerdo {
    width: 100% !important;
    max-width: 100% !important;
  }
}
