@charset "UTF-8";

:root {
  --color-white: #ffffff;
  --color-black: #000000;
  --color-green: #236933;
  --color-hover-green: #339149;
  --color-beige: #c4b093;
}

html {
  font-size: 100%;
  scroll-padding-top: calc(83px + 2rem);
}
body {
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 700;
  font-style: normal;
}

h1,
h2,
h3,
h4 {
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 700;
  font-style: normal;
}

h3 {
  margin-top: 2rem;
  margin-bottom: 3rem;
  text-align: center;
}
h3::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-hover-green);
  margin: 10px auto;
}
img {
  width: 100%;
}
h1 {
  margin: 0;
  line-height: 0.5;
}
.card {
  width: 100%;
  overflow: hidden;
}

/*=================================
Header
=================================*/
.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.navbar-toggler {
  border: none;
}
.navbar {
  background: #c4b093;
  border-bottom: 2px solid #605749;
  color: green;
}
.navbar-nav {
  margin-left: auto;
  gap: 0.6rem;
}
.navbar-nav .nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.2rem;
}
.navbar a {
  color: #2d271f;
  font-size: 1.5rem;
}
.navbar a:hover {
  color: var(--color-white);
}
.nav-link i {
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}
.nav-link span {
  font-size: 0.8rem;
}

.head-form {
  max-width: 300px;
  display: flex;
  padding: 0;
  overflow: hidden;
}
.head-form input {
  flex-grow: 1;
  padding: 0.4rem 1rem;
}
.head-form button {
  background: #c4b09366;
  padding: 0.2rem 1rem;
  border-radius: 5px;
}

.hero-section,
.category-section,
.recipe-section,
.share-container,
.share-member,
.add-page,
.member-section,
.share-page .alert,
.login-section,
.newac-section {
  margin-top: calc(83px + 2rem);
}

/*=================================
Hero Section 
=================================*/
.hero-section {
  position: relative;
}
.hero-section .mv {
  display: flex;
}
.main-text {
  margin-left: clamp(0.8rem, 5vw, 1.5rem);
}
.main-text h2 {
  margin-top: clamp(3rem, 5vw, 1.5rem);
  margin-bottom: clamp(0.75rem, 2.5vw, 1.75rem);
  font-size: clamp(1.2rem, 1.5vw + 1rem, 2.2rem);
  line-height: 1.4;
  max-width: 350px;
}
.main-text p {
  margin-bottom: clamp(0.75rem, 2.5vw, 2rem);
  font-size: clamp(0.7rem, 0.8vw + 0.4rem, 1rem);
  line-height: 1.6;
  max-width: 340px;
}
.main-text .add-btn {
  font-size: clamp(0.75rem, 0.6vw + 0.6rem, 1rem);
  padding: clamp(0.35rem, 0.5vw + 0.3rem, 0.625rem)
    clamp(0.75rem, 1.5vw + 0.5rem, 1.25rem);
}
.pen-area {
  position: relative;
  width: 300px;
  height: 150px;
  top: 7%;
  left: 30%;
}
.line {
  position: absolute;
  left: 20px;
  height: 3px;
  background-color: #c9ddc9;
  border-radius: 10px;
}
.line1 {
  width: 80px;
  top: 60px;
}
.line2 {
  width: 100px;
  top: 75px;
}
.line3 {
  width: 70px;
  top: 90px;
}
.pen-icon {
  position: absolute;
  font-size: 6rem;
  color: #c9ddc9;
  left: 130px;
}

/*=================================
Category Section 
=================================*/
/* .category-section .btn {
  outline: 1px solid #665747;
  color: #665747;
  margin-right: 0.6rem;
  padding: 0.4rem 1rem;
}
.category-section .btn:hover {
  background: #c4b09366;
  color: #000;
} */

