/*
Theme Name: IFG Colombia
Theme URI: https://ifgcolombia.local/
Author: IFG Colombia
Description: Custom WordPress theme for IFG Logistics.
Version: 0.5.2
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: ifgcolombia
*/

/* Video assets preserve their intended geometry without distortion. */
.ifg-service-video,
video.hero-video,
video.fh-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Keep every service preview inside the fixed-height home hero card. */
.section_hero .slider-hero-slide_info {
  min-width: 0;
  max-height: 100%;
  padding: .75rem 1.125rem;
  overflow: hidden;
}

.section_hero .slider-hero-slide_info h2,
.section_hero .slider-hero-slide_info p {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
}

.section_hero .slider-hero-slide_info h2 {
  flex: none;
  -webkit-line-clamp: 2;
}

.section_hero .slider-hero-slide_info > .opacity-60 {
  min-height: 0;
  overflow: hidden;
}

.section_hero .slider-hero-slide_info p {
  -webkit-line-clamp: 4;
}

.section_hero .slider-hero-slide {
  overflow: hidden;
}

@media (max-width: 767px) {
  .section_hero .slider-hero-slide_info {
    padding: 0 .125rem 0 .75rem;
  }

  .section_hero .slider-hero-slide_info p {
    -webkit-line-clamp: 2;
  }
}

.nav-menu_wrapper .ifg-nav-legal {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* IFG quote modal */
.ifg-modal-open {
  overflow: hidden;
}

.ifg-quote-modal,
.ifg-quote-modal * {
  box-sizing: border-box;
}

.ifg-quote-modal [hidden] {
  display: none !important;
}

.ifg-quote-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  padding: 1.5rem;
  place-items: center;
  color: #00283b;
}

.ifg-quote-modal.is-open {
  display: grid;
}

.ifg-quote-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 28, 43, .74);
  backdrop-filter: blur(10px);
}

.ifg-quote-modal__panel {
  position: relative;
  width: min(62rem, 100%);
  max-height: calc(100dvh - 3rem);
  overflow: auto;
  border-radius: 1.5rem;
  background: #f7f8f8;
  box-shadow: 0 1.5rem 5rem rgba(0, 20, 32, .32);
}

.ifg-quote-modal__close {
  position: absolute;
  z-index: 2;
  top: 1.25rem;
  right: 1.25rem;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  padding: .75rem;
  border: 0;
  border-radius: 50%;
  place-items: center;
  color: #fff;
  background: #00283b;
  cursor: pointer;
}

.ifg-quote-modal__close svg {
  width: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.ifg-quote-modal__header {
  padding: 2.25rem 5rem 1.5rem 2.5rem;
  color: #fff;
  background: #00465a;
}

.ifg-quote-modal__eyebrow {
  margin: 0 0 .5rem;
  color: #9ccbd9;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ifg-quote-modal__header h2 {
  max-width: 42rem;
  margin: 0;
  color: inherit;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
  letter-spacing: -.04em;
}

.ifg-quote-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.ifg-quote-progress__label {
  flex: none;
  font-size: .8125rem;
}

.ifg-quote-progress__track {
  display: block;
  width: min(20rem, 55%);
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, .28);
}

.ifg-quote-progress__track span {
  display: block;
  width: 33.333%;
  height: 100%;
  background: #fff;
  transition: width .25s ease;
}

.ifg-quote-form,
.ifg-quote-success {
  padding: 2rem 2.5rem 2.5rem;
}

