/* Base styles */
:root {
    --primary-color: #e31c3d;
    --secondary-color: #252a34;
    --accent-color: #f7c873;
    --text-color: #333;
    --text-light: #fff;
    --background-color: #fff;
    --section-padding: 6rem 0;
    --font-main: 'Noto Sans', sans-serif;
    --font-japanese: 'Noto Sans JP', sans-serif;
    --max-width: 1200px;
    --container-padding: 1.5rem;
    --grid-gap: 2rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
}

[lang="ja"] {
    font-family: var(--font-japanese);
}

img {
    max-width: 100%;
    height: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }

p {
    margin-bottom: 1rem;
}

/* Buttons */
button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
}

section {
    padding: var(--section-padding);
    overflow: hidden;
    position: relative;
}

section:nth-child(even) {
    background-color: #f8f8f8;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    padding: 0.2rem 0;
}

.logo img {
    max-height: 70px;
    margin-right: 20px;
     display: flex;
    align-items: center; /* Căn giữa theo chiều dọc */
    padding: 10px 20px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

#langToggle {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s;
}

#langToggle:hover {
    background-color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--secondary-color);
    position: relative;
    z-index: 1001;
}

/* Language Switcher */
.language-switcher {
    position: relative;
    display: inline-block;
}

.language-button {
    background-color: transparent;
    color: var(--text-color);
    padding: 10px;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

.language-button:hover, .language-button:focus {
    color: var(--primary-color);
}

.language-dropdown {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    right: 0;
}

.language-dropdown a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.language-dropdown a:hover {
    background-color: #f1f1f1;
}

.language-switcher:hover .language-dropdown {
    display: block;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    margin-top: -85px; /* Further increased to remove extra space */
    overflow: hidden;
}

.slideshow {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    height: 100vh;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    will-change: opacity;
}

.slide.active {
    opacity: 1;
}

.slide.active .slide-title {
    animation: slideUp 1s forwards;
}

.slide.active .slide-description {
    animation: slideUp 1s 0.5s forwards;
}

.slide.active .cta-button {
    animation: fadeIn 1s 1s forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


.slide-content {
    z-index: 2;
}

/* Slideshow Navigation */
.slideshow-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 3;
}

.slideshow-nav button {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.slideshow-nav button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.slideshow-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 3;
}

.slideshow-dots .dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.slideshow-dots .dot.active {
    background-color: white;
}

.slide.active .slide-title {
    animation: slideUp 1s forwards;
}

.slide.active .slide-description {
    animation: slideUp 1s 0.5s forwards;
}

.slide.active .cta-button {
    animation: fadeIn 1s 1s forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(0, 0, 0, 0.2),
        rgba(0, 0, 0, 0.4) 40%,
        rgba(0, 0, 0, 0.7)
    );
    z-index: 1;
}

.slide-content {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-light);
    width: 90%;
    max-width: 800px;
    z-index: 2;
}

.slide-content h1 {
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    transition: transform 0.3s, background-color 0.3s;
    font-weight: bold;
}

.cta-button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

/* Destinations */
.destination-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--grid-gap);
    margin-top: 3rem;
}

.destination-card {
    background: var(--background-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.destination-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-image {
    height: 250px;
    overflow: hidden;
    position: relative;
    background-color: #f0f0f0;
}

.dual-image {
    display: flex;
    width: 200%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.dual-image img {
    width: 50%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

[lang="ja"] .dual-image {
    transform: translateX(-50%);
}


.card-content {
    padding: 2rem;
    flex-grow: 1;
}

.card-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Tips Section */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--grid-gap);
    margin-top: 3rem;
}

.tip-card {
    background: var(--background-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s;
}

.tip-card:hover {
    transform: translateY(-5px);
}

.tip-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--grid-gap);
    margin-top: 3rem;
}

.gallery-item {
    position: relative;
    padding-bottom: 75%;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.03);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 2rem auto 0;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: var(--background-color);
    transition: border-color 0.3s;
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: #666;
    transition: transform 0.3s, color 0.3s;
    pointer-events: none;
    background-color: var(--background-color);
    padding: 0 0.5rem;
}

.form-group input:focus ~ label,
.form-group textarea:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    transform: translateY(-1.4rem) scale(0.8);
    color: var(--primary-color);
}

.submit-button {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-button:hover {
    background-color: var(--accent-color);
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 3rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--text-light);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent-color);
}

/* Language switching */
[lang="vi"] span[lang="ja"],
[lang="ja"] span[lang="vi"] {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    h1, .slide-content h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--background-color);
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    section {
        padding: 4rem 0;
    }

    .slide-content {
        padding: 0 1rem;
    }

    .card-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    h1, .slide-content h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.3rem; }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animated {
    animation: fadeIn 0.5s ease forwards;
}

/* Modal styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content/Box */
.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 1000px;
    border-radius: 12px;
    position: relative;
    display: flex;
    gap: 30px;
}

.modal-image {
    flex: 0 0 50%;
    max-height: 70vh;
    border-radius: 8px;
    overflow: hidden;
}

.modal-image .dual-image {
    display: flex;
    width: 200%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-image .dual-image img {
    width: 50%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

[lang="ja"] .modal-image .dual-image {
    transform: translateX(-50%);
}

.modal-text {
    flex: 1;
    overflow-y: auto;
    max-height: 70vh;
    padding-right: 20px;
}

.modal-text h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.modal-details {
    margin-top: 2rem;
}

.detail-item {
    margin-bottom: 2rem;
}

.detail-item h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-item ul {
    list-style: none;
    padding-left: 1.5rem;
}

.detail-item ul li {
    margin-bottom: 0.5rem;
    position: relative;
}

.detail-item ul li:before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: -1.5rem;
}

@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
        padding: 20px;
        margin: 10% auto;
    }

    .modal-image {
        max-height: 40vh;
    }
}

/* The Close Button */
.close {
    position: absolute;
    right: 10px;
    top: 0;
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    padding: 0 5px;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Featured Tour Section */
.featured-tour {
    padding: 4rem 0;
    background-color: #fdfdfd;
}

.featured-tour-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.featured-tour-image {
    flex: 0 0 45%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.featured-tour-image img {
    width: 100%;
    height: auto;
    display: block;
}

.featured-tour-info {
    flex: 1;
}

.featured-tour-info h3 {
    font-size: 2.2rem;
    color: var(--secondary-color);
}

.tour-date-highlight {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.tour-date-highlight i {
    margin-right: 0.5rem;
}

@media (max-width: 768px) {
    .featured-tour-content {
        flex-direction: column;
    }
}

/* Company Info in Footer */
.company-info p {
    margin-bottom: 0.5rem;
}

.company-info .title {
    font-weight: bold;
}

.company-info .name {
    font-style: italic;
}

.company-email {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s;
}

.company-email:hover {
    text-decoration: underline;
    color: var(--text-light);
}
