/**
 * @file footer.css
 * @component Footer (Organism)
 * @location components/organisms/footer/
 *
 * @description
 * Styles for the dynamic footer component. Uses CSS variables from base theme
 * and defines custom layout structures for columns, side panels, and the
 * bottom accreditation row.
 */

.c-footer {
  padding: 0;
  background: none;
}

.c-footer__top-section {
  background-color: #003865;
  color: #ffffff;
  padding: 60px 0;
}

.c-footer__bottom-section {
  background-color: #f5f7fa;
  padding: 30px 0;
  border-top: 1px solid #e2e8f0;
  padding-bottom: 0;
}

/* Main Grid & Panel Row */
.c-footer__top {
  display: flex;
  flex-direction: column;
  gap: 40px;

  @media (max-width: 991.98px) {
    gap: 10px;
  }
}

@media (min-width: 992px) {
  .c-footer__top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

/* Left side: Grid of Menu Columns */
.c-footer__menus {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  flex: 1;
}

@media (min-width: 576px) {
  .c-footer__menus {
    grid-template-columns: repeat(3, 1fr);
  }
}

.c-footer__menu-col {
  display: flex;
  flex-direction: column;
}

.c-footer__col-title {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  position: relative;
  margin: 0;
  padding: 0;
  font-family: "MMC_Bold";
  font-size: 18px;
  line-height: 20px;
  padding-bottom: 20px;
}

.c-footer__col-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.c-footer__col-list li {
  font-size: 14px;
  line-height: 30px;
}

.c-footer__col-list a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  line-height: 30px;
  font-weight: 400;
  transition:
    color 0.2s ease,
    padding-left 0.2s ease;
}

.c-footer__col-list a.is-secondary {
  color: #00ac41;
}

.c-footer__col-list a:hover {
  color: #00ac41;
}

/* Right side: Contact, Switcher, Social, CTA */
.c-footer__panel {
  display: flex;
  flex-direction: column;
  gap: 25px;
  width: 100%;
}

@media (min-width: 992px) {
  .c-footer__panel {
    width: 320px;
    flex-shrink: 0;
  }
}

/* Social Links */
.c-footer__social {
  display: flex;
  gap: 12px;
  align-items: center;
}

.c-footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
}

/* Contact Items */
.c-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.c-footer__contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #b0c3d0;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.c-footer__contact-item:hover {
  color: #00ac41;
}

.c-footer__contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00ac41;
}

/* Language Switcher in Footer (Opens Downward) */
.c-footer__language-wrapper {
  position: relative;
  width: fit-content;
}

.c-footer__language-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  user-select: none;
  padding: 0;
  color: #ffffff;
  transition: opacity 0.2s ease;
}

.c-footer__language-trigger:hover {
  opacity: 0.85;
}

.c-footer__language-icon {
  display: flex;
  align-items: center;
  color: #00ac41;
}

.c-footer__language-text {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
}

.c-footer__language-arrow {
  display: flex;
  align-items: center;
  color: #ffffff;
  transition: transform 0.2s ease;
}

.c-footer__language-wrapper.is-open .c-footer__language-arrow {
  transform: rotate(180deg);
}

.c-footer__language-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 178px;
  margin-top: 12px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  z-index: 100;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.c-footer__language-dropdown::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 80px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent #ffffff transparent;
}

/* Hover bridge to prevent dropdown from closing when moving mouse from trigger to dropdown */
.c-footer__language-dropdown::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 100%;
  height: 16px;
}

.c-footer__language-wrapper.is-open .c-footer__language-dropdown {
  display: flex;
}

@media (min-width: 992px) {
  .c-footer__language-wrapper:hover .c-footer__language-dropdown {
    display: flex;
  }

  .c-footer__language-wrapper:hover .c-footer__language-arrow {
    transform: rotate(180deg);
  }
}

.c-footer__language-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  color: #334155;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
  text-align: left;
}

