html {
    scroll-behavior: smooth;
    scroll-padding-top: 75px;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --nav-bg: #34495e;
    --light-bg: #f8f9fa;
    --text-color: #333;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    animation: fadeInPage 0.8s ease-in;
}
@keyframes fadeInPage { from { opacity: 0; } to { opacity: 1; } }

/* Global accessibility focus styles */
a:focus-visible, button:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

header {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.85), rgba(52, 152, 219, 0.85)), url('images/angkor-sunrise-main.jpg');
    background-size: 130% auto;
    background-blend-mode: overlay;
    background-repeat: no-repeat;
    animation: slideHero 40s linear infinite alternate;
    color: white;
    position: relative;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}
@keyframes slideHero {
    from { background-position: 0% 50%; }
    to { background-position: 100% 50%; }
}

header h1 {
    margin: 0;
    font-size: 1.8em;
    font-weight: 700;
    animation: fadeInDown 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

nav {
    background-color: var(--nav-bg);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
nav li {
    margin: 0 20px;
    position: relative;
}
nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}
nav a:hover {
    color: var(--primary-color);
}
nav a.active-page {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}
.dropdown {
    display: none;
    position: absolute;
    background-color: var(--nav-bg);
    min-width: 200px;
    z-index: 1;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 4px;
}
nav li:hover .dropdown {
    display: block;
}
.dropdown a {
    display: block;
    padding: 12px 16px;
    font-size: 0.9em;
}
.dropdown a:hover {
    background-color: var(--secondary-color);
}
.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: white;
    text-decoration: none;
    flex-wrap: wrap;
}
.brand h1 {
    margin: 0;
    color: inherit;
}
.logo {
    height: 45px;
    width: auto;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}
.lang-switch {
    position: absolute;
    top: 20px;
    right: 20px;
}
.lang-switch img {
    width: 35px;
    height: 25px;
    cursor: pointer;
    margin: 0 5px;
    border-radius: 3px;
    transition: all 0.3s ease;
}
.lang-switch img:hover {
    opacity: 1;
    transform: translateY(-3px) scale(1.1);
}
footer {
    background-color: var(--nav-bg);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}
footer a {
    color: var(--primary-color);
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}
.footer-copy {
    margin: 0 0 10px;
    color: #bbb;
    font-size: 0.95em;
}
.follow-us {
    margin: 0 0 10px;
    font-weight: 600;
    color: #fff;
}
.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-bottom: 10px;
}
.social-links a {
    color: white;
    text-decoration: none;
    font-size: 1.5em;
    transition: all 0.3s ease;
}
.social-links a:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

[data-lang] {
    display: none;
}
.active-lang {
    display: block !important;
}
span.active-lang {
    display: inline !important;
}

