/* css/main_halal.css */

/* --- Base Styles --- */
body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background-color: #f2f2f2;
    margin: 0;
    padding: 0;
    color: #333;
}
.wrap {
    max-width: 800px; /* PCでの表示幅を固定 */
    margin: 0 auto;
    padding: 0 15px;
}
.container {
    padding: 0;
}

/* --- Header Styles --- */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    position: relative; /* 言語選択ポップアップの位置決めに必要 */
}
.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0; /* 左側要素が縮まないようにする */
}
header .headerLink img {
    height: 35px;
    width: auto;
}
.headerTitleWrapper h1 {
    margin: 0;
    font-size: 1.2em;
    font-weight: bold;
}
.headerTitleWrapper h2 {
    margin: 0;
    font-size: 0.7em;
    color: #666;
}
.headerTool {
    text-decoration: none;
    color: #333;
}

/* PC用ナビゲーション */
.header-nav {
    flex-grow: 1;
    text-align: center;
}
.header-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex; /* PCでは横並び */
    justify-content: center;
    gap: 20px;
}
.header-menu li a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 8px 12px;
}
.header-menu li a:hover {
    color: #007bff;
}
.header-menu li a.current-page {
    font-weight: bold;
    color: #000;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}
.header-right .login-button { /* ログインボタンがある場合 */
    background-color: #f9c500;
    color: #333;
    border: none;
    padding: 8px 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
}
.header-right .fab { /* X(旧Twitter)アイコン */
    font-size: 1.2em;
    color: #333;
}

/* 言語選択ボタンとポップアップ（ヘッダー内） */
.header-lang-select {
    position: relative; /* ポップアップの位置決めに必要 */
    display: inline-block; /* ボタンが並ぶように */
}
#btnLangSelect {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}
#btnLangSelect:hover {
    background-color: #0056b3;
}
/* 言語選択ポップアップ */
.langSelectArea {
    position: absolute;
    top: 100%; /* ボタンのすぐ下に表示 */
    right: 0; /* ヘッダーの右端に合わせる */
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    width: 150px;
    padding: 5px 0;
    margin-top: 5px; /* ボタンとの間に少し隙間 */
}
.langSelectArea .menuLabel {
    font-weight: bold;
    padding: 5px 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
    color: #555;
    font-size: 0.9em;
}
.langSelectInArea a {
    display: block;
    padding: 5px 10px;
    text-decoration: none;
    color: #333;
    font-size: 0.85em;
}
.langSelectInArea a:hover {
    background-color: #f5f5f5;
}


/* モバイル用メニューボタン */
.menu-toggle {
    display: none; /* PCでは非表示 */
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #333;
}

/* ▼▼▼ 修正箇所: 768px以下の画面 (スマートフォン・タブレット) ▼▼▼ */
@media (max-width: 768px) {
    header {
        flex-wrap: wrap; /* ヘッダー内の要素が折り返すように設定 */
    }
    .header-nav {
        display: none; /* PC用ナビゲーションを非表示 */
    }
    .menu-toggle {
        display: block; /* モバイル用メニューボタンを表示 */
    }
    .header-left {
        flex-grow: 0; /* 左側が幅全体に広がらないように調整 */
    }
    .header-right {
        flex-grow: 1; /* 右側が残りのスペースを埋めるように設定 */
        justify-content: flex-end; /* 右端に寄せる */
    }
}
/* ▲▲▲ 修正ここまで ▲▲▲ */


/* モバイル用ナビゲーションメニューのスタイル */
.navMenuArea {
    position: absolute;
    top: 60px; /* ヘッダーの高さに合わせて調整 */
    right: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    width: 200px; /* メニューの幅 */
    padding: 10px 0;
}
.navMenuArea .menuLabel {
    font-weight: bold;
    padding: 8px 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
    color: #555;
}
.navMenuInArea ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.navMenuInArea ul li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}
.navMenuInArea ul li a:hover {
    background-color: #f5f5f5;
}


/* --- Search Form Styles --- */
.search-form-container {
    background-color: #fff;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}
.search-form-container p span {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #ff9900;
    display: inline-block;
    padding-bottom: 5px;
}
.search-form-container form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}
.search-form-container input,
.search-form-container select,
.search-form-container button {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.95em;
    flex-basis: calc(50% - 10px); /* 2列表示をデフォルトに */
    box-sizing: border-box;
    min-width: unset; /* 親のflex-basisが優先されるようにリセット */
}
.search-form-container button {
    background-color: #e60012;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-basis: 100%; /* ボタンは常に1列 */
    max-width: 200px; /* ボタンの最大幅 */
    font-weight: bold;
}

