/* Define reusable CSS variables for theme colors */
:root {
  --primary-color: #f8f5f2;
  --secondary-color: #f9f1e7;
  --accent-color: #ff6b6b;
  --dark-color: #2a9d8f;
  --text-color: #264653;
  --light-text: #6b717e;
  --success-color: #2a9d8f;
  --warning-color: #e9c46a;
  --border-radius: 12px;
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --heading-font: "Playfair Display", serif;
  --body-font: "Montserrat", sans-serif;
}

/* UNIVERSAL/MAIN SELECTOR STYLING */
html,
body {
  height: auto;
  font-family: var(--body-font);
  background-color: var(--primary-color);
  color: var(--text-color);
  overflow-x: hidden;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  background: var(--primary-color);
  background-size: auto;
}

.inverted-colors {
  --primary-color: #264653;
  --secondary-color: #1d3557;
  --text-color: #f8f5f2;
  --light-text: #d1d1d1;
  background-color: var(--primary-color);
  color: var(--text-color);
}

/* HEADER/NAVBAR STYLING */
header > .box,
.navbar {
  background-color: white;
  padding: 0px;
  box-shadow: var(--box-shadow);
  border-radius: var(--border-radius);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  padding: 16px 24px;
  border-radius: var(--border-radius);
}

.navbar-item {
  font-weight: 600;
  font-size: 1rem;
  margin-right: 30px;
  color: var(--text-color);
  transition: var(--transition);
}

.navbar-item:hover {
  color: var(--accent-color);
  transform: translateY(-2px);
}

.brand-logo {
  display: flex;
  align-items: center;
}

.logo-text {
  font-family: var(--heading-font);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--accent-color);
}

/* Highlight the GitHub button */
#gitPage {
  background-color: var(--dark-color);
  color: white;
  font-weight: 600;
  border-radius: 8px;
  transition: var(--transition);
}

#gitPage:hover {
  background-color: #238b7e;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Center align the brand/logo */
.navbar-brand {
  text-align: center;
}

/* Center-align the start section of the navbar */
.navbar-start {
  text-align: center;
  justify-content: center;
}

/* Larger font size for menu labels */
.menu-label {
  font-size: 1.25rem;
  color: var(--dark-color);
  font-weight: 700;
  margin-bottom: 12px;
  font-family: var(--heading-font);
}

/* Style links in navbar and menus */
.navbar-item,
.menu-list li a {
  background-color: transparent;
  color: var(--text-color);
  padding: 10px 16px;
  border-radius: 8px;
  margin: 5px;
  transition: var(--transition);
}

.menu-list li a:hover {
  background-color: var(--secondary-color);
  color: var(--accent-color);
  transform: translateX(5px);
}

.navbar-dropdown .navbar-item {
  color: var(--text-color);
}

.button {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 12px 24px;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.button:hover {
  background-color: #ff5252;
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.secondary-button {
  background-color: transparent;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
}

.secondary-button:hover {
  background-color: var(--accent-color);
  color: white;
}

.cta-button {
  font-size: 1.1rem;
  padding: 14px 32px;
  background-color: var(--dark-color);
}

.cta-button:hover {
  background-color: #238b7e;
}

/* Inverted colour selectors for nav */
.inverted-colors .button {
  background-color: var(--accent-color);
  color: white !important;
}

.inverted-colors .menu-list li a {
  background-color: transparent;
  color: var(--text-color);
}

.inverted-colors .navbar-item #modal-button {
  color: var(--text-color);
}

/* Modal Styling */
#search-modal .modal-content {
  max-width: 500px;
  margin: 0 auto;
}

#search-form {
  border: none;
  border-radius: var(--border-radius);
  background-color: white;
  padding: 32px;
  box-shadow: var(--box-shadow);
}

