:root {
    --primary-color: #008489; /* Teal - Calm & Professional */
    --primary-dark: #006c70;
    --secondary-color: #484848; /* Soft Black */
    --accent-color: #FF5A5F; /* Coral - Warmth */
    --bg-color: #f7f7f7; /* Light Warm Grey */
    --bg-light: #ffffff;
    --card-bg: #ffffff;
    --text-color: #484848;
    --light-text: #767676;
    --border-color: #ebebeb;
    --danger-color: #FF5A5F;
    --success-color: #008489;
    --warning-color: #FFB400;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 6px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 16px 32px rgba(0,0,0,0.15);
    --font-main: "Circular", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

/* Layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
    width: 92%;
    flex: 1;
}

/* Header & Nav */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--text-color);
    padding: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 80px;
    transition: all 0.3s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding-top: 0;
    padding-bottom: 0;
}

header #branding h1 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -0.5px;
}

header #branding a {
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.brand-prefix {
    position: relative;
    padding: 0 4px;
    font-weight: 800;
    color: var(--accent-color);
    z-index: 1;
}

.brand-prefix::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 2px;
    width: 100%;
    height: 30%;
    background-color: rgba(255, 90, 95, 0.2);
    border-radius: 4px;
    z-index: -1;
}

.brand-highlight {
    color: #000;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 24px;
    align-items: center;
}

header nav a {
    color: var(--text-color);
    font-weight: 600;
    font-size: 15px;
    padding: 10px 18px;
    border-radius: 30px;
    transition: all 0.2s;
}

header nav a:hover {
    background-color: #f7f7f7;
    color: var(--text-color);
}

.nav-link-secondary {
    color: var(--light-text);
    font-weight: 500;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.04);
    padding: 40px;
    margin-bottom: 32px;
    border: 1px solid rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

/* Homestay Grid */
.homestay-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 10px;
}

@media (max-width: 1024px) {
    .homestay-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .homestay-grid {
        grid-template-columns: 1fr;
    }
}

.homestay-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0,0,0,0.04);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.homestay-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.1);
}

.homestay-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-bottom: none;
    transition: transform 0.5s ease;
}

.homestay-card:hover img {
    transform: scale(1.05);
}

.homestay-info {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    position: relative;
    z-index: 1;
}

.homestay-info h3 {
    margin: 0 0 10px 0;
    font-size: 19px;
    line-height: 1.4;
    color: #222;
    font-weight: 700;
}

.homestay-info p {
    margin: 6px 0;
    color: var(--light-text);
    font-size: 15px;
}

.price-tag {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-color);
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    align-items: baseline;
    gap: 4px;
    border-top: 1px solid #f0f0f0;
}

.price-tag span {
    font-size: 14px;
    color: var(--light-text);
    font-weight: 400;
}

/* Search Box */
.search-box {
    background: #ffffff;
    padding: 6px;
    border-radius: 32px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.08);
    margin-bottom: 8px;
    border: 1px solid rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
}

.search-box form {
    display: flex;
    gap: 0;
    width: 100%;
    align-items: center;
    flex-wrap: nowrap;
}

.search-box input, .search-box select {
    border: none;
    padding: 12px 16px;
    border-radius: 0;
    border-right: 1px solid #f0f0f0;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--text-color);
}

.search-box input::placeholder {
    color: #999;
    font-weight: 400;
}

.search-box input:focus {
    outline: none;
    background: #f9f9f9;
    box-shadow: none;
}

.search-box input:first-child {
    border-radius: 32px 0 0 32px;
    padding-left: 24px;
}

.search-box .button {
    border-radius: 32px;
    margin: 4px;
    padding: 10px 24px;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(255, 90, 95, 0.3);
    height: 42px;
    line-height: 22px;
}

/* Custom Dropdown Override */
.custom-dropdown-wrapper {
    position: relative;
    width: auto;
}

.custom-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-top: 12px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    display: none;
    padding: 8px 0;
}

.custom-dropdown-list.show {
    display: block;
}