@media (max-width: 480px) {
    .search-form-container input,
    .search-form-container select {
        flex-basis: 100%; /* 全幅を使用 */
    }
}
@media (min-width: 768px) {
    .search-form-container input,
    .search-form-container select {
        flex-basis: calc(25% - 10px); /* 4列表示 */
        max-width: 180px; /* 各項目の最大幅を設ける */
    }
    .search-form-container button {
        flex-basis: auto; /* 自動幅 */
        max-width: 150px; /* ボタンの最大幅 */
    }
}
.info-text {
    font-size: 0.85em;
    color: #555;
    margin-top: 15px;
}

/* --- Main Content & Results --- */
.main-content-wrapper {
    margin: 20px auto;
    padding-bottom: 30px;
}
.results-summary-info {
    background-color: #5a5a5a;
    color: white;
    padding: 8px 12px;
    margin-bottom: 15px;
    font-size: 0.9em;
    border-radius: 3px;
    text-align: center;
}
.results-grid {
    display: grid;
    grid-template-columns: 1fr; /* デフォルトは1列 */
    gap: 15px;
    background-color: #fff;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
@media (min-width: 600px) {
    .results-grid {
        grid-template-columns: 1fr 1fr; /* 2列に */
    }
}
.initial-message, .error-message {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* --- Spot Card Styles --- */
.spot-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    width: 100%;
    cursor: pointer;
}
.spot-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}
.spot-card-content {
    padding: 8px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.spot-card-content h3 {
    font-size: 1.1em;
    font-weight: bold;
    margin: 0 0 5px;
    color: #007bff;
    line-height: 1.3;
}
.spot-card-content .description {
    font-size: 0.75em;
    color: #555;
    margin-bottom: 5px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 説明文を2行に制限 */
    -webkit-box-orient: vertical;
}
.spot-card-content .meta-info {
    font-size: 0.7em;
    color: #666;
    margin-bottom: 2px;
}
.spot-card-content .meta-info strong {
    color: #333;
}
.sns-share-buttons {
    margin-top: 8px;
    margin-bottom: 8px;
    display: flex;
    gap: 6px;
    justify-content: center;
}
.sns-share-buttons a {
    font-size: 1.1em;
    color: #666;
    transition: color 0.2s;
}
.sns-share-buttons .share-twitter:hover { color: #1DA1F2; }
.sns-share-buttons .share-facebook:hover { color: #1877F2; }
.sns-share-buttons .share-line:hover { color: #00C300; }
.website-link {
    display: block;
    text-align: center;
    background-color: #28a745;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: auto;
    transition: background-color 0.2s;
    font-size: 0.8em;
}
.website-link:hover {
    background-color: #218838;
}

/* --- Pagination Styles --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 2rem;
    font-size: 1.1rem;
    flex-wrap: wrap;
}
.pagination .page-link {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #555;
    background-color: #fff;
    transition: background-color 0.2s, color 0.2s;
    font-weight: bold;
}
.pagination .page-link.current {
    background-color: #007BFF;
    color: #fff;
    border-color: #007BFF;
}
.pagination .page-link:not(.current):not(.disabled):hover {
    background-color: #f0f0f0;
}
.pagination .page-link.disabled {
    color: #ccc;
    cursor: not-allowed;
    background-color: #f9f9f9;
}
.pagination .ellipsis {
    color: #999;
    padding: 0 5px;
}
@media (max-width: 480px) {
    .pagination {
        gap: 5px;
        font-size: 1em;
    }
    .pagination .page-link {
        min-width: 35px;
        height: 35px;
        padding: 0 8px;
    }
}

/* --- Result Item Styles --- */
.result-item {
    background-color: #f9f9f9;
    padding: 1.25rem;
    border-left: 5px solid #007bff;
    border-radius: 5px;
    margin-bottom: 1rem;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.result-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.result-item-header h3 {
    font-size: 1.1em;
    font-weight: bold;
    color: #007bff;
    margin: 0;
}
.result-item-body .result-description {
    font-size: 1em;
    line-height: 1.6;
    color: #333;
    margin: 0;
}
.result-item.rtl {
    text-align: right;
    direction: rtl;
    border-left: none;
    border-right: 5px solid #007bff;
}
.result-item.rtl .result-item-header {
    flex-direction: row-reverse;
}
.copy-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: 1em;
    padding: 5px;
    transition: color 0.2s ease;
}
.copy-btn:hover {
    color: #007bff;
}

/* --- Footer Styles --- */
footer {
    background-color: #e9e9e9;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #ccc;
    color: #555;
    font-size: 0.9em;
}
.groupLink {
    margin-bottom: 15px;
}
.groupLink a {
    color: #555;
    text-decoration: none;
    margin: 0 8px;
}
.groupLink a:hover {
    text-decoration: underline;
}
.footerNavBox {
    margin-top: 10px;
    font-size: 0.8em;
    color: #666;
}

/* --- Content Section Styles --- */
.content-section {
    background-color: #fff;
    padding: 30px;
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.content-section h2 {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff9900;
    text-align: center;
}
.content-section h3 {
    font-size: 1.4em;
    font-weight: bold;
    color: #007bff;
    margin-top: 30px;
    margin-bottom: 15px;
}
.content-section div {
    font-size: 0.95em;
    line-height: 1.6;
    color: #444;
    margin-bottom: 15px;
}
.content-section ul {
    list-style: disc;
    padding-left: 25px;
    margin-top: 10px;
    margin-bottom: 15px;
}
.content-section ul li {
    margin-bottom: 8px;
}
.content-section a {
    color: #007bff;
    text-decoration: none;
}
.content-section a:hover {
    text-decoration: underline;
}
@media (max-width: 600px) {
    .content-section { padding: 15px; }
    .content-section h2 { font-size: 1.5em; margin-bottom: 20px; }
    .content-section h3 { font-size: 1.2em; margin-top: 20px; margin-bottom: 10px; }
    .content-section div,
    .content-section ul li { font-size: 0.9em; }
}

/* --- Spot Detail Page Styles --- */
.spot-detail-title {
    font-size: 2em;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #ff9900;
    padding-bottom: 10px;
}
.image-carousel-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.spot-detail-image {
    width: 100%;
    height: 300px;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    transition: opacity 0.3s ease-in-out;
}
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.5em;
    z-index: 10;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}
.carousel-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }
.carousel-pagination {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.carousel-dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.carousel-dot.active {
    background-color: #007bff;
    transform: scale(1.2);
}
.spot-detail-content {
    padding: 10px;
}
.spot-detail-description {
    font-size: 1em;
    line-height: 1.7;
    color: #333;
    margin-bottom: 20px;
    white-space: pre-wrap;
}
.spot-detail-meta {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 10px;
}
.spot-detail-meta strong {
    color: #222;
    min-width: 90px;
    display: inline-block;
}
.spot-detail-map-link {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}
.spot-detail-map-link a {
    display: inline-block;
    background-color: #f9c500;
    color: #333;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease;
}
.spot-detail-map-link a:hover {
    background-color: #e0b000;
}
.detail-page-sns {
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 1.8em;
}
.detail-page-sns a {
    font-size: 1em;
}
.detail-page-website-link {
    font-size: 1.1em;
    padding: 10px 20px;
}
@media (max-width: 600px) {
    .spot-detail-title { font-size: 1.6em; margin-bottom: 15px; }
    .image-carousel-container { margin-bottom: 15px; }
    .spot-detail-image { height: 200px; }
    .carousel-button { font-size: 1.2em; width: 30px; height: 30px; padding: 5px 8px; }
    .carousel-dot { width: 8px; height: 8px; gap: 6px; }
    .spot-detail-description { font-size: 0.9em; margin-bottom: 15px; }
    .spot-detail-meta { font-size: 0.85em; margin-bottom: 8px; }
    .spot-detail-map-link { margin-top: 15px; margin-bottom: 15px; }
    .spot-detail-map-link a { padding: 8px 15px; font-size: 0.9em; }
    .detail-page-sns { font-size: 1.5em; margin-top: 15px; margin-bottom: 15px; }
    .detail-page-website-link { font-size: 1.1em; padding: 8px 15px; }
}