/* Global Resets & Base Styles */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans TC', sans-serif;
    background-color: #fdfdfd; /* Very light grey, almost white */
    color: #333; 
    line-height: 1.7;
    font-size: 16px;
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: #a07d5a; /* Earthy brown/gold, from example */
}

a:hover {
    color: #7c5f42; /* Darker shade */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1100px; /* Slightly narrower for elegance */
    margin: 0 auto;
    padding: 20px;
}

.container-bleed {
    width: 100%;
    padding: 40px 0;
}

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

.lead {
    font-size: 1.15em;
    color: #555;
    margin-bottom: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Content Sections Styling */
.content-section {
    padding: 70px 20px;
}

.content-section h2 {
    font-size: 2.8em;
    font-weight: 500;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.content-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #a07d5a;
    margin: 15px auto 30px;
}

/* Header & Navigation */
header {
    background-color: rgba(255,255,255,0.9);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.logo {
    font-size: 1.7em;
    font-weight: 700;
    color: #4a4a4a;
}

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

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

nav ul li a {
    color: #4a4a4a;
    font-weight: 500;
    font-size: 0.95em;
    padding-bottom: 5px;
    position: relative;
    transition: color 0.3s ease;
}

nav ul li a.active,
nav ul li a:hover {
    color: #a07d5a;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: #a07d5a;
    transition: width 0.4s ease;
}

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

.menu-toggle {
    display: none; 
    background: none;
    border: none;
    font-size: 24px;
    color: #4a4a4a;
    cursor: pointer;
}

/* Main Hero Section (Yen-Hotspring Style) */
.hero-main {
    height: calc(100vh - 70px); /* Adjust 70px based on header height */
    min-height: 500px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
    z-index: 0;
}

.hero-main-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.65);
    z-index: -1;
}

.hero-main-content {
    max-width: 800px;
    padding: 20px;
    position: relative; 
    z-index: 1;
}

.hero-main-content h1 {
    font-size: 3.2em;
    font-weight: 700;
    margin-bottom: 0.5em;
    line-height: 1.3;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.hero-main-content p {
    font-size: 1.3em;
    font-weight: 300;
    margin-bottom: 2.5em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.scroll-down-indicator {
    position: absolute;
    bottom: -150px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.9em;
    text-align: center;
    cursor: pointer; 
}

.scroll-down-indicator span {
    display: block;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.scroll-down-indicator i {
    font-size: 1.5em;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* About Preview Section */
#about-preview {
    background-color: #fff; /* Was inline, consider this or keep inline for specific bg image */
}

.btn {
    padding: 12px 28px;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: #a07d5a;
    color: white;
    border: 2px solid #a07d5a;
}

.btn-primary:hover {
    background-color: #7c5f42;
    border-color: #7c5f42;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: #a07d5a;
    border: 2px solid #a07d5a;
}

.btn-outline:hover {
    background-color: #a07d5a;
    color: white;
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-block;
    background-color: #6c757d; /* Bootstrap secondary-like */
    color: white;
    padding: 10px 20px;
    margin-top: 10px;
    border-radius: 5px;
    text-align: center;
    font-size: 0.9em;
}

.btn-secondary:hover {
    background-color: #5a6268;
    color: white;
}

/* Room Highlights / Preview Grid */
.room-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.room-preview-item {
    background-color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center; /* Center content */
}

.room-preview-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.room-preview-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.room-preview-item h3 {
    font-size: 1.5em;
    color: #333;
    margin: 20px 20px 10px 20px;
    font-weight: 500;
}

.room-preview-item p {
    font-size: 0.95em;
    color: #666;
    padding: 0 20px 20px 20px;
    line-height: 1.6;
}

/* Nearby Attractions Grid */
.attraction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.attraction-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
    cursor: pointer; /* Indicate it's clickable, though no link for now */
}

.attraction-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.attraction-item:hover img {
    transform: scale(1.1);
}

.attraction-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    color: white;
    padding: 20px 15px 15px;
    font-size: 1.2em;
    font-weight: 500;
    text-align: left;
}

/* Footer */
footer {
    background-color: #363636; /* Darker footer like example */
    color: #bbb;
    text-align: center;
    padding: 40px 20px;
    font-size: 0.9em;
}

footer p {
    margin: 8px 0;
}

footer a {
    color: #e0b88a; /* Lighter gold for footer links */
}

footer a:hover {
    color: #fff;
}

/* Responsive Design - Adjustments from previous CSS */
@media (max-width: 768px) {
    .logo {
        font-size: 1.5em;
    }
    nav ul {
        display: none; 
        flex-direction: column;
        width: 100%;
        background-color: white;
        position: absolute;
        top: 60px; /* Adjust based on actual header height */
        left: 0;
        padding: 10px 0;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
    }
    nav ul.active {
        display: flex; 
    }
    nav ul li {
        margin: 10px 0;
        text-align: center;
    }
    .menu-toggle {
        display: block; 
    }

    .hero-main {
        height: auto;
        min-height: 400px;
        padding: 50px 0;
    }
    .hero-main-content h1 {
        font-size: 2.2em;
    }
    .hero-main-content p {
        font-size: 1.1em;
    }

    .booking-form {
        flex-direction: column;
        align-items: stretch;
    }
    .booking-form .form-group,
    .booking-form .btn-primary {
        width: 100%;
    }

    .content-section h2 {
        font-size: 2.2em;
    }

    .room-preview-grid,
    .attraction-grid {
        grid-template-columns: 1fr; /* Stack items on mobile */
    }
}

/* Remove old hero style to avoid conflicts */
/* .hero { ... } */
/* .hero-image { ... } */
/* .hero-content { ... } */

/* Removing old highlight grid as it's replaced by room-preview */
/* .highlight-grid { ... } */
/* .highlight-item { ... } */

/* Ensure page-title-section uses new button styles if any buttons are added there */
/* Page Title Section (for internal pages) */
.page-title-section {
    background-size: cover;
    background-position: center;
    padding: 60px 20px;
    text-align: center;
    color: white;
    position: relative;
}

.page-title-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 1;
}

