/* ============================================= */
/* 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;
}
