/* Footer Container */
.footer-container {
    position: relative;
    font-family: var(--md-footer-font);
    color: #ffffff;
    padding: 0;
    align-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0px;
    height: min-content;
    justify-content: flex-end;
    overflow: visible;
    font-family: Inter, sans-serif;
    font-size: 15px !important;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.2;
    font-optical-sizing: auto;
    font-feature-settings:
        "calt" 1,
        "tnum" 1,
        "cv03" 1,
        "cv04" 1,
        "cv09" 1,
        "cv11" 1;
}

.footer-container strong,
.footer-container b,
.footer-container .bold {
    font-weight: 650;
}

.link {
    color: #ffb34f;
    text-decoration: underline;
}

.link:hover {
    color: #ffeed9;
    text-decoration: underline;
}

.link:active,
.link:focus {
    color: #ffc880;
    text-decoration: underline;
}

/* Apply text shadow to all text elements within footer */
.footer-container * {
    text-shadow: 0px 0px 3px rgba(0, 0, 0, 0.5) !important;
}

/* Background */
.footer-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/assets/images/meta/footer_menu.png') center bottom/cover no-repeat;
    z-index: 0;
}

.footer-wrapper {
    align-content: flex-start;
    align-items: flex-start;
    display: flex;
    flex: none;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 24px;
    height: min-content;
    justify-content: center;
    max-width: 1200px;
    overflow: visible;
    padding: 80px 0;
    position: relative;
    width: 80%;
    z-index: 1;
}

/* Company Info Section */
.company-info {
  flex: 1;
  min-width: 280px;
}

.company-logo {
    aspect-ratio: 4.898066783831283 / 1;
    flex: none;
    overflow: visible;
    position: relative;
    width: 245px;
}

.logo-image {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-position: center;
    object-fit: cover;
}

.company-details {
    align-content: flex-start;
    align-items: flex-start;
    display: flex;
    flex: none;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 8px;
    height: min-content;
    justify-content: center;
    overflow: visible;
    padding: 0;
    position: relative;
    width: 100%;
}

/* Partnership Section */
.partnership-content {
    place-content: flex-start;
    align-items: flex-start;
    display: flex;
    flex: 0 0 auto;
    flex-flow: column;
    gap: 2px;
    height: min-content;
    overflow: hidden;
    padding: 0px;
    position: relative;
    z-index: 1;
}

.partner-logos {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: 6px;
    background-color: #00000015;
    border-radius: 6px;
    flex: none;
    overflow: visible;
    position: relative;
    width: fit-content;
    min-width: min-content;
}

.mb-logo,
.vietlott-logo {
    display: block;
    flex: none;
    overflow: visible;
    position: relative;
    height: 24px;
    width: auto;
}

.mb-logo img,
.vietlott-logo img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-position: center;
    object-fit: contain;
}

.separator-column {
    align-self: stretch;
    flex: none;
    height: auto;
    overflow: hidden;
    position: relative;
    width: 1px !important;
    background-color: #ffffff;
    border-radius: 5px;
    opacity: 1;
}

/* Social Media Section */
.social-media {
    place-content: flex-start;
    align-items: flex-start;
    display: flex;
    flex: 0 0 auto;
    flex-flow: column;
    gap: 8px;
    height: min-content;
    overflow: hidden;
    padding: 0px;
    position: relative;
    z-index: 1;
}

.social-icons {
    align-content: center;
    align-items: center;
    display: flex;
    flex: none;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 20px;
    height: min-content;
    justify-content: flex-start;
    overflow: visible;
    padding: 0;
    position: relative;
    width: min-content;
}

.social-icons a {
    align-content: center;
    align-items: center;
    display: flex;
    flex: none;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    height: min-content;
    justify-content: center;
    min-height: 24px;
    min-width: 24px;
    overflow: hidden;
    padding: 0;
    position: relative;
    text-decoration: none;
    width: min-content;
    border-radius: 3px;
    box-shadow: rgba(0, 0, 0, 0.25) 0px 0px 2px 0px;
    opacity: 1;
}

.social-icons a img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* App Download Section */
.app-download {
    align-content: flex-start;
    align-items: flex-start;
    display: flex;
    flex: none;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 8px;
    height: min-content;
    justify-content: flex-start;
    overflow: visible;
    padding: 0;
    position: relative;
}

.app-download-content {
    align-content: center;
    align-items: center;
    display: flex;
    flex: none;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    height: min-content;
    justify-content: flex-start;
    overflow: hidden;
    padding: 0;
    position: relative;
}

.qr-code-link {
    aspect-ratio: 1 / 1;
    cursor: pointer;
    flex: none;
    height: 115px;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    width: 115px;
}

.qr-code-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.store-buttons {
    align-content: center;
    align-items: center;
    display: flex;
    flex: none;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 12px;
    height: auto;
    justify-content: center;
    padding: 0;
    position: relative;
}

.store-buttons a {
    aspect-ratio: 3.3333333333333335 / 1;
    cursor: pointer;
    flex: 1 0 0px;
    height: 44.5px;
    overflow: visible;
    position: relative;
    text-decoration: none;
    width: 149px;
    filter: drop-shadow(rgba(0, 0, 0, 0.25) 0px 0px 1px);
    opacity: 1;
}

