/* ============================================= */
/* CUSTOM STYLES - FBA Website                   */
/* ============================================= */

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* ============================================= */
/* HEADER STYLES                                 */
/* ============================================= */

/* Header shrink on scroll */
#main-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#main-header.scrolled .py-3 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

#main-header.scrolled img {
  height: 2.75rem;
}

/* Dropdown menu animation */
.dropdown-menu {
  transform: translateY(8px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.group:hover .dropdown-menu {
  transform: translateY(0);
}

/* Nav link active state */
.nav-link.active {
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background-color: #B51E21;
  border-radius: 2px;
}

/* Mobile accordion */
.accordion-toggle svg {
  transition: transform 0.3s ease;
}

.accordion-toggle.active svg {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.accordion-content.show {
  display: block;
  max-height: 500px;
  padding-bottom: 0.5rem;
}

/* ============================================= */
/* HERO SECTION                                  */
/* ============================================= */

#hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(249, 201, 113, 0.08);
  pointer-events: none;
}

#hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

/* ============================================= */
/* CARD HOVER EFFECTS                            */
/* ============================================= */

article.group:hover {
  transform: translateY(-4px);
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================= */
/* PARTNER LOGOS                                 */
/* ============================================= */

.partner-logo {
  transition: all 0.3s ease;
  filter: grayscale(30%);
  opacity: 0.7;
}

.partner-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

/* ============================================= */
/* BACK TO TOP BUTTON                            */
/* ============================================= */

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  transform: translateY(-3px);
}

/* ============================================= */
/* SCROLL REVEAL ANIMATIONS                      */
/* ============================================= */

[data-sr] {
  visibility: visible;
}

/* ============================================= */
/* CUSTOM SCROLLBAR                              */
/* ============================================= */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #B51E21;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #D71D23;
}

/* ============================================= */
/* LOADING ANIMATION                             */
/* ============================================= */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================= */
/* SECTION DIVIDERS                              */
/* ============================================= */

.section-divider {
  position: relative;
}

.section-divider::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #B51E21, #F9C971);
  border-radius: 2px;
}

/* ============================================= */
/* RESPONSIVE ADJUSTMENTS                        */
/* ============================================= */

/* Mobile Menu overlay */
@media (max-width: 1023px) {
  #mobile-menu {
    border-top: 3px solid #B51E21;
  }
}

/* Tablet specific */
@media (min-width: 768px) and (max-width: 1023px) {
  #hero h1 {
    font-size: 2.5rem;
  }
}

/* Desktop large */
@media (min-width: 1280px) {
  .nav-link {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Mobile small */
@media (max-width: 480px) {
  #hero h1 {
    font-size: 1.75rem;
  }

  #hero p {
    font-size: 0.875rem;
  }

  .font-phudu.text-3xl {
    font-size: 1.5rem;
  }
}

/* ============================================= */
/* FOCUS STYLES (Accessibility)                  */
/* ============================================= */

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #B51E21;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================= */
/* SELECTION STYLING                             */
/* ============================================= */

::selection {
  background-color: #B51E21;
  color: white;
}

::-moz-selection {
  background-color: #B51E21;
  color: white;
}

/* ============================================= */
/* PRINT STYLES                                  */
/* ============================================= */

@media print {
  #top-bar,
  #main-header,
  #back-to-top,
  #mobile-menu {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
  }

  a {
    text-decoration: underline;
  }
}

/* Chặn tràn ngang do hiệu ứng trượt (ScrollReveal) – clip không tạo vùng cuộn nên không ảnh hưởng header sticky */
body {
  overflow-x: clip;
}

/* =============================================
   FOOTER XANH LÁ (Hoàng Hà Green - #0C765F)
   ============================================= */
.fba-footer,
footer#main-footer {
  background: linear-gradient(180deg, #0C765F 0%, #00483D 100%) !important;
}
.fba-footer .text-gray-400,
footer#main-footer .text-gray-400 { color: rgba(255, 255, 255, .82); }
.fba-footer .text-gray-500,
footer#main-footer .text-gray-500 { color: rgba(255, 255, 255, .62); }
.fba-footer .border-white\/10,
footer#main-footer .border-white\/10 { border-color: rgba(255, 255, 255, .15); }
.fba-footer .border-white\/20,
footer#main-footer .border-white\/20 { border-color: rgba(255, 255, 255, .25); }
.fba-footer .bg-white\/10,
footer#main-footer .bg-white\/10 { background-color: rgba(0, 0, 0, .20); }
.fba-footer input::placeholder,
footer#main-footer input::placeholder { color: rgba(255, 255, 255, .55); }
.fba-footer .bg-fba-red,
footer#main-footer .bg-fba-red { background-color: #FADA8E; color: #00483D; font-weight: 700; }
.fba-footer .bg-fba-red:hover,
footer#main-footer .bg-fba-red:hover,
.fba-footer .hover\:bg-fba-red-light:hover,
footer#main-footer .hover\:bg-fba-red-light:hover { background-color: #F9C971; color: #022B22; }
.fba-footer a:hover .bg-white\/10,
footer#main-footer a:hover .bg-white\/10,
.fba-footer .hover\:bg-fba-red:hover,
footer#main-footer .hover\:bg-fba-red:hover { background-color: #FADA8E; color: #00483D; }
.fba-footer .text-fba-gold,
footer#main-footer .text-fba-gold { color: #FADA8E; }
.fba-footer a:hover,
footer#main-footer a:hover { color: #FADA8E; }
/* Nút lên đầu trang: viền trắng để nổi rõ khi nằm trên footer */
#back-to-top { box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 8px 20px rgba(0, 0, 0, .25); }

/* Hero slider: ẩn banner phụ ngay từ đầu (trước khi fba-home.js chạy) để không chồng chữ */
.fba-hero-slide { opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s linear .9s; }
.fba-hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity .9s ease, visibility 0s; }

/* Header dùng font Phudu theo bộ nhận diện */
#top-bar,
#main-header #desktop-nav,
#main-header #desktop-nav a,
#main-header .dropdown-menu a,
#main-header #mobile-menu,
#main-header #mobile-menu a,
#main-header a[href*="dang-ky-thanh-vien"] {
  font-family: 'Phudu', 'Poppins', sans-serif;
  letter-spacing: .01em;
}
#main-header #desktop-nav .nav-link { font-size: 15px; font-weight: 600; }
#main-header .dropdown-menu a { font-size: 15px; font-weight: 500; }
#main-header #mobile-menu a { font-size: 16px; }

/* ============================================= */
/* PARTNER HORIZONTAL SCROLL TRACK               */
/* ============================================= */
.partner-scroll-container::-webkit-scrollbar {
  height: 7px;
}
.partner-scroll-container::-webkit-scrollbar-track {
  background: #e2e8f0;
  border-radius: 9999px;
}
.partner-scroll-container::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 9999px;
  transition: background 0.2s;
}
.partner-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #A81C1D;
}
.partner-scroll-container {
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #e2e8f0;
}
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

