/* リセット設定 */
html {
  font-size: 16px;
  font-family: sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0 0 0 0;
}
p, li, td {
  line-height: 1.7;
}
a:link {
  color: #306030;
  text-decoration: none;
}
a:visited {
  color: #306030;
  text-decoration: none;
}
a:hover {
  color: #306030;
  text-decoration: underline;
}
a:active {
  color: #306030;
  text-decoration: underline;
}
img {
  max-width: 100%;
}

/* すべてのページに適用 - ヘッダー */
.logo {
  text-align: center;
}
.header {
  padding-top: 80px;
  background-image: url(../images/top.jpg);
  background-repeat: repeat-x;
}
.nav ul {
  margin: 30px 0 0 0;
  padding: 0;
  list-style-type: "≫";
  color: #306030;
  display: flex;
  justify-content: center;
  gap: 40px;
}
.nav a:link {
  color: #306030;
}
.nav a:visited {
  color: #306030;
}
.nav a:hover {
  text-decoration: none;
}
.nav a:active {
  text-decoration: none;
}
.dropdown {
  position: relative;
}
.nav .dropdown-menu {
  margin: 0;
  padding: 10px 0;
  display: none; 
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  background: #fff8f0;
  font-size: 0.9rem;
  padding: 10px 0;
  list-style-type: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 8px;
  min-width: 100px;
  flex-direction: column;
  animation: fadeIn 0.3s ease forwards;
  z-index: 1000;
}
.dropdown:hover .dropdown-menu {
  display: block;
}
.dropdown-menu li a {
  display: block;
  padding: 8px 20px;
  color: #333;
  text-decoration: none;
  transition: background 0.2s;
}
.dropdown-menu li a:hover {
  background-color: #f0eae2;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* すべてのページに適用 - ヒーロー */
.hero {
  padding: 137px 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  text-align: center;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5); /* 文字が背景に埋もれないように */
}
.hero.index {
  aspect-ratio: 16 / 9;
  background-image: url(../images/image1.jpeg);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-image 1s ease-in-out;
  display: block;
  text-align: center;
}
.hero.access {
  background-image: url(../images/accesshero.jpeg);
}
.hero.animals {
  background-image: url(../images/animalshero.jpeg);
}
.hero.faq {
  background-image: url(../images/faqhero.jpeg);
}
.hero.contact {
  background-image: url(../images/faqhero.jpeg);
}
.hero.nekocafe {
  background-image: url(../images/nekocafe.jpeg);
}
.hero.productsintroduction {
  background-image: url(../images/billboard.png);
}

/* すべてのページに適用 - メイン */
main {
  margin: 50px auto 50px auto;
  max-width: 1000px;
}
main h2 {
  margin: 60px 0 20px 0;
  border-bottom: 2px solid #306030;
  padding: 0 0 5px 0;
  color: #306030;
  font-size: 1.3rem;
}

/* すべてのページに適用 - トップへ戻る */
.gotop {
  position: fixed;
  bottom: 300px;
  right: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 1000;
}
.gotop.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* すべてのページに適用 - フッター */
.copyright {
  margin-top: 20px;
  margin-bottom: 0;
  padding-top: 75px;
  padding-bottom: 75px;
  background-color: #306030;
  color: #FFFFFF;
  text-align: center;
  padding-top: 80px;
  background-image: url(../images/top.jpg);
  background-repeat: repeat-x;
}

/* 各ページのスタイル */
/* index.html */
.animal-land-cat-room {
  text-align: center;
}
#banner {
  cursor: pointer;
}
.banner {
  text-align: center;
  color: #306030;
}
.shop-info {
  border-collapse: collapse;
  margin: 80px auto;
}
.shop-info th, .shop-info td {
  border: 1px solid #DBDBDB;
  padding: 20px;
}
.shop-info th {
  width: 112px;
  text-align: left;
  vertical-align: top;
}
.shop-flex {
  display: flex;
  align-items: flex-start;
  gap: 20px; /* テーブルと画像の間の余白 */
}
.billboard img {
  margin: 50px;
  max-width: 500px;
  height: auto;
  border-radius: 500px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* animals.html */
#kittens, #puppies, #rabbits, #reptiles {
  margin: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}
.kitten, .puppy, .rabbit, .snake, .lizard {
  border-radius: 20px;
  overflow: hidden;
  background-color: #F5E8C7;
  border: 1px solid #818181;
  text-align: center;
  font-size: large;
  font-family: sans-serif;
  color: #306030;
}

