/* General Page Styles */
body {
  font-family: "Comic Sans MS", cursive, sans-serif;
  background-color: #fefbd8;
  margin: 0;
  padding: 0;
}

h1 {
  text-decoration: underline;
}

header {
  background-color: #ffb6c1;
  text-align: center;
  padding: 20px;
  border-bottom: 3px solid #ff69b4;
}

/* Navigation Bar */
.navbar {
  background-color: #add8e6;
  padding: 10px 0;
  text-align: center;
  border-bottom: 3px solid #87ceeb;
}

.navbar ul,
.nav-links {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.navbar li,
.nav-links li {
  display: inline;
  margin: 0 20px;
}

.navbar a,
.nav-links a {
  text-decoration: none;
  font-size: 1.1em;
  color: #333;
  font-weight: bold;
  background-color: #ffe4b5;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background-color 0.3s;
}

.navbar a:hover,
.nav-links a:hover {
  background-color: #ffcccb;
}

/* Homepage Recipe Links */
.link-container {
  padding: 30px;
  text-align: center;
}

.link-container h2 {
  color: #ff4500;
  margin-bottom: 20px;
}

.link-container ul {
  list-style-type: none;
  padding: 0;
}

.link-container li {
  margin: 15px 0;
}

.link-container a {
  text-decoration: none;
  font-size: 1.2em;
  color: #333;
  background-color: #ffe4b5;
  padding: 10px 20px;
  border-radius: 8px;
  display: inline-block;
  transition: background-color 0.3s;
}

.link-container a:hover {
  background-color: #ffcccb;
}

/* Recipe Card Images */
.recipe-img {
  width: 80%;
  max-height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 auto 10px;
  display: block;
}

.recipe-img {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.card-back .card-content {
  height: 100%;
  overflow-y: auto;
  padding: 15px;
  box-sizing: border-box;
}

.card-back .card-content::-webkit-scrollbar {
  width: 6px;
}

.card-back .card-content::-webkit-scrollbar-thumb {
  background-color: #ffa07a;
  border-radius: 3px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

.card {
  width: 300px;
  height: 320px;
  perspective: 1000px;
  cursor: pointer;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px dashed #ffa07a;
  border-radius: 10px;
  backface-visibility: hidden;
  background-color: #fff;
  box-sizing: border-box;
  padding: 15px;
  overflow: hidden;
}

.card-front {
  z-index: 2;
}

.card-back {
  transform: rotateY(180deg);
  background-color: #ffe4b5;
  text-align: center;
}

.card-content {
  height: 100%;
  overflow-y: auto;
}

.recipe-img {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

/* Card wrapper */
.card {
  width: 300px;
  height: 320px;
  perspective: 1000px;
  cursor: pointer;
  position: relative;
}

/* Inner flip layer */
.card-inner {
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
  position: relative;
}

/* Flip effect */
.card.flipped .card-inner {
  transform: rotateY(180deg);
}

/* Front and back faces */
.card-front,
.card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 2px dashed #ffa07a;
  border-radius: 10px;
  box-sizing: border-box;
  padding: 15px;
  backface-visibility: hidden;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background-color: #fff;
}

/* Front face */
.card-front {
  z-index: 2;
}

/* Back face */
.card-back {
  transform: rotateY(180deg);
  background-color: #ffe4b5;
  text-align: center;
}

/* Scrollable content inside back */
.card-content {
  flex: 1;
  overflow-y: auto;
}

/* Image styling */
.recipe-img {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}
.card-content {
  height: 100%;
  overflow-y: auto;
  padding: 10px;
  box-sizing: border-box;
}

.card-content::-webkit-scrollbar {
  width: 6px;
}

.card-content::-webkit-scrollbar-thumb {
  background-color: #ffa07a;
  border-radius: 3px;
}
.contact-form,
.recipe-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 500px;
  margin: 20px auto;
  padding: 20px;
  border: 2px dashed #ffa07a;
  border-radius: 10px;
  background-color: #fff8f0;
}

.contact-form input,
.contact-form textarea,
.recipe-form input,
.recipe-form textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

.contact-form button,
.recipe-form button {
  background-color: #ffa07a;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

.contact-form button:hover,
.recipe-form button:hover {
  background-color: #ff8c5a;
}

.social-links {
  list-style: none;
  padding-left: 0;
  text-align: center;
}

.social-links li {
  margin: 10px 0;
}

.social-links a {
  text-decoration: none;
  font-size: 1.1rem;
  color: #ffa07a;
}
.social-links {
  list-style: none;
  padding-left: 0;
  text-align: center;
}

.social-links li {
  margin: 10px 0;
}

.social-links a {
  text-decoration: none;
  font-size: 1.1rem;
  color: #ffa07a;
}
.card-content {
  height: 100%;
  overflow-y: auto;
  padding: 10px;
  box-sizing: border-box;
}

.card-content::-webkit-scrollbar {
  width: 6px;
}

.card-content::-webkit-scrollbar-thumb {
  background-color: #ffa07a;
  border-radius: 3px;
}
.contact-form,
.recipe-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 500px;
  margin: 20px auto;
  padding: 20px;
  border: 2px dashed #ffa07a;
  border-radius: 10px;
  background-color: #fff8f0;
}

.contact-form input,
.contact-form textarea,
.recipe-form input,
.recipe-form textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

.contact-form button,
.recipe-form button {
  background-color: #ffa07a;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

.contact-form button:hover,
.recipe-form button:hover {
  background-color: #ff8c5a;
}

.social-links {
  list-style: none;
  padding-left: 0;
  text-align: center;
}

.social-links li {
  margin: 10px 0;
}

.social-links a {
  text-decoration: none;
  font-size: 1.1rem;
  color: #ffa07a;
}
.social-links {
  list-style: none;
  padding-left: 0;
  text-align: center;
}

.social-links li {
  margin: 10px 0;
}

.social-links a {
  text-decoration: none;
  font-size: 1.1rem;
  color: #ffa07a;
}

* --- Button Links for Recipe Section --- */ .recipe-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 350px;
  margin: 20px auto;
  padding: 0; /* Ensure no extra spacing */
}

.recipe-buttons {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 400px;
  margin: 40px auto;
  padding: 0;
}

.recipe-buttons a {
  display: block;
  padding: 16px 24px;
  background-color: #d423bd;
  color: #333;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.recipe-buttons a:hover {
  background-color: #ffe4b5;
  transform: translateY(-2px);
}

.card-back {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 15px;
  box-sizing: border-box;
  overflow: hidden;
}

.card-back .card-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  padding-right: 10px;
  box-sizing: border-box;
  max-height: calc(100% - 30px); /* leaves room for padding/title */
}

/* Styled scrollbar */
.card-back .card-content::-webkit-scrollbar {
  width: 6px;
}

.card-back .card-content::-webkit-scrollbar-thumb {
  background-color: #ffa07a;
  border-radius: 3px;
}
#randomBtn,
#showAllBtn {
  background-color: #ffa07a;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#randomBtn:hover,
#showAllBtn:hover {
  background-color: #ff8c5a;
}
.small-img {
  width: 200px; /* or try 200px, 300px depending on your layout */
  height: auto; /* keeps proportions */
  border-radius: 8px; /* optional: soft corners */
  display: block;
  margin: 0 auto; /* centers the image */
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

.card {
  width: 300px;
  height: 320px;
  perspective: 1000px;
  position: relative;
}

.card-inner {
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
  position: relative;
}

.card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 2px dashed #ffa07a;
  border-radius: 10px;
  box-sizing: border-box;
  padding: 15px;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background-color: #fff;
  overflow: hidden;
}

.card-back {
  transform: rotateY(180deg);
  background-color: #ffe4b5;
  text-align: center;
}

.card-back .card-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  box-sizing: border-box;
  max-height: calc(100% - 30px);
}

.card-back .card-content::-webkit-scrollbar {
  width: 6px;
}

.card-back .card-content::-webkit-scrollbar-thumb {
  background-color: #ffa07a;
  border-radius: 3px;
}
.square-img {
  width: 200px; /* sets width */
  height: 200px; /* sets height to match width = square */
  object-fit: cover; /* crops image to fill square without distortion */
  border-radius: 8px; /* optional: soft corners */
  display: block;
  margin: 0 auto; /* centers the image */
}
.intro-message {
  background-color: #e66565;
  border: 2px dashed #ffa07a;
  border-radius: 12px;
  padding: 20px;
  margin: 30px auto;
  max-width: 700px;
  text-align: center;
  font-size: 1.1rem;
  color: #300031;
}

.site-footer {
  width: 100%;
  background-color: #ce33c1;
  text-align: center;
  padding: 20px;
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
  border-top: 3px dashed #ffa07a;
  position: relative;
  bottom: 0;
  left: 0;
}
