/*
-----------------------------------------------------------------------
  Footer Directorio de Empresas (templates/front_end/_footer.html.twig)
  Mobile-first: acordeón en móvil, columnas desde 768px.
-----------------------------------------------------------------------
*/
.p360-footer {
  border-top: 4px solid var(--marca-verde); /* franja de marca */
  --f-bg: #0b2350;
  --f-bg-2: #13306a;
  --f-line: rgba(255, 255, 255, 0.1);
  --f-text: #c9cfdc;
  --f-muted: #8f98ad;
  --f-accent: #ff8f72;
  background: var(--f-bg);
  color: var(--f-text);
  font-size: 15px;
  line-height: 1.6;
  height: auto; /* style.css fija footer { height: 500px } */
}
/* style.css añade padding vertical a todos los .container por debajo de 1200px */
.p360-footer .container { padding-top: 0; padding-bottom: 0; }
.p360-footer a { color: inherit; text-decoration: none; transition: color .15s ease; }
.p360-footer a:hover { color: var(--f-accent); }
.p360-footer a:focus-visible,
.p360-footer button:focus-visible,
.p360-footer summary:focus-visible {
  outline: 2px solid var(--f-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Cuerpo ---------- */
.p360-footer-main { padding: 40px 0 8px; }
.p360-footer-grid { display: grid; gap: 32px; }

.p360-footer-brand { text-align: center; }
.p360-footer-logo { display: inline-block; margin-bottom: 14px; }
.p360-footer-logo img { width: 230px; max-width: 100%; height: auto; display: block; }
.p360-footer-desc { margin: 0 auto 18px; max-width: 420px; }

.p360-footer-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: #fff !important;
  font-weight: 500;
}
.p360-footer-whatsapp i { color: #25d366; font-size: 20px; }
.p360-footer-whatsapp:hover { background: rgba(37, 211, 102, 0.22); }

.p360-footer-social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}
.p360-footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 15px;
}
.p360-footer-social a:hover { background: var(--marca-violeta-vivo); border-color: var(--marca-violeta-vivo); color: var(--marca-tinta); }

/* Acordeón de enlaces (móvil) */
.p360-footer-links { border-top: 1px solid var(--f-line); }
.p360-footer-group { border-bottom: 1px solid var(--f-line); }
.p360-footer-group summary {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.p360-footer-group summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  -webkit-tap-highlight-color: transparent;
}
.p360-footer-group summary::-webkit-details-marker { display: none; }
.p360-footer-group summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--f-muted);
  border-bottom: 2px solid var(--f-muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s ease;
}
.p360-footer-group[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.p360-footer-group ul { list-style: none; margin: 0; padding: 0 0 12px; }
.p360-footer-group li a {
  display: block;
  padding: 9px 0; /* zona táctil cómoda */
  color: var(--f-text);
}


/* ---------- Barra inferior ---------- */
.p360-footer-bottom { border-top: 1px solid var(--f-line); margin-top: 24px; }
.p360-footer-bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  /* deja sitio al botón flotante de subir */
  padding: 20px 0 calc(96px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-size: 13px;
  color: var(--f-muted);
}
.p360-footer-bottom-inner p { margin: 0; }
.p360-footer-autor { margin-top: 4px !important; }
.p360-footer-autor a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--f-accent); }
.p360-footer-autor a:hover { color: var(--f-accent); }
.p360-footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.p360-footer-legal a { display: inline-block; padding: 4px 0; }
.p360-footer-libro { color: #fff !important; font-weight: 500; }
.p360-footer-libro i { color: var(--f-accent); margin-right: 4px; }

/* ---------- Tablet ---------- */
@media (min-width: 768px) {
  .p360-footer-main { padding: 56px 0 16px; }
  .p360-footer-grid { gap: 40px 32px; }
  .p360-footer-brand { text-align: left; }
  .p360-footer-desc { margin-left: 0; }
  .p360-footer-social { justify-content: flex-start; }

  .p360-footer-links {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    border-top: 0;
  }
  .p360-footer-group { border-bottom: 0; }
  .p360-footer-group summary { min-height: 0; margin-bottom: 10px; cursor: default; pointer-events: none; }
  .p360-footer-group summary::after { display: none; }
  .p360-footer-group li a { padding: 5px 0; }

  .p360-footer-bottom-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    text-align: left;
    padding: 22px 90px calc(22px + env(safe-area-inset-bottom, 0px)) 0; /* a la derecha queda el botón de WhatsApp */
  }
}

/* ---------- Escritorio ---------- */
@media (min-width: 992px) {
  .p360-footer-grid { grid-template-columns: 1fr 2fr; gap: 64px; }
  .p360-footer-links { grid-column: auto; }
  .p360-footer-bottom-inner { padding-right: 140px; }
}
