/* Header Styling */

#header {
    background-color: rgba(255, 255, 255, 0.3); 
    backdrop-filter: blur(10px); 
    border-radius: 50px; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); 
    transition: all 0.3s ease; 
}

/* Logo Styling */
.logo {
    width: 120px; 
    height: auto;
    object-fit: contain; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Navigation Link Styling */
.nav-link {
    font-size: 16px;
    font-weight: 500;
    color: #0a0a0a; 
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #0b0b0b; 
}

/* Contact Button Styling */
.cta-btn {
    background-color: #050505; 
    color: #FFFFFF;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.cta-btn:hover {
    background-color: #3E2C23; 
}
.hero-section,
.typed-wrap {
  overflow-anchor: none;
}

body {
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

/* Hide Scrollbar */
::-webkit-scrollbar {
    display: none;
}
body {
    -ms-overflow-style: none;  
    scrollbar-width: none; 
}

/* Utility class for covering images */
.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}
.img-cover:hover {
    transform: scale(1.05);
}

/* Header Navigation Link Styling */
.nav-link {
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: black;
    transition: width 0.3s ease-in-out;
}
.nav-link:hover {
    color: #333;
}
.nav-link:hover::after {
    width: 100%;
}

/* Why Choose Us Section Cards */
.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    border-right: 1px solid transparent;
}
.feature-card:last-child {
    border-right: none;
}

@media (min-width: 1024px) {
    .feature-card {
        border-right: 1px solid #e5e7eb;
    }
}

/* Project Stats Cards */
.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-right: 1px solid transparent;
}
.stat-card:last-child {
    border-right: none;
}

@media (min-width: 768px) {
    .stat-card {
        border-right: 1px solid #e5e7eb;
    }
}

/* Social Icons in Footer */
.social-icon {
    transition: color 0.3s ease, transform 0.3s ease;
}
.social-icon:hover {
    color: #555;
    transform: translateY(-3px);
}

/* ========== 3D TILT EFFECT FOR GALLERY ========== */
.tilt-card {
    aspect-ratio: 1 / 1;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
    will-change: transform; 
    transition: transform 0.1s ease-out; 
}

.tilt-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateZ(20px);
}
/* ========== MASONRY GALLERY ========== */
.masonry-gallery {
    display: grid;
    /* --- MOBILE FIRST: Mặc định là 2 cột --- */
    grid-template-columns: repeat(2, 1fr); 
    gap: 0.5rem; 
    grid-auto-rows: 250px;
}

/* --- TABLET & DESKTOP: Chuyển sang lưới tự động khi màn hình đủ lớn (>= 768px) --- */
@media (min-width: 768px) {
    .masonry-gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem; 
    }
}

.masonry-item {
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.3s ease;
}

.masonry-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.masonry-item.h-tall {
    grid-row: span 2; 
}

/* Class để ẩn các mục gallery khi lọc */
.masonry-item.item-hidden {
    transform: scale(0.9);
    opacity: 0;
    pointer-events: none;
}
.masonry-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== GALLERY FILTERS ========== */
.gallery-filter-btn {
    padding: 0.5rem 1.5rem;
    border: 1px solid #d1d5db; 
    border-radius: 9999px; 
    font-weight: 500;
    color: #374151; 
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-filter-btn:hover {
    background-color: #f3f4f6; 
    border-color: #9ca3af; 
}

.gallery-filter-btn.active {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

/* Lightbox Fade-in Animation */
#lightbox.hidden {
    display: none;
}
#lightbox {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
/*      Styling for the Contact Form         */
.contact-input {
    width: 100%;
    background-color: rgba(243, 244, 246, 0.7); 
    border: 1px solid transparent;
    border-radius: 12px; 
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: #374151; 
    transition: all 0.3s ease-in-out;
}

.contact-input::placeholder {
    color: #9ca3af; 
}

/* Hiệu ứng khi focus (nhấp vào ô) */
.contact-input:focus {
    outline: none;
    border-color: #333;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/*      Scroll Reveal Animation              */
.reveal {
  position: relative;
  opacity: 0;
  transform: translateY(50px);
  transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform, opacity; 
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 200ms; }
.reveal-delay-2 { transition-delay: 400ms; }
.reveal-delay-3 { transition-delay: 600ms; }

.aspect-w-3 { position: relative; padding-bottom: calc(var(--tw-aspect-h, 4) / var(--tw-aspect-w, 3) * 100%); }
.aspect-h-4 { --tw-aspect-h: 4; }

.aspect-w-4 { position: relative; padding-bottom: calc(var(--tw-aspect-h, 3) / var(--tw-aspect-w, 4) * 100%); }
.aspect-h-3 { --tw-aspect-h: 3; }

.aspect-w-3 > *, .aspect-w-4 > * { position: absolute; height: 100%; width: 100%; top: 0; right: 0; bottom: 0; left: 0; }
.group:hover {
  transform: translateY(-6px);
}
/*   HIỆU ỨNG NỀN LIQUID GLASS           */

body::before,
body::after {
    content: '';
    position: fixed;
    z-index: -1; 
    border-radius: 50%;
    filter: blur(100px); 
    opacity: 0.15;
}

/* Đốm sáng màu xanh tím */
body::before {
    background-color: #8A2BE2; /* BlueViolet */
    width: 400px;
    height: 400px;
    top: 5%;
    left: 10%;
    animation: pulse 15s infinite alternate;
}

/* Đốm sáng màu hồng cam */
body::after {
    background-color: #FF6347; /* Tomato */
    width: 350px;
    height: 350px;
    bottom: 10%;
    right: 5%;
    animation: pulse 20s infinite alternate-reverse;
}

@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.3); }
}