.store-buttons img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Quick Links Section */
.quicklinks {
    align-content: flex-start;
    align-items: flex-start;
    display: flex;
    flex: none;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 8px;
    height: min-content;
    justify-content: flex-start;
    overflow: visible;
    padding: 0;
    position: relative;
    width: 100%;
}

.quicklinks-list {
align-content: center;
    align-items: center;
    display: flex;
    flex: none;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    height: min-content;
    justify-content: flex-start;
    overflow: hidden;
    padding: 0;
    position: relative;
    width: 100%;
}

.quicklinks-list .link-item a {
    color: #ffc880;
    text-decoration: none;
}

.quicklinks-list .link-item a:hover {
    color: #ffeed9;
    text-decoration: underline;
}

.quicklinks-list .link-item a:focus,
.quicklinks-list .link-item a.current {
    color: #ffc880;
    text-decoration: none;
}

/* Copyright Section */
.copyright {
    align-content: center;
    align-items: center;
    bottom: 20px;
    display: flex;
    flex: none;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    height: min-content;
    justify-content: center;
    overflow: visible;
    padding: 0;
    position: absolute;
    width: 100%;
    font-family: 'Halyard Display';
    font-size: 16px;
    font-weight: 400;
}

.copyright-text {
  color: rgba(253, 236, 206, 0.9);
  line-height: 1.4;
}

.copyright-text a {
  color: var(--md-accent-fg-color, #ffd700);
  text-decoration: none;
}

.copyright-text a:hover {
  text-decoration: underline;
}

/* Responsive Design */

/* Tablet (768px - 1199px) */
@media (max-width: 1199px) and (min-width: 768px) {
  .footer-container {
    padding: 3rem 0;
  }
  
  .footer-wrapper {
    padding: 0 1.5rem;
  }
  
  .footer-flex-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  
  .company-info,
  .partnership,
  .social-media,
  .app-download {
    min-width: auto;
    max-width: none;
  }
}

/* Mobile (≤767px) */
@media (max-width: 767px) {
  .footer-container {
    min-height: auto;
    padding: 2.5rem 0;
  }
  
  .footer-wrapper {
    padding: 0 1rem;
  }
  
  .company-info,
  .partnership,
  .social-media,
  .app-download {
    min-width: auto;
    max-width: none;
    width: 100%;
  }
  
  .logo-image {
    width: 200px;
  }
  
  .partner-logos {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .logo-separator {
    display: none;
  }
  
  .social-icons {
    justify-content: flex-start;
  }
  
  .app-download-content {
    align-items: flex-start;
  }
  
  .store-buttons {
    max-width: 250px;
  }
  
  .quicklinks-list {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .copyright-wrapper {
    padding-top: 1.5rem;
  }
}

/* Extra Small Mobile (≤480px) */
@media (max-width: 480px) {
  .footer-container {
    padding: 2rem 0;
  }
  
  .footer-wrapper {
    padding: 0 0.8rem;
  }
  
  .logo-image {
    width: 180px;
  }
  
  .social-icons a {
    width: 35px;
    height: 35px;
    padding: 5px;
  }
  
  .qr-placeholder img {
    width: 70px;
    height: 70px;
  }
  
  .store-buttons {
    max-width: 200px;
  }
}

/* Hide default Material footer */
.md-footer {
  display: none !important;
}

/* Adjust main content to accommodate custom footer */
.md-main {
  margin-bottom: 0;
}

.md-footer-meta,
.md-footer-nav {
  display: none !important;
}

.md-content {
  margin-bottom: 0;
}

/* Dark mode compatibility */
[data-md-color-scheme="slate"] .footer-container {
  background-color: rgba(30, 30, 46, 0.95);
}

[data-md-color-scheme="slate"] .footer-background {
  opacity: 0.8;
}

/* Animation classes for JavaScript */
.footer-animate-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.footer-animate-in.active {
  opacity: 1;
  transform: translateY(0);
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .footer-container *,
  .footer-container *::before,
  .footer-container *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for accessibility */
.footer-container a:focus {
  outline: 2px solid var(--md-accent-fg-color, #ffd700);
  outline-offset: 2px;
  border-radius: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .footer-container {
    background: #000000;
    color: #ffffff;
  }
  
  .footer-background {
    display: none;
  }
  
  .section-divider {
    background: #ffffff;
  }
}

/* New structure styles */
.footer-row-1 {
    align-content: flex-start;
    align-items: flex-start;
    display: flex;
    flex: none;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 24px;
    height: min-content;
    justify-content: flex-start;
    overflow: visible;
    padding: 0;
    position: relative;
    width: 100%;
}

.footer-col-1 {
    align-content: flex-start;
    align-items: flex-start;
    display: flex;
    flex: 1 0 0px;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 24px;
    height: min-content;
    justify-content: center;
    overflow: visible;
    padding: 0;
    position: relative;
    width: 1px;
}

.combined-sections {
    place-content: flex-start;
    align-items: flex-start;
    display: flex;
    flex: 0 0 auto;
    flex-flow: row;
    gap: 24px;
    height: min-content;
    overflow: hidden;
    padding: 0px;
    position: relative;
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 1199px) {
  .footer-col-1 {
    min-width: 100%;
  }
  
  .combined-sections {
    width: 100%;
  }
  
  .app-download {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .combined-sections {
    flex-direction: column;
    gap: 0.5rem;
  }
}