/* === Global Styles === */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #e7f3fa;
  background-image: url('/static/images/pawprint-bg.png');
  background-repeat: repeat;
  background-size: 350px;
}

/* === Navbar === */
.navbar {
  background-color: #333;
  padding: 1rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  display: flex;
  justify-content: center;
  align-items: center;
}
.nav-links {
  display: flex;
  justify-content: center;
}
.navbar a {
  color: white;
  text-decoration: none;
  margin: 0 1rem;
}
.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.hamburger .bar {
  width: 25px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
}


/* === Container === */
.container {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* === Pet Presenter Section === */
.pet-presenter {
  display: flex;
  justify-content: center;
  top: -160px;
  left: 0;
  right: 0;
  z-index: 10;
  pointer-events: none;
}

.banner-img {
  max-width: 550px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* === Banner Text === */
.banner {
  padding: 2rem 1rem;
  text-align: center;
}
.banner-text h1 {
  color: #1F3C88;
  font-size: 3.2rem;
  font-weight: 800;
  margin: 0;
}
.banner-text h2 {
  color: #555;
  font-size: 1.2rem;
  font-style: italic;
  margin: 0.5rem 0 0 0;
  font-weight: 500;
}

/* === Cards and Layout === */
.flex-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.card {
  background-color: white;
  padding: 1.5rem;
  border-radius: 8px;
  flex: 1;
  min-width: 280px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: relative;
  z-index: 5;
}

/* === Meal Planner === */
#meal-planner {
  margin-top: -100px;
  padding-top: 0;
}

.meal-plan-list {
  list-style-type: none;
  padding: 0;
  margin: 1rem 0;
}
.meal-plan-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid #e9ecef;
  gap: 1rem;
  border-radius: 6px;
  transition: background-color 0.2s;
  cursor: grab;
}
.meal-plan-item.locked {
  background-color: #e9ecef;
  cursor: not-allowed;
}
.meal-plan-item:last-child {
  border-bottom: none;
}
.meal-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-grow: 1;
}
.meal-info a {
  text-decoration: none;
  color: #007bff;
  font-weight: 500;
}
.meal-info .day {
  font-weight: bold;
  color: #333;
  width: 90px;
}
.meal-actions {
  display: flex;
  gap: 0.5rem;
}
.meal-actions form {
  margin: 0;
}
.action-btn {
  font-size: 0.8rem;
  padding: 0.4rem 0.7rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: white;
  min-width: 80px;
  text-align: center;
}
.suggest-btn {
  background-color: #6c757d;
}
.suggest-btn:disabled {
  background-color: #adb5bd;
  cursor: not-allowed;
}
.lock-btn {
  background-color: #ffc107;
  color: #333;
}
.generate-plan-btn {
  display: block;
  width: 100%;
  padding: 0.75rem;
  margin-top: 1rem;
  background-color: #28a745;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* === To-Do & Grocery Lists === */
.card ul {
  list-style-type: none;
  padding: 0;
}
.card li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.card input[type="text"] {
  flex-grow: 1;
  border: 1px solid #ccc;
  padding: 0.5rem;
  border-radius: 4px;
}
.card button {
  padding: 0.5rem 1rem;
  border: none;
  background-color: #007bff;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}
.card li form {
  margin-bottom: 0;
}

/* === Flash Messages === */
.flash-messages {
  list-style-type: none;
  padding: 0;
  margin-bottom: 1rem;
}
.flash-messages li {
  padding: 1rem;
  border-radius: 5px;
  margin-bottom: 0.5rem;
  text-align: center;
}
.flash-messages .success {
  background-color: #d4edda;
  color: #155724;
}
.flash-messages .warning {
  background-color: #fff3cd;
  color: #856404;
}
.flash-messages .info {
  background-color: #d1ecf1;
  color: #0c5460;
}

/* === Video Section === */
.video-section h2, .video-section h3, .video-section h4 {
  text-align: center;
}
.featured-video {
  margin-bottom: 2rem;
}
.past-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}
.past-video-card {
  display: flex;
  flex-direction: column;
}
.past-video-card iframe {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 8px;
}

/* === Responsive Styles === */
@media screen and (max-width: 768px) {
  .navbar {
    justify-content: flex-end; /* Align hamburger to the right */
  }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 60px; /* Position below navbar */
    left: 0;
    background-color: #333;
  }
  .nav-links.active {
    display: flex;
  }
  .navbar a {
    margin: 1rem 0;
    text-align: center;
  }
  .hamburger {
    display: flex;
  }
  .flex-row {
    flex-direction: column;
  }
  .banner-text h1 {
    font-size: 2.5rem;
  }
  .banner-text h2 {
    font-size: 1rem;
  }
  .pet-presenter {
    top: -100px;
  }
  #meal-planner {
    margin-top: -50px;
  }
}
