/* =========================================================
   AIA GLOBAL FOOTER V4 - CLEAN VERSION
   ใช้กับ GeneratePress Element Hook: generate_footer
   ========================================================= */

/* ---------- GeneratePress footer reset ---------- */
.site-footer,
.site-info,
.inside-site-info,
.footer-widgets {
  margin: 0 !important;
  padding: 0 !important;
  background: #000 !important;
}

.site-footer .copyright-bar {
  display: none !important;
}

.site-footer .inside-site-info {
  max-width: none !important;
  display: block !important;
}

/* ---------- Main footer ---------- */
.aia-footer-v4 {
  width: 100vw;
  margin: 0 calc(50% - 50vw);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, .075), transparent 26%),
    radial-gradient(circle at 86% 22%, rgba(255, 255, 255, .055), transparent 26%),
    linear-gradient(135deg, #333d47 0%, #2f3943 100%);
  color: #fff;
  font-family: inherit;
}

.aia-footer-v4,
.aia-footer-v4 * {
  box-sizing: border-box;
}

.aia-footer-v4 a {
  text-decoration: none;
}

/* ---------- Inner width 1200px ---------- */
.aia-footer-v4__wrap {
  width: min(1200px, calc(100% - 40px));
  max-width: 1200px;
  margin: 0 auto;
  padding: 44px 0 34px;
}

.aia-footer-v4__grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.25fr .9fr;
  gap: 24px;
  align-items: center;
}

/* ---------- Shared card ---------- */
.aia-footer-v4__card {
  background: rgba(255, 255, 255, .065);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 24px;
  box-shadow:
    0 18px 38px rgba(0, 0, 0, .20),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(4px);
}

/* ---------- Profile ---------- */
.aia-footer-v4__profile {
  text-align: center;
}

.aia-footer-v4__photo-frame {
  width: 210px;
  height: 210px;
  margin: 0 auto 20px;
  padding: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, .70), rgba(255, 255, 255, .14));
  box-shadow: 0 18px 38px rgba(0, 0, 0, .24);
}

.aia-footer-v4__photo {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  background: #fff;
}

.aia-footer-v4__name {
  margin: 0 0 8px;
  color: #fff;
  font-size: 22px;
  font-weight: 850;
  line-height: 1.35;
}

.aia-footer-v4__position {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, .94);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.45;
}

.aia-footer-v4__company {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, .82);
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- Badges / Certs ---------- */
.aia-footer-v4__badges,
.aia-footer-v4__certs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.aia-footer-v4__badges {
  margin-bottom: 10px;
}

.aia-footer-v4__badges span,
.aia-footer-v4__cert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .09);
}

/* MDRT Life Member - blue */
.aia-footer-v4__cert--mdrt {
  min-height: 40px;
  padding: 9px 18px;
  background: linear-gradient(135deg, #1853a3, #123f82);
  border-color: rgba(255, 255, 255, .20);
  box-shadow: none;
  font-size: 14px;
  font-weight: 900;
}

.aia-footer-v4__cert--fchfp {
  background: rgba(255, 255, 255, .12);
}

/* ---------- Center content ---------- */
.aia-footer-v4__content {
  padding: 28px 30px;
}

.aia-footer-v4__eyebrow {
  margin: 0 0 10px;
  color: #ffd8e3;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.4;
}

.aia-footer-v4__headline {
  margin: 0 0 18px;
  color: #fff;
  font-size: 23px;
  font-weight: 400;
  line-height: 1.42;
}

.aia-footer-v4__trust-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.aia-footer-v4__trust-list li {
  position: relative;
  margin: 0 0 10px;
  padding-left: 22px;
  color: rgba(255, 255, 255, .90);
  font-size: 15px;
  line-height: 1.65;
}

.aia-footer-v4__trust-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d31145;
  box-shadow: 0 0 0 4px rgba(211, 17, 69, .14);
}

.aia-footer-v4__trust-list strong {
  color: #fff;
  font-weight: 850;
}

.aia-footer-v4__trust-list span {
  color: rgba(255, 255, 255, .88);
}

/* ---------- Mini links ---------- */
.aia-footer-v4__mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.aia-footer-v4__mini-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff !important;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.aia-footer-v4__mini-links a:hover {
  background: #d31145;
  border-color: #d31145;
  transform: translateY(-1px);
}

/* ---------- Contact / QR ---------- */
.aia-footer-v4__contact {
  padding: 24px 20px 22px;
  text-align: center;
}

