/* Cemetery Post Styles */
:root {
    --primary-blue: #2563eb;
    --light-blue: #dbeafe;
    --dark-blue: #1e40af;
    --accent-blue: #60a5fa;
    --gray-100: #f8fafc;
    --gray-200: #e2e8f0;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --text-color: #334155;
    --border-color: #cbd5e1;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Container */
.cemetery-post-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
    color: var(--text-color);
}

/* Header */
.cemetery-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--primary-blue);
}

.cemetery-title {
    font-size: 2.5rem;
    color: var(--gray-800);
    margin: 0;
    font-weight: 700;
}

/* Sections */
.cemetery-section {
    margin-bottom: 50px;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    padding: 30px;
}

.section-title {
    color: var(--dark-blue);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 30px 0;
    padding: 15px 30px 15px 0;
    border-bottom: 3px solid var(--primary-blue);
    position: relative;
    background: transparent;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-blue);
}

/* Photo Slider */
.photo-slider {
    padding: 0;
}

.slider-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.slider-track {
    position: relative;
    width: 100%;
    height: 400px;
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
}

.slide:first-child {
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(37, 99, 235, 0.8);
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.slider-btn:hover {
    background: var(--primary-blue);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}

.slider-dots {
    text-align: center;
    padding: 20px 0 0;
}

.dot {
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: var(--gray-200);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover,
.dot.active {
    background-color: var(--primary-blue);
    transform: scale(1.2);
}

/* Price Section */
.price-section {
    margin-bottom: 50px;
}

.price-table-wrapper {
    margin-bottom: 40px;
    padding: 0;
    position: relative;
}

.price-table-title {
    color: var(--dark-blue);
    font-size: 1.3rem;
    font-weight: 600;
    margin: 30px 0 20px;
    padding-left: 15px;
    border-left: 4px solid var(--primary-blue);
}

.price-table {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    -webkit-overflow-scrolling: touch; /* スムーズなスクロール（iOS） */
    position: relative;
}

.price-table::after {
    content: '← スクロールできます →';
    position: absolute;
    bottom: -25px;
    right: 0;
    font-size: 0.7rem;
    color: var(--gray-600);
    display: none;
}

/* モバイルでスクロールヒントを表示 */
@media (max-width: 768px) {
    .price-table::after {
        display: block;
    }
}

.price-table table {
    width: 100%;
    min-width: 800px; /* 最小幅を設定 */
    border-collapse: collapse;
    font-size: 0.9rem;
}

.price-table th {
    background: var(--light-blue);
    color: var(--dark-blue);
    font-weight: 600;
    padding: 15px 10px;
    text-align: center;
    border-bottom: 2px solid var(--primary-blue);
    border-right: 1px solid var(--border-color);
    white-space: nowrap;
}

.price-table th:last-child {
    border-right: none;
}

.price-table td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    vertical-align: middle;
    white-space: nowrap; /* 文字の折り返しを防止 */
}

.price-table td:last-child {
    border-right: none;
}

.price-table tr:nth-child(even) {
    background: var(--gray-100);
}

.price-table tr:hover {
    background: var(--light-blue);
}

.price-table tr.sold-out {
    opacity: 0.6;
    background: #f1f5f9;
}

.total-price {
    font-weight: 700;
    color: var(--primary-blue);
}

.additional-fee {
    display: block;
    font-size: 0.8rem;
    color: #dc2626;
    margin-top: 2px;
}

.additional-fee-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--light-blue);
    color: var(--dark-blue);
    border: 1px solid var(--accent-blue);
    display: inline-block;
    white-space: nowrap; /* 文字の折り返しを防止 */
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    display: inline-block;
    white-space: nowrap; /* 文字の折り返しを防止 */
}

.status-badge.available {
    background: #dcfce7;
    color: #166534;
}

.status-badge.sold-out {
    background: #fee2e2;
    color: #991b1b;
}

/* Price Supplement */
.price-supplement {
    padding: 0;
}

.price-supplement h4 {
    color: var(--dark-blue);
    font-size: 1.1rem;
    margin: 20px 0 15px;
    font-weight: 600;
}

.supplement-content {
    background: var(--gray-100);
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid var(--accent-blue);
}

/* Facility Section */
.facility-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 0;
}