.page-title-section .container {
    position: relative;
    z-index: 2;
}

.page-title-section h1 {
    font-size: 2.8em;
    margin: 0;
    font-weight: 700;
}

/* Room Grid Styling (rooms.html) - ensure consistency */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.room-item {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* Added for better internal alignment */
    flex-direction: column; /* Stack content vertically */
}

.room-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.room-item img {
    width: 100%;
    height: 220px; 
    object-fit: cover;
}

.room-item-content {
    padding: 20px;
    flex-grow: 1; /* Allow content to fill space */
    display: flex;
    flex-direction: column;
}

.room-item h3 {
    font-size: 1.6em;
    color: #333; /* Updated from #34495e */
    margin: 0 0 10px 0;
    font-weight: 500;
}

.room-item p {
    font-size: 0.95em;
    color: #666; /* Updated from #555 */
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1; /* Allow paragraph to take available space */
}

/* Ensure .btn-secondary inside .room-item is styled correctly */
.room-item .btn-secondary {
    margin-top: auto; /* Push button to bottom */
    align-self: flex-start; /* Align button to the left */
}

/* Gallery Grid Styling (gallery.html) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px; 
    margin-top: 30px;
}

.gallery-grid a img {
    width: 100%;
    height: 200px; 
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gallery-grid a img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Location Page Styling (location.html) */
.location-flex-container {
    display: flex;
    flex-wrap: wrap; 
    gap: 30px;
    align-items: flex-start;
}

.location-info {
    flex: 1; 
    min-width: 300px; 
}

.location-info h2, .location-map h2 {
    text-align: left;
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
}

.location-info h3 {
    font-size: 1.3em;
    color: #4a4a4a; /* Updated from #34495e */
    margin-top: 20px;
    margin-bottom: 10px;
}

.location-info ul {
    list-style: disc;
    margin-left: 20px;
    padding-left: 0;
    color: #555;
}

.location-info ul li {
    margin-bottom: 8px;
}

.location-map {
    flex: 1.5; 
    min-width: 300px;
}

/* Contact Page Styling (contact.html) */
.contact-flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: stretch;    /* ← 改成 stretch */
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-info h2, .contact-form-container h2 {
    text-align: left;
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 1.05em;
    display: flex;
    align-items: center;
    color: #555;
}