.custom-dropdown-item {
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-color);
    transition: background 0.2s;
}

.custom-dropdown-item:hover {
    background-color: #f7f7f7;
    color: var(--text-color);
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to right, #FF5A5F, #FF385C); /* Airbnb Gradient */
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    text-align: center;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 90, 95, 0.3);
    color: white;
}

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

.button-outline:hover {
    border-color: #000;
    background: transparent;
    color: #000;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
 }

.form-actions .button {
    padding: 6px 12px;
    font-size: 13px;
    height: 34px;
}

/* Forms */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.2s;
    background-color: #fff;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 132, 137, 0.1);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 14px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 60px 0 40px;
    background-color: #ffffff;
    color: var(--light-text);
    margin-top: auto;
    border-top: 1px solid #ebebeb;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 24px;
}

.flash-messages div {
    padding: 16px 24px;
    background-color: #ffffff;
    color: var(--text-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.toast-container {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 2000;
}

.toast {
    min-width: 240px;
    max-width: 360px;
    background: #111827;
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition: transform .25s ease, opacity .25s ease;
    font-size: 14px;
    line-height: 1.4;
}

.toast.show {
    opacity: 0.98;
    transform: translateY(0) scale(1);
}

/* Facility Tags */
.facility-tag {
    display: inline-block;
    background: #fff;
    color: var(--text-color);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    margin-right: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    transition: all 0.2s;
    font-weight: 500;
}

.facility-tag:hover {
    border-color: var(--text-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Hero Section (New) */
.hero-banner {
    background: url('../images/hero_bg.jpg') no-repeat center center;
    background-size: cover;
    padding: 100px 40px 140px; /* More bottom padding for overlap */
    border-radius: 32px;
    margin-bottom: 60px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
}

.hero-banner h1 {
    color: white;
    font-size: 48px;
    margin-bottom: 24px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-weight: 800;
}

.hero-banner p {
    font-size: 20px;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* Admin Sidebar */
.admin-container {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-top: 32px;
    width: 95%;
    max-width: 1600px;
}

.admin-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    padding: 12px 0 !important;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
}

.admin-sidebar h3 {
    padding: 0 24px 12px;
    margin: 12px 0 8px;
    background: transparent;
    border-bottom: none;
    font-size: 12px;
    color: #999;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-sidebar a.sidebar-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: none;
    transition: all 0.2s;
    font-size: 15px;
    font-weight: 500;
    margin: 4px 12px;
    border-radius: 8px;
}

.admin-sidebar a.sidebar-item:hover, .admin-sidebar a.sidebar-item.active {
    background-color: #f0fdfc; /* Light Teal */
    color: var(--primary-color);
    border-left: none;
    padding-left: 24px;
}

.admin-sidebar a.sidebar-item .icon {
    margin-right: 12px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* Admin Sidebar Accordion Styles */
.menu-accordion {
    border-bottom: none;
    margin: 4px 12px;
    border-radius: 8px;
    overflow: hidden;
}

.menu-header {
    padding: 12px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.2s;
    user-select: none;
    font-size: 15px;
    border-radius: 8px;
}

.menu-header > span:first-child {
    display: flex;
    align-items: center;
}

.menu-header:hover {
    background-color: #f7f7f7;
    color: var(--primary-color);
}

.menu-accordion.open .menu-header {
    color: var(--primary-color);
    font-weight: 600;
}

.menu-header > span:first-child {
    display: flex;
    align-items: center;
}

.menu-header .icon {
    margin-right: 12px;
    width: 24px;
    display: inline-block;
    text-align: center;
    font-size: 18px;
}

.menu-header .arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    color: #bbb;
}

.menu-accordion.open .menu-header .arrow {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.menu-content {
    display: none;
    background-color: transparent;
    padding: 4px 0;
    box-shadow: none;
}

.menu-accordion.open .menu-content {
    display: block;
}

.menu-content a {
    padding: 10px 12px 10px 52px !important;
    font-size: 14px;
    color: var(--light-text);
    border-bottom: none;
    border-left: none;
    display: block;
    margin: 2px 0;
    border-radius: 8px;
    transition: all 0.2s;
}

.menu-content a:hover, .menu-content a.active {
    background-color: #f0fdfc;
    color: var(--primary-color);
    border-left: none;
    padding-left: 52px !important;
    font-weight: 500;
}

.menu-content a::before {
    content: "•";
    margin-right: 8px;
    color: #ddd;
    font-size: 16px;
    line-height: 1;
}

.menu-content a:hover::before, .menu-content a.active::before {
    color: var(--primary-color);
}

.admin-content {
    flex: 1;
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    min-height: 500px;
    min-width: 0;
}

/* User Dashboard */
.user-container {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-top: 32px;
}

.user-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.user-sidebar a {
    display: block;
    padding: 16px 24px;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s;
    font-size: 15px;
}

.user-sidebar a:hover, .user-sidebar a.active {
    background-color: #fff5f5; /* Light Red */
    color: var(--accent-color);
}

.user-content {
    flex: 1;
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--border-color);
}

th, td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f7f7f7;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 15px;
    letter-spacing: 0.5px;
}

tr:last-child td {
    border-bottom: none;
}

/* Action Links (Edit/Delete Buttons in Tables) */
.action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border: 1px solid var(--danger-color);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
    background-color: var(--danger-color);
    margin: 0 4px; /* Space between buttons */
    vertical-align: middle;
}

.action-link:hover {
    background-color: #ff385c;
    border-color: #ff385c;
    color: white;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(255, 90, 95, 0.3);
    transform: translateY(-1px);
}

.action-link.text-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
    color: #ffffff !important;
    text-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

.action-link.text-danger:hover {
    background-color: #ff385c;
    border-color: #ff385c;
    color: white;
    box-shadow: 0 2px 6px rgba(255, 90, 95, 0.3);
}

/* Auth Pages */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    padding: 40px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-color);
}