.aia-footer-v4__contact-title {
  margin: 0 0 14px;
  color: #ffd8e3;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.4;
}

.aia-footer-v4__buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
}

.aia-footer-v4__btn {
  width: 100%;
  max-width: 235px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 14px;
  color: #fff !important;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.2;
  box-shadow: 0 12px 22px rgba(0, 0, 0, .18);
  transition: transform .2s ease, box-shadow .2s ease;
}

.aia-footer-v4__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 26px rgba(0, 0, 0, .22);
}

.aia-footer-v4__btn--tel {
  background: #d31145;
}

.aia-footer-v4__btn--line,
.aia-footer-v4__btn-line {
  background: #d31145;
  border-color: #d31145;
  color: #ffffff !important;
}

.aia-footer-v4__qr-frame {
  width: 180px;
  margin: 0 auto 14px;
  padding: 13px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .22);
}

.aia-footer-v4__qr {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.aia-footer-v4__qr-title {
  margin: 0 0 7px;
  color: #fff;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.35;
}

.aia-footer-v4__qr-text {
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
  line-height: 1.65;
}

/* ---------- Bottom bar ---------- */
.aia-footer-v4__bottom {
  width: 100vw;
  margin: 0 calc(50% - 50vw);
  background: #000;
  color: rgba(255, 255, 255, .75);
  text-align: center;
}

.aia-footer-v4__bottom-inner {
  width: min(1200px, calc(100% - 40px));
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 0 20px;
}

.aia-footer-v4__bottom p {
  margin: 0;
  color: rgba(255, 255, 255, .75);
  font-size: 13px;
  line-height: 1.75;
}

.aia-footer-v4__bottom a {
  color: rgba(255, 255, 255, .75) !important;
  font-weight: 400;
  text-decoration: none;
}

.aia-footer-v4__bottom a:hover {
  text-decoration: underline;
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .aia-footer-v4__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .aia-footer-v4__profile,
  .aia-footer-v4__content,
  .aia-footer-v4__contact {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
  }
}

/* ---------- Mobile: 1 column + 20px gutters ---------- */
@media (max-width: 767px) {
  .aia-footer-v4__wrap {
    width: calc(100% - 40px);
    padding: 38px 0 34px;
  }

  .aia-footer-v4__grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .aia-footer-v4__photo-frame {
    width: 178px;
    height: 178px;
    margin-bottom: 18px;
  }

  .aia-footer-v4__name {
    font-size: 20px;
  }

  .aia-footer-v4__position {
    font-size: 16px;
  }

  .aia-footer-v4__company {
    font-size: 14px;
  }

  .aia-footer-v4__content {
    padding: 24px 20px;
  }

  .aia-footer-v4__headline {
    font-size: 20px;
  }

  .aia-footer-v4__trust-list li {
    font-size: 14px;
  }

  .aia-footer-v4__mini-links {
    justify-content: flex-start;
  }

  .aia-footer-v4__contact {
    padding: 24px 20px;
  }

  .aia-footer-v4__btn {
    max-width: 100%;
    font-size: 15px;
  }

  .aia-footer-v4__qr-frame {
    width: 168px;
  }

  .aia-footer-v4__bottom-inner {
    width: calc(100% - 40px);
    padding: 16px 0 18px;
  }

  .aia-footer-v4__bottom p {
    font-size: 12px;
  }
}
/* ป้าย Tag เล็ก: ปรึกษาวางแผนประกันได้ฟรี */
.aia-footer-v4__eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0 0 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 216, 227, .12);
  border: 1px solid rgba(255, 216, 227, .28);
  color: #ffd8e3;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
}

/* ป้าย Tag เล็ก: ติดต่อเพื่อขอคำแนะนำเบื้องต้น */
.aia-footer-v4__contact-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0 auto 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 216, 227, .12);
  border: 1px solid rgba(255, 216, 227, .28);
  color: #ffd8e3;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
}

/* มือถือให้ป้ายอยู่กลาง สวยขึ้น */
@media (max-width: 767px) {
  .aia-footer-v4__eyebrow {
    margin-left: auto;
    margin-right: auto;
  }

  .aia-footer-v4__contact-title {
    font-size: 12.5px;
  }
}
/* Footer Mini Links: Facebook Button */
.aia-footer-v4__mini-links .aia-footer-v4__mini-link--facebook {
  background: #1853a3;
  border-color: rgba(255, 255, 255, .18);
  color: #ffffff;
  font-weight: 850;
  box-shadow: 0 10px 22px rgba(24, 83, 163, .22);
}