/*=================================
Pick Section 
=================================*/
.pick-section .card img,
.recipe-section .card img {
  overflow: hidden;
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.pick-section h4,
.recipe-section h4 {
  font-size: 1.2rem;
  margin: 0.5rem 0.5rem;
}
.pick-section .recipe-comment,
.recipe-section .recipe-comment {
  font-size: 0.8rem;
  margin: 0 0.5rem 0.5rem 0.5rem;
}
.pick-section .small.text-muted,
.recipe-section .small.text-muted {
  font-size: 0.75rem;
  margin: 0 0.5rem 0.5rem 0.5rem;
}
.pick-section .list-btn {
  display: block;
  width: 200px;
  margin: 0 auto;
}
.recipe-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.heart-btn {
  font-size: 1.3rem;
  color: palevioletred;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.4rem;
}
.heart-count {
  font-size: 1rem;
}
.hero-section .add-btn,
.pick-section .list-btn {
  font-size: 1rem;
  padding: 0.5rem 0.8rem;
}

/*=================================
News Section 
=================================*/
.news-section h3 {
  margin-top: 8rem;
}
.news-block {
  margin-bottom: 5rem;
}
.news-item {
  display: flex;
  border-bottom: 1px solid #ccc;
  text-decoration: none;
  color: #000;
  max-width: 600px;
  padding: 20px;
  transition: background 0.3s;
  margin-left: auto;
  margin-right: auto;
}
.news-item:hover {
  background: #c4b09366;
}
.news-tag {
  background: var(--color-green);
  color: var(--color-white);
  padding: 2px 8px;
  margin-left: 2rem;
  margin-right: 1rem;
  border-radius: 5px;
  font-size: 0.8rem;
}

/*=================================
Footer
=================================*/
footer {
  text-align: center;
  background: var(--color-beige);
}
footer p {
  margin-bottom: 0;
  padding-top: 1rem;
  padding-bottom: 1rem;
  color: #2d271f;
}
.backtopbtn {
  font-size: 2.5rem;
  position: fixed;
  right: 1rem;
  bottom: 1rem;
}
.backtopbtn a {
  color: var(--color-green);
  opacity: 0.8;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
}

/*=================================
フォーム共通設定 
=================================*/
table th {
  vertical-align: middle;
}
table th,
table td {
  padding: 10px;
}

/*=================================
ボタン共通設定 
=================================*/
.hero-section .add-btn,
.pick-section .list-btn,
.add-section button {
  background: var(--color-green);
  color: var(--color-white);
}
.hero-section .add-btn:hover,
.pick-section .list-btn:hover,
.add-section button:hover {
  background: var(--color-hover-green);
  color: var(--color-white);
}

/*=================================
recipe.php
=================================*/
.recipe-link {
  margin: 0;
  text-decoration: none;
  color: inherit;
}
.recipe-card {
  transition: 0.3s;
  cursor: pointer;
}

/*=================================
recipe_detail.php
=================================*/
.recipe-detail-section {
  margin-top: 3.5rem;
}
.recipe-detail-section ul {
  list-style-type: disc;
}
.recipe-detail-section ol {
  list-style-type: decimal;
}
.recipe-detail-section li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
}
.btn-group {
  display: flex;
  justify-content: space-between;
  gap: 25rem;
}
.recipe-btns {
  display: flex;
  gap: 1rem;
}

/*=================================
add.php
=================================*/
.member-list {
  display: flex;
  justify-content: center;
  gap: 1rem;
  text-align: center;
}
.member-item {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 240px;
}
.form-content table {
  width: 100%;
}
.add-page form {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.add-page form button {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.add-page .form-content {
  margin: 0;
}
.add-page tr {
  display: block;
}
.add-page input,
.add-page textarea {
  margin: 10px 0;
}
.add-page .form-btn {
  margin-top: 3rem;
  outline: 1px solid var(--color-green);
  color: var(--color-green);
}
.add-page .form-btn:hover {
  background: var(--color-hover-green);
  color: var(--color-white);
}
.add-page .add-btn {
  width: 170px;
  background: var(--color-green);
  color: var(--color-white);
}
.add-page .add-btn:hover {
  background: var(--color-hover-green);
  color: var(--color-white);
}
.step-row {
  display: flex;
  align-items: center;
}
#addIngredient,
#addStep {
  display: block;
}
#ingredientArea input {
  margin-bottom: 1.4rem;
}
.step-row span {
  width: 1.5rem;
}

