/* ==========================================================================
   RESPONSIVE CSS - NUNU NAILS BAR
   ========================================================================== */

/* ==========================================================================
   DESKTOP OVERRIDES (min-width: 1025px)
   ========================================================================== */
@media screen and (min-width: 1025px) {
  /* Services filter tabs căn giữa trên Desktop */
  .services-filter-tabs {
    justify-content: center;
  }

  /* Gallery: Bố cục 4 cột so le chênh lệch nghệ thuật trên Desktop */
  .gallery-custom-layout {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .gallery-top-grid,
  .gallery-masonry-stagger,
  .gallery-stagger-col {
    display: contents;
  }

  /* Hàng 1 Desktop: Ảnh 1 (1 col), Ảnh 2 (1 col), Ảnh 3 (2 cols) */
  .item-1 {
    grid-column: 1;
    grid-row: 1;
  }

  .item-2 {
    grid-column: 2;
    grid-row: 1;
  }

  .item-3.item-wide {
    grid-column: 3 / span 2;
    grid-row: 1;
    aspect-ratio: 2 / 1;
  }

  /* Hàng 2 Desktop: Ảnh 4 (dọc cao span 2 hàng), Ảnh 5, Ảnh 6, Ảnh 7 */
  .item-4.item-tall-girl {
    grid-column: 1;
    grid-row: 2 / span 2;
    height: 100%;
  }

  .item-5.item-sign-tree {
    grid-column: 2;
    grid-row: 2;
  }

  .item-6.item-salon-chairs {
    grid-column: 3;
    grid-row: 2;
  }

  .item-7.item-menu-table {
    grid-column: 4;
    grid-row: 2;
  }

  /* Hàng 3 Desktop: Ảnh 8 (1 col), Ảnh 9 (2 cols) */
  .item-8.item-spa-beds {
    grid-column: 2;
    grid-row: 3;
  }

  .item-9.item-panorama {
    grid-column: 3 / span 2;
    grid-row: 3;
    aspect-ratio: 2 / 1;
  }

  /* Blog: Bố cục 2 cột trên Desktop */
  .blog-mobile-layout {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 36px;
    align-items: stretch;
  }

  .blog-featured-card {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .blog-featured-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
  }

  .blog-featured-footer {
    margin-top: auto;
  }

  /* ==========================================================================
     Video Section Desktop Layout: Bento Grid 3 Cột Sang Trọng & Cân Đối
     ========================================================================== */
  .video-grid-layout {
    grid-template-columns: 1.8fr 1fr 1.2fr;
    grid-template-rows: 1fr 1fr;
    grid-template-areas:
      "v1 v2 v3"
      "v1 v2 v4";
    gap: 20px;
    height: 540px;
  }

  .video-grid-layout .video-card-1 {
    grid-area: v1;
    height: 100%;
  }

  .video-grid-layout .video-card-2 {
    grid-area: v2;
    height: 100%;
  }

  .video-grid-layout .video-card-3 {
    grid-area: v3;
    height: 100%;
  }

  .video-grid-layout .video-card-4 {
    grid-area: v4;
    height: 100%;
  }

  /* Viết cứng aspect-ratio Desktop cho Bento Grid */
  .video-grid-layout .video-card-1 .video-thumb-container,
  .video-grid-layout .aspect-video-featured {
    aspect-ratio: 16 / 15;
    height: 100%;
  }

  .video-grid-layout .video-card-2 .video-thumb-container,
  .video-grid-layout .aspect-video-tall {
    aspect-ratio: 1 / 1.69;
    height: 100%;
  }

  .video-grid-layout .video-card-3 .video-thumb-container,
  .video-grid-layout .video-card-4 .video-thumb-container,
  .video-grid-layout .aspect-video-detail {
    aspect-ratio: 3 / 2;
    height: 100%;
  }

  /* Biến thể Desktop 2 tầng (1 video rộng trên + 2 cột dưới) viết cứng aspect-ratio */
  .video-grid-layout.layout-tier {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto 1fr 1fr;
    grid-template-areas:
      "v1 v1"
      "v2 v3"
      "v2 v4";
    gap: 20px;
    height: auto;
  }

  .video-grid-layout.layout-tier .video-card-1 .video-thumb-container,
  .video-grid-layout.layout-tier .aspect-video-featured {
    aspect-ratio: 21 / 9;
    max-height: 480px;
  }

  .video-grid-layout.layout-tier .video-card-2 {
    height: 100%;
  }

  .video-grid-layout.layout-tier .video-card-2 .video-thumb-container,
  .video-grid-layout.layout-tier .aspect-video-tall {
    aspect-ratio: 1 / 1.69;
    height: 100%;
  }

  .video-grid-layout.layout-tier .video-card-3 .video-thumb-container,
  .video-grid-layout.layout-tier .video-card-4 .video-thumb-container,
  .video-grid-layout.layout-tier .aspect-video-detail {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  /* Blogs Listing Page Grid trên Desktop: 3 Cột (2 Hàng x 3 Cột = 6 Bài) */
  .blogs-grid-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px 28px;
  }

  /* Services Listing Page Grid trên Desktop: 3 Cột */
  .services-grid-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(20px, 2.5vw, 28px);
  }

  /* Reviews Listing Page Grid trên Desktop: 3 Cột */
  .reviews-grid-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(20px, 2.5vw, 28px);
  }

  /* Similar Articles Grid trên Desktop: 3 Cột */
  .similar-grid-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 28px;
  }
}

/* ==========================================================================
   TABLET BREAKPOINT (max-width: 1024px)
   ========================================================================== */
