/* ============================================
   FOOTER.CSS — Footer + Newsletter form
   Sửa: cấu trúc cột, accordion mobile
   ============================================ */

/* ==== Newsletter form input UPDATE ==== */
.newsletter-popup {
  position: fixed;
  left: 50%;
  top: 48px;
  transform: translateX(-50%) scale(1);
  z-index: 1000;
  min-width: 310px;
  max-width: 94vw;
  background: var(--cream, #F4EFE6);
  color: var(--ink, #241b15);
  border-radius: 16px;
  box-shadow: 0 6px 32px 0 rgba(36, 27, 21, 0.13),
              0 1.5px 8px 0 rgba(36,27,21,0.08);
  padding: 24px 32px 22px 32px;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(.4,0,.2,1), transform 0.35s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Định dạng form bên trong popup newsletter cho input rộng rãi */
.newsletter-popup form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 13px;
  align-items: center;
}

.newsletter-popup input[type="text"],
.newsletter-popup input[type="tel"],
.newsletter-popup input[type="name"] {
  width: 100%;
  max-width: 360px;
  min-width: 0;
  padding: 15px 16px;
  border-radius: 7px;
  border: 1.2px solid #DDD3C2;
  background: #fff;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink, #241b15);
  margin: 0 auto;
  box-sizing: border-box;
  transition: border-color .18s;
  outline: none;
  font-family: inherit;
}

.newsletter-popup input[type="text"]:focus,
.newsletter-popup input[type="tel"]:focus,
.newsletter-popup input[type="name"]:focus {
  border-color: var(--rose, #E8B5A0);
  background: #F7F4ED;
}

.newsletter-popup button[type="submit"] {
  display: block;
  margin: 7px auto 0 auto;
  width: 100%;
  max-width: 360px;
  min-width: 0;
  padding: 15px 0 15px 0;
  background: var(--rose, #E8B5A0);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 1.07rem;
  font-family: inherit;
  letter-spacing: 0.02em;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s, box-shadow .16s;
  box-shadow: 0 1.5px 2.5px 0 rgba(36,27,21,0.08);
}
.newsletter-popup button[type="submit"]:hover,
.newsletter-popup button[type="submit"]:focus {
  background: #d9a185;
}

.newsletter-popup[aria-live="polite"] {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) scale(1);
}
.newsletter-popup .popup-close-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  color: var(--ink, #241b15);
  font-size: 22px;
  opacity: 0.56;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 7px;
  transition: background 0.14s;
}
.newsletter-popup .popup-close-btn:focus,
.newsletter-popup .popup-close-btn:hover {
  background: rgba(36, 27, 21, 0.12);
  opacity: 0.84;
}
.newsletter-popup .popup-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px auto;
  color: var(--brand, #A5F3FC);
  font-size: 38px;
  /* use emoji or icon SVG in html */
}
@media (max-width: 420px) {
  .newsletter-popup {
    padding: 15px 8vw 13px 8vw;
    font-size: 0.97rem;
  }
  .newsletter-popup .popup-close-btn {
    top: 7px;
    right: 6px;
    font-size: 20px;
  }
  .newsletter-popup form {
    gap: 10px;
  }
  .newsletter-popup input[type="text"],
  .newsletter-popup input[type="tel"],
  .newsletter-popup input[type="name"],
  .newsletter-popup button[type="submit"] {
    max-width: 98vw;
    font-size: 0.96rem;
    padding: 13px 7vw;
  }
}

/* Animation xuất hiện mượt mà */
.newsletter-popup[aria-live="polite"] {
  animation: newsletter-popup-in 0.4s cubic-bezier(.47,1.64,.41,.8) both;
}
@keyframes newsletter-popup-in {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}
/* Mobile: 1 cột; Desktop: 3 cột */
.footer-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 768px) {
  .footer-row {
    grid-template-columns: 3fr 2.7fr 2.7fr;
    gap: 48px;
  }
  .footer-content {
    display: grid;
  }
}

/* === Accordion mobile cho 2 cột links === */
.footer-accordion details > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 0;
  border-bottom: 1px solid rgba(244, 239, 230, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-accordion details > summary::-webkit-details-marker {
  display: none;
}
.footer-accordion details > summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 300;
  transition: transform 0.2s ease;
}
.footer-accordion details[open] > summary::after {
  content: "−";
}
.footer-accordion details[open] > summary {
  border-bottom: none;
}
.footer-accordion ul {
  padding: 8px 0 16px 0;
  border-bottom: 1px solid rgba(244, 239, 230, 0.2);
}

@media (min-width: 768px) {
  .footer-accordion details {
    /* Trên desktop: bỏ accordion, hiển thị tất cả */
  }
  .footer-accordion details > summary {
    pointer-events: none;
    border-bottom: none;
    padding: 0 0 12px 0;
  }
  .footer-accordion details > summary::after {
    display: none;
  }
  .footer-accordion details[open] ul,
  .footer-accordion details ul {
    display: block;
    border-bottom: none;
  }
  .footer-accordion details:not([open]) ul {
    display: block;
  }
}
