/* 士業事務所ホームページ - 共通スタイルシート */

/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基本設定 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", YuGothic, "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", Arial, "メイリオ", Meiryo, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    background-color: #f8f9fa;
}

/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダー */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #1e3a8a;
    text-decoration: none;
}

/* ナビゲーション */
nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #1e3a8a;
}

/* モバイルメニューボタン */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* メインコンテンツ */
main {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

/* セクション共通 */
section {
    background-color: #fff;
    padding: 60px 0;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

h1, h2, h3 {
    color: #1e3a8a;
    margin-bottom: 20px;
}

h1 {
    font-size: 36px;
    text-align: center;
}

h2 {
    font-size: 28px;
    text-align: center;
    margin-bottom: 40px;
}

h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 15px 40px;
    background-color: #1e3a8a;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #1e40af;
}

.btn-primary {
    background-color: #2563eb;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #fff;
    color: #1e3a8a;
    border: 2px solid #1e3a8a;
}

.btn-secondary:hover {
    background-color: #f0f4ff;
}

/* グリッドレイアウト */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* カード */
.card {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* コンパクトサービカード */
.service-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.1);
    border-color: #1e3a8a;
}

.service-card h3 {
    color: #1e3a8a;
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 600;
}

.service-card p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    flex-grow: 1;
}

.service-card .highlight {
    font-size: 12px;
    color: #1e3a8a;
    font-weight: bold;
    margin: 0;
    padding: 6px 12px;
    background-color: #f0f4ff;
    border-radius: 20px;
    text-align: center;
}

/* サービスカード詳細 */
.service-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.service-card-icon {
    color: #1e3a8a;
    font-size: 16px;
    transition: transform 0.3s ease;
    margin-left: 10px;
}

.service-card.expanded .service-card-icon {
    transform: rotate(180deg);
}

.service-card-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0;
}

.service-card.expanded .service-card-detail {
    max-height: 300px;
    padding: 15px 0 5px 0;
}

.service-card-detail h4 {
    font-size: 14px;
    color: #1e3a8a;
    margin-bottom: 10px;
    font-weight: 600;
}

.service-card-detail ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-card-detail li {
    padding: 3px 0;
    font-size: 13px;
    color: #374151;
    border-left: 2px solid #e5e7eb;
    padding-left: 12px;
    margin-bottom: 5px;
}

.service-card-detail li:hover {
    border-left-color: #1e3a8a;
    color: #1e3a8a;
}

/* コンパクトテキストセクション */
.compact-text-section h2 {
    font-size: 20px;
    margin-bottom: 25px;
}

.compact-text-section h3 {
    font-size: 16px;
    color: #1e3a8a;
    margin-bottom: 12px;
    font-weight: 600;
}

.compact-text-section p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* テーブル */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background-color: #f3f4f6;
    font-weight: bold;
    color: #1e3a8a;
}

tr:hover {
    background-color: #f9fafb;
}

/* フォーム */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #374151;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #1e3a8a;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* フッター */
footer {
    background-color: #1e3a8a;
    color: #fff;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-section p,
.footer-section a {
    color: #e0e7ff;
    text-decoration: none;
    line-height: 1.8;
}

.footer-section a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #3730a3;
    color: #e0e7ff;
}

/* ヒーローセクション */
.hero {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.4) 0%, rgba(59, 130, 246, 0.4) 100%), 
                url('images/hero-background.jpg') center/cover no-repeat;
    color: #fff;
    padding: 100px 0;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.3) 0%, rgba(59, 130, 246, 0.3) 100%);
}

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

.hero h1 {
    color: #fff;
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
}

/* アコーディオン（FAQ用） */
.accordion-item {
    margin-bottom: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
}

.accordion-header {
    background-color: #f9fafb;
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.accordion-header:hover {
    background-color: #f3f4f6;
}

.accordion-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s, padding 0.3s;
}

.accordion-item.active .accordion-content {
    padding: 20px;
    max-height: 500px;
}

