/* Footer Styles */

.footer {
  background: var(--zz-blue);
  color: #e2e8f0;
  padding: 60px 0 0;
  margin-top: 0 !important;
  height: 100%;
  padding-bottom: 100px;
}

.footer .page-container {
  padding-top: 0;
}

.footer .container {
  max-width: 90vw;
  margin: 0 auto;
  padding: 0 60px;
}

@media (max-width: 1400px) {
  .footer .container {
    padding: 0 40px;
  }
}

@media (max-width: 1250px) {
  .footer .container {
    padding: 0 25px;
  }
}

@media (max-width: 480px) {
  .footer .container {
    padding: 0 20px;
  }
}

/* Main Footer Content */
.footer-main {
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
}

/* Brand Column */
.footer-col--brand {
  max-width: 400px;
}

.footer-logo {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-logo img {
  width: 180px;
  height: auto;
}

@media (max-width: 1000px) {
  .footer-logo {
    /* align-items only works on flex containers — use block centering */
    display: block;
    margin: 0 auto;
    text-align: center;
  }
}

.footer-tagline {
  color: #ffffff;
  line-height: 1.6;
  margin-bottom: 24px;
  font-size: 15px;
}

/* Contact Items */
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.5;
}

.contact-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #60a5fa;
}

/* Footer Titles */
.footer-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Links Column */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links li a {
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  display: inline-block;
  position: relative;
}

.footer-links li a::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  transition: width 0.3s ease;
}

.footer-links li a:hover {
  color: #fff;
  transform: translateX(4px);
}

.footer-links li a:hover::before {
  width: 100%;
}

/* Social Links */
.footer-socials {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  color: #cbd5e1;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.social-link:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.footer-empty {
  color: #ffffff;
  font-size: 14px;
  font-style: italic;
}

/* Footer Bottom */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  font-size: 14px;
  color: #ffffff;
}

.copyright {
  margin: 0;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-legal a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-legal a:hover {
  color: #fff;
}

.footer-legal .separator {
  color: #475569;
}

/* Responsive Design */
@media (max-width: 992px) {
  .footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-col--brand {
    grid-column: 1 / -1;
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .footer {
    padding: 40px 0 0;
    margin-top: 60px;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-logo {
    font-size: 24px;
  }


  .footer-main {
    padding-bottom: 32px;
  }
}

/* Dark mode enhancement */
@media (prefers-color-scheme: dark) {
  .footer {
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
  }
}

/* ---------- Mobile-friendly accordion & touch improvements ---------- */

/* Style chung cho details-based accordion */
.footer-accordion {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
}

/* dùng summary làm tiêu đề (giữ style giống .footer-title) */
.footer-accordion summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  margin-bottom: 12px;
  outline: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Ẩn mũi tên mặc định của summary trên 1 số trình duyệt */
.footer-accordion summary::-webkit-details-marker {
  display: none;
}

/* custom arrow */
.footer-accordion summary::after {
  content: "▾";
  font-size: 14px;
  transition: transform 0.25s ease;
  color: #94a3b8;
}

/* xoay mũi tên khi mở */
.footer-accordion[open] summary::after {
  transform: rotate(-180deg);
}

/* Nội dung của accordion */
.footer-accordion>*:not(summary) {
  margin: 0;
  padding: 0;
}

/* Tăng kích thước link / icon để dễ bấm */
.footer-socials .social-link {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* tăng kích thước svg trong contact */
.contact-icon {
  width: 20px;
  height: 20px;
  margin-top: 0;
}

/* Tối ưu padding cho mobile */
@media (max-width: 640px) {
  .footer {
    padding: 24px 16px 16px;
    height: auto;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* brand full width */
  .footer-col--brand {
    grid-column: 1 / -1;
    max-width: none;
    padding-bottom: 6px;
  }

  /* thu nhỏ logo image nếu cần */
  .footer-logo img {
    max-height: 44px;
    object-fit: contain;
  }

  /* giảm khoảng cách và font nhỏ hơn 1 chút */
  .footer-tagline {
    font-size: 14px;
    margin-bottom: 16px;
  }

  .contact-item {
    font-size: 15px;
    gap: 10px;
  }

  /* Links: stacked with larger tap area */
  .footer-links li a {
    padding: 10px 6px;
    display: block;
    border-radius: 6px;
  }

  .footer-links li a:hover {
    transform: none;
  }

  /* Footer bottom center */
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  /* Adjust summary title look on mobile */
  .footer-accordion summary.footer-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.4px;
    text-transform: uppercase;
  }

  /* Hide decorative underline on small screens to simplify visuals */
  .footer-links li a::before {
    display: none;
  }
}

/* Accessibility: focus outlines */
.footer-accordion summary:focus,
.footer-links a:focus,
.social-link:focus {
  outline: 3px solid rgba(99, 102, 241, 0.18);
  outline-offset: 3px;
  border-radius: 8px;
}

/* small tweak: keep dark-mode behavior */
@media (prefers-color-scheme: dark) {
  .footer {
    background: linear-gradient(135deg, #071021 0%, #020417 100%);
  }
}