/* Homepage footer styles for standalone category pages. */
.nexa-directory {
  --green-500: #00b95f;
  --green-600: #009b50;
}
.nexa-directory .container {
  width: min(1200px, calc(100% - 40px));
  margin-inline: auto;
}
.nexa-directory .site-footer {
  margin-top: 0;
  font-size: 16px;
}
/* =========================================================
   TOP COMMITMENT BAR (Thanh cam kết 4 tiêu chí)
   ========================================================= */
.footer-commit-bar {
  background: #e6f4ec; border-top: 1px solid #bbf7d0;
  border-bottom: 1px solid #bbf7d0; padding: 26px 0;
}
.footer-commit-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.commit-item {
  display: flex; align-items: flex-start; gap: 14px;
}
.commit-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; border: 2px solid var(--green-500);
  display: grid; place-items: center; font-size: 1.25rem;
  color: var(--green-600); flex-shrink: 0; box-shadow: 0 2px 8px rgb(0 185 95 / 15%);
}
.commit-item strong {
  display: block; font-size: .92rem; font-weight: 700; color: #064e3b;
  margin-bottom: 3px;
}
.commit-item p {
  font-size: .8rem; color: #334155; line-height: 1.45; margin: 0;
}

/* =========================================================
   MAIN FOOTER (Giao diện Sáng sủa, Tươi mới & Sạch đẹp - Bản Desktop gốc)
   ========================================================= */
.site-footer {
  background: #f4faf6; color: #334155; padding: 56px 0 24px;
  border-top: 1px solid #dcfce7;
}
.footer-desktop-wrapper { display: block; }
.footer-mobile-wrapper { display: none; }

.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1.1fr 1fr 1.2fr;
  gap: 40px; padding-bottom: 44px;
}

.footer-col-brand .footer-brand-logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: #064e3b; text-decoration: none; margin-bottom: 14px;
}
.footer-col-brand .footer-brand-logo img { width: 46px; height: 46px; }
.footer-col-brand .footer-brand-logo strong { font-size: 1.3rem; font-weight: 800; display: block; color: #064e3b; }
.footer-col-brand .footer-brand-logo small { font-size: .72rem; color: var(--green-600); display: block; font-weight: 600; }

.company-fullname {
  font-size: .85rem; font-weight: 800; color: #0f172a; letter-spacing: .01em;
  margin-bottom: 8px; line-height: 1.4;
}
.company-desc {
  font-size: .83rem; color: #475569; line-height: 1.6; margin-bottom: 18px;
}

/* Social Row (Nút icon tròn chuẩn theo ảnh mẫu) */
.footer-social-row {
  display: flex; align-items: center; gap: 14px; margin-top: 12px;
}
.social-icon-btn, .social-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #facc15; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 3px 8px rgb(0 0 0 / 12%); border: 2px solid #fff;
  font-size: 0; position: relative;
}
.social-icon-btn:hover, .social-btn:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 16px rgb(0 0 0 / 20%);
}