.facility-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: var(--gray-100);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.facility-item:hover {
    background: var(--light-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.facility-icon {
    color: var(--primary-blue);
    font-weight: 700;
    margin-right: 10px;
    font-size: 1.1rem;
}

.facility-name {
    font-weight: 500;
}

/* Access Section */
.access-section {
    padding: 30px;
}

.access-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.access-map-wrapper {
    flex: 1;
}

.access-info-wrapper {
    flex: 1;
}

.access-general {
    background: var(--light-blue);
    padding: 20px;
    border-radius: 6px;
    margin: 30px 0;
    border-left: 4px solid var(--primary-blue);
}

.access-map {
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.access-map iframe {
    width: 100%;
    height: 300px;
    border: 0;
    border-radius: 8px;
}

.access-method {
    margin: 0 0 30px 0;
}

.access-method:last-child {
    margin-bottom: 0;
}

.access-method h4 {
    color: var(--dark-blue);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-left: 15px;
    border-left: 3px solid var(--accent-blue);
}

.access-list {
    background: var(--gray-100);
    padding: 20px 25px;
    border-radius: 6px;
    margin: 0;
}

.access-list li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.access-list li:before {
    content: "→";
    color: var(--primary-blue);
    font-weight: 700;
    position: absolute;
    left: 0;
}

.access-list li:last-child {
    margin-bottom: 0;
}

/* Basic Info Section */
.basic-info-section {
    padding: 30px;
}

.basic-info-table {
    margin-top: 30px;
    overflow-x: auto;
}

.basic-info-table table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.basic-info-table th {
    background: var(--light-blue);
    color: var(--dark-blue);
    font-weight: 600;
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    width: 150px;
    white-space: nowrap;
}

.basic-info-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background: #fff;
}

.basic-info-table tr:last-child th,
.basic-info-table tr:last-child td {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cemetery-post-container {
        padding: 15px;
    }
    
    .cemetery-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.3rem;
        padding: 15px 20px 15px 0;
    }
    
    .cemetery-section {
        padding: 20px;
    }
    
    .access-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .access-map iframe {
        height: 250px;
    }
    
    .price-table-wrapper,
    .facility-list,
    .access-section,
    .basic-info-section {
        padding: 0;
    }
    
    .photo-slider {
        padding: 0;
    }
    
    .slider-track {
        height: 250px;
    }
    
    .slider-btn {
        padding: 10px 12px;
        font-size: 16px;
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
    
    .facility-list {
        grid-template-columns: 1fr;
    }
    
    .additional-fee-badge,
    .status-badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
    
    .total-price {
        font-weight: 700;
        color: var(--primary-blue);
        font-size: 0.8rem; /* スマートフォンでの可読性確保 */
    }
    
    .price-table-wrapper {
        margin-bottom: 50px; /* スクロールヒントのスペース確保 */
    }
    
    .price-table {
        font-size: 0.8rem;
    }
    
    .price-table {
        font-size: 0.8rem;
    }
    
    .price-table table {
        min-width: 700px; /* モバイル用の最小幅 */
    }
    
    .price-table th,
    .price-table td {
        padding: 8px 6px;
        white-space: nowrap; /* 文字の折り返しを防止 */
    }
    
    .price-table th {
        border-right: 1px solid var(--border-color);
    }
    
    .price-table th:last-child {
        border-right: none;
    }
    
    .price-table td {
        border-right: 1px solid var(--border-color);
    }
    
    .price-table td:last-child {
        border-right: none;
    }
    
    .basic-info-table th {
        width: 120px;
        padding: 12px 15px;
    }
    
    .basic-info-table td {
        padding: 12px 15px;
    }
    
    .access-map iframe {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .cemetery-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.1rem;
        padding: 12px 15px 12px 0;
    }
    
    .cemetery-section {
        padding: 15px;
    }
    
    .access-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .access-map iframe {
        height: 200px;
    }
    
    .photo-slider {
        padding: 0;
    }
    
    .slider-track {
        height: 200px;
    }
    
    .slider-btn {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .prev-btn {
        left: 8px;
    }
    
    .next-btn {
        right: 8px;
    }
    
    .dot {
        height: 10px;
        width: 10px;
        margin: 0 3px;
    }
    
    .price-table-wrapper {
        margin-bottom: 50px; /* スクロールヒントのスペース確保 */
    }
    
    .price-table {
        font-size: 0.75rem;
    }
    
    .price-table table {
        min-width: 600px; /* スマートフォン用の最小幅 */
    }
    
    .price-table th,
    .price-table td {
        padding: 6px 4px;
        white-space: nowrap; /* 文字の折り返しを防止 */
    }
    
    .price-table th {
        border-right: 1px solid var(--border-color);
    }
    
    .price-table th:last-child {
        border-right: none;
    }
    
    .price-table td {
        border-right: 1px solid var(--border-color);
    }
    
    .price-table td:last-child {
        border-right: none;
    }
    
    .facility-item {
        padding: 10px 12px;
    }
    
    .access-map iframe {
        height: 200px;
    }
}