.aia-footer-v4__mini-links .aia-footer-v4__mini-link--facebook:hover {
  background: #2164bf;
  border-color: rgba(255, 255, 255, .28);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(24, 83, 163, .32);
}

/* มือถือให้ปุ่ม Facebook อยู่ในแถวเดียวกับปุ่มอื่นแบบพอดี */
@media (max-width: 767px) {
  .aia-footer-v4__mini-links .aia-footer-v4__mini-link--facebook {
    width: fit-content;
  }
}
/* =========================================================
   AIA Footer Callback Form - Compact Version
   ========================================================= */

.aia-footer-callback {
  width: 100%;
  background: #333d47;
  color: #ffffff;
  padding: 0 20px 36px;
}

.aia-footer-callback,
.aia-footer-callback *,
.aia-footer-callback *::before,
.aia-footer-callback *::after {
  box-sizing: border-box;
}

.aia-footer-callback__inner {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 26px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.22);
}

.aia-footer-callback__head {
  max-width: 860px;
  margin: 0 auto 22px;
  text-align: center;
}

.aia-footer-callback__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-bottom: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(211, 17, 69, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffd7e2;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.aia-footer-callback__head h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 400;
  line-height: 1.25;
}

.aia-footer-callback__head p {
  max-width: 760px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15.5px;
  line-height: 1.75;
}

.aia-footer-callback__form-card {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 22px;
}

/* Contact Form 7 Reset */
.aia-footer-callback .wpcf7 form,
.aia-footer-callback .wpcf7 p {
  margin: 0;
}

.aia-footer-callback .wpcf7 br {
  display: none;
}

/* Form Layout */
.aia-cf7-callback-form {
  width: 100%;
}

.aia-cf7-callback-form__fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.aia-cf7-callback-form__field {
  display: block;
  margin: 0;
}

.aia-cf7-callback-form__field > span:first-child {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.4;
}

.aia-cf7-callback-form input[type="text"],
.aia-cf7-callback-form input[type="tel"] {
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.98);
  color: #101828;
  font-size: 15px;
  font-weight: 700;
  outline: none;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.aia-cf7-callback-form input[type="text"]:focus,
.aia-cf7-callback-form input[type="tel"]:focus {
  border-color: #d31145;
  box-shadow: none;
}

.aia-cf7-callback-form input::placeholder {
  color: rgba(16, 24, 40, 0.48);
}

/* Consent */
.aia-cf7-callback-form__consent {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
}

.aia-cf7-callback-form__consent .wpcf7-list-item {
  margin: 0;
}

.aia-cf7-callback-form__consent label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
}

.aia-cf7-callback-form__consent input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-width: 17px;
  margin: 4px 0 0;
  accent-color: #d31145;
}

/* Submit Button */
.aia-cf7-callback-form__submit {
  margin-top: 16px;
}

.aia-cf7-callback-form input[type="submit"] {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: #d31145;
  color: #ffffff;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.aia-cf7-callback-form input[type="submit"]:hover {
  background: #b90f3d;
  transform: translateY(-1px);
  box-shadow: none;
}

/* Note */
.aia-footer-callback__note {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12.5px;
  line-height: 1.6;
  text-align: center;
}

/* CF7 Validation */
.aia-footer-callback .wpcf7-spinner {
  margin: 10px 0 0 10px;
}

.aia-footer-callback .wpcf7-not-valid-tip {
  margin-top: 6px;
  color: #ffb6c8;
  font-size: 12.5px;
  font-weight: 700;
}

.aia-footer-callback .wpcf7-response-output {
  margin: 14px 0 0 !important;
  padding: 10px 14px !important;
  border-radius: 14px;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.6;
}

