﻿/* ===== Layout ===== */
.food-main {
 position: relative;
}

.food-content {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: stretch;  /* make all flex children equal height */
  max-width: 1024px;
  margin: auto;
}

.food-content .left-column {
  flex: 1 1 48%;
  min-width: 300px;
  
  display: flex;          /* let children stretch inside */
  flex-direction: column; /* stack content vertically */
}

.food-content .right-column {
  flex: 1 1 48%;
  min-width: 300px;

  display: flex;          /* let children stretch inside */
  flex-direction: column; /* stack content vertically */
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
.food-content {
    flex-direction: column;
  }

.food-content .left-column,
.food-content .right-column {
    flex: 1 1 100%;
  }
}


/* ===== Food Content ===== */

  .food-guide {
    max-width: 700px;
    margin: auto;
    background: #fff;
    padding: 20px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  .food-guide h2 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 1em;
    font-size: 1.6em;
    color: #333;
  }
  .food-icon {
    font-size: 1.6em;
  }
  /* 圖例 */
  .legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.95em;
  }
  .legend span {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .legend .box {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: inline-block;
  }
  .ok-box { background: #d4f8d4; border: 1px solid #3ba55d; }
  .warn-box { background: #fff3b0; border: 1px solid #e0a800; }
  .avoid-box { background: #f8d4d4; border: 1px solid #c53030; }

  /* 分類清單 */
  .food-guide h3 {
    margin-top: 1.4em;
    font-size: 1.2em;
    color: #444;
    border-left: 6px solid #999;
    padding-left: 8px;
  }
  .food-guide ul {
    list-style: none;
    padding: 0;
    margin: 0.5em 0 0;
  }
  .food-guide li {
    padding: 10px 14px;
    margin: 6px 0;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.05em;
  }
  .food-guide li.ok {
    background: #d4f8d4;
    border-left: 6px solid #3ba55d;
    color: #2c662d;
  }
  .food-guide li.warn {
    background: #fff3b0;
    border-left: 6px solid #e0a800;
    color: #6c4a00;
  }
  .food-guide li.avoid {
    background: #f8d4d4;
    border-left: 6px solid #c53030;
    color: #721c24;
  }
  
  .note-box {
    margin-top: 12px;
    padding: 12px 16px;
    background: #e8f4fd;
    border-left: 6px solid #2980b9;
    border-radius: 10px;
    color: #1b4f72;
    font-size: 0.95em;
    line-height: 1.5;
  }
  
	/* Shared styles for info boxes */
	.info-box {
	  margin: 20px 0;
	  padding: 16px 20px;
	  border-radius: 10px;
	}
	
	/* Specific styles */
	.tips {
	  background: #f3f9e8;
	  border-left: 6px solid #7cb518;
	}
	
	.principle {
	  background: #f0fff4;
	  border-left: 6px solid #28a745;
	}
  
  .principle h3 {
    margin: 0 0 10px;
    font-size: 1.2em;
    color: #155724;
  }
  .principle ul {
    margin: 0;
    padding-left: 20px;
  }


/* START hamburger menu */
/* Mobile First Styles */
.hamburger-menu {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-color);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin: 15px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1001;
}

.hamburger-menu:hover {
  background-color: #b35959;
  transform: scale(1.05);
}

.hamburger-menu .line {
  width: 20px;
  height: 2px;
  background-color: white;
  margin: 2px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.food-sidebar {
  display: none;
  background-color: var(--primary-color);
  padding: 1.5rem;
  box-shadow: 3px 0 10px rgba(0,0,0,0.1);
  height: 100vh;
  overflow-y: auto;
}


.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
  border-bottom: 2px solid rgba(0,51,102,0.15);
}

.sidebar-header .logo {
  font-size: 1.5rem;
}

.sidebar-header .title {
  letter-spacing: 1px;
}

/* Desktop styling */
@media (min-width: 768px) {
  .sidebar-header {
    color: #fff;
    border-bottom: 2px solid rgba(255,255,255,0.2);
  }
}


.food-sidebar ul {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.food-sidebar li {
  transition: all 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
}

.food-sidebar a {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  text-decoration: none;
  color: #CC6666;
  font-family: 'Arial', sans-serif;
  font-weight: 500;
  transition: all 0.3s ease;
  background: rgba(255,255,255,0.9);
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  border: 1px solid rgba(204,102,102,0.2);
}

.food-sidebar a:hover {
  background: #C71585;
  color: white;
  transform: translateX(8px);
  box-shadow: 0 4px 15px rgba(204,102,102,0.3);
}

.food-sidebar a:active {
  transform: translateX(4px);
  background: #b35959;
}

.food-sidebar li.selected a {
  color: white;
  background-color: #800000;
  /* Optional: add subtle transition */
  transition: all 0.2s ease;
}

/* Mobile styles */
@media (max-width: 767px) {
  .food-sidebar {
    width: 100%;
    position: absolute;
    top: 60px;
    left: -100%;
    transition: all 0.3s ease;
    z-index: 1000;
    background: #fff;
  }
  
  .active .food-sidebar {
	display: block;
	left: 0;
  }
  
  .hamburger-menu span {
    left: calc(100% + 15px);
    right: auto;
  }
}

/* Desktop Styles */
@media (min-width: 768px) {
  .hamburger-menu {
    display: none;
  } 
  
  .food-sidebar {
    display: block;
    width: 250px;
    position: absolute;
    left: 0;
    top: 0;
    background: var(--primary-color);
  }
  
  .cssMeal {
    margin-left: 250px; /* Offset main content by sidebar width */
    max-width: calc(100% - 250px);
  }

}

/* Hamburger Animation */
.active .line {
  background-color: rgba(0, 0, 0, 0.8);
}

.active .line-1 {
  transform: rotate(45deg) translate(5px, 5px);
}

.active .line-2 {
  opacity: 0;
  visibility: hidden;
}

.active .line-3 {
  transform: rotate(-45deg) translate(5px, -5px);
}

.hamburger-menu span {
  position: absolute;
  left: 5rem;
  background-color: #e2b646;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.8rem 1.2rem;
  color: #fff;
  font-family: "Baloo Da 2", serif;
  font-size: 1.2rem;
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  white-space: nowrap;
}

.active .hamburger-menu:hover span {
  opacity: 1;
  visibility: visible;
}

.hamburger-menu span::before {
  content: "";
  position: absolute;
  left: -8px;
  border-width: 8px 8px 8px 0;
  border-style: solid;
  border-color: transparent #e2b646 transparent transparent;
}
/* END hamburger menu */

.food-sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
  border-bottom: 2px solid rgba(0,51,102,0.15);
}

.food-sidebar-header .logo {
  font-size: 1.5rem;
}

.food-sidebar-header .title {
  letter-spacing: 1px;
}

/* Desktop styling */
@media (min-width: 768px) {
  .food-sidebar-header {
    color: #fff;
    border-bottom: 2px solid rgba(255,255,255,0.2);
  }
}

/* END hamburger menu */  