/* style.css - Desktop: Logo static left, menu right (space-between). Mobile: Keep absolute center. */
:root {
    --primary-color: #2E7D32;
    --secondary-color: #1976D2;
    --accent-color: #FF9800;
    --text-color: #333;
    --bg-color: #F5F5F5;
    --white: #FFF;
    --shadow: 0 4px 20px rgba(0,0,0,0.1);
    --border-radius: 12px;
    --navbar-height: 70px; /* Height của navbar */
    --offset: 16px; /* Khoảng cách thêm */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif', serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

.hero {
    position: relative;
    height: 100vh;
    background: linear-gradient(rgba(46, 125, 50, 0.7), rgba(25, 118, 210, 0.7)), url('images/anh4.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.6));
}

.hero-content {
    background: rgba(255, 255, 255, 0.15); /* Subtle white semi-transparent */
    backdrop-filter: blur(15px); /* Blur để nổi trên bg */
    padding: 2.5rem 3rem; /* Padding để tạo "box" */
    border-radius: 20px; /* Rounded cho hiện đại */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); /* Shadow để pop out */
    max-width: 80%; /* Giới hạn width */
    animation: fadeInUp 1s ease-out;
	z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); /* Giữ nhẹ */
    animation: fadeInUp 1s ease-out;
}

.hero-content p {
    font-size: 1.5rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5); /* Nhẹ hơn */
    animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between; /* Logo left, menu right */
    align-items: center;
    position: relative;
    height: var(--navbar-height);
}

.nav-logo {
    color: var(--primary-color);
    font-family: 'Noto Serif', serif;
    font-size: 1.1rem;
    font-weight: 700;
    height: 30px;
    line-height: 30px;
    z-index: 102;
}

.nav-logo h3 {
    margin: 0;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px; /* Bé hơn */
    height: 25px; /* Bé hơn */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.hamburger span {
    width: 100%;
    height: 3px; /* Bé hơn */
    background-color: var(--primary-color);
    border-radius: 10px;
    transition: all 0.3s ease;
    transform-origin: left center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -7px);
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    margin: 0;
    padding: 0; /* Bỏ padding-left */
    flex: 1;
}

.nav-menu li {
    margin: 0; /* Bỏ margin */
}

.nav-menu a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.8rem 1.2rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
    display: block;
    white-space: nowrap;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-radius: var(--border-radius);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-menu a:hover::before,
.nav-menu a.active::before {
    opacity: 1;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

main {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.section {
    margin-bottom: 4rem;
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    scroll-margin-top: calc(var(--navbar-height) + var(--offset)); /* Offset cho scroll-snap nếu cần */
}

.section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

h2, h3, h4 {
    color: var(--primary-color);
    font-family: 'Noto Serif', serif;
    margin-bottom: 1rem;
    position: relative;
}

h2::after, h3::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    margin-top: 0.5rem;
    border-radius: 2px;
}

.image-card {
    text-align: center;
    margin: 2rem 0;
    background: var(--bg-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.image-card:hover {
    transform: scale(1.02);
}

.image-card img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.image-card img:hover {
    transform: scale(1.05);
}

.image-card figcaption {
    font-style: italic;
    margin-top: 1rem;
    color: #666;
    font-family: 'Roboto', sans-serif;
}

/* Gallery: Uniform Grid for consistent row heights */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-auto-rows: 188px;
    grid-gap: 1rem;
    margin: 2rem 0;
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

/* Modal Gallery */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s ease;
}

.swiper-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.swiper-button-next, .swiper-button-prev {
    color: var(--white);
}

.swiper-pagination-bullet-active {
    background: var(--accent-color);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

footer {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    font-family: 'Roboto', sans-serif;
}

/* Lightbox cho single images */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    cursor: pointer;
    font-weight: bold;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

.lightbox-caption {
    color: white;
    margin-top: 10px;
    font-family: 'Roboto', sans-serif;
}

/* Responsive */
@media (max-width: 1300px) {
    .hamburger {
        display: flex;
    }
	.hamburger.active {
        width: 15px;
		height: 30px;
    }

    /* Logo luôn hiện trên mobile - absolute center */
    .nav-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        display: block;
        z-index: 102;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--navbar-height);
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        width: 100%;
        text-align: center;
        transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-shadow: var(--shadow);
        padding: 0; /* Bỏ padding */
        border-bottom: 1px solid rgba(46, 125, 50, 0.1);
        z-index: 99;
        padding-left: 0 !important;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        opacity: 0;
        transform: translateX(-20px);
        animation: slideInMenu 0.3s ease forwards;
    }

    .nav-menu li:nth-child(1) { animation-delay: 0.1s; }
    .nav-menu li:nth-child(2) { animation-delay: 0.2s; }
    .nav-menu li:nth-child(3) { animation-delay: 0.3s; }
    .nav-menu li:nth-child(4) { animation-delay: 0.4s; }

    @keyframes slideInMenu {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    .nav-menu a {
        padding: 1rem 2rem; /* Giảm padding cho nhỏ hơn */
        font-size: 1.1rem; /* Nhỏ font hơn */
        border-bottom: 1px solid rgba(46, 125, 50, 0.1);
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        grid-auto-rows: 140px;
        grid-gap: 0.8rem;
    }

    .hero-content {
        padding: 2rem 2rem; /* Giảm padding mobile */
        max-width: 90%;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .section {
        padding: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .nav-menu {
        padding-left: 80px;
    }

    .gallery {
        grid-auto-rows: 150px;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        top: calc(var(--navbar-height) - 10px); /* Điều chỉnh nếu navbar height thay đổi trên mobile nhỏ */
    }

    .nav-menu li {
        margin: 0.8rem 0; /* Nhỏ hơn nữa trên small mobile */
    }

    .nav-menu a {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .gallery {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
        grid-gap: 0.8rem;
    }

    .hero-content {
        padding: 1.5rem 1.5rem;
        max-width: 95%;
    }

    .hero-content h1 {
        font-size: 2rem;
    }
}