:root {
    --primary: #c19b76;
    --primary-dark: #a58261;
    --dark: #2d2d2d;
    --light: #f9f9f9;
    --gray: #7a7a7a;
    --light-gray: #e9e9e9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: #fff;
}

@keyframes vibrateWithPause {

    0%,
    10% {
        transform: translateX(0);
    }

    15% {
        transform: translateX(-2px);
    }

    20% {
        transform: translateX(2px);
    }

    25% {
        transform: translateX(-2px);
    }

    30% {
        transform: translateX(2px);
    }

    35% {
        transform: translateX(-1px);
    }

    40% {
        transform: translateX(1px);
    }

    45%,
    100% {
        transform: translateX(0);
    }
}

.zalo_button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    padding: 12px;
    background-color: #0068ff;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 9999;
    touch-action: manipulation;
    animation: vibrateWithPause 3s infinite;
    overflow: visible;
    /* important for badge */
}

.zalo_button .badge {
    position: absolute;
    top: -4px;
    right: -2px;
    background-color: red;
    color: white;
    font-size: 12px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px white;
}

/* Hover and active effects */
.zalo_button:hover {
    background-color: #0055cc;
}

.zalo_button:active {
    background-color: #0047a0;
}

/* Optional: Smaller size on very small screens */
@media (max-width: 480px) {
    .zalo_button {
        width: 50px;
        height: 50px;
        padding: 10px;
        font-size: 20px;
        bottom: 16px;
        right: 16px;
    }
}

h1,
h2,
h3,
h4,
h5 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
}

@media (max-width: 768px) {
    .header-container {
        padding: 16px 20px;
    }
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo span {
    color: var(--dark);
}

.detail-nav ul {
    display: flex;
    list-style: none;
    gap: 16px;
}

.detail-nav ul li {
    margin-left: 0px;
}

.detail-nav ul li a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: all 0.3s ease;
}

.detail-nav ul li a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.detail-nav ul li a:hover:after {
    width: 100%;
}

.detail-nav ul li a:hover {
    color: var(--primary);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: all 0.3s ease;
}

nav ul li a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

nav ul li a:hover:after {
    width: 100%;
}

nav ul li a:hover {
    color: var(--primary);
}

.mobile-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://cdn.sinhthinhco.com.vn/assets/home_hero_background.jpeg') center/cover no-repeat;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Scroll-down indicator */
.scroll-down {
    position: absolute;
    bottom: 36px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    white-space: nowrap;
}

.scroll-down span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.scroll-down-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    animation: bounceDown 1.8s ease-in-out infinite;
    transition: background 0.2s;
}

.scroll-down:hover .scroll-down-icon {
    background: var(--primary-dark);
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(8px); }
}

/* About Section */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary);
}

.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--gray);
}

.about-stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
}

.stat-item .number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* Services Section */
.services {
    background-color: var(--light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    /* Fixed width for perfect centering */
    gap: 30px;
    justify-content: start;
    /* This will center the last row */
}

.service-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-img {
    height: 250px;
    overflow: hidden;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-img img {
    transform: scale(1.1);
}

.service-content {
    padding: 25px;
}

.service-content h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.service-content p {
    color: var(--gray);
    margin-bottom: 20px;
}

/* Projects Section */
.projects-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid var(--light-gray);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-item {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.project-img {
    height: 300px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Always-visible label at bottom */
.project-label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 16px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, transparent 100%);
    color: #fff;
    transition: opacity 0.35s ease;
}

.project-label h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.project-item:hover .project-label {
    opacity: 0;
}

/* Hover overlay */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 20, 10, 0.78);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    color: white;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.project-item:hover .project-overlay {
    opacity: 1;
}

.project-item:hover .project-img img {
    transform: scale(1.08);
}

.project-overlay h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #fff;
}

.project-overlay p {
    margin-bottom: 20px;
    color: var(--primary);
    font-weight: 500;
}

/* Testimonials */
.testimonials {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('https://cdn.sinhthinhco.com.vn/assets/home_hero_background_1.jpeg') center/cover fixed;
    color: white;
    text-align: center;
}

.testimonials .section-title h2 {
    color: white;
}

.testimonials-container {
    max-width: 800px;
    margin: 0 auto;
}