.auth-links {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 2px solid #f0f0f0;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    cursor: pointer;
    font-weight: 600;
    color: var(--light-text);
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Detail Page Refinements */
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 20px;
}

.detail-gallery {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    background: #fff;
}

.detail-main-image {
    width: 100%;
    height: 625px;
    object-fit: contain;
    background-color: #fff;
    display: block;
    transition: opacity 0.3s;
}

.detail-thumbs {
    padding: 12px;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    background: #fff;
    border-top: 1px solid #eee;
    scrollbar-width: thin;
}

.detail-thumb-item {
    width: 90px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    opacity: 0.6;
}

.detail-thumb-item:hover, .detail-thumb-item.active {
    border-color: var(--primary-color);
    opacity: 1;
    transform: translateY(-2px);
}

.detail-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.detail-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 24px;
}

.booking-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
    border: 1px solid rgba(0,0,0,0.04);
    position: sticky;
    top: 100px;
}

.btn-favorite {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    color: #555;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.btn-favorite:hover {
    background-color: #f8f9fa;
    border-color: #ccc;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.btn-favorite.active {
    background-color: #fff0f0;
    border-color: #ff6b6b;
    color: #e74c3c;
}

.btn-favorite.active svg {
    fill: #e74c3c;
    stroke: #e74c3c;
}

/* Detail Content Boxes */
.detail-content-box {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.02);
}

.detail-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.detail-stat-item strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 16px;
}

.detail-stat-item {
    font-size: 16px;
    color: var(--light-text);
}

.facilities-container {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.reviews-section {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-top: 24px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.02);
}

/* Review Section */
.review-item {
    border-bottom: 1px solid #eee;
    padding: 24px 0;
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.review-author {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--primary-color);
}