/* Tablet */
@media (max-width: 1024px) {
  .aia-cf7-callback-form__fields {
    grid-template-columns: 1fr;
  }

  .aia-footer-callback__form-card {
    max-width: 720px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .aia-footer-callback {
    padding: 0 20px 32px;
  }

  .aia-footer-callback__inner {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .aia-footer-callback__head {
    margin-bottom: 18px;
    text-align: left;
  }

  .aia-footer-callback__tag {
    margin-bottom: 9px;
  }

  .aia-footer-callback__head h3 {
    font-size: 24px;
  }

  .aia-footer-callback__head p {
    font-size: 14.5px;
  }

  .aia-footer-callback__form-card {
    padding: 16px;
    border-radius: 20px;
  }

  .aia-cf7-callback-form input[type="text"],
  .aia-cf7-callback-form input[type="tel"] {
    min-height: 47px;
    font-size: 14.5px;
  }

  .aia-cf7-callback-form input[type="submit"] {
    min-height: 50px;
    font-size: 14.5px;
  }

  .aia-cf7-callback-form__consent {
    font-size: 12.5px;
  }
}
/* ==================================================
   AIA CONTACT FORM WIDTH FIX
   จอเล็กกว่า 1025px ให้กล่องฟอร์มกว้างเท่ากล่องด้านบน
================================================== */

@media (max-width: 1024px) {

  /* กล่องฟอร์มหลัก */
  .aia-contact-form,
  .aia-lead-form,
  .aia-contact-form-section,
  .aia-contact-form-card,
  .aia-callback-form,
  .aia-form-card {
    width: min(100%, 860px) !important;
    max-width: calc(100% - 32px) !important;

    margin-left: auto !important;
    margin-right: auto !important;

    box-sizing: border-box !important;
  }

  /* ถ้าฟอร์มอยู่ใน GenerateBlocks Container */
  .gb-container:has(form),
  .wp-block-group:has(form) {
    max-width: calc(100% - 32px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }

  /* ตัว form ด้านในไม่ให้ดันกล่องล้น */
  form {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  form input,
  form textarea,
  form select,
  form button {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}
/* ==================================================
   AIA FOOTER CALLBACK WIDTH MATCH FIX
   จอเล็กกว่า 1100px ให้กล่องฟอร์มกว้างเท่ากล่องด้านบน
================================================== */

@media (max-width: 1100px) {

  .aia-footer-callback {
    width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .aia-footer-callback__inner {
    width: 100% !important;
    max-width: 760px !important;

    margin-left: auto !important;
    margin-right: auto !important;

    box-sizing: border-box !important;
  }

  .aia-footer-callback__form-card {
    width: 100% !important;
    max-width: 100% !important;

    margin-left: auto !important;
    margin-right: auto !important;

    box-sizing: border-box !important;
  }
}

/* ==================================================
   ACCESSIBILITY + LINE BRAND COLOR
   รวม Override ไว้จุดเดียว เพื่อลด CSS ซ้ำซ้อน
================================================== */

/* LINE button: รองรับทั้ง class เดิมและ class ที่ใช้อยู่จริง */
.aia-footer-v4__btn--line,
.aia-footer-v4__btn-line,
body .aia-footer-v4 a.aia-footer-v4__btn.aia-footer-v4__btn-line {
  background: #d31145 !important;
  background-color: #d31145 !important;
  border-color: #d31145 !important;
  color: #ffffff !important;
}

.aia-footer-v4__btn--line *,
.aia-footer-v4__btn-line *,
body .aia-footer-v4 a.aia-footer-v4__btn.aia-footer-v4__btn-line * {
  color: #ffffff !important;
}

.aia-footer-v4__btn--line:hover,
.aia-footer-v4__btn--line:focus,
.aia-footer-v4__btn--line:focus-visible,
.aia-footer-v4__btn-line:hover,
.aia-footer-v4__btn-line:focus,
.aia-footer-v4__btn-line:focus-visible,
body .aia-footer-v4 a.aia-footer-v4__btn.aia-footer-v4__btn-line:hover,
body .aia-footer-v4 a.aia-footer-v4__btn.aia-footer-v4__btn-line:focus,
body .aia-footer-v4 a.aia-footer-v4__btn.aia-footer-v4__btn-line:focus-visible {
  background: #d31145 !important;
  background-color: #d31145 !important;
  border-color: #d31145 !important;
  color: #ffffff !important;
}

/* Callback text contrast */
.aia-footer-callback,
.aia-footer-callback__inner {
  color: #ffffff !important;
}

.aia-footer-callback p,
.aia-footer-callback span,
.aia-footer-callback label {
  color: #f3f4f6 !important;
}

.aia-footer-callback__note {
  color: #e5e7eb !important;
}

.aia-footer-callback a:not(.aia-footer-v4__btn-line) {
  color: #ffffff !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* AIA ACCESSIBILITY PATCH 2026-08-27 — legacy LINE footer button */
body a.aia-footer-btn-line {
  background: #007A33 !important;
  color: #ffffff !important;
}

body a.aia-footer-btn-line:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}
