/* style.css */

@charset "UTF-8";

main {
  font-family: sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  color: #333;
  min-height: 100vh;
  width: 100%;
}

/*-------------------------------------------
helloworld
-------------------------------------------*/
.sub-heading {
    color: #0077a8;
    font-size: 50px;
    font-weight: bold;
    text-align: center;
}

/*-------------------------------------------
card
-------------------------------------------*/
.container {
    padding: 20px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.card-image {
    width: 100%;
    padding-bottom: 60%;
    background-color: #cccccc;
    border-radius: 8px 8px 0 0;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 20px;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #333333;
}

.card-description {
    font-size: 13px;
    color: #333333;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ボタン */
.btn-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.round-button {
    position: relative;
    display: block;  
    width: 200px;
    height: 40px;
    margin: 40px auto 0; 
    background-color: #ffffff;
    color: #333333;
    font-weight: bold;
    font-size: 16px;
    border: 1px solid #333333;
    border-radius: 20px;
    cursor: pointer;
    padding: 0 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.round-button:hover {
    background-color: #333333;
    color: #ffffff;
}

.btn-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.btn-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}


/*-------------------------------------------
recipe(pc)
-------------------------------------------*/

.recipe-container{
  display: flex;
  align-items: flex-end;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 60px;
  margin-bottom: 60px;
}

.image-section {
    width: 50%;
}

.image-section img {
    width: 100%;
    height: 880px;
    object-fit: cover;
    vertical-align: bottom;
}

.content-section {
    flex: 1;
    padding: 0 60px;
}

.recipe-header {
    margin-bottom: 40px;
}

.recipe-header h2 {
    font-size: 2.2rem;
    font-weight: normal;
    margin-bottom: 10px;
}

.recipe-header p {
    color: #666;
}

.ingredients {
    margin-bottom: 40px;
}

.ingredients h3, .instructions h3 {
    font-size: 1.4rem;
    font-weight: normal;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
    margin-bottom: 20px;
}

.ingredients ul, .instructions ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ingredients li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}

.instructions ol {
    list-style-type: decimal; 
    padding-left: 20px;
    margin: 0;
}

.instructions ol li {
    margin-bottom: 15px;
    line-height: 1.2;
    padding-bottom: 15px; 
    border-bottom: 1px dashed #ddd; 
}

.instructions ol li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/*-------------------------------------------
recipe Button
-------------------------------------------*/
.recipe-list-btn-container {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 40px;
} 

.recipe-list-btn {
    display: inline-block;
    border: solid 1px #2b2a27;
    font-size: 0.875rem;
    padding: 18px 60px;
    text-decoration: none;
    color: #2b2a27;
    transition: all 0.3s;
}

.recipe-list-btn:hover {
    opacity: 0.8;
}

/*-------------------------------------------
footer
-------------------------------------------*/
footer {
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
}

.social-links li a {
    text-decoration: none;
    color: #666;
    margin: 0 10px;
}

.social-links li a:hover {
    text-decoration: underline;
}

footer p {
    font-size: 0.9rem;
    color: #999;
}

/* -------------------------------------- */
/* SP版（画面幅768px以下で適用） */
/* -------------------------------------- */
@media (max-width: 768px) {
    .recipe-container {
        flex-direction: column;
    }

    .image-section {
        width: 100%; 
    }

    .content-section {
        padding: 40px 20px; 
    }

    .image-section img {
        height: auto; /* 高さをコンテンツに合わせる */
    }

    /* 各要素の余白調整 */
    .recipe-header {
        margin-bottom: 20px;
    }

    .ingredients, .instructions {
        margin-bottom: 20px;
    }

    .recipe-list-btn-container {
    margin-top: 10px; 
    margin-bottom: 40px;
}
    
    footer {
        padding-top: 20px;
    }
}

/*-------------------------------------------
table
-------------------------------------------*/

.table {
    width: 100%;
    max-width: 600px;
    margin:  auto;  
    margin-top: 60px; 
    margin-bottom: 40px;
    text-align: center;
    border-collapse: collapse;
    border-spacing: 0;
    color: #353535;
}

.table thead {
    background: #87cefa;
}

.table th,
.table td {
    border: 1px solid #ccc;
    padding: 10px;
}

.table tr:nth-child(even) td {
    background-color: #f5f5f5
}

/*-------------------------------------------
ブロック交互デザイン
-------------------------------------------*/
.container {
  max-width: 1200px;   /* 横幅を1200pxに制限 */
  margin: 0 auto;      /* 中央寄せ */
  padding: 0 20px;     /* 画面が狭いとき用に左右に余白 */
}

.box {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;

  width: 100%;         
  padding: 60px 0;     /* 上下の余白 */
  box-sizing: border-box;
}

.box .text h3 {
  font-size: 2rem;     /* 見出しを大きくする */
  font-weight: bold;   /* 太字に */
  margin-bottom: 15px; /* 下に余白をつける */
}

.box .text {
  flex: 1;
}

.box .pict {
  flex: 1;
}

/* ダミー画像エリア */
.box .dummy {
  background-color: #ccc;
  width: 90%;          /* ← 80% → 90% に拡大 */
  max-width: 500px;    /* ← 最大幅を少し大きく */
  aspect-ratio: 16 / 9;
  margin: 0 auto;
}

/* 偶数番目は左右を逆に */
.box:nth-child(even) {
  flex-direction: row-reverse;
  background-color: #f0f0f0; /* 背景グレー */
}

/* --- レスポンシブ --- */
@media screen and (max-width: 768px) {
  .box {
    flex-direction: column;    /* 縦並び */
    align-items: stretch;
  }
  /* 並び順を強制：画像→テキスト */
  .box .pict { order: 1; }
  .box .text { order: 2; margin-top: 15px; }

  /* 偶数ボックスの左右反転指定を無効化（縦並びなので不要） */
  .box:nth-child(even) { flex-direction: column; }
}