/* Class helper cho các tấm kính */
.glass-container {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 2rem 1.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}
/* Style cho nút Filter */
.filter-btn {
    padding: 0.6rem 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #374151; 
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: rgba(255, 255, 255, 1); 
    border-color: rgba(0, 0, 0, 0.2); 
}

.filter-btn.active {
    background-color: #000;
    color: #fff;
    border-color: #000;
}
/* ===== Signature reveal + pen dot ===== */
.signature-wrap{position:relative;display:inline-block}
.signature-img{
  display:block;
  /* ban đầu che 100% theo trục ngang, rồi mở dần */
  clip-path: inset(0 100% 0 0);
  filter: drop-shadow(0 5px 15px rgba(0,0,0,.06));
}
.signature-wrap.play .signature-img{
  animation: sig-reveal 2s cubic-bezier(.2,.8,.2,1) .2s forwards;
}
@keyframes sig-reveal{
  to{clip-path: inset(0 0 0 0)}
}

/* chấm bút chạy theo */
.signature-wrap::after{
  content:"";
  position:absolute; top:50%; left:0%;
  width:10px; height:10px; border-radius:50%;
  background:#111; box-shadow:0 0 8px rgba(0,0,0,.35);
  transform: translate(-50%,-50%);
  opacity:0;
}
.signature-wrap.play::after{
  animation: pen 2s ease-out .2s forwards;
}
@keyframes pen{
  0%   {left:0%; opacity:1}
  95%  {left:calc(100% - 8px); opacity:1}
  100% {left:calc(100% - 8px); opacity:0}
}
/* ============================================== */
/* ========== TÙY CHỈNH HERO SWIPER ========== */
/* ============================================== */

#hero-swiper {
    /* Loại bỏ một số style mặc định có thể gây xung đột */
    --swiper-theme-color: #ffffff; /* Đổi màu pagination và nút thành màu trắng */
    --swiper-navigation-size: 32px; /* Kích thước icon mũi tên */
}

/* Tùy chỉnh nút Next/Prev */
#hero-swiper .swiper-button-next,
#hero-swiper .swiper-button-prev {
    color: var(--swiper-theme-color);
    background-color: rgba(0, 0, 0, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    
    /* --- CẬP NHẬT MỚI --- */
    opacity: 0; /* Mặc định ẩn đi */
    transform: scale(0.8); /* Hơi thu nhỏ lại */
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

/* --- THÊM KHỐI MỚI: Chỉ hiện nút khi hover vào slider --- */
#hero-swiper:hover .swiper-button-next,
#hero-swiper:hover .swiper-button-prev {
    opacity: 1; /* Hiện ra */
    transform: scale(1); /* Trở về kích thước bình thường */
}


#hero-swiper .swiper-button-next:hover,
#hero-swiper .swiper-button-prev:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

/* Tùy chỉnh Pagination */
#hero-swiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transition: background-color 0.3s ease;
}

#hero-swiper .swiper-pagination-bullet-active {
    background-color: var(--swiper-theme-color);
}