/* css/home.css - Homepage Specific Styles - 改善版 */

/* ===========================
   Hero Section
   =========================== */
   .hero {
    background: linear-gradient(135deg, var(--accent-coral) 0%, var(--accent-sage) 100%);
    padding: 4rem 0 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 60%;
    height: 200%;
    background: white;
    opacity: 0.1;
    transform: rotate(35deg);
}

.hero::after {
    content: '✨';
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    font-size: 3rem;
    opacity: 0.2;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero .editorial-title {
    color: white;
    margin-bottom: 1rem;
    animation: slideInDown 0.8s ease;
}

.hero .editorial-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2rem;
    margin-bottom: 3rem;
    animation: slideInUp 0.8s ease 0.2s both;
}

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

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    animation: fadeIn 1s ease 0.4s both;
}

.hero-stat {
    text-align: center;
    color: white;
    transition: transform 0.3s ease;
}

.hero-stat:hover {
    transform: scale(1.1);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    background: linear-gradient(45deg, white, rgba(255,255,255,0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeIn 1s ease 0.6s both;
}

.hero-actions .btn {
    min-width: 160px;
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero-actions .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* ===========================
   Integrated Map Section (New)
   =========================== */
.integrated-map-section {
    margin: 2rem 0;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.map-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.map-legend-inline {
    display: flex;
    gap: 1.5rem;
}

.map-legend-inline .legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--warm-gray);
}

.map-legend-inline .legend-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.map-legend-inline .legend-marker.premium {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.map-legend-inline .legend-marker.free {
    background: var(--accent-sage);
}

.map-wrapper-integrated {
    position: relative;
}

.map-container-integrated {
    height: 600px;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.map-container-integrated::before {
    content: '🗺️';
    position: absolute;
    font-size: 3rem;
    opacity: 0.15;
}

/* ===========================
   View Toggle Container (New Design)
   =========================== */
.view-toggle-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0 1.5rem;
}

.view-toggle-group {
    display: inline-flex;
    background: var(--cream);
    padding: 0.375rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.view-mode-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--warm-gray);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.view-mode-btn:hover {
    background: rgba(255,255,255,0.5);
}

.view-mode-btn.active {
    background: white;
    color: var(--accent-coral);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.view-mode-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.view-mode-text {
    font-weight: 500;
}

/* ===========================
   Statistics Section
   =========================== */
.statistics-section {
    padding: 3rem 0;
    background: linear-gradient(180deg, var(--cream) 0%, white 100%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: white;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-coral), var(--accent-sage));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.stat-card h3 {
    font-size: 0.9rem;
    color: var(--warm-gray);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    background: linear-gradient(135deg, var(--accent-coral), var(--accent-sage));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-change {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

.stat-change.positive {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--cream);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-coral), var(--accent-sage));
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===========================
   Shops Section - コンパクト版に修正
   =========================== */
.shops-section {
    padding: 4rem 0;
    background: white;
}

/* Search Filter Container - コンパクト版 */
.search-filter-container {
    margin-bottom: 1.5rem;
    background: white;
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* 検索バー（リセットボタン統合） */
.search-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.search-input {
    flex: 1;
    padding: 0.625rem 1rem;
    font-size: 0.95rem;
    border-radius: 10px;
    border: 2px solid var(--cream);
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.search-input:focus {
    border-color: var(--accent-coral);
    background: white;
    box-shadow: 0 0 0 3px rgba(232, 180, 160, 0.1);
    outline: none;
}

.search-btn {
    padding: 0 1.25rem;
    background: linear-gradient(135deg, var(--accent-coral), var(--accent-sage));
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(232, 180, 160, 0.3);
}

.search-icon {
    font-size: 1.1rem;
}

/* リセットボタン（新規） */
.reset-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0 1rem;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    color: var(--warm-gray);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.reset-btn:hover {
    background: linear-gradient(135deg, #e0e0e0, #d0d0d0);
    color: var(--text-dark);
    transform: translateY(-1px);
}

.reset-icon {
    font-size: 1rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.reset-btn:hover .reset-icon {
    transform: rotate(180deg);
}

.reset-text {
    font-size: 0.875rem;
}

/* フィルターバー */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}

/* コンパクトなセレクトボックス */
.filter-select.compact {
    min-width: auto;
    padding: 0.5rem 0.75rem;
    padding-right: 2rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%23999' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}

.filter-select.compact:hover {
    border-color: var(--accent-coral);
    background-color: #fcfcfc;
}

.filter-select.compact:focus {
    outline: none;
    border-color: var(--accent-coral);
    box-shadow: 0 0 0 2px rgba(232, 180, 160, 0.15);
}

/* 古いスタイルの上書き */
.filters,
.search-container,
.view-controls,
.view-group,
.filter-reset {
    display: none !important;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--warm-gray);
    grid-column: 1 / -1;
}

.no-results p {
    font-size: 1.1rem;
}

/* ===========================
   Campaigns Section
   =========================== */
.campaigns-section {
    padding: 4rem 0;
    background: linear-gradient(180deg, white 0%, var(--cream) 100%);
}

.campaign-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.campaign-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.campaign-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(45deg, transparent, rgba(232, 180, 160, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.campaign-card:hover::before {
    top: -150%;
    left: -150%;
}

.campaign-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.campaign-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.campaign-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.campaign-card p {
    color: var(--warm-gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.campaign-card .btn {
    margin-top: 1rem;
}

/* ===========================
   About Section
   =========================== */
.about-section {
    padding: 0;
    background: white;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

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

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin-top: 1.5rem;
}

.feature {
    text-align: center;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    animation: float 3s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.2s);
}

.feature:nth-child(1) { --i: 0; }
.feature:nth-child(2) { --i: 1; }
.feature:nth-child(3) { --i: 2; }

.feature h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.feature p {
    color: var(--warm-gray);
    font-size: 0.9rem;
}

/* ===========================
   Loading States
   =========================== */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
    background: transparent;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--cream);
    border-top-color: var(--accent-coral);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===========================
   タブレット対応
   =========================== */
@media (max-width: 1024px) and (min-width: 769px) {
    .filter-bar {
        flex-wrap: wrap;
    }
    
    .filter-group {
        flex: 1 1 100%;
        margin-bottom: 0.5rem;
    }
    
    .integrated-map-section {
        margin: 1.5rem 0;
    }
    
    .map-container-integrated {
        height: 450px;
    }
}

/* ===========================
   Responsive Design - スマートフォン対応改善版
   =========================== */
@media (max-width: 768px) {
    /* Hero */
    .hero {
        padding: 3rem 0 4rem;
    }
    
    .hero .editorial-title {
        font-size: 1.8rem;
    }
    
    .hero .editorial-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        padding: 0 1rem;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    /* Integrated Map - モバイル */
    .integrated-map-section {
        margin: 1rem 0;
        border-radius: 12px;
    }
    
    .map-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .map-title {
        font-size: 1rem;
    }
    
    .map-legend-inline {
        width: 100%;
        justify-content: space-around;
    }
    
    .map-legend-inline .legend-item {
        font-size: 0.8rem;
    }
    
    .map-container-integrated {
        height: 400px;
    }
    
    /* View Toggle - モバイル */
    .view-toggle-container {
        margin: 1.5rem 0 1rem;
    }
    
    .view-toggle-group {
        width: 100%;
        max-width: 320px;
        padding: 0.25rem;
    }
    
    .view-mode-btn {
        flex: 1;
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    .view-mode-icon {
        font-size: 1rem;
    }
    
    .view-mode-text {
        display: none; /* モバイルではアイコンのみ表示 */
    }
    
    /* Statistics */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem 1rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    /* Search Filter Container - モバイル版 */
    .search-filter-container {
        padding: 0.75rem;
        border-radius: 12px;
        margin-bottom: 1rem;
    }
    
    /* 検索バー - モバイル */
    .search-bar {
        margin-bottom: 0.5rem;
    }
    
    .search-input {
        padding: 0.75rem 1rem;
        font-size: 16px; /* iOSの自動ズーム防止 */
    }
    
    .search-btn {
        padding: 0 1rem;
        min-width: 44px; /* タップターゲット最小サイズ */
    }
    
    .reset-btn {
        padding: 0 0.75rem;
    }
    
    .reset-text {
        display: none; /* モバイルではアイコンのみ表示 */
    }
    
    /* フィルターバー - モバイル */
    .filter-bar {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        width: 100%;
    }
    
    .filter-select.compact {
        width: 100%;
        padding: 0.625rem 0.75rem;
        padding-right: 2rem;
        font-size: 0.875rem;
        min-height: 44px; /* タップターゲット最小サイズ */
    }
    
    /* Campaigns */
    .campaign-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    /* About */
    .about-features {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   小型スマートフォン対応（iPhone SE等）
   =========================== */
@media (max-width: 375px) {
    .hero .editorial-title {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Map - 小型スマホ */
    .map-container-integrated {
        height: 350px;
    }
    
    .map-legend-inline {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    /* View Toggle - 小型スマホ */
    .view-toggle-group {
        max-width: 280px;
    }
    
    .view-mode-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    /* Search Filter Container - 小型スマホ */
    .search-filter-container {
        padding: 0.625rem;
    }
    
    .search-bar {
        gap: 0.375rem;
    }
    
    .search-input {
        padding: 0.625rem 0.875rem;
    }
    
    .filter-select.compact {
        padding: 0.5rem 0.625rem;
        padding-right: 1.75rem;
        font-size: 0.8125rem;
    }
}

/* ===========================
   フォーカス状態の改善
   =========================== */
@media (hover: none) and (pointer: coarse) {
    /* タッチデバイスでのタップ領域を拡大 */
    .filter-select.compact,
    .view-mode-btn,
    .reset-btn,
    .search-btn {
        position: relative;
    }
    
    .filter-select.compact::before,
    .view-mode-btn::before,
    .reset-btn::before,
    .search-btn::before {
        content: '';
        position: absolute;
        top: -4px;
        right: -4px;
        bottom: -4px;
        left: -4px;
    }
}

/* Google Maps InfoWindow スタイル */
.gm-style-iw-c {
    padding: 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

.gm-style-iw-d {
    overflow: auto !important;
    max-height: none !important;
}

.gm-style-iw-t::after {
    background: linear-gradient(45deg, white, white) !important;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .gm-style-iw-c {
        max-width: 280px !important;
    }
}