* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: sans-serif;
    background: #f5f5f5;
    color: #222;
}

a {
    text-decoration: none;
    color: inherit;

}

/* ヘッダー */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 15px 40px;

    background: white;

    border-bottom: 1px solid #ddd;

    position: sticky;
    top: 0;

    z-index: 1000;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
}

nav ul {
    display: flex;
    gap: 40px;
    list-style: none;
}

nav a {
    text-decoration: none;
    color: #222;
    font-weight: bold;
}

/* メインビジュアル */

.hero {

    position: relative;

    height: 600px;

    background-image: url("../images/hero.jpg");
    background-size: cover;
    background-position: center;
}

.hero::before {

    content: "";

    position: absolute;

    inset: 0;

    background: rgba(0, 0, 0, 0.4);
}

.hero-content {

    position: relative;

    z-index: 1;

    color: white;
}

/* 共通 */

section {
    padding: 100px 10%;
    text-align: center;
}

h1 {
    font-size: 4rem;
    margin-bottom: 20px;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

p {
    line-height: 1.8;
}

/* ボタン */

.btn {
    display: inline-block;

    margin-top: 30px;

    padding: 12px 40px;

    border: 1px solid #222;

    text-decoration: none;

    color: #222;

    transition: .3s;
}

.btn:hover {
    background: #222;
    color: white;
}

/* レイアウト */

.layout-container {
    display: flex;
    justify-content: center;
    gap: 50px;

    margin-top: 50px;

    flex-wrap: wrap;
}

.card {
    width: 280px;

    transition: 0.3s;
}

.card:hover {
    transform: translateY(-10px);
}

.card-image {
    height: 220px;
    width: 100%;
    object-fit: cover;
    /* 画像の比率を保ったままトリミング表示 */
    vertical-align: bottom;
    /* 画像下の不要な隙間を消す */
}

.card-info {
    background: black;
    color: white;
    padding: 20px;
    text-align: left;
}

.more {
    text-align: right;
    margin-top: 30px;
}

.more a {
    text-decoration: none;
    color: #222;
    font-weight: bold;
}

/* フッター */

footer {
    background: #d9d9d9;

    padding: 40px;

    text-align: center;

    margin-top: 100px;
}

/* TOPへ戻るボタン */

#topBtn {

    position: fixed;

    bottom: 30px;
    right: 30px;

    width: 50px;
    height: 50px;

    border: none;

    border-radius: 50%;

    background: #222;

    color: white;

    font-size: 20px;

    cursor: pointer;

    opacity: 0;
    visibility: hidden;

    transition: 0.3s;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);

}

#topBtn:hover {
    opacity: 0.8;
}

.page-title {
    padding: 80px 10% 40px;
    text-align: center;
}

.about-box {

    width: 70%;

    margin: 40px auto;

    background: white;

    padding: 40px;

    border-radius: 15px;

    box-shadow: 0 5px 15px rgba(0, 0, 0, .08);

    text-align: left;

}

.about-box h2 {

    margin-bottom: 20px;

    border-left: 5px solid #222;

    padding-left: 15px;

}

.about-box p {

    line-height: 2;

}

.about-box ul {

    margin-left: 20px;

    line-height: 2;

}

/* レイアウト一覧 */

.layout-grid {

    width: 90%;

    margin: 60px auto;

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));

    gap: 40px;

}

.layout-card {

    background: white;

    border-radius: 15px;

    overflow: hidden;

    box-shadow: 0 5px 15px rgba(0, 0, 0, .1);

    transition: .3s;

}

.layout-card:hover {

    transform: translateY(-8px);

}

.layout-card img {

    width: 100%;

    height: 230px;

    object-fit: cover;

}

.layout-text {

    padding: 25px;

}

.layout-text h2 {

    margin-bottom: 15px;

    font-size: 24px;

}

.layout-text p {

    margin-bottom: 8px;

}

/* 詳細ページ */

.detail-image {

    width: 80%;

    margin: 40px auto;

}

.detail-image img {

    width: 100%;

    border-radius: 15px;

}

.detail-box {

    width: 80%;

    margin: 40px auto;

    background: white;

    padding: 35px;

    border-radius: 15px;

    box-shadow: 0 5px 15px rgba(0, 0, 0, .08);

}

.detail-box h2 {

    margin-bottom: 20px;

    border-left: 5px solid #222;

    padding-left: 15px;

}

.detail-box table {

    width: 100%;

    border-collapse: collapse;

}

.detail-box th {

    width: 180px;

    background: #f3f3f3;

}

.detail-box th,
.detail-box td {

    border: 1px solid #ddd;

    padding: 15px;

}

.detail-box ul {

    margin-left: 20px;

    line-height: 2;

}

.detail-box p {

    line-height: 2;

}

/* 初心者ガイド */

.guide-container {

    width: 90%;

    margin: 60px auto;

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));

    gap: 30px;

}

.guide-card {

    background: white;

    padding: 30px;

    border-radius: 15px;

    box-shadow: 0 5px 15px rgba(0, 0, 0, .08);

    transition: .3s;

}

.guide-card:hover {

    transform: translateY(-8px);

}

.guide-card h2 {

    margin-bottom: 15px;

    border-left: 5px solid #222;

    padding-left: 12px;

    font-size: 22px;

}

.guide-card p {

    line-height: 2;

}