/* ==================================================
   MOBILE-FIRST OPTIMIZED STYLES
   大手サイト標準のモバイル対応
   ================================================== */

/* モバイルファーストベース */
* {
    box-sizing: border-box;
}

/* ベースフォントサイズとタッチターゲット最適化 */
html {
    font-size: 62.5%; /* 1rem = 10px */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    touch-action: manipulation;
}

body {
    font-size: 1.6rem;
    line-height: 1.6;
    font-family: var(--font-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* コンテナ - モバイルファースト */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1.2rem; /* FIXED: Consistent with header */
}

/* タブレット */
@media (min-width: 768px) {
    .container {
        max-width: 768px;
        padding: 0 2rem;
    }
}

/* デスクトップ */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
        padding: 0 2.4rem;
    }
}

/* 大画面 */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
        padding: 0 3rem;
    }
}

/* ==================================================
   HEADER - モバイル最適化
   ================================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem; /* FIXED: Consistent horizontal padding */
    min-height: 5.6rem; /* FIXED: Slightly reduced for mobile */
}

/* ロゴ */
.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 3.6rem; /* FIXED: Slightly larger for better visibility */
    height: 3.6rem;
    flex-shrink: 0;
}

.logo-text h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
    line-height: 1.2;
}

.tagline {
    font-size: 1.2rem;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.1;
    display: none; /* モバイルでは非表示 */
}

/* デスクトップナビゲーション */
.main-nav {
    display: none;
}

@media (min-width: 1024px) {
    .main-nav {
        display: block;
    }
    
    .tagline {
        display: block;
    }
}

/* モバイルメニューボタン */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 4.8rem; /* FIXED: Larger touch target */
    height: 4.8rem;
    background: none;
    border: 2px solid var(--primary-green);
    border-radius: 0.8rem;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1001;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: var(--primary-green);
    border-color: var(--primary-green-dark);
}

.mobile-menu-btn:hover .hamburger-line {
    background: white;
}

.hamburger-line {
    width: 1.8rem; /* 18px - 細くした */
    height: 0.2rem; /* 2px - より細い線 */
    background: var(--primary-green);
    border-radius: 0.1rem;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* margin削除 - gap で間隔制御
.hamburger-line:nth-child(2) {
    margin: 0.5rem 0;
} */

/* ハンバーガーメニューのアニメーション */
.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(0.6rem, 0.6rem);
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(0.6rem, -0.6rem);
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* モバイルナビゲーション */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 32rem;
    max-width: 85vw;
    height: 100%;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 6rem 2rem 2rem;
}

.mobile-nav.active .mobile-nav-content {
    transform: translateX(0);
}

.mobile-nav-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 4rem;
    height: 4rem;
    background: none;
    border: none;
    font-size: 2.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-list li {
    border-bottom: 1px solid var(--gray-200);
}

.mobile-nav-link {
    display: block;
    padding: 1.8rem 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--gray-800);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    color: var(--primary-green);
}

/* ==================================================
   HERO SECTION - モバイル最適化
   ================================================== */

.hero {
    padding: 8rem 0 4rem; /* ヘッダー分を考慮 */
    text-align: center;
}

.hero-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-title .highlight {
    color: var(--primary-green);
    font-weight: 800;
}

.hero-description {
    font-size: 1.6rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 100%; /* FIXED: Full width for mobile */
    padding: 0 0.5rem; /* Add subtle side padding */
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
    max-width: 32rem;
}

/* タブレット調整 */
@media (min-width: 768px) {
    .hero {
        padding: 10rem 0 6rem;
    }
    
    .hero-title {
        font-size: 3.6rem;
    }
    
    .hero-description {
        font-size: 1.8rem;
        max-width: 80%;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        max-width: none;
    }
}

/* デスクトップ調整 */
@media (min-width: 1024px) {
    .hero {
        padding: 12rem 0 8rem;
        text-align: left;
    }
    
    .hero-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6rem;
        align-items: center;
        text-align: left;
    }
    
    .hero-title {
        font-size: 4.8rem;
    }
    
    .hero-description {
        font-size: 1.9rem;
        max-width: 100%;
    }
    
    .hero-buttons {
        justify-content: flex-start;
    }
}

/* ==================================================
   BUTTONS - タッチ最適化
   ================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.8rem 2.8rem; /* FIXED: Larger padding for better touch */
    font-size: 1.6rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 1rem; /* FIXED: Slightly more rounded */
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.2;
    min-height: 5.2rem; /* FIXED: Larger touch target */
    position: relative;
    overflow: hidden;
    font-family: var(--font-secondary);
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-green);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: var(--primary-green);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

/* ==================================================
   SECTIONS - モバイル最適化
   ================================================== */