.c-footer__language-option:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.c-footer__language-option:last-child {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.c-footer__language-option:hover {
  background-color: #f1f5f9;
  color: #00ac41;
}

.c-footer__language-option.is-active {
  background-color: #f1f5f9;
  color: #00ac41;
  font-weight: 600;
}

.c-footer__language-option img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.c-footer__cta-label {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  text-align: left;
  font-family: "MMC_Bold", sans-serif;
}

/* Footer CTA Button */
.c-footer__cta-btn {
  display: inline-block;
  background-color: #00ac41;
  color: #ffffff;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 4px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 172, 65, 0.15);
}

.c-footer__cta-btn:hover {
  background-color: #009137;
  transform: translateY(-1px);
  color: #ffffff;
  box-shadow: 0 6px 12px rgba(0, 172, 65, 0.25);
}

.c-footer__cta-btn:active {
  transform: translateY(0);
}

/* Bottom Footer Section */
.c-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Accreditation Logos Banner */
.c-footer__logos {
  background-color: transparent;
  border-radius: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 60px;
  box-shadow: none;
}

/* Dynamic logo image (from Footer Logos block) */
.c-footer__logo-img-wrap {
  display: flex;
  align-items: center;
  justify-content: start;
}

.c-footer__logo-img {
  height: 60px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: none;
}

.c-footer__logo-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 6px 14px;
  min-width: 100px;
  height: 48px;
  background-color: #f8fafc;
  color: #003865;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
  user-select: none;
}

.c-footer__logo-badge:hover {
  transform: scale(1.05);
  border-color: #cbd5e1;
}

.c-footer__logo-text {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.2;
}

.c-footer__logo-sub {
  font-size: 9px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Custom coloring for specific badges to look extremely premium and authentic */
.c-footer__logo-badge--iso {
  color: #0c4a6e;
}

.c-footer__logo-badge--tuv {
  border-color: #0284c7;
  color: #0284c7;
}

/* Legal and Copyright Info */
.c-footer__info {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .c-footer__info {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.c-footer__copyright {
  font-size: 14px;
  color: #2c3e50;
  line-height: 16px;
}

.c-footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  align-items: center;
}

.c-footer__legal-links a {
  font-size: 14px;
  color: #2c3e50;
  line-height: 16px;
  text-decoration: none;
}

.c-footer__legal-separator {
  color: #2c3e50;
  font-size: 16px;
  user-select: none;
}

/* Responsive/Mobile specific layout styles matching design screenshots */
@media (min-width: 576px) {
  .c-footer__col-chevron {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .c-footer__top-section {
    padding: 15px 0;
    padding-bottom: 30px;
  }

  .c-footer__menus {
    gap: 0;
    margin-bottom: 20px;
  }

  .c-footer__col-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    cursor: pointer;
    text-align: center;
    width: 100%;
    margin-bottom: 0;
    color: #ffffff;
    font-size: 18px;
    font-family: "MMC_Bold", sans-serif;
  }

  .c-footer__col-chevron {
    display: inline-flex;
    align-items: center;
    color: #ffffff;
    transition: transform 0.3s ease;
  }

  .c-footer__col-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
    align-items: center;
    padding-bottom: 0;
  }

  .c-footer__col-list li {
    text-align: center;
    width: 100%;
  }

  .c-footer__menu-col.is-open .c-footer__col-list {
    max-height: 500px;
    transition: max-height 0.3s ease-in-out;
    padding-bottom: 16px;
  }

  .c-footer__menu-col.is-open .c-footer__col-chevron {
    transform: rotate(180deg);
  }

  /* Side Panel Centering on Mobile */
  .c-footer__panel {
    align-items: center;
    text-align: center;
    gap: 20px;
  }

  .c-footer__social {
    justify-content: center;
    width: 100%;
    margin-bottom: 10px;
  }

  .c-footer__contact {
    align-items: center;
    width: 100%;
  }

  .c-footer__language-wrapper {
    margin: 0 auto;
  }

  .c-footer__cta {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
  }

  .c-footer__cta-label {
    text-align: center;
    margin-bottom: 12px;
  }

  .c-footer__cta-btn {
    width: 100%;
    max-width: 340px;
  }

  /* Bottom section logos */
  .c-footer__logos {
    justify-content: center;
    gap: 30px 40px;
  }

  .c-footer__logo-img-wrap {
    justify-content: center;
    flex: 0 0 calc(50% - 20px);
    max-width: 140px;
  }

  /* Ensure last rows center if odd number */
  .c-footer__logo-img-wrap:nth-last-child(-n + 3) {
    flex: 0 0 calc(33.333% - 20px);
  }

  .c-footer__logo-img {
    height: 50px;
  }

  .c-footer__info {
    text-align: center;
    align-items: center;
  }

  .c-footer__legal-links {
    justify-content: center;
  }
}

/* Resource Footer Webform Styles */
.c-footer__webform-section {
  text-align: center;
  margin-bottom: 30px;
}

.c-footer__webform-title {
  font-family: "Lato", sans-serif;
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 25px;
  font-weight: 300;
  font-size: 32px;
  line-height: 34px;
  text-align: center;
}

.c-footer__webform-container form.webform-submission-resource-footer-form,
.c-footer__webform-container form[id^="webform-submission-resource-footer"] {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 30px;
  max-width: 100%;
  margin: 0 auto;
}

/* Individual form items */
.c-footer__webform-container
  form.webform-submission-resource-footer-form
  .form-item,
.c-footer__webform-container
  form.webform-submission-resource-footer-form
  .js-form-item {
  flex: 1;
  margin: 0;
}

.c-footer__webform-container
  form.webform-submission-resource-footer-form
  input[type="text"],
.c-footer__webform-container
  form.webform-submission-resource-footer-form
  input[type="email"],
.c-footer__webform-container
  form.webform-submission-resource-footer-form
  input[type="tel"] {
  border: 1px solid #fff;
  color: #747474;
  background-color: #ffffff;
  text-decoration: none;
  border-radius: 4px;
  outline: none;
  font-size: 16px;
  line-height: 35px;
  padding: 5px 5px 2px;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-family, "Noto Sans", sans-serif);
}