/* Component specific styles */
.welcome {
    background-color: #ecf0f1;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}
.scrolling-text {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 57s linear infinite;
    font-size: 1.3em;
    font-weight: 500;
    color: var(--secondary-color);
    white-space: nowrap;
}
@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

.welcome:hover .scrolling-text {
    animation-play-state: paused;
    cursor: default;
}

.content {
    padding: 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.popular-tours-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.text-center {
    text-align: center;
}

.tour-package, .package {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.popular-highlight {
    border: 3px solid var(--primary-color);
    animation: zoomPulse 4s infinite ease-in-out, blinkHighlight 2s infinite ease-in-out;
    will-change: transform, border-color;
}

.package-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
}

.section-spacer {
    margin-top: 50px;
}

@keyframes zoomPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@keyframes blinkHighlight {
    0%, 100% { opacity: 1; border-color: var(--primary-color); }
    50% { opacity: 0.85; border-color: #f1c40f; }
}

.destination-card, .package, .blog-card, .tour-package, .gallery img {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease, border-color 0.3s;
    cursor: pointer;
}

.destination-card:hover, .package:hover, .blog-card:hover, .tour-package:hover, .gallery img:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.itinerary-list {
    text-align: left;
    display: inline-block;
    margin: 15px auto;
    padding-left: 20px;
    max-width: 100%;
}

/* Search Bar Styles */
.search-bar-container {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}
.search-bar-container input {
    width: 100%;
    max-width: 500px;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.search-bar-container input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
    outline: none;
}

.no-results {
    display: none;
    text-align: center;
    margin: 30px 0;
    font-size: 1.1em;
    color: var(--secondary-color);
}

.name-tag {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    margin-bottom: 10px;
    font-weight: 500;
}
code {
    display: block;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.tour-package img, .package img {
    width: 100%;
    max-width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.92);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}
.gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.section-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 20px 40px 10px;
}
.section-tabs a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 999px;
    background: #f5f8ff;
    transition: background 0.2s ease;
}
.section-tabs a:hover {
    background: #e8efff;
}
.section-title {
    max-width: 1200px;
    margin: 0 auto 15px;
    padding: 0 40px;
    text-align: center;
}
.section-title h3 {
    margin: 0 0 10px;
}
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    align-items: center; justify-content: center;
}
.modal-content { 
    max-width: 90%; 
    max-height: 90%; 
    border-radius: 8px;
    animation: modalZoom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalZoom {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.tour-modal-content {
    background: white;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.tour-popup-list {
    list-style: none;
    padding: 0;
}
.tour-popup-list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.tour-popup-list a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.tour-popup-list a:hover {
    color: var(--primary-color);
}
.close {
    position: absolute; top: 20px; right: 30px;
    color: white; font-size: 40px; cursor: pointer;
}
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    z-index: 1001;
}
.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}
.prev {
    left: 0;
}
.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.contact-info, .contact-form, .upload-section {
    background: white; padding: 30px; border-radius: 8px; flex: 1; min-width: 300px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); margin: 10px;
}
.gallery-section {
    display: none;
}
.gallery-section.active-section {
    display: block;
}
.section-tabs a.active-tab {
    background: var(--primary-color);
    color: white;
}
.contact-info p i {
    width: 25px;
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 1.1em;
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 20px;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}
.blog-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.blog-card h3 {
    margin: 0;
    padding: 20px;
    font-size: 1.2em;
    color: var(--secondary-color);
    background: #f8f9fa;
}
.blog-card p {
    padding: 20px;
    margin: 0;
    color: #555;
    flex-grow: 1;
}
.blog-link {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 20px 20px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    width: fit-content;
    transition: background 0.2s;
}
.blog-link:hover {
    background-color: var(--secondary-color);
}
.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}
.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border: 0;
}
.destination-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}
.destination-card {
    background: white; padding: 25px; border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); text-align: center;
}
.destination-card h3 { color: var(--secondary-color); }
.destination-card a { display: inline-block; margin-top: 15px; color: var(--primary-color); text-decoration: none; font-weight: 600; }

.submit-btn {
    background-color: var(--primary-color); color: white; padding: 12px 20px;
    border: none; border-radius: 4px; cursor: pointer; width: 100%;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    font-weight: 500;
}
.submit-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.portrait {
    float: right; margin: 0 0 20px 20px; width: 300px;
    border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.5s ease;
}
.portrait:hover {
    transform: scale(1.05);
}

.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 100px;
    z-index: 1001;
    width: 56px;
    height: 56px;
    background: #25D366;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    font-size: 24px;
    transition: transform 0.3s, background 0.3s;
    animation: whatsappPulse 2.5s infinite;
}
.whatsapp-float:hover { transform: scale(1.1); }
@keyframes whatsappPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); transform: scale(1); }
    50% { transform: scale(1.08); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); transform: scale(1); }
}

.top-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1001;
    width: 46px;
    height: 46px;
    background: var(--primary-color);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    font-size: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.top-button:hover { background: #2980b9; }
.top-button.show {
    opacity: 1;
    visibility: visible;
    bottom: 25px;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 10px;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    header { padding: 40px 20px 20px; } /* Space for lang-switch */
    header h1 { font-size: 1.5em; }
    .lang-switch { top: 10px; right: 50%; transform: translateX(50%); width: max-content; }
    .menu-toggle { display: block; }
    nav ul { display: none; flex-direction: column; width: 100%; text-align: center; background-color: var(--nav-bg); }
    nav ul.show { display: flex; }
    nav li { margin: 10px 0; }
    nav li:hover .dropdown { display: none; } /* Disable hover dropdown on touch */
    .dropdown { position: static; display: block; box-shadow: none; width: 100%; background: rgba(0,0,0,0.1); }
    .portrait { float: none; width: 100%; margin: 0 0 20px 0; }
    .blog-grid { padding: 20px; gap: 15px; }
    .blog-card h3 { padding: 15px; font-size: 1.1em; }
    .blog-card p { padding: 15px; font-size: 0.95em; }
    .content { padding: 20px 15px; }
}