/*
 * Custom overrides and reusable layout helpers.
 * Maintain this file lightweight and specific so the base theme remains untouched.
 */

:root {
  --mf-text-column-gap: 2.5rem;
  --mf-text-column-gap-mobile: 1.25rem;
}

/* Declaro correctamente los colores primario y secundario con los colores del tema */
.text-primary { color: var(--theme-color2) !important; }
.text-secondary { color: var(--theme-color1) !important; }

/* Botón de WhatsApp flotante en zona inferior izquierda */
.whatsapp-button-wrapper {
  position: fixed;
  bottom: 40px;
  left: 50px;
  z-index: 1000;
}
.whatsapp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--theme-color1);
  box-shadow: 0px 8px 16px rgba(3, 4, 28, 0.3);
  transition: width 0.3s, height 0.3s;
}

.whatsapp-button:hover {
  width: 50px;
  height: 50px;
}

.acc-content a.white {
  color: var(--theme-color-white);
}

.acc-content a.white:hover {
  color: var(--theme-color-2);
}

/* Two-column text blocks: keeps the content readable and separated without breaking the theme. */
.row.text-columns,
.row.two-columns,
.row.columns-2,
.row.content-columns,
.feature-list .row {
  --bs-gutter-x: var(--mf-text-column-gap);
  --bs-gutter-y: 2rem;
}

.text-columns .column,
.two-columns .column,
.columns-2 .column,
.content-columns .column,
.feature-list .column,
.feature-list [class*="col-"] {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.text-columns .column > :last-child,
.two-columns .column > :last-child,
.columns-2 .column > :last-child,
.content-columns .column > :last-child,
.feature-list .column > :last-child,
.feature-list [class*="col-"] > :last-child {
  margin-bottom: 0;
}

.text-columns .column > p + p,
.two-columns .column > p + p,
.columns-2 .column > p + p,
.content-columns .column > p + p,
.feature-list .column > p + p,
.feature-list [class*="col-"] > p + p {
  margin-top: 1rem;
}

/* Keeps image + text blocks consistent even when a column contains a photo and a paragraph. */
.text-columns .column img,
.two-columns .column img,
.columns-2 .column img,
.content-columns .column img,
.feature-list .column img,
.feature-list [class*="col-"] img {
  display: block;
  width: 100%;
  border-radius: 16px;
  margin-bottom: 1rem;
}

@media (max-width: 767.98px) {
  .row.text-columns,
  .row.two-columns,
  .row.columns-2,
  .row.content-columns,
  .feature-list .row {
    --bs-gutter-x: var(--mf-text-column-gap-mobile);
    --bs-gutter-y: 1.25rem;
  }
}

/* Optional utility for text blocks that should look like editorial columns. */
.editorial-columns {
  column-gap: var(--mf-text-column-gap);
}

@media (max-width: 767.98px) {
  .editorial-columns {
    column-gap: var(--mf-text-column-gap-mobile);
  }
}

/* Homepage editorial copy: two-column blocks with readable spacing */
.about-section .upper-box.home-two-column-copy,
.about-section .upper-box.home-four-column-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 2vw, 2.75rem);
  align-items: start;
}

.about-section .upper-box.home-two-column-copy .text,
.about-section .upper-box.home-four-column-copy .text {
  max-width: none;
  margin: 0;
}

@media (max-width: 991.98px) {
  .about-section .upper-box.home-two-column-copy,
  .about-section .upper-box.home-four-column-copy {
    grid-template-columns: 1fr;
  }
}

/* Match the theme's checked bullet style for lists used in service/content pages. */
.list-style-one,
ul.list-style-one {
  position: relative;
  margin: 0 0 2.5rem;
  padding-left: 0;
  list-style: none;
}

.list-style-one li,
ul.list-style-one li {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.list-style-one li .icon,
.list-style-one li i.icon,
ul.list-style-one li .icon,
ul.list-style-one li i.icon {
  position: relative;
  display: inline-flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  line-height: 18px;
  font-size: 10px;
  color: var(--headings-color);
  background-color: var(--theme-color1);
  font-weight: 1200;
  flex-shrink: 0;
}

.list-style-one li span,
ul.list-style-one li span {
  color: var(--headings-color);
}

/* Campo auxiliar de formulario: fuera de pantalla, no visible para las personas */
.campo-extra {
  position: absolute !important;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-feedback {
  margin: 0 0 1rem;
  padding: .75rem 1rem;
  border-radius: 4px;
  text-align: left;
}
.form-feedback.is-success { background: #e6f4ea; color: #1e6b35; }
.form-feedback.is-error { background: #fdecea; color: #a12a1f; }

.cookie-advice {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999998;
  width: min(440px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid #d6dfdd;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
  color: #163d3b;
}
.cookie-advice[hidden],
.cookie-advice [hidden] { display: none !important; }
.cookie-advice h2 { margin: 0 0 10px; font-size: 22px; line-height: 1.25; }
.cookie-advice p { margin: 0 0 14px; color: #334d4b; font-size: 14px; line-height: 1.5; }
.cookie-advice a { color: #0c403e; text-decoration: underline; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-actions button {
  flex: 1 1 120px;
  padding: 10px 12px;
  border: 2px solid #0c403e;
  border-radius: 6px;
  background: #0c403e;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
.cookie-actions button:hover { background: #225b58; }
.cookie-actions button:focus-visible,
.cookie-settings-link:focus-visible,
.cookie-advice input:focus-visible { outline: 3px solid #b67a00; outline-offset: 3px; }
.cookie-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid #d6dfdd;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;
}
.cookie-option strong, .cookie-option > span > span { display: block; }
.cookie-option p { margin: 0; }
.cookie-option input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: #0c403e; }
.cookie-advice .cookie-error { color: #a12a1f; }
.cookie-settings-link { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--theme-color1-text-color); font-size: 20px; }
.cookie-settings-link:hover { color: var(--theme-color2); }
@media (max-width: 575.98px) {
  .cookie-advice { right: 16px; bottom: 16px; max-height: calc(100vh - 32px); padding: 18px; }
}