.contact-info p i {
    margin-right: 12px; /* Increased margin */
    color: #a07d5a; /* Accent color for icons */
    font-size: 1.2em;
    width: 22px; 
    text-align: center;
}

.contact-info h3 {
    font-size: 1.3em;
    color: #4a4a4a;
    margin-top: 25px;
    margin-bottom: 10px;
}

.social-links {
    margin-top: 25px;
}

.social-links a {
    color: #4a4a4a;
    font-size: 1.8em;
    margin-right: 18px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #a07d5a;
}

.contact-form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
}

#contact-form {
    display: flex;
    flex-direction: column;
    flex: 1; /* 滿高 */
}

#contact-form .form-group {
    flex: 0; /* 保持欄位原高度 */
}

#contact-form button {
    margin-top: auto; /* 推到底 */
    align-self: flex-start;
}

.form-group-message {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.form-group-message textarea {
    flex-grow: 1;
    min-height: 0; /* Override default min-height to allow shrinking/growing */
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500; /* Slightly less bold */
    color: #444;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    font-family: 'Noto Sans TC', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #a07d5a;
    box-shadow: 0 0 0 0.15rem rgba(160, 125, 90, 0.2);
}

/* Adding some general animation classes if needed later */
.animated-text {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlideUp 0.8s ease-out forwards;
}

.hero-main-content h1.animated-text {
    animation-delay: 0.3s;
}

.hero-main-content p.animated-text {
    animation-delay: 0.6s;
}

@keyframes fadeInSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* 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.6); /* Black w/ opacity for overlay */
    padding-top: 60px; /* Location of the box */
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto 15% auto; /* 5% from the top, 15% from the bottom and centered */
    padding: 30px 40px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 700px; /* Maximum width */
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: slideInFromTop 0.4s ease-out;
}

.close-modal-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    position: relative; /* Ensure z-index applies correctly */
    z-index: 20; /* Higher than the arrows (z-index: 10) */
}

.close-modal-btn:hover,
.close-modal-btn:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

#modalRoomContent h2 {
    font-size: 2.2em;
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: left;
}
#modalRoomContent h2::after {
    display: none; /* Remove global H2 underline in modal */
}

#modalRoomContent h4 {
    font-size: 1.2em;
    color: #a07d5a;
    margin-top: 25px;
    margin-bottom: 10px;
}

#modalRoomContent ul {
    list-style: disc;
    margin-left: 20px;
    padding-left: 0;
    margin-bottom: 20px;
}

#modalRoomContent ul li {
    margin-bottom: 8px;
    color: #555;
}

.modal-room-image {
    width: 100%;
    height: auto;
    max-height: 300px; /* Limit image height in modal */
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 20px;
}

.modal-thumbnail-gallery {
    display: flex;
    flex-wrap: wrap; /* Allow thumbnails to wrap if many */
    gap: 10px;
    margin-bottom: 20px;
    justify-content: flex-start; /* Align thumbnails to the start */
}

.modal-thumbnail {
    width: 80px; /* Adjust size as needed */
    height: 60px; /* Adjust size as needed */
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, transform 0.2s ease;
    margin: 0 5px; /* Add some spacing between thumbnails */
}

.modal-thumbnail:hover {
    border-color: #a07d5a; /* Accent color */
    transform: scale(1.05);
}