.modal-background {
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.label {
  color: var(--text-color) !important;
  font-weight: 600;
}

.input,
.select select {
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  padding: 12px 16px;
  transition: var(--transition);
}

.input:focus,
.select select:focus {
  border-color: var(--dark-color);
  box-shadow: 0 0 0 1px var(--dark-color);
}

/* HERO SECTION STYLING */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 80px 40px;
  background-color: white;
  border-radius: var(--border-radius);
  margin: 40px auto;
  max-width: 1200px;
  box-shadow: var(--box-shadow);
  overflow: hidden;
  position: relative;
}

.hero-content {
  flex: 1;
  padding-right: 40px;
}

.hero-title {
  font-family: var(--heading-font);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-color);
  margin-bottom: 24px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--light-text);
  margin-bottom: 32px;
  max-width: 500px;
}

.hero-cta {
  display: flex;
  gap: 16px;
}

.hero-image-container {
  flex: 1;
  position: relative;
  height: 400px;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-image:hover {
  transform: scale(1.05);
}

/* BENEFITS SECTION */
.benefits-section {
  padding: 80px 40px;
  background-color: var(--secondary-color);
  margin: 40px auto;
  border-radius: var(--border-radius);
  max-width: 1200px;
}

.section-title {
  font-family: var(--heading-font);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-color);
  text-align: center;
  margin-bottom: 48px;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

.benefits-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

.benefit-card {
  background-color: white;
  padding: 32px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
  transition: var(--transition);
}

.benefit-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.benefit-card h3 {
  font-family: var(--heading-font);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--dark-color);
}

.benefit-card p {
  color: var(--light-text);
}

/* STATS SECTION */
.stats-section {
  padding: 60px 40px;
  background-color: var(--dark-color);
  margin: 40px auto;
  border-radius: var(--border-radius);
  max-width: 1200px;
  color: white;
}

.stats-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 32px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  transition: var(--transition);
}

.stat-item:hover {
  transform: translateY(-5px);
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  display: block;
  margin-bottom: 8px;
  font-family: var(--heading-font);
}

.stat-label {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* MAIN CONTENT STYLING */
.main-content {
  max-width: 1200px;
  margin: 40px auto;
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.sidebar {
  background-color: var(--secondary-color);
  padding: 24px;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.spacer {
  margin-top: 32px;
  margin-bottom: 32px;
  font-weight: bold;
  color: var(--dark-color);
  position: relative;
}

.spacer p {
  font-family: var(--heading-font);
  font-size: 1.2rem;
}

.spacer::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

.recipe-details {
  padding: 32px;
}

.recipe-header {
  text-align: center;
  margin-bottom: 32px;
}

#recipe-name {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--dark-color);
  margin-bottom: 16px;
  font-family: var(--heading-font);
}

.favorite-button {
  background-color: var(--warning-color);
  color: var(--text-color) !important;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
}

.recipe-section {
  overflow: auto;
  max-height: 300px;
  padding: 24px;
  margin-bottom: 24px;
  border-radius: var(--border-radius);
  background-color: var(--secondary-color);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.recipe-section:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.recipe-media {
  padding: 32px;
}

.image-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 24px;
}

#recipe-picture {
  width: 100%;
  border-radius: var(--border-radius);
  transition: transform 0.5s ease;
}

.image-container:hover #recipe-picture {
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  top: 16px;
  right: 16px;
  background-color: var(--dark-color);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.video-frame {
  width: 100%;
  height: 370px;
  border-radius: var(--border-radius);
  margin-bottom: 24px;
  box-shadow: var(--box-shadow);
}

/* TESTIMONIALS SECTION */
.testimonials-section {
  padding: 80px 40px;
  background-color: white;
  margin: 40px auto;
  border-radius: var(--border-radius);
  max-width: 1200px;
  box-shadow: var(--box-shadow);
}

.testimonials-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

.testimonial-card {
  background-color: var(--secondary-color);
  padding: 32px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.testimonial-content {
  margin-bottom: 24px;
  position: relative;
}

.testimonial-content::before {
  content: '"';
  font-family: var(--heading-font);
  font-size: 4rem;
  position: absolute;
  top: -20px;
  left: -10px;
  color: var(--accent-color);
  opacity: 0.2;
}

.testimonial-content p {
  font-style: italic;
  line-height: 1.8;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 700;
  color: var(--dark-color);
}

.author-title {
  font-size: 0.9rem;
  color: var(--light-text);
}

/* TRENDING SECTION */
.trending-section {
  max-width: 100%;
  margin: 40px 0;
  background-color: white;
  border-radius: 0;
  padding: 40px;
  box-shadow: var(--box-shadow);
}

.recipe-subtitle {
  font-family: var(--heading-font);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-color);
  text-align: center;
  margin-bottom: 32px;
}

.container-carousel {
  padding: 0 1rem;
}

#trending {
  margin: auto;
  max-width: 100%;
}