.ifg-quote-step fieldset,
.ifg-complements {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ifg-quote-step > fieldset > legend {
  margin-bottom: .4rem;
  padding: 0;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -.025em;
}

.ifg-quote-step__intro {
  margin: 0 0 1.5rem;
  color: #526b76;
}

.ifg-service-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.ifg-choice-card {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.ifg-choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ifg-choice-card span {
  display: flex;
  min-height: 5rem;
  padding: 1rem 3rem 1rem 1rem;
  border: 1px solid #cedadd;
  border-radius: 1rem;
  flex-direction: column;
  justify-content: center;
  background: #fff;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.ifg-choice-card span::after {
  position: absolute;
  top: 50%;
  right: 1.1rem;
  width: .7rem;
  height: .7rem;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  content: '';
  transform: translateY(-50%) rotate(45deg);
}

.ifg-choice-card strong {
  font-size: 1rem;
  font-weight: 600;
}

.ifg-choice-card small {
  margin-top: .2rem;
  color: #657d87;
  font-size: .8125rem;
}

.ifg-choice-card input:checked + span {
  border-color: #37768b;
  background: #e5f0f3;
}

.ifg-choice-card:hover span {
  transform: translateY(-2px);
}

.ifg-choice-card input:focus-visible + span,
.ifg-quote-modal :is(button, input, select, textarea, a):focus-visible {
  outline: 3px solid #6eaac1;
  outline-offset: 2px;
}

.ifg-quote-fields {
  display: grid;
  gap: 1rem;
}

.ifg-quote-fields--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ifg-quote-fields--four {
  grid-template-columns: .7fr 1fr .7fr 1.4fr;
}

.ifg-quote-fields label,
.ifg-quote-notes {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: .4rem;
}

.ifg-quote-fields label > span,
.ifg-quote-notes > span,
.ifg-field-label,
.ifg-complements > legend {
  color: #294d5c;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ifg-quote-fields input,
.ifg-quote-fields select,
.ifg-quote-notes textarea {
  width: 100%;
  min-height: 3rem;
  padding: .75rem .9rem;
  border: 1px solid #cbd8dc;
  border-radius: .75rem;
  color: #00283b;
  background: #fff;
  font: inherit;
}

.ifg-quote-notes {
  margin-top: 1rem;
}

.ifg-quote-notes textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.ifg-quote-mode {
  margin-bottom: 1rem;
}

.ifg-inline-options,
.ifg-complements > div {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .5rem;
}

.ifg-inline-options label,
.ifg-complements label {
  position: relative;
  cursor: pointer;
}

.ifg-inline-options input,
.ifg-complements input {
  position: absolute;
  opacity: 0;
}

.ifg-inline-options span,
.ifg-complements span {
  display: block;
  padding: .65rem .9rem;
  border: 1px solid #cbd8dc;
  border-radius: 999px;
  background: #fff;
  font-size: .875rem;
}

.ifg-inline-options input:checked + span,
.ifg-complements input:checked + span {
  border-color: #00465a;
  color: #fff;
  background: #00465a;
}

.ifg-complements {
  margin-top: 1.25rem;
}

.ifg-quote-consent {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-top: 1.5rem;
  color: #526b76;
  font-size: .875rem;
}

.ifg-quote-consent input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: .1rem;
  accent-color: #00465a;
}

.ifg-quote-consent a {
  color: #00465a;
  text-decoration: underline;
}

.ifg-quote-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  margin-top: 1.75rem;
}

.ifg-quote-button {
  min-height: 3rem;
  padding: .75rem 1.35rem;
  border: 1px solid #00465a;
  border-radius: 999px;
  color: #fff;
  background: #00465a;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ifg-quote-button--secondary {
  color: #00465a;
  background: transparent;
}

.ifg-quote-button:disabled {
  cursor: wait;
  opacity: .6;
}

.ifg-quote-form__error {
  margin-top: 1rem;
  padding: .8rem 1rem;
  border-radius: .75rem;
  color: #7a1f1f;
  background: #fde8e8;
}

.ifg-quote-success {
  min-height: 25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.ifg-quote-success__icon {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  place-items: center;
  color: #fff;
  background: #37768b;
  font-size: 1.5rem;
}

.ifg-quote-success__icon svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ifg-quote-success h3 {
  margin: 0 0 .75rem;
  font-size: 2rem;
}

.ifg-quote-success p {
  max-width: 38rem;
  margin: 0 0 1.5rem;
  color: #526b76;
}

.ifg-quote-hp {
  position: absolute !important;
  left: -10000px !important;
}

@media (max-width: 767px) {
  /* Keep the compact mobile footer focused on company and legal information. */
  .show-mobile.mobile_order-3 > .vflex.is-gap-16.is-x-center > .hflex.is-y-center {
    display: none !important;
  }

  .ifg-quote-modal {
    padding: 0;
    place-items: end stretch;
  }

  .ifg-quote-modal__panel {
    width: 100%;
    max-height: 94dvh;
    border-radius: 1.25rem 1.25rem 0 0;
  }

  .ifg-quote-modal__header {
    padding: 1.75rem 4.5rem 1.25rem 1.25rem;
  }

  .ifg-quote-modal__header h2 {
    font-size: 2.25rem;
  }

  .ifg-quote-form,
  .ifg-quote-success {
    padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
  }

  .ifg-service-options,
  .ifg-quote-fields--two,
  .ifg-quote-fields--four {
    grid-template-columns: 1fr;
  }

  .ifg-choice-card span {
    min-height: 4.5rem;
  }

  .ifg-quote-form__actions {
    position: sticky;
    bottom: 0;
    padding-top: 1rem;
    background: #f7f8f8;
  }

  .ifg-quote-form__actions .ifg-quote-button:not([hidden]) {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ifg-choice-card span,
  .ifg-quote-progress__track span {
    transition: none;
  }
}
