/* ============================================================
   Antoantonghop Theme — vnce.vn-inspired
   ============================================================ */

:root {
  --primary: #003366;
  --primary-dark: #002347;
  --primary-light: #1a4a82;
  --secondary: #0099cc;
  --accent: #ff6b35;
  --text-dark: #1a1a1a;
  --text-body: #444;
  --text-muted: #777;
  --bg-light: #f4f6f9;
  --bg-section: #fafbfc;
  --border-color: #e5e7eb;
  --white: #ffffff;
  --transition: all .25s ease;
  --shadow-sm: 0 2px 6px rgba(0,0,0,.05);
  --shadow-md: 0 6px 18px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.10);
  --radius: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--white);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--secondary); }

h1, h2, h3, h4, h5, h6 {
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0;
}

img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1200px; }

/* ============================================================
   Top Bar
   ============================================================ */
.topbar {
  background: var(--primary);
  color: rgba(255,255,255,.85);
  font-size: 13px;
  padding: 8px 0;
}
.topbar a { color: rgba(255,255,255,.85); }
.topbar a:hover { color: #fff; }
.topbar .topbar-item { display: inline-flex; align-items: center; gap: 6px; margin-right: 18px; }
.topbar .topbar-item i { color: var(--secondary); }
.topbar .topbar-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.1);
  margin-left: 6px;
}
.topbar .topbar-social a:hover { background: var(--accent); color: #fff; }

/* ============================================================
   Main Header
   ============================================================ */
.main-header {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 1020;
}
.main-header .navbar-brand img { max-height: 60px; }
.main-header .nav-link {
  color: var(--text-dark) !important;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  padding: 22px 14px !important;
  position: relative;
}
.main-header .nav-link:hover,
.main-header .nav-link.active { color: var(--primary) !important; }
.main-header .nav-link::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 16px;
  height: 2px; background: var(--accent); transform: scaleX(0); transition: var(--transition);
}
.main-header .nav-link:hover::after,
.main-header .nav-link.active::after { transform: scaleX(1); }
.main-header .dropdown-menu {
  border: 0; border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 8px 0; margin-top: 0;
}
.main-header .dropdown-item {
  padding: 8px 18px; font-size: 14px;
  border-left: 3px solid transparent;
}
.main-header .dropdown-item:hover {
  background: var(--bg-light); color: var(--primary);
  border-left-color: var(--accent);
}
.btn-hotline {
  background: var(--accent); color: #fff !important;
  padding: 10px 22px; border-radius: 30px;
  font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-hotline:hover { background: var(--primary); color: #fff !important; }

/* ============================================================
   Hero / Slider
   ============================================================ */
.hero-slider { position: relative; }
/* aspect-ratio reserves vertical space BEFORE the image loads → no CLS as Swiper
   initializes / first image streams in. 16:6.5 ≈ matches the old 520px-max look on
   ~1280px screens, but now stable across viewports. */
.hero-slider .swiper-slide { aspect-ratio: 16 / 6.5; max-height: 520px; }
.hero-slider .swiper-slide img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.hero-slider .swiper-button-prev,
.hero-slider .swiper-button-next {
  color: #fff; background: rgba(0,51,102,.6);
  width: 48px; height: 48px; border-radius: 50%;
}
.hero-slider .swiper-button-prev:hover,
.hero-slider .swiper-button-next:hover { background: var(--accent); }
.hero-slider .swiper-button-prev::after,
.hero-slider .swiper-button-next::after { font-size: 18px; font-weight: 700; }
.hero-slider .swiper-pagination-bullet { background: #fff; opacity: .6; width: 12px; height: 12px; }
.hero-slider .swiper-pagination-bullet-active { background: var(--accent); opacity: 1; }

/* ============================================================
   Section Common
   ============================================================ */
.section { padding: 64px 0; }
.section--light { background: var(--bg-section); }
.section--primary { background: var(--primary); color: #fff; }
.section--primary h1, .section--primary h2, .section--primary h3 { color: #fff; }

.section-title {
  text-align: center; margin-bottom: 40px;
}
.section-title .label {
  display: inline-block; color: var(--accent);
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; margin-bottom: 8px;
}
.section-title h2 {
  font-size: 32px; font-weight: 700; color: var(--primary);
  margin-bottom: 14px;
}
.section-title .divider {
  width: 60px; height: 3px; background: var(--accent);
  margin: 0 auto 16px;
}
.section-title p { color: var(--text-muted); font-size: 15px; max-width: 700px; margin: 0 auto; }

/* ============================================================
   Service Cards
   ============================================================ */
.service-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
  height: 100%;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: var(--transition);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.service-card:hover::before { transform: scaleX(1); }
.service-card .icon-wrap {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  transition: var(--transition);
}
.service-card .icon-wrap i { color: #fff; font-size: 28px; }
.service-card:hover .icon-wrap {
  background: linear-gradient(135deg, var(--accent), #ff8c5a);
  transform: rotate(8deg) scale(1.05);
}
.service-card h3 {
  font-size: 17px; font-weight: 700; margin: 0 0 10px;
  color: var(--primary);
}
.service-card p {
  color: var(--text-muted); font-size: 14px; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   Stats Section
   ============================================================ */
.stats-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}
.stats-section::before {
  content: ''; position: absolute; inset: 0;
  background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"%3E%3Cpath fill="%23ffffff" fill-opacity=".04" d="M0 0h100v100H0zM100 100h100v100H100z"/%3E%3C/svg%3E');
}
.stat-item { text-align: center; position: relative; }
.stat-item .stat-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.stat-item .stat-icon i { font-size: 26px; color: #fff; }
.stat-item .stat-value {
  font-size: 38px; font-weight: 800; line-height: 1; margin-bottom: 6px;
  color: #fff;
}
.stat-item .stat-label {
  font-size: 14px; text-transform: uppercase; letter-spacing: 1px;
  color: rgba(255,255,255,.85);
}

/* ============================================================
   About Section
   ============================================================ */
.about-section .about-img {
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  /* Reserve 4:3 space — prevents CLS while DB-backed image loads. */
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
}
.about-section h2 { color: var(--primary); font-size: 30px; margin-bottom: 18px; }
.about-section .lead { font-size: 16px; color: var(--text-body); line-height: 1.7; }
.about-section .check-list { list-style: none; padding: 0; margin: 20px 0; }
.about-section .check-list li {
  padding: 6px 0 6px 30px; position: relative; color: var(--text-body);
}
.about-section .check-list li::before {
  content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
  position: absolute; left: 0; top: 6px;
  color: var(--accent); font-size: 14px;
}

/* ============================================================
   News Cards
   ============================================================ */
.news-card {
  background: #fff; border: 1px solid var(--border-color);
  border-radius: var(--radius); overflow: hidden;
  transition: var(--transition); height: 100%;
  display: flex; flex-direction: column;
}
.news-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.news-card .news-image { position: relative; overflow: hidden; padding-top: 60%; }
.news-card .news-image img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.news-card:hover .news-image img { transform: scale(1.05); }
.news-card .news-date {
  position: absolute; top: 12px; left: 12px;
  background: var(--accent); color: #fff;
  padding: 8px 12px; border-radius: 4px;
  font-size: 12px; font-weight: 700; line-height: 1;
  text-align: center;
}
.news-card .news-date .day { display: block; font-size: 18px; }
.news-card .news-body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; }
.news-card h3 {
  font-size: 16px; font-weight: 700; margin: 0 0 10px; color: var(--text-dark);
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card h3 a { color: inherit; }
.news-card h3 a:hover { color: var(--primary); }
.news-card .news-excerpt {
  color: var(--text-muted); font-size: 14px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card .news-link {
  margin-top: 12px; color: var(--accent); font-weight: 600; font-size: 13px;
}

/* ============================================================
   Partner Carousel
   ============================================================ */
.partner-slider .swiper-slide {
  display: flex; align-items: center; justify-content: center;
  height: 100px; padding: 10px;
}
.partner-slider .swiper-slide img {
  max-height: 80px; max-width: 100%; object-fit: contain;
  filter: grayscale(100%); opacity: .7; transition: var(--transition);
}
.partner-slider .swiper-slide:hover img { filter: none; opacity: 1; }

/* ============================================================
   Breadcrumb
   ============================================================ */
.breadcrumb-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 50px 0 40px;
  color: #fff; position: relative;
}
.breadcrumb-banner h1 {
  color: #fff; font-size: 30px; margin: 0 0 8px;
}
.breadcrumb-banner .breadcrumb {
  background: transparent; margin: 0; padding: 0;
  font-size: 14px;
}
.breadcrumb-banner .breadcrumb a { color: rgba(255,255,255,.8); }
.breadcrumb-banner .breadcrumb a:hover { color: #fff; }
.breadcrumb-banner .breadcrumb-item.active { color: rgba(255,255,255,.7); }
.breadcrumb-banner .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255,255,255,.5);
}

/* ============================================================
   Listing Cards (Blog/Product/Service list)
   ============================================================ */
.listing-card {
  background: #fff; border: 1px solid var(--border-color);
  border-radius: var(--radius); overflow: hidden;
  transition: var(--transition); height: 100%;
  display: flex; flex-direction: column;
}
.listing-card:hover { box-shadow: var(--shadow-md); }
.listing-card .listing-image { position: relative; padding-top: 65%; overflow: hidden; }
.listing-card .listing-image img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.listing-card:hover .listing-image img { transform: scale(1.06); }
.listing-card .listing-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.listing-card h3 { font-size: 16px; margin: 0 0 10px; line-height: 1.4; }
.listing-card h3 a { color: var(--text-dark); }
.listing-card h3 a:hover { color: var(--primary); }
.listing-card .listing-excerpt {
  color: var(--text-muted); font-size: 14px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.listing-card .listing-meta {
  color: var(--text-muted); font-size: 13px; margin-bottom: 8px;
}
.listing-card .listing-meta i { margin-right: 4px; color: var(--accent); }

/* ============================================================
   Article (Detail page)
   ============================================================ */
.article-detail h1 { color: var(--primary); font-size: 28px; margin-bottom: 14px; }
.article-detail .meta { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.article-detail .meta i { margin-right: 4px; color: var(--accent); }
.article-detail .content { font-size: 16px; line-height: 1.8; }
.article-detail .content img { border-radius: var(--radius); margin: 16px 0; }
.article-detail .content h2,
.article-detail .content h3 { color: var(--primary); margin-top: 28px; }

/* ============================================================
   Sidebar (detail page)
   ============================================================ */
.side-widget {
  background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius);
  padding: 22px; margin-bottom: 24px;
}
.side-widget h3 {
  font-size: 16px; font-weight: 700; color: var(--primary);
  padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 2px solid var(--accent); position: relative;
}
.side-widget .side-list { list-style: none; padding: 0; margin: 0; }
.side-widget .side-list li { padding: 8px 0; border-bottom: 1px dashed var(--border-color); }
.side-widget .side-list li:last-child { border-bottom: 0; }
.side-widget .side-list a {
  color: var(--text-body); display: flex; gap: 10px; align-items: flex-start;
}
.side-widget .side-list a:hover { color: var(--primary); }
.side-widget .side-list img { width: 70px; height: 50px; object-fit: cover; border-radius: 4px; }

/* ============================================================
   Pagination
   ============================================================ */
.paginate_links a,
.pagination > li > a {
  color: var(--primary); border: 1px solid var(--border-color);
  padding: 8px 14px; margin: 0 3px; border-radius: 4px;
  display: inline-block; font-weight: 600;
}
.paginate_links a:hover,
.paginate_links a.active,
.pagination > li > a:hover {
  background: var(--primary); color: #fff !important; border-color: var(--primary);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--primary-dark); color: rgba(255,255,255,.7);
  padding: 60px 0 0; font-size: 14px;
}
.site-footer h4 {
  color: #fff; font-size: 16px; font-weight: 700; text-transform: uppercase;
  margin: 0 0 22px; padding-bottom: 12px;
  border-bottom: 2px solid var(--accent); display: inline-block;
}
.site-footer a { color: rgba(255,255,255,.7); }
.site-footer a:hover { color: #fff; }
.site-footer .footer-logo img { max-height: 70px; margin-bottom: 14px; background: #fff; padding: 8px; border-radius: 4px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { padding: 5px 0; }
.site-footer ul li i { color: var(--accent); margin-right: 8px; width: 16px; }
.site-footer .branch-item { margin-bottom: 14px; }
.site-footer .branch-item .branch-name { color: #fff; font-weight: 700; margin-bottom: 4px; }
.site-footer .social-icons { display: flex; gap: 10px; margin-top: 12px; }
.site-footer .social-icons a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.1); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.site-footer .social-icons a:hover { background: var(--accent); transform: translateY(-2px); }
.site-footer .copyright {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 40px; padding: 20px 0; text-align: center;
  font-size: 13px; color: rgba(255,255,255,.5);
}

/* ============================================================
   Back to Top
   ============================================================ */
#back-to-top {
  position: fixed; bottom: 30px; right: 30px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: none; align-items: center; justify-content: center;
  border: 0; cursor: pointer; z-index: 1000;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
#back-to-top:hover { background: var(--primary); transform: translateY(-4px); }
#back-to-top.show { display: inline-flex; }

/* ============================================================
   Floating Hotline (mobile)
   ============================================================ */
.float-contact {
  position: fixed; bottom: 90px; right: 30px;
  z-index: 999; display: flex; flex-direction: column; gap: 10px;
}
.float-contact a {
  width: 46px; height: 46px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: var(--shadow-md);
  animation: pulse 2s infinite;
}
.float-contact .fc-phone { background: #28a745; }
.float-contact .fc-zalo { background: #0068ff; animation-delay: .3s; }
.float-contact .fc-messenger { background: #0084ff; animation-delay: .6s; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,53,.4), var(--shadow-md); }
  50% { box-shadow: 0 0 0 14px rgba(255,107,53,0), var(--shadow-md); }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn-primary-accent {
  background: var(--accent); border-color: var(--accent); color: #fff;
  padding: 10px 22px; border-radius: 30px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary-accent:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-outline-primary-custom {
  background: transparent; border: 2px solid var(--primary); color: var(--primary);
  padding: 9px 22px; border-radius: 30px; font-weight: 600;
}
.btn-outline-primary-custom:hover { background: var(--primary); color: #fff; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 991.98px) {
  .section { padding: 48px 0; }
  .section-title h2 { font-size: 24px; }
  .stat-item .stat-value { font-size: 30px; }
  .main-header .nav-link { padding: 12px 14px !important; }
  .main-header .nav-link::after { display: none; }
  .topbar .topbar-item { display: flex; }
}
@media (max-width: 575.98px) {
  .section { padding: 36px 0; }
  .section-title h2 { font-size: 22px; }
  .article-detail h1 { font-size: 22px; }
  .float-contact { bottom: 75px; right: 16px; }
  .float-contact a { width: 42px; height: 42px; }
}
