/* テンプレート用スタイル */

/* 見出し付きグレーボックス */
.template-heading-box {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #007bff;
}

.template-heading {
    color: #007bff;
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

.template-content {
    color: #495057;
    line-height: 1.6;
}

/* infoアイコン付き見出しボックス */
.template-info-box {
    background-color: #e3f2fd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #bbdefb;
}

.template-heading-info {
    color: #0d47a1;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.template-icon-info {
    font-size: 1.2rem;
}

/* 枠なしグレーボックス */
.template-simple-box {
    background-color: #f8f9fa;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

/* 枠ありグレーボックス */
.template-border-box {
    background-color: #f8f9fa;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

/* ボタン共通スタイル */
.template-anchor-btn,
.template-link-btn,
.template-link-btn-blank,
.template-file-btn,
.template-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 10px 0;
}

.template-anchor-btn:hover,
.template-link-btn:hover,
.template-link-btn-blank:hover,
.template-file-btn:hover,
.template-pdf-btn:hover {
    background-color: #0056b3;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

/* ファイル用ボタンの色を変更 */
.template-file-btn {
    background-color: #28a745;
}

.template-file-btn:hover {
    background-color: #1e7e34;
}

.template-pdf-btn {
    background-color: #dc3545;
}

.template-pdf-btn:hover {
    background-color: #c82333;
}

/* アンカーボタンの色を変更 */
.template-anchor-btn {
    background-color: #17a2b8;
}

.template-anchor-btn:hover {
    background-color: #117a8b;
}

/* 新しいタブボタンの色を変更 */
.template-link-btn-blank {
    background-color: #6c757d;
}

.template-link-btn-blank:hover {
    background-color: #545b62;
}

.btn-text {
    font-weight: 500;
}

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

/* ==============================================
   新しいレイアウトテンプレート用スタイル
   ============================================== */

/* 4列グリッドレイアウト */
.template-grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.template-grid-4col .grid-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.template-grid-4col .spec-header {
    background-color: #007bff;
    color: white;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 2rem;
    text-align: center;
}

.template-grid-4col .spec-content {
    padding: 15px;
}

.template-grid-4col .spec-content p {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.4;
}

/* 3列グリッドレイアウト */
.template-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 20px 0;
}

.template-grid-3col .grid-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.template-grid-3col .content-block h4 {
    color: #007bff;
    margin: 0 0 12px 0;
    font-size: 2rem;
    font-weight: 600;
}

.template-grid-3col .content-block p {
    margin: 0;
    color: #495057;
    line-height: 1.5;
}

/* 2列グリッドレイアウト（等幅 1:1） */
.template-grid-2col-equal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px 0;
}

.template-grid-2col-equal .grid-item {
    background: #f8f9fa;
    border-left: 4px solid #28a745;
    padding: 20px;
    border-radius: 0 8px 8px 0;
}

.template-grid-2col-equal .content-block h4 {
    color: #28a745;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.template-grid-2col-equal .content-block p {
    margin: 0;
    line-height: 1.5;
}

/* 2列グリッドレイアウト（2:1比率） */
.template-grid-2col-21 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin: 20px 0;
}

.template-grid-2col-21 .grid-item-large {
    background: white;
    border: 2px solid #17a2b8;
    border-radius: 8px;
    padding: 25px;
}

.template-grid-2col-21 .grid-item-small {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 20px;
}

.template-grid-2col-21 .content-block h4 {
    margin: 0 0 12px 0;
    font-weight: 600;
}

.template-grid-2col-21 .grid-item-large .content-block h4 {
    color: #17a2b8;
    font-size: 2rem;
}

.template-grid-2col-21 .grid-item-small .content-block h4 {
    color: #0d47a1;
    font-size: 2rem;
}

/* 2列グリッドレイアウト（3:1比率） */
.template-grid-2col-31 {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 25px;
    margin: 20px 0;
}

.template-grid-2col-31 .grid-item-major {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 25px;
}

.template-grid-2col-31 .grid-item-minor {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
}

.template-grid-2col-31 .content-block h4 {
    margin: 0 0 12px 0;
    font-weight: 600;
}

.template-grid-2col-31 .grid-item-major .content-block h4 {
    color: #856404;
    font-size: 2rem;
}

.template-grid-2col-31 .grid-item-minor .content-block h4 {
    color: #495057;
    font-size: 2rem;
}

/* スペック表テンプレート */
.template-spec-table {
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.template-spec-table .spec-title {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    margin: 0;
    padding: 20px 25px;
    font-size: 2rem;
    font-weight: 600;
}

.template-spec-table .spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0;
}

.template-spec-table .spec-category {
    border-right: 1px solid #dee2e6;
}

.template-spec-table .spec-category:last-child {
    border-right: none;
}

.template-spec-table .spec-category-header {
    background-color: #e9ecef;
    padding: 15px 20px;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
}

.template-spec-table .spec-item {
    display: flex;
    border-bottom: 1px solid #f1f3f4;
}

.template-spec-table .spec-label {
    background-color: #f8f9fa;
    padding: 12px 15px;
    font-weight: 500;
    color: #495057;
    width: 40%;
    border-right: 1px solid #dee2e6;
}

.template-spec-table .spec-value {
    padding: 12px 15px;
    color: #212529;
    width: 60%;
}

/* 価格表・比較表テンプレート */
.template-price-table {
    margin: 20px 0;
    overflow-x: auto;
}

.price-comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 1.5rem;
}

.price-comparison-table th {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 15px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 2rem;
}

.price-comparison-table .model-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    min-width: 150px;
}

.price-comparison-table .price-header {
    background: linear-gradient(135deg, #dc3545, #c82333);
    min-width: 120px;
}

.price-comparison-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.price-comparison-table .model-cell {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #007bff;
    border-right: 2px solid #dee2e6;
}

.price-comparison-table .spec-cell {
    text-align: center;
    color: #495057;
}

.price-comparison-table .price-cell {
    background-color: #fff5f5;
    text-align: center;
    font-weight: 600;
    color: #dc3545;
    border-left: 2px solid #dee2e6;
}

.price-comparison-table tbody tr:hover {
    background-color: #f1f3f4;
}

/* レスポンシブ対応 */
@media (max-width: 992px) {
    .template-grid-4col {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .template-grid-3col {
        grid-template-columns: 1fr;
    }
    
    .template-grid-2col-equal,
    .template-grid-2col-21,
    .template-grid-2col-31 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .template-grid-4col {
        grid-template-columns: 1fr;
    }
    
    .template-spec-table .spec-grid {
        grid-template-columns: 1fr;
    }
}