/* --- Responsive Adaptations --- */

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Base Responsive */
@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 15px;
    }

    header {
        height: 70px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    header nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
        z-index: 999;
    }

    header nav.show {
        height: auto;
        padding-bottom: 20px;
    }

    header nav ul {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }

    header nav a {
        display: block;
        padding: 15px 24px;
        border-radius: 0;
        border-bottom: 1px solid #f0f0f0;
    }

    header nav a:hover {
        background-color: #f9f9f9;
    }

    body.menu-open {
        overflow: hidden;
    }

    /* Index Page Responsive */
    .hero-banner {
        padding: 60px 20px 100px;
        border-radius: 0;
        margin-left: -15px;
        margin-right: -15px;
        margin-top: -20px;
    }

    .hero-banner h1 {
        font-size: 32px;
    }

    .hero-banner p {
        font-size: 16px;
    }

    .search-box {
        border-radius: 16px;
        padding: 15px;
        margin-top: -40px;
    }

    .search-box form {
        flex-direction: column;
        gap: 10px;
    }

    .search-box input, .search-box .custom-dropdown-wrapper {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid #f0f0f0;
    }

    .search-box input:first-child {
        padding-left: 16px;
        border-radius: 0;
    }

    .search-box .button {
        width: 100%;
        margin: 10px 0 0 0;
        height: 48px;
    }

    /* Detail Page Responsive */
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .booking-card {
        position: static;
        margin-top: 20px;
    }

    .detail-header {
        flex-direction: column;
        gap: 15px;
    }

    .detail-stats {
        flex-wrap: wrap;
        gap: 20px;
    }

    .detail-stat-item {
        flex: 1 1 40%;
    }

    .gallery-stage {
        height: 300px !important;
    }

    .detail-thumbs {
        margin-top: 10px;
        gap: 8px;
    }

    .detail-thumb-item {
        width: 60px;
        height: 45px;
    }

    .detail-content-box, .reviews-section {
        padding: 20px;
    }

    /* Tables Responsive */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table thead {
        display: none;
    }

    table.responsive-table, table.responsive-table tbody, table.responsive-table tr, table.responsive-table td {
        display: block;
        width: 100%;
    }

    table.responsive-table tr {
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 12px;
        background: white;
        padding: 10px;
    }

    table.responsive-table td {
        text-align: right;
        padding: 8px 10px;
        border: none;
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    table.responsive-table td::before {
        content: attr(data-label);
        font-weight: 700;
        text-align: left;
    }

    /* Order Page specific adjustments */
    .order-行程-cell {
        flex-direction: column;
        align-items: flex-end !important;
    }

    /* User Profile Responsive */
    .user-container {
        flex-direction: column;
        gap: 20px;
    }

    .user-sidebar {
        width: 100%;
        display: flex;
        overflow-x: auto;
        padding: 10px 0 !important;
        border-radius: 12px;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .user-sidebar div:first-child {
        display: none; /* Hide "个人中心" title on mobile */
    }

    .user-sidebar a {
        padding: 10px 20px !important;
        border-bottom: none !important;
        border-right: 1px solid #f0f0f0;
    }

    .user-sidebar a:last-child {
        border-right: none;
    }

    .user-content {
        padding: 0;
    }

    .profile-form {
        padding: 20px;
    }

    .mobile-full-width {
        width: 100% !important;
    }

    .mobile-column {
        flex-direction: column !important;
    }

    .homestay-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Admin Layout Responsive */
    .admin-container {
        flex-direction: column;
        width: 100%;
        padding: 10px;
        gap: 15px;
    }

    .admin-sidebar {
        position: fixed;
        top: 70px;
        left: -280px;
        bottom: 0;
        width: 260px;
        z-index: 1000;
        transition: left 0.3s ease;
        border-radius: 0;
        box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    }

    .admin-sidebar.show {
        left: 0;
    }

    .admin-content {
        width: 100%;
        padding: 0;
    }

    .admin-header nav {
        display: none; /* Hide header links on mobile to save space */
    }

    .welcome-msg {
        display: none;
    }

    .admin-header .container {
        justify-content: space-between;
    }

    /* Dashboard filters on mobile */
    .search-box {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .search-box > div {
        margin-left: 0 !important;
        width: 100%;
        justify-content: space-between;
    }
}

/* iPad / Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }

    .detail-grid {
        gap: 20px;
    }

    .homestay-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
