* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Arial", sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fafafa;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Navigation */
nav {
  background: white;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 2rem;
  font-weight: bold;
  color: #ff6b6b;
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #ff6b6b;
}

.sign-up-btn {
  background: #c4a5a5;
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.sign-up-btn:hover {
  background: #a1908e;
}

/* Hero Section */
.hero {
  background: linear-gradient(
    135deg,
    rgba(180, 164, 165, 0.5),
    rgba(140, 128, 129, 0.5)
  );
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("/images/hero-image.jpg");
  background-size: cover;
  background-position: center;
  z-index: -1;
  opacity: 0.2;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #343333;
  font-weight: 700;
}

.add-recipe-btn {
  background: linear-gradient(135deg, #8b7d7d, #c4a5a5);
  color: white;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 500;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.add-recipe-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 125, 125, 0.4);
}

/* About Section */
.about {
  padding: 80px 0;
  text-align: center;
}

.about h2 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.about h2 .highlight {
  color: #c4a5a5;
}

.about-btn {
  display: inline-block;
  background-color: #8b7d7d;
  color: white;
  padding: 12px 30px;
  text-decoration: none;
  border-radius: 25px;
  margin: 30px 0 50px;
  transition: background-color 0.3s ease;
  font-weight: 500;
}

.about-btn:hover {
  background-color: #6d5f5f;
}

/* About Content Section */
.about-content {
  padding: 100px 0;
  background: white;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
}

.content-image {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  height: 400px;
  background: url("/images/blueberryCake.png") no-repeat center/cover,
    linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.content-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.content-text {
  padding-left: 20px;
}

.content-text h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  font-weight: 700;
  line-height: 1.2;
}

.content-text h2 .highlight {
  color: #c4a5a5;
}

.content-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 20px;
}

