:root {
  --color-primary: #EDEDED;     /* Default to gray */
  --color-secondary: #EDEDED;
  --color-background: #EDEDED;
  --color-text: #EDEDED;

}

#index{
  transition: 
  background-color 0.3s ease-out,
  color 0.3s ease-out;

}

body {
 background-color: var(--color-background);
 color: var(--color-text);
 /* transition: 
 background-color 0.3s ease-out,
 color 0.3s ease-out; */
}

.dropdown-container {
  display: flex;
  justify-content: center;
  width: 100%;
}


.dropdown {
  position: relative; 
  width: 300px; 
  max-height: 200px; 
  margin: 0 auto; 

}
.header{
  text-align: center;
  background-color: var(--color-primary);
  justify-content: center;
  align-items: center; 
  margin: 10px; 
  padding: 50px 50px 120px 50px;
  position: relative; 
  /* transition: 
  background-color 0.3s ease-out,
  color 0.3s ease-out; */
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 75px; /* Height of scallop */
  background-color: var(--color-background);
  mask: radial-gradient(75px at 50% 0, #0000 98%, #000) calc(50% - 69.375px) 0/130px 100%;
  -webkit-mask: radial-gradient(75px at 50% 0, #0000 98%, #000) calc(50% - 69.375px) 0/130px 100%;
  z-index: 0; 
  /* transition: 
  background-color 0.3s ease-out,
  color 0.3s ease-out; */
}

.header-details{
background-color: var(--color-primary);
margin: 10px;
padding: 50px 150px 100px 150px;
position: relative;
display:flex; 
justify-content: center;
align-items: center;
/* transition: 
background-color 0.3s ease-out,
color 0.3s ease-out; */
}

.header-details::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 75px; /* Height of scallop */
background-color: var(--color-background);
mask: radial-gradient(75px at 50% 0, #0000 98%, #000) calc(50% - 69.375px) 0/130px 100%;
-webkit-mask: radial-gradient(75px at 50% 0, #0000 98%, #000) calc(50% - 69.375px) 0/130px 100%;
z-index: 0; 
/* transition: 
background-color 0.3s ease-out,
color 0.3s ease-out; */
}

.header-content{
  /* background-color: blue; */
  display: grid; 
  grid-template-columns: 1fr auto 1fr; 
  /* max-width: 1000px;  */

}
.header-container {
  grid-column: 2; 
  margin: 0px 75px 0px 75px; 
  text-align: center;
  /* background-color: green; */
}

.header-details nav {
grid-column: 1; /* Place nav in the first column */
justify-self: start; /* Align to the left */
z-index: 1;
}





.back-button {
display: flex;
justify-content: center;
align-items: center;
width: 60px;
height: 60px;
border-radius: 50%;
background-color: var(--color-background);
box-sizing: border-box;
text-decoration: none;
color: var(--color-primary);
transition: all 0.3s ease;
}

.back-button:hover {
background-color: var(--color-secondary);
/* transform: translateY(-2px); */
/* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); */
}

.arrow-icon {
font-size: 30px;
line-height: 1;
}

.material-symbols-outlined {
font-variation-settings:
'FILL' 0,
'wght' 600,
'GRAD' 0,
'opsz' 24
}

#header-title, #datetime {
margin: 20px 0;
text-align: center;
z-index: 1;
position: relative;
white-space: normal;

}

.footer{

  background-color: var(--color-secondary); 
  color: var(--color-text); 
  height: 100px; 
  text-align: center; 
  margin: 10px; 
  padding: 50px; 
  position: relative; 
  /* transition: 
  background-color 0.3s ease-out,
  color 0.3s ease-out; */

}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 75px; /* Height of scallop */
  background-color: var(--color-secondary); /* This should match your page background */
  mask: radial-gradient(75px at 50% 0%, #0000 98%, #000) calc(50% - 69.375px) 0/130px 100%;
  -webkit-mask: radial-gradient(75px at 50% 0%, #0000 98%, #000) calc(50% - 69.375px) 0/130px 100%;
  z-index: 0;
  transform: translateY(-100%); /* Move it up to position at the top edge */
  /* transition: 
  background-color 0.3s ease-out,
  color 0.3s ease-out; */
}

.footer a {
  font-family: "Libre Caslon Text", serif;
  font-weight: 400;
  font-style: normal; 
  font-size: 14px;
  /* text-decoration: underline; */
  color: var(--color-primary);
 
  /* transition: 
  background-color 0.3s ease-out,
  color 0.3s ease-out; */
}

a:hover {
  background-color: var(--color-background);
}


h1 {
 color: var(--color-background); 
 font-family: "Libre Caslon Text", serif; 
 font-weight: 700; 
 font-style: normal;
 font-size: 48px;


}


h2 {
  color: var(--color-secondary);
  font-family: "Libre Caslon Text", serif; 
  font-weight: 700; 
  font-style: normal;
  font-size: 24px;

}

.date-link {
  color: var(--color-secondary);
  text-decoration: none;
  /* transition: all 0.5s ease;  */
  position: relative;
}


.date-link:hover {
  color: var(--color-primary);

}

/* date-link transition styles  */

/* .date-link::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--color-primary);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.date-link:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
} */

p{ 

  font-family: "Libre Caslon Text", serif;
  font-weight: 400;
  font-style: normal; 
  font-size: 16px; 
  color: var(--color-primary);

}



ul li {
  font-family: "Libre Caslon Text", serif;
  font-weight: 400;
  font-style: normal; 
  font-size: 16px 
}

p.small{ 

  font-family: "Libre Caslon Text", serif;
  font-weight: 400;
  font-style: normal; 
  font-size: 14px 
}


.container {
display: flex; 
flex-wrap: wrap; 
column-gap: 120px; /*I think this should be 125*/
row-gap: 75px;
padding: 125px 0px 125px 0px; /*top right bottom left*/
margin: auto; /* Auto margins for horizontal centering */
justify-content: flex-start; /* Keep items left-aligned within rows */
width: fit-content; /* Make container only as wide as needed */
max-width: 1000px;
/* background-color: greenyellow; */

}

.container-wrapper {
display: flex;
justify-content: center; 
width: fit-content;
/* background-color: lightblue; */
margin-right: auto; 
margin-left: auto;
padding: 0px 
}


.card{
  width: 100px;
  /* flex: 0 0 100px;  */
  text-align: center;
  /* padding: 10px; */
  transition: opacity .1s ease-out;
  display: flex;
  
  flex-direction: column;
  align-items: center;    

  /* background-color: lightcoral; */

}

.card.hidden {
  opacity: 0;
  transform: scale(0);

  transition: opacity .1s ease-out; 
  display: none;
  pointer-events: none;
  margin: 0;
  padding: 0;
  height: 0;
  overflow: hidden;
}

.card.visible {
  opacity: 1;
  transform: scale(1);
  transition: opacity .1s ease-out; 

  pointer-events: auto;
}

.card.fade-in {
  opacity: 1;
  /* transition: opacity .9s ease-out;  */

}

.card.fade-out {
  opacity: 0;
  /* transition: opacity .9s ease-out; */

}


.card img {
  width: 100%;  /* Fill the width of the card */
  height: 80px;  /* Fixed height for consistency */
  object-fit: contain;
  margin-bottom: 5px;
}

img {
  /* width: 100px; 
  height: 100px;   */
  object-fit: contain;
}


.select{ 
  background: var(--color-background); 
  color: var(--color-primary); 
  display: flex; 
  justify-content: space-between;
  align-items: center; 
  border: 2px var(--color-primary) solid; 
  border-radius: 0.7em; 
  padding: 1em; 
  width: 100%; 
  box-sizing: border-box;
  transform: translateY(20%);
  transition: 
    background-color 0.3s ease-out,
    border 0.3s ease-out,
    color 0.3s ease-out;

}

.menu{
  list-style: none; 
  padding: .5em .5em; 
  background: var(--color-background);
  border-radius: 0.5em;
  border-width: 3px;
  border-style: solid;
  text-align: left;
  color: var(--color-primary);
  position: absolute; 
  top: 3.5em; 
  left: 50%; 
  width: 100%; 
  box-sizing: border-box;
  transform: translateX(-50%); 
  opacity: 0; 
  display: none;
  transition: .2s; 
  z-index:1; 
  max-height: 300px;
  overflow-y: scroll
  
}

.list li{
  color: var(--color-primary);
  margin: 5px; 
}

.recipe-list li{
  margin: 5px; 
}

.list li{
  margin: 5px;
}

.select:hover{
  background: var(--color-secondary);
}

.select-clicked{
  border: 2px var(--color-primary) solid;
}

.caret {
  width: 0; 
  height: 0; 
  border-left: 6px solid transparent; 
  border-right: 6px solid transparent; 
  border-top: 7px solid var(--color-primary); 
  transition: 0.3s
}

.caret-rotate{
  transform: rotate(180deg); 
}



.active {
  background: var(--color-primary); 
  color: var(--color-background);
  width: 100%; 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0.7em; 
  border-radius: 0.7em;
}

.menu-open{
  display: block; 
  opacity: 1; 
}

.menu li{ 
  padding: .75em;
  width: 100%; 
  display: flex; 
  justify-content: flex-start;
  align-items: center; 
  box-sizing: border-box; 

}

.menu li:hover{
  background: var(--color-secondary);
  color: var(--color-primary); 
  border-radius: 0.5em; 
}

.menu::-webkit-scrollbar{
  width: 1em; 
}

.menu::-webkit-scrollbar-track{
  border-radius: 2em;
}

.menu::-webkit-scrollbar-thumb{
  background: var(--color-secondary); 
  border-radius: 2em;
}


.about-container{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;


}


/* Mobile styles */
@media screen and (max-width: 767px) {
  .container {
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    grid-gap: 2.5rem;
    padding: 30px 10px 60px 10px;
    justify-content: center;
    margin: 5px;
  }
  
  .header {
    padding: 30px 30px 80px 30px;
    margin: 5px;
  }


  #header-title, #datetime {
    margin: 10px 0;
    text-align: center;
    z-index: 1;
    position: relative;
    white-space: normal;
  }

  
  h1 {
    font-size: 24px;
    text-wrap: wrap; 
  }
  
  h2 {
    font-size: 16px;
    text-wrap: wrap;
  }

  h3 {
    font-size: 16px;
  }

  p {
    font-size: 14px; 
  }

  li {
    font-size: 14px; 
    margin: 5px
  }
  
  .card {
      flex: 0 0 25%; /* Make each card take roughly 1/3 of the container width */
      width: 25%; /* Match the flex basis */
      max-width: 75px; /* Set a maximum width */
      min-width: 50px; /* Ensure cards don't get too small */
  }
  .card p {
      font-size: 14px; 
  }

  img {
      width: 100%; 
      height: auto;
      max-height: 250px;
      object-fit: contain;
      display: block;
    }
  
  .dropdown {
    width: 90%;
  }
  
  .footer {
    padding: 30px 20px;
    margin: 5px;
  }

  .menu{
    top: 3em;
  }

  .footer p {
      font-size: 14px; 
  }

  .footer a{
      font-size: 14px;
  }

  .back-button {
    width: 50px;
    height: 50px;
  }
   
 
}

/* Tablet styles */
@media screen and (min-width: 768px) and (max-width: 1025px) {
  .container {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    grid-gap: 100px;
    padding: 100px 50px;
    max-width: 700px; 

  }
}


@media screen and (max-width: 767px) {
  .menu {
    max-height: 250px;
  }
  
  .select {
    padding: 0.8em;
  }
  
  .menu li {
    padding: 0.6em;
  }
}


.about-section{
  padding: 0px;
  max-width: 600px;
  display:flex;
  justify-content: center;
  align-items: center;



}





/* Styles for produce detail page */
.produce-detail {
display: block;
max-width: 1000px;
margin: 2rem auto;
padding: 2rem;
background-color: var(--color-background);
border-radius: 8px;
}

.produce-detail h1 {
color: var(--color-primary);
text-align: center;
margin-bottom: 2rem;
}

.produce-card {

width: 300px;
flex: 0 0 px; 
text-align: center;
display: flex;
flex-direction: column;
align-items: center;    



/* background-color: lightcoral; */

}

.produce-image img {
text-align: center;
margin: 0;
width: 225px;
height: 225px;
}

#about-image {
  text-align: center;
  margin: 0;
  width: 400px;
  height: 400px;
 
  /* background-color: lightcyan; */
  opacity: 1;

  }



.produce-about-image{
  text-align: center;
  margin: 0;
  width: 300px;
  height: 300px;
 
}

.produce-info {
/* background-color: lightblue; */
max-width: 600px; 
}

.info-section{
margin: 40px 40px
}

.about-text{
  margin: 20px 40px
}

.produce-content {
display: flex;
margin: auto; 
padding: 75px 100px; 
max-width: 1000px; 
flex-wrap: wrap; 
justify-content: center;
gap: 1.5rem;

}

.about-content {
  display: flex;
  margin: auto; 
  padding: 75px 100px; 
  max-width: 1000px; 
  flex-wrap: wrap; 
  justify-content: center;
  gap: 1.5rem;
  
  }

/* Initial state - hidden */
.produce-content {
  opacity: 0;
  /* transform: translateY(5px); */
  /* transition: opacity .3s ease-out, transform .3s ease-out; */
  transition: opacity .3s ease-out;
  
}

/* Final state - visible */
.produce-content.fade-in {
  opacity: 1;
  transform: translateY(0);
}


/* Initial state - hidden */
.about-content {
  opacity: 0;
  /* transform: translateY(5px); */
  /* transition: opacity .3s ease-out, transform .3s ease-out; */
  transition: opacity .3s ease-out;
  
}

/* Final state - visible */
.about-content.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Initial state - hidden */
.container-wrapper {
  opacity: 0;
  /* transform: translateY(5px); */
  /* transition: opacity .3s ease-out, transform .3s ease-out; */
  transition: opacity .3s ease-out;
  
}

/* Final state - visible */
.container-wrapper.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Initial state - hidden */
.container-wrapper {
  opacity: 0;
  /* transform: translateY(5px); */
  /* transition: opacity .3s ease-out, transform .3s ease-out; */
  transition: opacity .3s ease-out;
  
}






.produce-content h2 {
color: var(--color-primary);
font-size: 18px;

}

.about-content h2 {
  color: var(--color-primary);
  font-size: 18px;
  
  }


.produce-content h3 {
color: var(--color-primary);
font-family: "Libre Caslon Text", serif; 
font-weight: 700; 
font-style: normal;
font-size: 16px
}

.about-content h3 {
  color: var(--color-primary);
  font-family: "Libre Caslon Text", serif; 
  font-weight: 700; 
  font-style: normal;
  font-size: 16px
  }


.produce-content p {
color: var(--color-primary);
}


.about-content p {
  color: var(--color-primary);
  }
  

nav {

text-align: left;
display: flex; 
align-items: center;
padding: 0.5rem 1rem;
}

nav a {
color: var(--color-background);
text-decoration: none;
font-weight: bold;
font-size: 1.1rem;
transition: color 0.3s ease;
display: inline-block;
padding: 0.5rem 1rem;
border-radius: 4px;
background-color: rgba(255, 255, 255, 0.2);
}

nav a:hover {
background-color: var(--color-secondary);
color: var(--color-primary);
}

/* Mobile styles for produce detail page */
@media screen and (max-width: 767px) {

   /* Produce Details page  */
   .header-details {
    grid-gap: 15px; /* Add some spacing between elements */
    padding: 30px 20px 80px 20px;
    margin: 5px;
   }

  .header-details nav {
    grid-column: 1;
    grid-row: 1;
  }

  #header-title, #datetime {
    margin: 10px 0;
    text-align: center;
    z-index: 1;
    position: relative;
    white-space: normal;
  }

  .header-container {
      
      width: 100%; /* Ensure full width */
      margin: 0px;
      padding:  0px 5px 0px 5px;
      box-sizing: border-box;
      /* background-color: blue; */
  }
  .header-content { 
    /* background-color: green; */
    margin: 0px; 
    padding: 0px;
    box-sizing: border-box;
  }

  

  .produce-detail {
    padding: 1rem; 
    margin: 1rem;
  }
  
  .produce-content {
    display: flex;
    margin: 5px; 
    padding: 20px 15px 80px 15px;
    flex-wrap: wrap; 
    justify-content: center;
    gap: 1.5rem;
  }

  .about-content {
    display: flex;
    margin: 5px; 
    padding: 20px 15px 80px 15px;
    flex-wrap: wrap; 
    justify-content: center;
    gap: 1.5rem;
  }
  

  #about-image{
    width: 350px;
    height: 350px
  }

  .about-text {
    margin: 0px 0px
  }
  .info-section {
    margin: 40px 0px
  }
  .produce-detail h1 {
    font-size: 32px;
  }

  .produce-image img {
    max-width: 150px;
    max-height: 150px;
  }

  .info-section h2 {
    font-size: 18px;
  }
  
  .info-section p {
    font-size: 16px;
  }

  #container-reverse #about-image {
    order: 1; 
  }
  
  #container-reverse .about-section {
    order: 2; 
  }

}