/*=================================
share.php & login.php
=================================*/
.share-group {
  width: 400px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.share-container p,
.login-container p {
  font-size: 0.9rem;
  margin-bottom: 3rem;
}
.login-container tr {
  padding-bottom: 1rem;
}
.login-container th {
  padding-right: 1rem;
}
.share-section input,
.newgr-section input,
.login-section input,
.newac-section input {
  width: 300px;
}
.share-container button,
.login-container button {
  margin-top: 3rem;
  background: var(--color-green);
  color: var(--color-white);
}
.share-container button:hover,
.login-container button:hover {
  background: var(--color-hover-green);
  color: var(--color-white);
}
.share-section,
.login-section {
  border-right: 1px solid #ccc;
}
.login-container .errors {
  color: red;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/*=================================
アクティブページ指定
=================================*/
.my-page .nav-item:first-child a {
  color: var(--color-green);
}
.top-page .nav-item:nth-child(2) a {
  color: var(--color-green);
}
.recipe-page .nav-item:nth-child(3) a {
  color: var(--color-green);
}
.add-page .nav-item:nth-child(4) a {
  color: var(--color-green);
}
.share-page .nav-item:nth-child(5) a {
  color: var(--color-green);
}
.login-page .nav-item:nth-child(6) a {
  color: var(--color-green);
}

/*=================================
animate.css アニメーション
=================================*/
.pen-icon {
  opacity: 0;
}
.pen-icon.is-active {
  opacity: 1;
  animation: fadeInLeft 3s;
}
.recipe-card,
.list-btn,
.news-section {
  opacity: 0;
  animation-fill-mode: forwards;
}
.recipe-card.is-active,
.list-btn.is-active,
.news-section.is-active {
  animation: fadeInUp 1s;
  opacity: 1;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 85%;
  }
  img {
    width: 100%;
  }
  .mv {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  .user-info {
    display: block;
    border-bottom: 2px solid #efefef;
    padding-bottom: 0.5rem;
  }
  .navbar .container {
    display: flex;
    justify-content: space-between;
    max-width: 768px;
    margin-left: 20px;
    margin-right: 20px;
  }
  .navbar-collapse {
    background: var(--color-white);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
  }
  .navbar-nav .nav-link {
    flex-direction: row;
    justify-content: center;
    text-align: center;
  }
  .nav-link i {
    text-align: center;
    padding-right: 1rem;
  }
  .nav-item {
    border-bottom: 1px solid #eee;
  }

  .hero-section,
  .category-section,
  .recipe-section,
  .share-container,
  .share-member,
  .add-page,
  .member-section,
  .share-page .alert,
  .login-section,
  .newac-section {
    margin-top: calc(47px + 2rem);
  }

  /*=================================
Hero Section
=================================*/
  .hero-section {
    margin-top: calc(47px);
  }
  .hero-section .card {
    border: none;
    border-radius: 0;
  }
  .hero-section .mv {
    order: 1;
    width: 100%;
  }
  .hero-section .container {
    padding-left: 0;
    padding-right: 0;
  }
  .hero-section .col-md-8 {
    width: 100%;
    max-width: 100%;
  }
  .hero-section .top-slide img {
    width: 100%;
    height: auto;
    display: block;
  }
  .hero-section .main-text {
    padding: 0;
    margin-left: 0;
    text-align: center;
    order: 2;
  }
  .main-text h2,
  .main-text p {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-section .add-btn {
    width: 100%;
    max-width: clamp(200px, 60vw, 280px);
    margin: 1rem auto;
  }
  .hero-section .pen-area {
    display: none;
  }
  .hero-section .add-btn {
    max-width: 200px;
  }

  /*=================================
Pickup Section & Recipe Section
=================================*/

  .pick-section .card,
  .recipe-section .card {
    width: 100%;
    max-width: none;
    margin: 0 0 1rem 0;
  }
  .pick-section .card img,
  .recipe-section .card img {
    width: 100%;
    height: 120px;
  }
  .pick-section h4,
  .recipe-section h4 {
    font-size: 0.9rem;
    margin: 0.35rem;
    line-height: 1.3;
  }
  .pick-section .recipe-comment,
  .recipe-section .recipe-comment {
    font-size: 0.75rem;
    margin: 0 0.35rem 0.35rem 0.35rem;
    line-height: 1.3;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .pick-section .small.text-muted,
  .recipe-section .small.text-muted {
    font-size: 0.65rem;
    margin: 0 0.35rem 0.35rem 0.35rem;
  }
  .recipe-content {
    padding: 0.35rem;
  }
  .heart-btn {
    font-size: 0.9rem;
    margin: 0.25rem;
    gap: 0.25rem;
  }
  .heart-count {
    font-size: 0.75rem;
  }
  .pick-section .recipe-card,
  .recipe-section .recipe-card {
    margin-bottom: 0.75rem !important;
  }

  /*=================================
News Section
=================================*/
  .news-section {
    padding: 0 1rem;
  }
  .news-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
  .news-title {
    width: 100%;
    margin-top: 0.5rem;
  }

  /* add-page */
  .add-page form {
    max-width: 250px;
    margin-left: auto;
    margin-right: auto;
  }

  .share-section input,
  .newgr-section input,
  .login-section input,
  .newac-section input {
    width: 200px;
  }
  .share-section,
  .login-section {
    border: none;
  }
  .share-page .alert {
    max-width: 250px;
    margin-bottom: -6rem;
    margin-left: auto;
    margin-right: auto;
  }
  .share-section {
    margin-bottom: 3rem;
  }

  /*=================================
Footer
=================================*/
  footer {
    width: 100%;
  }
  .backtopbtn {
    right: 10%;
  }

  /*=================================
recipe.php
=================================*/
  .pick-section .pick-grid,
  .recipe-section .recipe-grid {
    margin-left: 5px;
    margin-right: 5px;
  }
}

@media (max-width: 480px) {
  html {
    max-width: 480px;
    font-size: 85%;
    overflow-x: hidden;
  }
  body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }
  .hero-section .mv {
    width: 100%;
  }
  .slick-next {
    visibility: hidden;
  }
  .card {
    overflow: visible;
  }

  .pick-section h4 {
    margin-top: 0.8em;
    margin-left: 0.7rem;
    font-weight: 700;
  }
  .pick-section .recipe-comment {
    font-size: 0.65rem;
  }
  .pick-section .card img,
  .recipe-section .card img {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
  }
  .my-page .member-list {
    flex-direction: column;
    align-items: center;
  }
  .recipe-detail-section .btn-group {
    gap: 1rem;
  }
}
