:root {
    --bg-color: #FFFFFF;
    --text-color: #333333;
    --primary-color: #ff7b00;
    /* オレンジ系アクセント */
    --hover-color: #f5f5f5;
    --border-color: #e0e0e0;
    --masonry-gap: 16px;
    --border-radius: 10px;
}

.hidden {
    display: none !important;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    line-height: 1;
    display: flex;
    align-items: center;
}

.バエヤド {
    max-height: 60px;
    /* ヘッダーに収まる適切なサイズに制限。必要に応じて調整。 */
    width: auto;
    object-fit: contain;
    display: block;
}

/* Search options */
.search-container {
    flex-grow: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.vacant-search-row {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.date-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.date-separator {
    font-size: 0.8rem;
    color: #888;
}

.area-select {
    padding: 8px 12px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background-color: #fff;
    color: var(--text-color);
    outline: none;
    cursor: pointer;
    min-width: 120px;
    transition: all 0.2s ease;
}

input[type="date"].area-select {
    width: 150px;
    font-family: inherit;
}

.area-select:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.area-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 123, 0, 0.1);
}

.filter-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background-color: #fff;
    color: var(--text-color);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--text-color);
    color: #fff;
    border-color: var(--text-color);
}

/* Main Content: Masonry Grid */
.main-content {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
    min-height: 80vh;
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--masonry-gap);
}

@media (max-width: 1200px) {
    .masonry-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 800px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .masonry-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.grid-item {
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: #f0f0f0;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.grid-item img.loaded {
    opacity: 1;
}

.hotel-card-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hotel-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hotel-card-area {
    font-size: 0.75rem;
    color: #666;
    margin: 0;
}

.rating {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 0.8rem;
    color: #ffb400;
    /* 楽天トラベル風のゴールド */
}

.star.filled {
    color: #ffb400;
}

.star {
    color: #ccc;
}

.rating-num {
    color: #ff7b00;
    font-weight: bold;
    margin-left: 4px;
}

.stay-date {
    display: inline-block;
    font-size: 0.75rem;
    color: #888;
    margin-right: 8px;
}

.stay-date-label {
    display: block;
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 10px;
}

.hotel-card-price {
    font-size: 0.8rem;
    color: #333;
    margin-top: 4px;
}

.hotel-card-price .price-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e60012;
    /* 楽天レッド風 */
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 50px 0;
}

.loading-spinner.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.no-results {
    text-align: center;
    padding: 50px 0;
    color: #666;
}

.no-results.hidden {
    display: none;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background-color: #fff;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1001;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.modal.hidden .modal-content {
    transform: translateY(20px);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-body {
    display: flex;
    flex-wrap: wrap;
    overflow-y: auto;
    max-height: 90vh;
}

.modal-image-gallery {
    flex: 1 1 50%;
    min-width: 300px;
    background: #f9f9f9;
}

.modal-image-gallery img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-info {
    flex: 1 1 50%;
    min-width: 300px;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.modal-hotel-name {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.modal-hotel-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.7;
}

.modal-price {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.booking-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 30px;
    transition: background-color 0.2s;
}

.booking-btn:hover {
    background-color: #e66e00;
}

.info-section h3,
.spots-section h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.info-list,
.spots-list {
    list-style: none;
}

.info-list li,
.spots-list li {
    padding: 8px 0;
    font-size: 0.9rem;
    border-bottom: 1px dashed var(--border-color);
}