/* ===== 基本 ===== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: sans-serif;
    line-height: 1.6;
}

/* ===== ヘッダー ===== */
.hero {
    position: relative;
    background-image: url("images/a.jpg");
    background-size: cover;
    background-position: center;
    height: 180px;

    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
}

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

/* ===== ナビ ===== */
.tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid #ddd;
    background: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.tabs a {
    padding: 14px 20px;
    text-decoration: none;
    color: #555;
    white-space: nowrap;
}

.tabs a.active {
    color: black;
    border-bottom: 3px solid black;
}

/* ===== メイン ===== */
.main {
    display: flex;
    padding: 60px;
    align-items: center;
}

/* 左 */
.text {
    width: 50%;
}

.text h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.text p {
    line-height: 1.8;
}

.text button {
    margin-top: 20px;
    padding: 12px 20px;
    background: white;
    border: 1px solid #333;
    cursor: pointer;
}

/* 右 */
.image {
    width: 50%;
}

.image img {
    width: 100%;
    border-radius: 5px;
}

/* メイン画像だけ制御（ここ重要） */
.image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== 記事一覧 ===== */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 40px;
}

.card {
    text-decoration: none;
    color: black;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    transition: 0.2s;
    background: white;
}

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

.card img {
    width: 100%;
    display: block;
}

.card-content {
    padding: 15px;
}

/* ===== 記事ページ ===== */
.article {
    max-width: 800px;
    margin: auto;
    padding: 20px;
}

/* 本文画像だけ小さく制限（暴走防止） */
.article img {
    width: 100%;
    max-width: 600px;
    display: block;
    margin: 20px auto;
}

/* ===== 下部 ===== */
.info {
    padding: 60px;
    text-align: center;
}

.profile-link {
    padding: 60px;
    text-align: center;
    background: #f9f9f9;
}

.profile-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 20px;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.footer {
    text-align: center;
    padding: 40px;
    background: #f5f5f5;
}

/* ===== スマホ ===== */
@media (max-width: 800px) {

    .main {
        flex-direction: column;
        padding: 20px;
    }

    .cards {
        grid-template-columns: 1fr;
    }
}