.c-footer__webform-container
  form.webform-submission-resource-footer-form
  input::placeholder {
  color: #747474;
}

.c-footer__webform-container
  form.webform-submission-resource-footer-form
  .form-actions {
  margin: 0;
  flex: 1;
}

.c-footer__webform-container
  form.webform-submission-resource-footer-form
  input[type="submit"],
.c-footer__webform-container
  form.webform-submission-resource-footer-form
  button.webform-button--submit {
  border: 1px solid #00ac41;
  color: #fff;
  background-color: #00ac41;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  line-height: 35px;
  padding: 5px 5px 2px;
  width: 100%;
  max-width: 300px;
  text-align: center;
  display: inline-block;
  font-weight: 600;
  margin: 10px 0;
  outline: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  font-family: var(--font-family, "Noto Sans", sans-serif);
}

.c-footer__webform-container
  form.webform-submission-resource-footer-form
  input[type="submit"]:hover,
.c-footer__webform-container
  form.webform-submission-resource-footer-form
  button.webform-button--submit:hover {
  background-color: #009137;
}

/* Override section-level centering for client footer form */
.c-footer__webform-section {
  text-align: left;
}

/* ── Client footer webform: row 1 = radios, row 2 = fields + button ── */
.c-footer__webform-container form.webform-submission-client-footer-form,
.c-footer__webform-container form[id^="webform-submission-client-footer"] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 16px;
  max-width: 100%;
  margin: 0;
  justify-content: flex-start;
}

/* Reset browser fieldset defaults for the radios wrapper */
.c-footer__webform-container
  form.webform-submission-client-footer-form
  fieldset.radios--wrapper {
  border: none;
  padding: 0;
  margin: 0;
  flex: 0 0 100%;
  background: transparent;
  min-inline-size: unset;
}

/* Hide the visually-hidden legend text from affecting layout */
.c-footer__webform-container
  form.webform-submission-client-footer-form
  fieldset.radios--wrapper
  .fieldset-legend {
  display: none;
}

/* The inner fieldset-wrapper and webform radios div — flex row, left-aligned */
.c-footer__webform-container
  form.webform-submission-client-footer-form
  fieldset.radios--wrapper
  .fieldset-wrapper,
.c-footer__webform-container
  form.webform-submission-client-footer-form
  fieldset.radios--wrapper
  .js-webform-radios {
  display: flex;
  flex-direction: row;
  gap: 24px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* Each individual radio item */
.c-footer__webform-container
  form.webform-submission-client-footer-form
  fieldset.radios--wrapper
  .form-type-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
}

.c-footer__webform-container
  form.webform-submission-client-footer-form
  fieldset.radios--wrapper
  input[type="radio"],
.c-footer__webform-container
  form.webform-submission-client-footer-form
  input[type="radio"].form-radio {
  accent-color: #4a9eff;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
  appearance: auto;
  -webkit-appearance: radio;
}

.c-footer__webform-container
  form.webform-submission-client-footer-form
  fieldset.radios--wrapper
  label {
  color: #ffffff;
  font-size: 15px;
  font-family: var(--font-family, "Noto Sans", sans-serif);
  cursor: pointer;
  margin: 0;
  white-space: nowrap;
}

/* Text/email/tel fields — flex: 1 each on row 2 */
.c-footer__webform-container
  form.webform-submission-client-footer-form
  .js-form-type-textfield,
.c-footer__webform-container
  form.webform-submission-client-footer-form
  .js-form-type-email,