.modal-thumbnail.active-thumbnail {
    border-color: #7c5f42; /* Darker accent for active */
    box-shadow: 0 0 5px rgba(124, 95, 66, 0.5);
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes slideInFromTop {
    from {transform: translateY(-50px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

/* Adjust modal for smaller screens */
@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        padding: 20px;
        margin-top: 10%;
    }
    #modalRoomContent h2 {
        font-size: 1.8em;
    }
    .modal-room-image {
        max-height: 200px;
    }
} 

/* ───────────────────────────
   客房精選 ─ 横向滑動樣式
─────────────────────────── */
/* 1. 橫向滑動容器 */
.rooms-carousel {
    display: flex;
    gap: 20px;               /* 卡片間距 */
    overflow: hidden;        /* 不要出現水平捲軸 */
    padding: 0 10px;         /* 如果想左右留一點空 */
  }
  
  /* 2. 房卡基本樣式 */
  .room-card {
    position: relative;
    flex: 1;                 /* 每張一開始都是 1 單位寬 */
    min-width: 0;            /* 讓 flex-basis 正常運作 */
    height: 420px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    transition: flex 0.4s ease; /* 寬度過渡動畫 */
  }
  /* .room-card:hover {
    transform: scale(1.08);
    z-index: 2;             
  } */
   /* 3. 當滑鼠在走廊上，就把所有卡片先歸 1，準備 hover 動態 */
.rooms-carousel:hover .room-card {
    flex: 1;
  }
  
  /* 4. 滑鼠移到那張卡片，放大它（flex:2），其他自動維持 flex:1 */
  .rooms-carousel .room-card:hover {
    flex: 2;
    z-index: 2;              /* 保持在最上層 */
  }
  
  /* 5. 如果想讓未 hover 的卡片再更窄一點，可加下面這段： */
  .rooms-carousel:hover .room-card:not(:hover) {
    flex: 0.8;
  }
  
  /* 3. 一開始永遠顯示的房名 */
  .room-name {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: #fff;
    font-size: 1.2em;
    font-weight: 500;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
    pointer-events: none;
  }
  
  /* 4. hover 時出現的覆蓋層 */
  .room-hover {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
  }
  .room-card:hover .room-hover {
    opacity: 1;
    visibility: visible;
  }
  
  /* 5. 覆蓋層內文字、按鈕樣式 */
  .room-hover h3 {
    margin: 0 0 8px;
    font-size: 1.6em;
    font-weight: 600;
  }
  .room-hover .room-type {
    margin-bottom: 12px;
    font-size: 0.95em;
    opacity: 0.9;
  }
  .room-hover .room-desc {
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 16px;
  }
  /* 使用既有 btn-outline */
  .room-hover .btn-outline {
    padding: 8px 18px;
    font-size: 0.9em;
    border-color: #fff;
    color: #fff;
  }
  .room-hover .btn-outline:hover {
    background: #fff;
    color: #333;
  }

/* ────── 容器 & 卡片 基本 ────── */
.attraction-carousel {
    display: flex;
    gap: 20px;
    overflow: hidden;
  }
  
  .attraction-card {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 300px;               /* 可調高度 */
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    transition: flex 0.4s ease, transform 0.4s ease;
  }
  .attraction-card:hover {
    flex: 2;
    transform: scale(1.02);
    z-index: 2;
  }
  
  /* 非 hover 時讓其他微縮（可選） */
  .attraction-carousel:hover .attraction-card:not(:hover) {
    flex: 0.8;
  }
  
  /* 永遠顯示的名稱 */
  .attraction-name {
    position: absolute;
    bottom: 15px;
    left: 15px;
    color: #fff;
    font-size: 1.2em;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
    pointer-events: none;
  }
  
  /* hover 出現的覆蓋層 */
  .attraction-hover {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
  }
  .attraction-card:hover .attraction-hover {
    opacity: 1;
    visibility: visible;
  }
  
  /* 覆蓋層內文字 & 按鈕 */
  .attraction-hover h3 {
    margin: 0 0 8px;
    font-size: 1.5em;
    font-weight: 600;
  }
  .attraction-hover p {
    font-size: 0.9em;
    line-height: 1.4;
    margin-bottom: 12px;
  }
  .attraction-hover .btn-outline {
    padding: 8px 18px;
    color: #fff;
    border-color: #fff;
  }
  .attraction-hover .btn-outline:hover {
    background: #fff;
    color: #333;
  }
  
/* Room Modal Image Gallery Arrows */
.modal-image-container {
    position: relative; /* Needed for absolute positioning of arrows */
    margin-bottom: 10px; /* Space between main image and thumbnails */
}

.modal-room-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto; /* Center image if it's narrower than container */
}

.modal-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    user-select: none; /* Prevent text selection */
    border-radius: 5px;
}

.modal-nav-arrow.prev {
    left: 10px;
}

.modal-nav-arrow.next {
    right: 10px;
}

.modal-nav-arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-thumbnail-gallery {
    text-align: center; /* Center thumbnails */
}

.modal-thumbnail {
    /* ... existing styles ... */
    margin: 0 5px; /* Add some spacing between thumbnails */
}

.active-thumbnail {
    /* ... existing styles ... */
}