/* 共通スタイル */
#main { background-color: var(--bg-light); }
#main section { padding: 2em 0; }
.content-container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.section-title { text-align: start; padding: .4em .6em; font-size: 1.8rem; margin-bottom: 2rem; color: var(--text-dark); background-image: linear-gradient(to right, var(--primary-color) 20%, var(--text-lighter) 20%); background-repeat: no-repeat; background-size: 100% 2px; background-position: left bottom; }
.icon { text-align: center; padding-top: 4rem; }
.icon i { font-size: 4rem; color: var(--secondary-color); margin-bottom: 1rem; }

/* ヒーローセクション */
.hero-section { position: relative; height: 80vh; min-height: 480px; background-position: center; display: flex; align-items: end; justify-content: center; }
.hero-content { display: grid; justify-items: center; width: 80%; max-width: 1440px; color: var(--text-dark); }
.hero-text {justify-self: start;width: 50%;min-width: 680px;border-radius: 15px;margin-bottom: 8rem;padding: 0.5rem;background: rgba(ff,ff,ff,0.4);backdrop-filter: blur(4px);-webkit-backdrop-filter: blur(2px); }
.hero-title { font-size: 72px; font-weight: 1200; line-height: 1.4; color: #FFFFFF; text-shadow: 0 0 10px var(--primary-color); }
.hero-subtitle { font-size: 28px; padding-left: 12px; margin-bottom: 2rem; font-weight: 600; color: var(--text-gray); }

/* TOPページ検索フォーム */
.top-search-section { padding: 0 !important; }
.top-search-container { width: 95%; max-width: 940px; margin: -100px auto 0 auto; position: relative; }
.top-search-form { background: var(--bg-white); padding: 2rem 3rem; border-radius: 12px; box-shadow: var(--shadow-heavy); }
.search-layout-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 2.5rem; margin-bottom: 1.5rem; }
.search-group { margin-bottom: 1.5rem; }
.search-group:last-child { margin-bottom: 0; }
.search-group-title { font-size: 1rem; font-weight: bold; color: var(--text-gray); margin-bottom: 0.8rem; }
.search-toggle-buttons { display: flex; gap: 0.75rem; }
.search-toggle-button { flex: 1; padding: 0.7rem; border: 1px solid var(--primary-color); border-radius: 8px; background-color: #fff; color: var(--primary-color); font-size: 0.95rem; font-weight: bold; cursor: pointer; transition: all 0.2s ease; text-align: center; }
.search-toggle-button.active { background-color: var(--primary-color); color: white; }
.search-select-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding-bottom: 1rem; }
.search-select-grid:last-child { padding-bottom: 0; }
.search-select-grid select { width: 100%; padding: 0.8rem; font-size: 1rem; border: 1px solid #ccc; border-radius: 8px; background-color: #fff; -webkit-appearance: none; -moz-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 0.7rem center; background-size: 1em; }
.search-keyword-input { width: 100%; padding: 0.8rem 1rem; font-size: 1rem; border: 1px solid #ccc; border-radius: 8px; }
.search-submit-container { padding-top: 1rem; border-top: 1px solid #eee; }
.search-submit-button { width: 100%; padding: 1.2rem; border: none; border-radius: 8px; background-color: var(--primary-color); color: white; font-size: 1.2rem; font-weight: bold; cursor: pointer; transition: background-color 0.3s; }
.search-submit-button:hover { background-color: var(--primary-color-dark, #40b39e); }

/* 検索結果 */
.search-results-section { background-color: var(--bg-white); }
.studio-results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.studio-result-item a { display: block; text-decoration: none; color: inherit; }
.studio-result-thumbnail img { width: 100%; height: auto; border-radius: 8px; }
.studio-result-title { font-size: 1.2rem; margin-top: 0.5rem; }

/* 人気のスタジオ */
.recommended-studios-section { padding-top: 4em; }
.recommended-container { width: 80%; margin: 0 auto; }
.recommended-section-title { background-color: var(--secondary-color); border-radius: 8px 8px 0 0; color: white; text-align: center; padding: 2px 0; margin: 0; position: relative; }
.recommended-section-title::after { position: absolute; content: ''; top: 100%; left: calc(50% - 14px); border: 14px solid transparent; border-top: 14px solid var(--secondary-color); width: 0; height: 0; }
.studio-list { border: 2px solid var(--secondary-color); border-radius: 0 0 8px 8px; display: grid; grid-template-columns: repeat(auto-fit, minmax(95px, 1fr)); gap: 0; padding: 1em; margin: 0; list-style: none; width: 100%; justify-items: center; }
.studio-item { padding: 4px 0; }
.studio-link { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #333; transition: transform 0.3s ease, opacity 0.3s ease; padding: 0.3rem 0; }
.studio-link:hover { transform: translateY(-5px); opacity: 0.8; }
.studio-icon { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; margin-bottom: 0.5rem; background-color: #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); }
.studio-name { font-size: 0.8rem; font-weight: 500; text-align: center; }

/* 初心者ガイド */
.step-guide-section { background-color: var(--bg-white); }
.guide-list { list-style: none; counter-reset: number; padding: 0; margin: 0; }
.guide-item { display: flex; align-items: center; gap: 1em; margin-bottom: 1em; }
.guide-item:before{ counter-increment: number; content: counter(number); width: 2.2em; height: 2.2em; border-radius: 50%; font-size: 1em; font-weight: bold; background-color: var(--primary-color); color: white; display: flex; justify-content: center; align-items: center; flex-shrink: 0; }
.guide-link { font-size: 1.2rem; color: blue; font-weight: bold; text-decoration: none; transition: color 0.2s ease; }
.guide-link:hover { color: #e9546b; text-decoration: underline; }
.guide-text { margin-top: -0.8em; padding-left: 3em; padding-bottom: 1.5em; color: var(--text-gray); font-size: 0.9em; }

/* CTAセクション */
.cta-search-section { width: 100%; padding: 5rem 2rem; }
.cta-title { text-align: center; font-size: 1.8rem; font-weight: 800; color: var(--text-gray); padding-top: 2rem; padding-bottom: 2rem; }
.cta-description { text-align: center; color: var(--text-gray); font-weight: 500; line-height: 1.8; padding-top: 1rem; padding-bottom: 3.5rem; }
.search-container { display: flex; justify-content: center; align-items: stretch; width: 100%; max-width: 900px; margin: 0 auto; }
.search { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-grow: 1; padding: 2.5rem 1rem; text-decoration: none; color: var(--text-gray); transition: background-color 0.3s ease; position: relative; }
.search:not(:first-child)::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 50%; background-color: #333; }
.search i { font-size: 2.5rem; color: var(--secondary-color); margin-bottom: 1rem; }
.search span { font-size: 1.1rem; font-weight: bold; color: var(--text-gray); }
.search:hover i, .search:hover span { color: var(--secondary-color-light); }

/* 人気エリア */
.area-grid-section { width: 100%; padding: 5rem 2rem; background-color: var(--bg-white); }
.area-grid-title { text-align: center; font-size: 1.8rem; font-weight: 800; color: var(--text-gray); padding-bottom: 2rem; }
.area-grid-description { text-align: center; color: var(--text-gray); font-weight: 500; line-height: 1.8; padding-top: 1rem; padding-bottom: 2.5rem; }
.area-card-container { width: 80%; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0.5rem; margin: 0 auto; }
.area-card { display: block; position: relative; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: 0 4px 15px rgba(0,0,0,0.05); text-decoration: none; }
.card-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; background: rgba(0,0,0,0.2); transition: background-color 0.4s ease; }
.card-title { color: white; font-size: 2rem; font-weight: bold; text-shadow: 1px 1px 5px rgba(0,0,0,0.5); transform: translateY(25%); transition: transform 0.4s ease; }
.area-card:hover .card-image { transform: scale(1.05); }
.area-card:hover .card-overlay { background-color: rgba(0,0,0,0.3); }
.area-card:hover .card-title { transform: translateY(0); }

/* 目的から探す */
.purpose-search-section { width: 100%; padding: 5rem 2rem; background-color: var(--bg-white); }
.purpose-section-title { text-align: center; font-size: 1.8rem; font-weight: 800; color: var(--text-gray); padding-bottom: 2rem; }
.purpose-section-description { text-align: center; color: var(--text-gray); font-weight: 500; line-height: 1.8; padding-top: 1rem; padding-bottom: 2.5rem; }
.pickup-grid-container { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 4rem; border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.pickup-grid-item { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 0.5rem; background-color: #fff; text-decoration: none; text-align: center; position: relative; transition: background-color 0.3s ease; }
.pickup-grid-item:not(:nth-child(4n))::after { content: ''; position: absolute; top: 50%; right: 0; transform: translateY(-50%); width: 1px; height: 50%; background-color: #eee; }
.pickup-grid-item:nth-child(-n+4)::before { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 80%; height: 1px; background-color: #eee; }
.pickup-grid-item:hover { background-color: var(--primary-color-light, #f0fafa); }
.pickup-grid-item i { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 1rem; transition: transform 0.3s ease; }
.pickup-grid-item:hover i { transform: scale(1.1); }
.pickup-grid-item span { font-size: 0.9rem; font-weight: bold; color: var(--text-gray); line-height: 1.4; }
.tag-categories { display: flex; justify-content: space-between; gap: 2rem; }
.tag-category { flex: 1; }
.category-title { font-size: 1.2rem; font-weight: bold; color: var(--text-gray); margin-bottom: 1rem; padding-left: 0.5rem; padding-bottom: 0.2rem; border-bottom: 2px solid var(--primary-color); }
.tag-cloud { padding-left: 0.5em; }
.tag-button { display: block; padding-bottom: 0.5rem; text-decoration: none; font-weight: bold; color: var(--text-gray); transition: color 0.2s; }
.tag-button:hover { color: var(--primary-color-light); text-decoration: underline; }

/* 詳細検索 */
.detailed-search-section { width: 100%; padding: 5rem 2rem; background-color: var(--bg-white); }
.detailed-search-title { text-align: center; font-size: 1.8rem; font-weight: 800; color: var(--text-gray); padding-bottom: 2rem; }
.detailed-search-description { text-align: center; color: var(--text-gray); font-weight: 500; line-height: 1.8; padding-top: 1rem; padding-bottom: 2.5rem; }
.detailed-search-form { max-width: 900px; margin: 0 auto; padding: 2.5rem; border: 1px solid #eee; border-radius: 12px; }
.kodawari-categories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; border-top: 1px solid #eee; padding-top: 2rem; }
.kodawari-group h4 { font-size: 0.9rem; font-weight: bold; color: var(--text-gray); margin-bottom: 1rem; }
.tag-cloud-search { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.tag-button-filter { padding: 0.5rem 1rem; border: 1px solid #ccc; border-radius: 20px; background-color: #fff; color: #555; font-size: 0.9rem; cursor: pointer; transition: all 0.2s ease; }
.tag-button-filter.active { background-color: var(--primary-color); border-color: var(--primary-color); color: white; }

/* メディアクエリ */
@media (max-width: 768px) {
    .hero-title { font-size: 32px; }
    .hero-subtitle { font-size: 16px; }
    .hero-text { min-width: 100%; margin-bottom: 4rem; }
    .search-layout-grid, .kodawari-categories { grid-template-columns: 1fr; }
    .cta-search-section .search-container { flex-direction: column; }
    .cta-search-section .search:not(:first-child)::before { top: 0; left: 50%; transform: translateX(-50%); width: 80%; height: 1px; }
    .pickup-grid-container { grid-template-columns: repeat(2, 1fr); }
    .pickup-grid-item:not(:nth-child(4n))::after { content: none; }
    .pickup-grid-item:nth-child(odd)::after { content: ''; position: absolute; top: 50%; right: 0; transform: translateY(-50%); width: 1px; height: 50%; background-color: #eee; }
    .pickup-grid-item:nth-child(-n+4)::before { content: none; }
    .pickup-grid-item:nth-child(-n+6)::before { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 80%; height: 1px; background-color: #eee; }
}

.br-sp {
	display: none;
}

/* =============================================== */
/* メディアクエリ (レスポンシブ対応) */
/* =============================================== */


/* ----------------------------------------------- */
/* スマホサイズ (768px以下) */
/* ----------------------------------------------- */
@media (max-width: 768px) {
	
	.br-sp {
		display: block;
	}
	
    /* 共通 */
    #main section {
        padding: 2.5em 0; /* セクション間の余白を調整 */
    }
	.content-container {
		padding: 0 16px;
	}
    .section-title {
        font-size: 1.4rem; /* セクションタイトルを少し小さく */
    }
    .icon {
        padding-top: 2rem;
    }
    .icon i {
        font-size: 3rem;
    }

    /* ヒーローセクション */
    .hero-section {
        height: 60vh;
        min-height: 400px;
    }
	.hero-content {
		width: 100%;
		padding: 0 16px;
	}
    .hero-text {
        width: 100%;
        margin-bottom: 4rem;
    }
    .hero-title {
        font-size: 34px; /* スマホ向けにタイトルサイズ調整 */
        text-shadow: 0 0 5px var(--primary-color);
    }
    .hero-subtitle {
        font-size: 16px; /* サブタイトルサイズ調整 */
        padding-left: 0;
    }

    /* TOPページ検索フォーム */
    .top-search-container {
        margin-top: -80px; /* フォームの重なりを浅くする */
        width: 90%;
    }
    .search-layout-grid {
        grid-template-columns: 1fr; /* 1列レイアウトに変更 */
        gap: 1.5rem;
    }
    .search-select-grid {
        grid-template-columns: 1fr; /* 1列レイアウトに変更 */
    }

    /* 人気のスタジオ */
    .studio-list {
        padding: 1em 0.5em;
        /* アイコンが3〜4列になるように調整 */
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    }
    .studio-icon {
        width: 48px;
        height: 48px;
    }
	.studio-name {
		display: none;
	}

    /* 初心者ガイド */
    .guide-item {
        font-size: 0.9rem;
    }
    .guide-item:before {
        width: 2em;
        height: 2em;
    }
    .guide-text {
        padding-left: 2.5em;
    }

    /* CTAセクション */
    .cta-search-section .search-container {
        border: 1px solid #ddd;
        border-radius: 12px;
        overflow: hidden;
    }
    .cta-search-section .search {
        padding: 1.5rem 1rem;
    }
    .cta-search-section .search:not(:first-child)::before {
        /* 縦線の代わりに横線にする */
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 80%;
        height: 1px;
        background-color: #ddd;
    }

    /* 人気エリア */
    .area-card-container {
        /* 1列または2列のグリッドに */
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.5rem;
    }
	.card-title {
		font-size: 24px;
	}

    /* 目的から探す */
    .pickup-grid-container {
        grid-template-columns: repeat(3, 1fr); /* 2列に固定 */
		margin-bottom: 32px;
    }
	.tag-categories { 
		display: block; 
	}
	.tag-category:not(:last-child) {
		padding-bottom: 32px;
	}
}