@media screen and (max-width: 1024px) {
  :root {
    --header-height: 64px;
  }

  /* Mobile Menu Toggle Button */
  .menu-toggle-btn {
    display: flex;
  }

  /* Mobile Menu Drawer: full width, full height - height header chính (64px) */
  .header-nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100vw;
    width: 100%;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    background-color: #ffffff;
    box-shadow: none;
    border-top: none;
    padding: 32px clamp(20px, 5vw, 28px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    z-index: 999;
    
    /* Hiệu ứng trượt / mờ mượt mà */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.28s ease, visibility 0.28s ease, transform 0.28s ease;
  }

  .header-nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  /* Danh sách menu căn trái, cách đều 24px chuẩn ảnh */
  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    color: #333333;
    width: auto;
    display: inline-block;
    padding: 0;
    border-bottom: none;
    transition: color 0.2s ease, transform 0.2s ease;
  }

  .nav-link:hover,
  .nav-link.active {
    color: var(--btn-brown);
    transform: translateX(4px);
  }

  .nav-link.active::after {
    display: none;
  }

  /* Why Choose Us - 2 columns on tablet */
  .why-us-grid {
    flex-wrap: wrap;
  }
  .why-us-card {
    flex: 0 1 calc(50% - (var(--why-gap, 24px) / 2));
    max-width: 480px;
  }

  /* Footer - 2 columns on tablet */
  .footer-layout {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
  }

  /* Blogs Listing Grid trên Tablet: 2 Cột */
  .blogs-grid-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 20px;
  }

  /* Services Listing Grid trên Tablet: 2 Cột */
  .services-grid-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 20px;
  }

  /* Reviews Listing Grid trên Tablet: 2 Cột */
  .reviews-grid-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 20px;
  }

  /* Similar Articles Grid trên Tablet: 2 Cột */
  .similar-grid-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 20px;
  }
}

/* ==========================================================================
   MOBILE BREAKPOINT (max-width: 768px - KHỚP 100% ẢNH MẪU)
   ========================================================================== */
@media screen and (max-width: 768px) {
  /* Blogs Listing Grid trên Mobile: 1 Cột xếp dọc khớp chuẩn ảnh mẫu 100% */
  .blogs-grid-layout {
    display: flex;
    flex-direction: column;
    gap: 26px;
  }

  /* Services Listing Grid trên Mobile: 1 Cột xếp dọc chuẩn 100% ảnh mẫu */
  .services-grid-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 480px;
    margin: 0 auto;
  }

  /* Reviews Listing Grid trên Mobile: 1 Cột xếp dọc chuẩn 100% ảnh mẫu */
  .reviews-grid-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 500px;
    margin: 0 auto clamp(32px, 5vw, 44px);
  }

  /* Similar Articles Grid trên Mobile: 1 Cột xếp dọc chuẩn 100% ảnh mẫu */
  .similar-grid-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  /* Why Choose Us - 1 column stack */
  .why-us-grid {
    flex-direction: column;
    max-width: 480px;
    margin: 0 auto;
  }
  .why-us-card {
    flex: 1 1 100%;
    max-width: 480px;
    width: 100%;
  }

  /* Hero buttons */
  .page-hero {
    text-align: center;
  }

  .hero-content {
    margin: 0 auto;
    text-align: center;
  }

  .hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  /* Blog: 1 cột (1 bài lớn trên, 3 bài nhỏ dưới) */
  .blog-mobile-layout {
    flex-direction: column;
  }

  /* Footer - 1 column stack, căn trái 100% đúng ảnh mẫu */
  .footer-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 28px;
  }

  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 6px;
    padding-top: 18px;
  }
}

/* ==========================================================================
   SMALL MOBILE BREAKPOINT (max-width: 480px)
   ========================================================================== */
@media screen and (max-width: 480px) {
  .logo-title {
    font-size: 18px;
  }

  .header-actions {
    gap: 6px;
  }

  .btn-lang-current {
    padding: 2px 6px 2px 3px;
    font-size: 11px;
    gap: 4px;
  }

  .lang-flag-current .vn-flag-svg {
    width: 18px;
    height: 18px;
  }

  .btn-lang-circle,
  .btn-phone-circle {
    width: 28px;
    height: 28px;
  }

  .vn-flag-svg {
    width: 20px;
    height: 20px;
  }

  .header-phone-icon {
    width: 13px;
    height: 13px;
  }

  .btn-book-nav {
    padding: 6px 12px;
  }

  .btn-book-nav-text {
    font-size: 12px;
  }

  .menu-toggle-btn {
    width: 24px;
    height: 24px;
  }

  .menu-toggle-btn .bar {
    width: 18px;
  }

  .hero-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: auto;
    flex: 1;
    max-width: 175px;
    padding: 11px 14px;
    text-align: center;
    white-space: nowrap;
  }

  .btn-primary-text,
  .btn-secondary-text {
    font-size: 13px;
  }

  /* Services Card trên điện thoại nhỏ */
  .service-card-actions {
    gap: 6px;
  }

  .btn-service-learn {
    padding: 7px 12px;
  }

  .btn-service-book {
    padding: 7px 14px;
  }

  .booking-card-center {
    padding: 24px 16px;
  }

  .booking-social-circle {
    width: 38px;
    height: 38px;
  }

  .booking-social-circle img {
    width: 17px;
    height: 17px;
  }

  .booking-social-icons {
    gap: 10px;
  }

  .cta-banner-box {
    padding: 40px 16px;
  }

  .btn-cta-white {
    width: 100%;
    text-align: center;
  }

  .blog-row-item {
    gap: 12px;
    padding: 0;
  }

  .blog-row-title {
    font-size: 14px;
  }
}