/* Feature Cards - FIXED TO MATCH IMAGE */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.feature-card {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-align: center;
  position: relative;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.feature-card:nth-child(1) {
  background: #f5f5f5;
  padding: 0;
}

.feature-card:nth-child(2) {
  background: linear-gradient(135deg, #b4a4a5, #a1908e);
  color: white;
  padding: 40px 30px;
}

.feature-card:nth-child(3) {
  background: #f5f5f5;
  padding: 0;
}

.feature-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feature-card h3 {
  font-size: 1.8rem;
  margin: 0;
  font-weight: 700;
  line-height: 1.3;
}

/* Filter Section */
.filter-section {
  background: white;
  padding: 60px 0;
}

.filter-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 40px;
}

.filter-title .highlight {
  color: #c4a5a5;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
}

.filter-btn {
  background: #e9ecef;
  color: #333;
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: linear-gradient(135deg, #8b7d7d, #c4a5a5);
  color: white;
  transform: translateY(-2px);
}

/* Recipe Type Toggle */
.recipe-toggle {
  display: flex;
  justify-content: center;
  margin-bottom: 50px;
}

.toggle-option {
  background: #e9ecef;
  color: #333;
  border: none;
  padding: 12px 25px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-option:first-child {
  border-radius: 25px 0 0 25px;
}

.toggle-option:last-child {
  border-radius: 0 25px 25px 0;
}

.toggle-option.active {
  background: linear-gradient(135deg, #8b7d7d, #c4a5a5);
  color: white;
}

.toggle-option::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

/* Recipes Section - FIXED TO MATCH IMAGE */
.recipes {
  padding: 80px 0;
  background-color: #fafafa;
}

.recipes-section {
  padding: 40px 0 80px;
}

.recipes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 50px;
}

.recipes h2 {
  font-size: 2.8rem;
  font-weight: 700;
  color: #333;
}

.browse-all {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  background: #f0f0f0;
  padding: 12px 30px;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.browse-all:hover {
  background: #e0e0e0;
}

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 40px;
  justify-content: center;
}

/* Handle single recipe case */
.recipes-grid:has(.recipe-card:only-child) {
  grid-template-columns: minmax(500px, 600px);
  justify-content: center;
}

/* Handle two recipes case */
.recipes-grid:has(.recipe-card:nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(450px, 1fr));
}

/* Handle three recipes case */
.recipes-grid:has(.recipe-card:nth-child(3):last-child) {
  grid-template-columns: repeat(2, minmax(450px, 1fr));
}

.recipe-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  width: 100%;
}

.recipe-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.recipe-image {
  width: 180px;
  height: 100%;
  min-height: 180px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-color: #f0f0f0;
}

.recipe-content {
  padding: 25px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.recipe-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #333;
}

.recipe-meta {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.recipe-meta div {
  margin-bottom: 4px;
}

.view-recipe {
  background: #b4a4a5;
  color: white;
  padding: 10px 25px;
  text-decoration: none;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
  align-self: flex-start;
}

.view-recipe:hover {
  background: #a1908e;
  transform: translateY(-2px);
}

/* No Recipes Message */
.no-recipes-message {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  text-align: center;
  padding: 2rem;
  grid-column: 1 / -1;
}

.no-recipes-message p {
  color: #666;
  font-size: 1.2rem;
  margin: 0;
}

.no-recipes-message a {
  color: #8b7d7d;
  text-decoration: underline;
}

/* Founder Section */
.founder-section {
  background: #f8f9fa;
  border-radius: 30px;
  padding: 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.founder-avatar {
  width: 150px;
  height: 150px;
  margin: 0 auto 40px;
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #8b7d7d, #c4a5a5);
}

.owner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.founder-quote {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #444;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.founder-name {
  font-size: 1.3rem;
  font-weight: 600;
  color: #333;
}

/* Footer - FIXED TO MATCH IMAGE */
.footer {
  background: linear-gradient(135deg, #b4a4a5, #a1908e);
  color: white;
  text-align: center;
  padding: 60px 20px 40px;
  position: relative;
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
}
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 60px;
  height: 60px;
  background-color: #847778;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  border-radius: 50%;
  border: none;
  text-decoration: none;
  display: none; /* hidden by default, JS shows it */
  z-index: 1000;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.back-to-top:hover {
  background-color: #645a5b;
  transform: translateY(-3px);
}

.footer p {
  margin: 0;
  font-size: 1rem;
  padding-top: 40px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 40px;
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 30px;
  text-align: center;
}

.close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 2rem;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover {
  color: #333;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 30px;
}

.btn-primary {
  background: linear-gradient(135deg, #8b7d7d, #c4a5a5);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  flex: 1;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 125, 125, 0.4);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  flex: 1;
}

.btn-danger:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

.btn-danger:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.delete-modal-content {
  text-align: center;
}

.delete-modal-content h2 {
  color: #d63384;
  margin-bottom: 20px;
}

.delete-modal-content p {
  font-size: 1.1rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
}

.cuisine-highlight {
  font-weight: 600;
  color: #c4a5a5;
}

/* Responsive Design */
@media (max-width: 992px) {
  .recipes-grid {
    grid-template-columns: 1fr !important;
  }

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

@media (max-width: 968px) {
  .content-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .content-text {
    padding-left: 0;
    text-align: center;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .content-text h2 {
    font-size: 2rem;
  }

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

  .nav-links {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 60px 0;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .about h2 {
    font-size: 2rem;
  }

  .about-content {
    padding: 60px 0;
  }

  .content-text h2 {
    font-size: 1.8rem;
  }

  .content-text p {
    font-size: 1rem;
  }

  .founder-section {
    margin: 20px;
    border-radius: 20px;
  }

  .founder-avatar {
    width: 120px;
    height: 120px;
  }

  .founder-quote {
    font-size: 1.1rem;
  }

  .recipes-header {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

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

  .recipe-card {
    grid-template-columns: 1fr;
  }

  .recipe-image {
    width: 100%;
    height: 200px;
  }

  .nav-links {
    display: none;
  }

  .filter-title {
    font-size: 2rem;
  }

  .category-filters {
    justify-content: flex-start;
    overflow-x: auto;
    padding: 10px 0;
  }

  .recipe-card {
    max-width: 100%;
  }

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

  .cuisines-container .page-header h1 {
    font-size: 2.5rem;
  }

  .cuisines-grid {
    grid-template-columns: 1fr;
    padding: 0 20px 60px;
  }

  .modal-content {
    margin: 20% auto;
    padding: 30px 20px;
    width: 95%;
  }

  .modal-actions {
    flex-direction: column;
  }

  .cuisine-actions {
    flex-direction: column;
    gap: 10px;
  }

  .edit-btn,
  .delete-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .add-recipe-btn {
    padding: 12px 30px;
    font-size: 1rem;
  }

  .toggle-option {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .cuisines-container .page-header {
    padding: 60px 0;
  }

  .cuisines-container .page-header h1 {
    font-size: 2rem;
  }

  .add-btn {
    padding: 12px 25px;
    font-size: 1rem;
  }

  .modal-content h2 {
    font-size: 1.5rem;
  }

  .no-cuisines h2 {
    font-size: 2rem;
  }
}

@media (max-width: 600px) {
  .recipes-grid {
    grid-template-columns: 1fr;
  }
}