section {
    padding: 3rem 0; /* FIXED: Reduced excessive section padding */
}

@media (min-width: 768px) {
    section {
        padding: 6rem 0;
    }
}

@media (min-width: 1024px) {
    section {
        padding: 8rem 0;
    }
}

.section-title {
    font-size: 2.4rem;
    font-weight: 700;
    text-align: center;
    color: var(--gray-800);
    margin-bottom: 3rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 3.2rem;
        margin-bottom: 4rem;
    }
}

@media (min-width: 1024px) {
    .section-title {
        font-size: 3.6rem;
        margin-bottom: 5rem;
    }
}

/* ==================================================
   GRIDS - モバイル最適化
   ================================================== */

.features-grid,
.quick-access-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
    
    .quick-access-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.4rem;
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4rem;
    }
}

/* ==================================================
   CARDS - タッチ最適化
   ================================================== */

.feature-card,
.quick-access-card {
    background: white;
    border-radius: 1.2rem;
    padding: 2.8rem 2rem; /* FIXED: More generous padding */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    margin-bottom: 1.2rem; /* FIXED: Add bottom margin */
}

@media (hover: hover) {
    .feature-card:hover,
    .quick-access-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        border-color: var(--primary-green);
    }
}

.feature-icon,
.quick-access-icon {
    width: 5.6rem;
    height: 5.6rem;
    margin: 0 auto 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-green);
}

.feature-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1.2rem;
    text-align: center;
}

.feature-description {
    font-size: 1.4rem;
    color: var(--gray-600);
    line-height: 1.6;
    text-align: center;
    margin: 0;
}

@media (min-width: 768px) {
    .feature-card,
    .quick-access-card {
        padding: 3rem;
    }
    
    .feature-title {
        font-size: 2rem;
    }
    
    .feature-description {
        font-size: 1.5rem;
    }
}

/* ==================================================
   TABLE - スマホ対応カード表示
   ================================================== */

.table-wrapper {
    background: white;
    border-radius: 1.2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 3rem;
}

.comparison-table {
    width: 100%;
    display: none; /* モバイルでは非表示 */
}

@media (min-width: 1024px) {
    .comparison-table {
        display: table;
    }
}

/* モバイル用カード表示 */
.mobile-cards {
    display: block;
}

.mobile-card {
    border-bottom: 1px solid var(--gray-200);
    padding: 2rem;
    position: relative;
}

.mobile-card:last-child {
    border-bottom: none;
}

.mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.6rem;
}

.mobile-card-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.mobile-card-rating {
    font-size: 1.4rem;
}

.mobile-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 1.6rem;
}

.mobile-detail {
    display: flex;
    flex-direction: column;
}

.mobile-detail-label {
    font-size: 1.2rem;
    color: var(--gray-500);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.mobile-detail-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--gray-800);
}

.mobile-card-action {
    text-align: center;
}

@media (min-width: 1024px) {
    .mobile-cards {
        display: none;
    }
}

/* ==================================================
   PICKUP SECTION - モバイル最適化
   ================================================== */

.pickup-section {
    padding: 4rem 0;
    background: var(--bg-light);
}

.pickup-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.4rem;
}

@media (min-width: 768px) {
    .pickup-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
}

@media (min-width: 1024px) {
    .pickup-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
}

.pickup-card {
    background: white;
    border-radius: 1.6rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

@media (hover: hover) {
    .pickup-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
        border-color: var(--primary-green);
    }
}

.pickup-header {
    padding: 2.4rem 2.4rem 1.6rem;
    text-align: center;
    position: relative;
}

.pickup-badge {
    position: absolute;
    top: -0.8rem;
    right: 1.6rem;
    background: var(--primary-green);
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 1.6rem;
    font-size: 1.2rem;
    font-weight: 600;
    white-space: nowrap;
}

.pickup-logo {
    margin-bottom: 1.6rem;
}

.pickup-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1.2rem;
}

.pickup-content {
    padding: 0 2.4rem 2.4rem;
}

.pickup-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.pickup-features li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pickup-features li:last-child {
    border-bottom: none;
}

.pickup-features .label {
    font-size: 1.4rem;
    color: var(--gray-600);
    font-weight: 500;
}

.pickup-features .value {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--gray-800);
}

.pickup-actions {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

@media (min-width: 768px) {
    .pickup-actions {
        flex-direction: row;
        gap: 1rem;
    }
    
    .pickup-actions .btn {
        flex: 1;
    }
}

/* ==================================================
   UTILITY CLASSES
   ================================================== */

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
}

.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* タッチデバイス最適化 */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 4.8rem;
        padding: 1.8rem 2.4rem;
    }
    
    .mobile-nav-link {
        padding: 2rem 0;
        min-height: 4.4rem;
        display: flex;
        align-items: center;
    }
}