/* nekocafe.html */
.gacha {
  text-align: center;
  color: #306030;
}
.cats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}
.cat {
  max-height: 480px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #818181;
}
.cat.cafemenu {
  max-height: 200px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #818181;
}
.h2nekocafe {
  text-align: center;
  font-size: 20px;
  font-family: sans-serif;
  color: #306030;
}

/* ネコカード */
.catroom-cast-heading {
  text-align: center;
  font-size: 60px;
  font-family: sans-serif;
  color: #306030;
}
.cat-gacha {
  text-align: center;
  padding: 3em 1em;
  background: #fef9f5;
}
.cat-gacha-heading {
  font-size: 1.8em;
  margin-bottom: 1em;
  color: #4d3f3f;
}
.gacha-container {
  position: relative;
  display: inline-block;
  perspective: 1000px;
}
.gacha-card {
  width: 250px;
  height: 350px;
  margin: 0 auto 1em;
}
.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}
.card-inner.flipped {
  transform: rotateY(180deg);
}
.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}
.card-back {
  background-color: #F5E8C7;
  display: flex;
  align-items: center;
  border: 30px solid #306030;
  justify-content: center;
}
.card-back img {
  width: 80%;         
  height: auto;      
  margin: 0 auto;     
  display: flex;
  padding: 1.5em 0;   
  object-fit: contain;
}
.card-front {
  background: #fff;
  transform: rotateY(180deg);
}
.card-front img {
  width: 100%;
  height: auto;
}
.card-name {
  margin: 0.5em;
  font-weight: bold;
  color: #5b4444;
}
.gacha-button {
  background-color: #385544;
  color: #ffffff;
  border: none;
  padding: 0.8em 1.5em;
  border-radius: 8px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.3s;
}
.gacha-button:hover {
  background-color: #ced09a;
  color: #385544;
}

/* products.html */
#products {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}
.product {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #818181;
  text-align: center;
  font-size: large;
  font-family: serif;
  color: #306030;
}
.h2products {
  text-align: center;
  font-size: 20px;
  font-family: sans-serif;
  color: #306030;
}

/* faq.html */
.faq-item {
  border-bottom: 1px solid #ccc;
  padding: 10px 0;
  color: #306030;
  cursor: pointer;
}
.faq-answer {
  display: none;
  padding: 5px 0 15px;
  color: #309030;
  font-size: 0.95rem;
  line-height: 1.6;
}
.faq-item.open .faq-answer {
  display: block;
}
form {
  margin: 0 auto;
  max-width: 640px;
}
input[type="text"], textarea {
  border-top-left-radius: 10px; /* 左上の角を丸くする */
  border-bottom-right-radius: 10px; /* 右下の角を丸くする */
  padding: 6px;
  border: 1px solid #818181;
  width: 100%;
  font-size: 1rem;
}
textarea {
  height: 140px;
}
.submit {
  text-align: center;
}
input[type="submit"] {
  border-top-left-radius: 10px; /* 左上の角を丸くする */
  border-bottom-right-radius: 10px; /* 右下の角を丸くする */
  padding: 20px;
  border: 1px solid #818181;
  width: 200px;
  background-color: #306030;
  color: #FFFFFF;
  font-size: 1.5rem;
}

/* モバイル対応 */
@media(max-width: 767px) {
  .nav ul {
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.9rem;
    padding: 0 10px;
    gap: 20px;
  }
  main {
    padding: 0 4%;
  }
  h2 {
    padding: 0 4%;
  }
  .dropdown-menu {
    position: static;
    display: none;
  }
  .dropdown.open .dropdown-menu {
     display: block;
  }

  /* index.html */
  .hero.index {
    padding: 5vh 0;
  }
  .shop-flex {
    flex-direction: column;
    align-items: center;
  }

  .billboard img {
    margin: 0;
    max-width: 100%;
    height: auto;
    border-radius: 50px;
  }

  /* animals.html */
  #kittens, #puppies, #rabbits, #reptiles {
    grid-template-columns: 1fr 1fr;
  }
  .kitten, .puppy, .rabbit, .snake, .lizard {
    font-size: 50%;
  }

  /* nekocafe.html */
  .cats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* products.html */
  #products {
    font-size: 50%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