.c-footer__webform-container
  form.webform-submission-client-footer-form
  .js-form-type-tel {
  flex: 1;
  min-width: 140px;
  margin: 0;
}

.c-footer__webform-container
  form.webform-submission-client-footer-form
  input[type="text"],
.c-footer__webform-container
  form.webform-submission-client-footer-form
  input[type="email"],
.c-footer__webform-container
  form.webform-submission-client-footer-form
  input[type="tel"] {
  border: 1px solid #fff;
  color: #747474;
  background-color: #ffffff;
  border-radius: 4px;
  outline: none;
  font-size: 16px;
  line-height: 35px;
  padding: 5px 10px;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-family, "Noto Sans", sans-serif);
}

.c-footer__webform-container
  form.webform-submission-client-footer-form
  input::placeholder {
  color: #747474;
}

/* Submit / form-actions */
.c-footer__webform-container
  form.webform-submission-client-footer-form
  .form-actions {
  flex: 1;
  min-width: 160px;
  margin: 0;
}

.c-footer__webform-container
  form.webform-submission-client-footer-form
  input[type="submit"],
.c-footer__webform-container
  form.webform-submission-client-footer-form
  button.webform-button--submit {
  border: 1px solid #00ac41;
  color: #fff;
  background-color: #00ac41;
  border-radius: 4px;
  font-size: 14px;
  line-height: 35px;
  padding: 5px 10px;
  width: 100%;
  text-align: center;
  display: inline-block;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-family, "Noto Sans", sans-serif);
  box-sizing: border-box;
}

.c-footer__webform-container
  form.webform-submission-client-footer-form
  input[type="submit"]:hover,
.c-footer__webform-container
  form.webform-submission-client-footer-form
  button.webform-button--submit:hover {
  background-color: #009137;
}

/* Mobile: stack vertically */
@media (max-width: 767.98px) {
  .c-footer__webform-container form.webform-submission-client-footer-form,
  .c-footer__webform-container form[id^="webform-submission-client-footer"] {
    flex-wrap: wrap;
    gap: 12px;
  }

  .c-footer__webform-container
    form.webform-submission-client-footer-form
    .form-type--radios {
    flex: 0 0 100%;
    flex-direction: row;
    gap: 20px;
  }

  .c-footer__webform-container
    form.webform-submission-client-footer-form
    .js-form-type-textfield,
  .c-footer__webform-container
    form.webform-submission-client-footer-form
    .js-form-type-email,
  .c-footer__webform-container
    form.webform-submission-client-footer-form
    .js-form-type-tel,
  .c-footer__webform-container
    form.webform-submission-client-footer-form
    .form-actions {
    flex: 0 0 100%;
    min-width: 0;
  }
}

.c-footer__webform-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255);
  margin-top: 25px;
  margin-bottom: 30px;
}

/* Mobile responsive styling for the inline form */
@media (max-width: 767.98px) {
  .c-footer__webform-section {
    padding: 0 20px;
  }

  .c-footer__webform-title {
    font-size: 22px;
    line-height: 30px;
    margin-bottom: 20px;
  }

  .c-footer__webform-container form.webform-submission-resource-footer-form,
  .c-footer__webform-container form[id^="webform-submission-resource-footer"] {
    flex-direction: column;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    gap: 12px;
  }

  .c-footer__webform-container
    form.webform-submission-resource-footer-form
    .form-item,
  .c-footer__webform-container
    form.webform-submission-resource-footer-form
    .js-form-item,
  .c-footer__webform-container
    form.webform-submission-resource-footer-form
    .form-actions {
    width: 100%;
    flex: none;
  }

  .c-footer__webform-container
    form.webform-submission-resource-footer-form
    input[type="submit"],
  .c-footer__webform-container
    form.webform-submission-resource-footer-form
    button.webform-button--submit {
    max-width: 100%;
    margin: 10px 0 0 0;
  }
}

/* Subscribe banner overlaps from content into footer */
.c-footer__subscribe-banner {
  position: relative;
  z-index: 10;
  margin-bottom: -90px;
}

.c-footer__top-section {
  padding-top: 120px !important;
}

@media (max-width: 991.98px) {
  .c-footer__subscribe-banner {
    margin-bottom: -60px;
  }
  .c-footer__top-section {
    padding-top: 90px !important;
  }
}

@media (max-width: 600px) {
  .c-footer__subscribe-banner {
    margin-bottom: -40px;
  }
  .c-footer__top-section {
    padding-top: 64px !important;
  }
}