.testimonial {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.testimonial p {
    font-style: italic;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.client {
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
}

.client-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.client-info h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

/* Contact Section */
.contact-container {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    margin-bottom: 25px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--primary);
    font-size: 1.2rem;
}

.contact-details h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.contact-form {
    flex: 1;
    background: var(--light);
    padding: 16px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(193, 155, 118, 0.2);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 70px 0 0;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-col h4 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary);
}

.footer-col p {
    margin-bottom: 20px;
    color: #aaa;
}

.footer-links li {
    margin-bottom: 12px;
    list-style: none;
}

.footer-links li a {
    color: #aaa;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9rem;
}

.filter-section {
    border-bottom: 1px solid #e9e9e9;
    padding: 16px 0;
}

.filter-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray);
    margin-bottom: 12px;
}

.filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-list li {
    margin: 0;
}

.filter-list li a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--dark);
    background: var(--light-gray);
    border: 1px solid transparent;
    border-radius: 30px;
    padding: 7px 16px;
    font-size: 14px;
    line-height: 1.4;
    min-height: 36px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.filter-list li a:hover,
.filter-list li a:active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.year-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.center-box {
    display: flex;
    justify-content: center;
    /* căn ngang */
    align-items: center;
    /* căn dọc */
    min-height: 300px;
    /* chiều cao để căn giữa dọc */
}

.not-found-img {
    max-width: 50%;
    height: auto;
}

.detail-image-stack {
    position: relative;
    width: 100%;
    min-height: 202px;
    max-height: 576px;
    overflow: hidden;
}

.detail-image-background {
    position: absolute;
    /* make sure it's behind */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: blur(20px);
    transform: scale(1.1);
    /* prevents blur edges showing */
    z-index: 1;
}

.detail-image {
    position: relative;
    /* ensures it layers above */
    width: 100%;
    height: auto;
    max-height: 576px;
    object-fit: contain;
    z-index: 2;
    object-position: center;
}

.small-br {
    display: block;
    margin-bottom: 4px;
    content: "";
}

/* Desktop: split evenly into 3+ columns */
@media (min-width: 768px) {
    .relative-projects {
        overflow-x: hidden;
        /* no scroll on desktop */
    }

    .item {
        flex: 1 1 calc(33.333% - 16px);
        /* 3 items per row */
        min-width: unset;
        /* let flex handle the width */
    }
}


/* Responsive Styles */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3rem;
    }

    .about-content {
        flex-direction: column;
    }

    .contact-container {
        flex-direction: column;
    }
}

/* Sidebar nav (hidden by default on all sizes — shown via JS class on mobile) */
.sidebar-header {
    display: none;
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    nav {
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100vh;
        background: #fff;
        z-index: 1100;
        display: flex;
        flex-direction: column;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
        transition: left 0.32s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
    }

    nav.open {
        left: 0;
    }

    .sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px 20px 16px;
        border-bottom: 1px solid var(--light-gray);
        flex-shrink: 0;
    }

    .sidebar-close {
        font-size: 20px;
        cursor: pointer;
        color: var(--gray);
        padding: 4px 8px;
    }

    nav ul {
        display: flex;
        flex-direction: column;
        list-style: none;
        padding: 12px 0;
        margin: 0;
        flex: 1;
    }

    nav ul li {
        margin: 0;
    }

    nav ul li a {
        display: block;
        padding: 14px 24px;
        font-size: 16px;
        border-bottom: 1px solid var(--light-gray);
    }

    .mobile-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-btns {
        flex-direction: column;
    }

    .section {
        padding: 70px 0;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .stat-item .number {
        font-size: 2rem;
    }

    .filter-section {
        padding: 14px 0;
    }

    .filter-list li a {
        font-size: 13px;
        padding: 6px 14px;
    }
}

/* ── Carousel ──────────────────────────────────── */
.carousel-wrapper {
    position: relative;
    width: 100%;
    background: #111;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: relative;
    z-index: 2;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 576px;
}

.carousel-img {
    width: 100%;
    max-height: 576px;
    object-fit: contain;
    display: block;
}

.carousel-controls {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.45);
    padding: 6px 10px;
    border-radius: 999px;
}

.carousel-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.2s;
}

.carousel-dot.active {
    background: #fff;
}

.carousel-arrow {
    width: 26px;
    height: 26px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 13px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.carousel-arrow i {
    display: block;
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 576px) {
    .carousel-controls {
        gap: 6px;
        padding: 5px 8px;
    }

    .carousel-arrow {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }
}