.trending-slide {
  width: 30rem;
  height: 30rem;
}

.trending-slide-img img {
  width: 100%;
  height: 30vh;
  border-radius: var(--border-radius);
  object-fit: cover;
  border: none;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  background-color: #f0f0f0; /* Fallback background color */
}

.swiper-slide-shadow-left,
.swiper-slide-shadow-right {
  display: none;
}

/* CTA SECTION */
.cta-section {
  background-color: var(--accent-color);
  padding: 80px 40px;
  margin: 40px auto;
  border-radius: var(--border-radius);
  max-width: 1200px;
  text-align: center;
  box-shadow: var(--box-shadow);
}

.cta-content {
  max-width: 700px;
  margin: 0 auto;
}

.cta-section h2 {
  font-family: var(--heading-font);
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 24px;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin-bottom: 32px;
}

.cta-section .button {
  background-color: white;
  color: var(--accent-color);
  font-size: 1.1rem;
  padding: 14px 32px;
}

.cta-section .button:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

/* FOOTER STYLING */
footer {
  background-color: var(--text-color);
  color: white;
  padding: 60px 40px 20px;
  margin-top: 80px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}

.footer-logo {
  flex: 1;
  min-width: 250px;
}

.footer-logo .logo-text {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}

.footer-logo p {
  color: rgba(255, 255, 255, 0.7);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-column {
  min-width: 150px;
}

.footer-column h4 {
  font-family: var(--heading-font);
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
}

.footer-column h4::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 30px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
}

.footer-column li {
  margin-bottom: 12px;
}

.footer-column a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition);
}

.footer-column a:hover {
  color: white;
  padding-left: 5px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* ANIMATIONS */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

.pulse {
  animation: pulse 2s infinite;
}

/* MEDIA QUERIES FOR RESPONSIVE LAYOUT */
/* Media query: Mobile */
@media (max-width: 768px) {
  .hero-section {
    flex-direction: column;
    padding: 40px 20px;
  }

  .hero-content {
    padding-right: 0;
    margin-bottom: 40px;
  }

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

  .hero-image-container {
    width: 100%;
  }

  .stats-container {
    flex-direction: column;
    align-items: center;
  }

  .testimonials-container {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
  }

  .trending-slide {
    width: 15rem !important;
    height: 18rem !important;
  }

  .trending-slide-img img {
    width: 15rem !important;
    height: 15rem !important;
  }

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

/* Media query: Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-title {
    font-size: 3rem;
  }

  .trending-slide {
    width: 20rem !important;
    height: 20rem !important;
  }

  .trending-slide-img img {
    width: 20rem !important;
    height: 20rem !important;
  }
}

/* Dark mode overrides */
.dark-mode {
  background-color: #121212;
  color: #ffffff;
}

.dark-mode .navbar,
.dark-mode .box {
  background-color: #333333;
  color: #ffffff;
}

/* Fix the select dropdown padding */
.select select {
  padding: 8px 12px;
}

/* Add styles for empty state message */
.empty-state {
  padding: 20px;
  text-align: center;
  color: var(--light-text);
  border: 2px dashed #e2e8f0;
  border-radius: var(--border-radius);
  margin: 20px 0;
}

.empty-state p {
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .trending-slide-img img {
    width: 100% !important;
    height: 200px !important;
  }
}