.accordion-icon {
    transition: transform 0.3s;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    /* ヘッダー */
    .header-wrapper {
        padding: 15px 0;
    }
    
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    nav.active {
        display: block;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    nav li {
        border-bottom: 1px solid #e5e7eb;
    }
    
    nav a {
        display: block;
        padding: 15px 20px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    /* グリッド */
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    /* ヒーロー */
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    /* フッター */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* セクション */
    section {
        padding: 40px 20px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 24px;
    }
}

/* ユーティリティクラス */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

.mt-40 {
    margin-top: 40px;
}

.highlight {
    color: #1e3a8a;
    font-weight: bold;
}

.badge {
    display: inline-block;
    padding: 5px 15px;
    background-color: #fee2e2;
    color: #dc2626;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

/* カレンダー予約システム */
.calendar-container {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-btn {
    background-color: #1e3a8a;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.calendar-btn:hover {
    background-color: #1e40af;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day-header {
    text-align: center;
    font-weight: bold;
    padding: 10px 5px;
    color: #1e3a8a;
}

.calendar-day {
    aspect-ratio: 1;
    border: 1px solid #e5e7eb;
    background-color: #fff;
    padding: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.calendar-day:hover:not(.disabled) {
    background-color: #f0f4ff;
    border-color: #1e3a8a;
}

.calendar-day.disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.calendar-day.selected {
    background-color: #1e3a8a;
    color: #fff;
    border-color: #1e3a8a;
}

.calendar-day-number {
    font-size: 14px;
    font-weight: 500;
}

.calendar-day-status {
    font-size: 10px;
    margin-top: 5px;
}

/* 時間選択 */
.time-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.time-slot {
    padding: 10px;
    text-align: center;
    border: 1px solid #e5e7eb;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 5px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.time-slot:hover:not(.disabled) {
    background-color: #f0f4ff;
    border-color: #1e3a8a;
}

.time-slot.disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.time-slot.selected {
    background-color: #1e3a8a;
    color: #fff;
    border-color: #1e3a8a;
}

/* 予約選択リスト */
.reservation-selections {
    background-color: #e0f2fe;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.reservation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #fff;
    border-radius: 5px;
    margin-bottom: 10px;
}

.reservation-item button {
    background-color: #dc2626;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.reservation-item button:hover {
    background-color: #b91c1c;
}

/* スマホ対応（予約ページ特化） */
@media (max-width: 768px) {
    /* カレンダー */
    .calendar-container {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .calendar-header {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .calendar-header h3 {
        font-size: 18px;
        margin: 0;
    }
    
    .calendar-nav {
        justify-content: center;
    }
    
    .calendar-btn {
        padding: 10px 20px;
        font-size: 16px;
    }
    
    .calendar-grid {
        gap: 1px;
        font-size: 12px;
    }
    
    .calendar-day-header {
        padding: 8px 2px;
        font-size: 12px;
    }
    
    .calendar-day {
        padding: 2px;
        min-height: 50px;
        font-size: 11px;
        -webkit-tap-highlight-color: rgba(30, 58, 138, 0.2);
        touch-action: manipulation;
    }
    
    .calendar-day-number {
        font-size: 13px;
        font-weight: 600;
    }
    
    .calendar-day-status {
        font-size: 9px;
        margin-top: 2px;
    }
    
    /* 時間選択 */
    .time-slots {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 15px;
    }
    
    .time-slot {
        padding: 12px 8px;
        font-size: 14px;
        -webkit-tap-highlight-color: rgba(30, 58, 138, 0.2);
        touch-action: manipulation;
        min-height: 48px; /* iOSの推奨タップサイズ */
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }
    
    /* 予約選択リスト */
    .reservation-selections {
        padding: 15px;
        margin-top: 20px;
    }
    
    .reservation-selections h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .reservation-item {
        padding: 12px;
        font-size: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .reservation-item button {
        align-self: flex-end;
        padding: 6px 12px;
    }
    
    /* フォーム全体 */
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 5px;
    }
    
    input[type="text"],
    input[type="email"], 
    input[type="tel"],
    textarea,
    select {
        font-size: 16px; /* iOS のズーム防止 */
        padding: 12px;
        border-radius: 8px;
    }
    
    textarea {
        min-height: 100px;
    }
    
    /* ボタン */
    .btn {
        padding: 12px 24px;
        font-size: 16px;
        border-radius: 8px;
        width: 100%;
        margin-top: 10px;
    }
    
    /* セクション調整 */
    section {
        padding: 30px 0;
        margin-bottom: 20px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* 予約ページ専用のスマホレイアウト */
    .grid.grid-2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* 予約フローをよりコンパクトに */
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    /* 予約フォーム専用のスマホ調整 */
    #form-section h2 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    /* カード */
    .card {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    /* 予約の流れ */
    .grid.grid-3 .card {
        text-align: center;
        padding: 15px;
    }
    
    .grid.grid-3 .card h3 {
        font-size: 36px;
        margin-bottom: 5px;
    }
    
    .grid.grid-3 .card h4 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .grid.grid-3 .card p {
        font-size: 13px;
        line-height: 1.5;
    }
    
    /* サービスカードのスマホ対応 */
    .service-card {
        padding: 16px;
        margin-bottom: 15px;
    }
    
    .service-card h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .service-card p {
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 10px;
    }
    
    .service-card .highlight {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    /* サービスカード詳細のスマホ対応 */
    .service-card-icon {
        font-size: 14px;
    }
    
    .service-card-detail h4 {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .service-card-detail li {
        font-size: 12px;
        padding: 2px 0;
        padding-left: 10px;
        margin-bottom: 3px;
    }
    
    /* コンパクトテキストセクションのスマホ対応 */
    .compact-text-section h2 {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .compact-text-section h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .compact-text-section p {
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 10px;
    }
}