.social-icon-btn.facebook, .social-btn.facebook { background: #facc15; color: #1877f2; }
.social-icon-btn.tiktok, .social-btn.tiktok { background: #facc15; color: #0f172a; }
.social-icon-btn.zalo, .social-btn.zalo { background: #facc15; color: #0284c7; }

.social-icon-btn svg, .social-btn svg { width: 22px; height: 22px; }
.social-icon-btn .zalo-text, .social-btn .zalo-text {
  font-size: .8rem; font-weight: 900; color: #0284c7; background: transparent;
  padding: 0; border-radius: 0; line-height: 1; letter-spacing: -0.02em;
}

/* Footer Titles & Lists */
.footer-title {
  font-size: 1.05rem; font-weight: 700; color: #064e3b; margin-bottom: 18px;
  position: relative; padding-bottom: 8px;
}
.footer-title::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 36px; height: 3px;
  background: var(--green-500); border-radius: 2px;
}

.footer-contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.footer-contact-list li { display: flex; align-items: flex-start; gap: 10px; font-size: .85rem; }
.footer-contact-list .contact-icon {
  width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  color: #475569; font-size: 1.15rem; line-height: 1; flex: 0 0 24px;
}
.footer-contact-list .contact-icon svg { width: 22px; height: 22px; display: block; }
.footer-contact-list strong { display: block; color: #0f172a; font-weight: 700; margin-bottom: 1px; }
.footer-contact-list a { color: var(--green-600); text-decoration: none; font-weight: 700; }
.footer-contact-list a:hover { text-decoration: underline; color: #047857; }
.footer-contact-list span { color: #475569; }

.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-links a {
  color: #475569; text-decoration: none; font-size: .85rem; font-weight: 500;
  transition: color .15s, padding-left .15s; display: inline-block;
}
.footer-links a:hover { color: var(--green-600); padding-left: 4px; font-weight: 600; }

/* Disclaimer Card (Miễn trừ trách nhiệm) */
.disclaimer-card {
  background: #fff; border: 1px solid #d1fae5; border-radius: 10px;
  padding: 16px 18px; box-shadow: 0 2px 8px rgb(0 0 0 / 3%);
}
.disclaimer-card p {
  font-size: .81rem; color: #475569; line-height: 1.6; margin: 0;
}
.disclaimer-card strong { color: #064e3b; font-weight: 700; }

/* Bottom Bar */
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 16px; padding-top: 22px; border-top: 1px solid #cbd5e1;
  font-size: .8rem; color: #64748b;
}
.back-to-top {
  color: var(--green-600); font-weight: 700; text-decoration: none; transition: color .15s;
}
.back-to-top:hover { color: #047857; text-decoration: underline; }

@media (max-width: 992px) {
  .footer-commit-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* =========================================================
   MOBILE FOOTER (Chỉ áp dụng <= 640px theo Nhà Thuốc Thân Thiện)
   ========================================================= */
@media (max-width: 640px) {
  .footer-desktop-wrapper { display: none !important; }
  .footer-mobile-wrapper { display: block !important; }
  .site-footer {
    padding: 22px 0 16px !important;
    background: #f4f8f5 !important;
    border-top: 3px solid #007d48 !important;
  }
  .nexa-mf-section { margin-bottom: 16px; }
  .nexa-mf-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
  }
  .nexa-mf-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
  }
  .nexa-mf-links a {
    color: #475569;
    text-decoration: none;
    font-size: 0.92rem;
    line-height: 1.5;
  }
  .nexa-mf-highlight a {
    color: #007d48 !important;
    font-weight: 700 !important;
  }
  .nexa-mf-disclaimer {
    font-size: 0.84rem;
    line-height: 1.6;
    color: #4b5563;
    margin: 0;
  }
  .nexa-mf-link-green {
    color: #007d48 !important;
    font-weight: 700 !important;
    text-decoration: none;
  }
  .nexa-mf-toggle {
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    user-select: none;
    padding: 4px 0 2px;
  }
  .nexa-mf-toggle::-webkit-details-marker { display: none; }
  .nexa-mf-toggle .toggle-close { display: none; }
  .nexa-mf-details[open] .nexa-mf-toggle .toggle-open { display: none; }
  .nexa-mf-details[open] .nexa-mf-toggle .toggle-close { display: inline; }
  .nexa-mf-details .toggle-arrow { transition: transform 0.2s ease; }
  .nexa-mf-details[open] .toggle-arrow { transform: rotate(180deg); }
  .nexa-mf-expanded {
    margin-top: 8px;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #64748b;
    background: #ffffff;
    border: 1px solid #d1fae5;
    border-radius: 8px;
    padding: 10px 12px;
  }
  .nexa-mf-divider {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 16px 0 12px;
    width: 100%;
  }
  .nexa-mf-legal {
    text-align: left;
    font-size: 0.76rem;
    line-height: 1.6;
    color: #64748b;
    margin-bottom: 12px;
  }
  .nexa-mf-legal a {
    color: #007d48;
    text-decoration: none;
    font-weight: 700;
  }
  .nexa-mf-socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
  }
  .nexa-mf-social-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #007d48;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
  }
  .nexa-mf-zalo .zalo-text {
    font-size: 0.72rem;
    font-weight: 900;
    color: #007d48;
  }
}

@media (max-width: 640px) {
  .nexa-directory .container { width: min(100% - 28px, 1200px); }
  .nexa-directory .site-footer { padding: 22px 0 16px !important; }
}
