*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    font-family: 'Segoe UI', sans-serif;
    background-color: #f8fef9;
    color: #1f3b2c;
}
.header_wrapper{
    margin-top: 40px;
    margin-left: 150px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: row;
    gap: 35px;
}
.Header{
    display: flex;
    flex-direction: row;
    font-size: 50px;
    font-family: Arial, Helvetica, sans-serif;
    width: 450px;
    height: 125px;
    color: #59A17B;
    padding: 5px;
    text-align: center;
    background-color: #D0F0C0;
    outline: solid 7.5px #ffffff;
    border-radius: 25px;
    justify-content: center;
    align-items: center;
    order: 5;
    margin-bottom: 5px;  
}
.Header h1{
    justify-content: center;
    align-self: center;
    text-align: center;
    margin-right: 80px;
    margin-left: -40px;
}
.caloriePlan{
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    row-gap: 60px;
    overflow: visible;
    margin-top: 15px;
    margin-bottom: 200px;
    min-height: 850px;
    max-height: 1600px;
    width: 450px;
    backdrop-filter: blur(40px);
    box-shadow: 0 24px 16px rgba(0,0,0,0.1);
    background-color:#d0f0c0;
    color: #ffffff;
    border-radius: 30px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    align-items: center;
    font-weight: bolder;
    outline: solid 7.5px #ffffff;
    transition: max-height 0.4s ease-in-out;  
    z-index: 0; 
}
#caloriePlanheading{
    width: 435px;
    height: 35px;
    margin-bottom: 25px;
    margin-top: 25px;
    margin-right: 0px;
    color: #ffffff;
    background-color: transparent;
    border-radius: 10px;
    padding: 2px;
    text-align: center;
    font-size: 30px;  
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
#userName{
    width: 350px;
    height: 10px;
    margin-right: 0px;
    margin-bottom: 0px;
    margin-top: 25px;
    background-color: transparent;
    color: #2c2c2c;
    border-radius: 10px;
    text-align: center;
    font-size: 30px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.totalCalories{
    text-align: center;
}

.weightLossGoal{
    text-align: center;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    row-gap: 30px;   
}
.weightLossGoal h2{
    font-size: 40px;
    height: 80px;
    background-color: #4b5054;
    border-radius: 20px;
    color: #ffffff;
    border: solid 8px #474B4F;
    align-content: center;
}
.mild{
    display: flex;
    flex-direction: column;
    width: 400px;
    height: 80px;
    background-color: #7e8284;
    border-radius: 20px;
    justify-content: center;
    font-size: 50px;
    color: #a3f92a;
    font-weight: bold;
    transition: all ease-in-out 0.2s;
}

.mild:hover{
    background-color: #f6f6f6;
    color: #000000;
    font-size: 58px;
    cursor: pointer;
}

.weightLoss{
    display: flex;
    flex-direction: column;
    width: 400px;
    height: 80px;
    background-color: #7e8284;
    border-radius: 20px;
    justify-content: center;
    font-size: 20px;
    color: #a3f92a;
    font-weight: bold;
    transition: all ease-in-out 0.2s;
}
.weightLoss:hover{
    background-color: #ffffff;
    color: #000000;
    font-size: 22px;
    cursor: pointer;
}
.extreme{
    display: flex;
    flex-direction: column;
    width: 400px;
    height: 80px;
    background-color: #7e8284;
    border-radius: 20px;
    justify-content: center;
    font-size: 20px;
    color: #a3f92a;
    font-weight: bold;
    transition: all ease-in-out 0.2s;
}
.extreme:hover{
    background-color: #ffffff;
    color: #000000;
    font-size: 22px;
    cursor: pointer;
}
.continueBtn{
    text-align: center;
    margin-top: 30px;
    font-size: 40px;
    font-weight: bold;
    height: 60px;
    width: 400px;
    border-radius: 20px;
    border: none;
    background-color: #a3f92a;
    color: rgb(255, 255, 255);
    transition: all ease-in-out 0.2s;
}
.continueBtn:hover{
    background-color: white;
    color: #a3f92a;
    
    width: 410px;
}
.main_wrapper{
    display: flex;
    flex-direction: column;
    height: 100%;
    align-items: center;
}
.main{
    display: flex;
    flex-direction: column;
    align-items: center;
}
.sidebar{
    position: absolute;
    top: 40px;
    right: 0px;
    left: 2.5px;
    bottom: 0px;
    padding: .4em .8rem;
    text-align: center;
    margin-inline: auto;
    width: 450px;
    height: 10px;
    border-radius: 25px;
    outline: solid 7px #ffffff;
    background-color: #D0F0C0;
    transition: all 0.4s ease;
    visibility: hidden;
    opacity: 0;
    z-index: 3;  
}
.sidebar .nav_item{
    visibility: hidden;
    opacity: 0;
    
}
.sidebar.active .nav_item{
    visibility: visible;
    opacity: 1;
    
}

.sidebar.active{
    width: 450px;
    height: 550px;
    visibility: visible;
    opacity: 1;
}

.sidebar ul li{
    position:relative;
    width: 100%;
    height: 85px;
    margin: 0.05rem auto;
    list-style: none;
    line-height: 100px;
    font-family: 'Segoe UI', sans-serif, Helvetica;   
}

.sidebar ul li a{
    
    margin: auto;
    color: hsl(0, 0%, 100%);
    padding: 10px 130px;
    font-size: 35px;
    text-decoration: none;
    border-radius: 50px;   
}
.sidebar ul li a:hover{
    color:  #ffffff;
    background-color: #2E7D32;
    box-shadow: 10px 5px 25px hsl(0, 0%, 81%);
}
.Menu #Menuicon{ 
    text-align: center;
    font-size: 110px;
    cursor: pointer;
    color: hsl(0, 0%, 96%);
    background-color: #2E7D32;
    outline: solid 7.5px #ffffff;
    border-radius: 15px;
}
.Menu{
    margin-top: 5px;
    align-self: start;
    order: 8;
}
.Menu #Menuicon:hover{
    background-color: hsl(0, 0%, 100%);
    color: #2E7D32; 
    outline: solid 7.5px #D0F0C0;
}
a{
    text-decoration: none;
}

.Cards-Container{
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: -30px;
    margin-bottom: 5px;
}
.calorie-card{
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    row-gap: 0px;
    position: relative;
    background: #FFFFFF;
    border-radius: 18px;
    padding: 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bolder;
    min-width: 125px;
    width: 420px;
    height: 135px;
    transition: height 0.4s ease-in;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease-out;
    z-index: 1;
    cursor: pointer;
}
  
.calorie-card:hover {
    transform: scale(1.04);
    transition: transform 0.4s ease-in-out;
}
  
.meal-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 100px;
}
  
.meal-icon {
    font-size: 30px;
}
  
.meal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #4CAF50;
    margin-right: auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.meal-header #maintenance
{
    margin: 0;
    margin-right: 0px;
    font-size: 20px;
    color: #4CAF50;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
  
.meal-name {
    margin: 10px 0;
    color: #666;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    font-weight: bolder;
}
  
.calorie-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
  
.kcal-number {
    font-size: 28px;
    font-weight: 800;
    color: #2E7D32;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
  
.kcal-label{
    font-size: 14px;
    color: #888;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.card-details{
    max-height: 0;
    padding: 0 20px;
    margin-left: -5px;
    margin-right: 0px;
    margin-top: 15px;
    margin-bottom: 25px;
    opacity: 0;
    transition: all 0.3s ease, padding 0.3s ease;
    background: #f8fef9;
    color: #555;
    font-size: 16px;
    font-weight: bolder;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-radius: 15px;
}
.card-details #Goal{
    color: #2E7D32;
    background-color: transparent;
    font-weight: bolder;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

  /* when .expanded is added */
.calorie-card.expanded{
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transition: max-height 0.4s ease;
    transform-origin: top;
    transform: scale(1.2);
    height: auto;
    min-height: 250px;
    max-height: 2000px;
    transition: all 0.4s ease-in-out;
     /* big enough to show your content */
    min-width: 410px;
    background-color: #FFFFFF;
    z-index: 2;
    font-weight: bolder;
}
.calorie-card.expanded .card-details{
    display: flex;
    flex-direction: column;
    max-height: 1600px;
    overflow: visible;
    opacity: 1;
    transition: all 0.85s ease;
    background-color: transparent;
    font-weight: bolder;
    
}
/*Plus button CSS*/
.add-meal-btn{
    overflow: hidden;
    position: absolute;
    display: none;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 4;
    
}
.calorie-card.expanded .add-meal-btn {
    opacity: 1;
    transition: all 0.85s ease;
    position: absolute;           
    bottom: 10px;             
    right: 10px;               
    width: 41px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #4CAF50;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
  
.add-meal-btn .plus-icon {
    font-size: 30px;
    line-height: 1;
    color: #ffffff;
    
}
  
.add-meal-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
  
.add-meal-btn:active {
    transform: scale(0.96);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/*Activity popup : Daily Steps*/
/* Blur overlay */
.popup-overlay{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.15);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    
}
  
/* Show it when active */
.calorie-card.expanded .popup-overlay.active{
    display: flex;
    z-index: 3;
    animation: fadeIn 0.2s ease-in-out;
}
  
/* Popup container */
.popup-container {
    background: white;
    padding: 28px;
    border-radius: 16px;
    width: 310px;
    height: 225px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease;
}
  
.popup-container h2 {
    margin-bottom: 10px;
    font-size: 20px;
    color: #2e7d32; /* DiEtY green */
}
  
/* Input style */
.popup-container input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 20px;
}
/* Buttons */
.popup-buttons {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
  
.submit-btn {
    flex: 1;
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
}
.submit-btn:hover {
    flex: 1;
    background-color: hsl(122, 39%, 39%);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14.25px;
    transition: all 0.2s ease-in-out;
}
  
.cancel-btn {
    flex: 1;
    background-color: #eeeeee;
    color: #333;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
}
.cancel-btn:hover {
    flex: 1;
    background-color: #d4d4d4;
    color: #333;
    font-size: 14.30px;
    transition: all 0.2s ease-in-out;
}
  
/* Fade animation */
@keyframes fadeIn {
    from {
      opacity: 0;
      transform: scale(0.96);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
}
  /*end of popup window*/

  
.user-form {
    width: 450px;
    margin: 15px auto;
    padding: 20px 25px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  }
  
.user-form h2 {
    text-align: center;
    color: #2a8146;
    margin-bottom: 20px;
  }
  
  /* Floating Label Groups */
.form-group {
    position: relative;
    display: flex;
    flex-direction: column;
    margin-top: 28px;
    align-items: center;
  }
  
.form-group input {
    width: 93.5%;
    padding: 20px 12px 12px;
    font-size: 22px;
    color: #373737;
    border: 1px solid #d9e8dd;
    border-radius: 8px;
    background-color: #fefefe;
    transition: border-color 0.3s ease;
  }
  
.form-group input:focus {
    border-color: #4CAF50;
    outline: none;
    font-size: 21px;
  }
  
.form-group label {
    position: absolute;
    top: -7px;
    left: 12px;
    background-color: #fefefe;
    padding: 0px 0px;
    font-size: 21px;
    color: #2a8146;
    opacity: 1;
    transform: translateY(15px);
    transition: 0.25s ease all;
    pointer-events: none;
    
}
  
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    transform: translateY(-15px);
}
  
  /* buttons */
.form-buttons {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    margin-top: 30px;
}
  
.user-form button {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}
  
.user-form button[type="submit"] {
    background: #2a8146;
    color: white;
  }
  
.user-form button[type="submit"]:hover {
    background: #256b3a;
  }
  
.reset-btn {
    background: #e0e0e0;
    color: #333;
  }
  
.reset-btn:hover {
    background: #cccccc;
  }


/*DragDropzone CSS*/
.drag-Wrapper {
    display: none;
    background: #FFFFFF;
    border-radius: 0px 0px 15px 15px;
    padding: 20px;
    margin-left: 0px;
    margin-right: 0px;
    margin-top: 20px;
    max-width: 750px;
    height: auto !important;
    max-height: 1600px;
    font-family: 'Segoe UI', sans-serif;
    visibility: hidden;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.8s ease;
}
.calorie-card.expanded .drag-Wrapper.active{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    visibility: visible;
    opacity: 1;
    transition: opacity 0.8s ease-in-out;
    margin-left: 0px;
    margin-right: 0px;
    margin-top: 0px;
    min-height: 500px;
    max-height: 2000px !important;
    height: auto !important;
    width: auto !important;
    min-width: 420px !important;
    background-color: #ffffff;
    z-index: 3;
} 

.ingredients-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    row-gap: 20px;
    column-gap: 20px;
    margin-top: 15px;
}
.ingredients-container ul{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: center;
    row-gap: 7px;
    column-gap: 7px;
    margin-top: 10px;
}
.ingredients-list {
    display: flex;
    flex-direction: column;
    padding: 20px;
    margin-top: 100px;
    margin-bottom: 50px;
    align-items: center;
    justify-content: center;
    column-gap: 10px;
    row-gap: 10px;
    margin-right: auto;
    margin-left: auto;
  }
/*ingredient card design*/
.ingredient {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #9eff6da8;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border: 1.5px solid #bde7cd;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 0.3rem 0.5rem;
    font-size: 1rem;
    width: 120px;
    height: 35px;
    font-weight: 500;
    cursor: grab;
    transition: all 0.2s ease;
    user-select: none;
}
.ingredient:hover {
    background-color:#9eff6ded;;
    transform: scale(1.06);
  }
  
.ingredient:active {
    transform: scale(1.05);
}
  
.drop-zone {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 5px;
    row-gap: 1px;
    background: #eef8ee;
    border-radius: 12px;
    min-height: 100px;
    min-width: 230px;
    max-height: 900px;
    max-width: 500px;
    padding: 2px;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px;
}
.drop-zone p{
    color: #2E7D32;
    margin-top: 5px;
    margin-bottom: 15px;
    width: 350px;
    height: 25px;
    text-align: center;
    background-color: transparent;
}
  
.drop-zone ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content:center;
    align-items: center;
    column-gap: 5px;
    row-gap: 1px;
    list-style: none;
    padding: 5px;
    margin-top: 3px;
    margin-bottom: 5px;
    margin-right: 10px;
    margin-left: 10px;
}
  
.drop-zone li {
    background-color: #9eff6da8;
    padding: 6px;
    border-radius: 6px;
    font-size: 14px;
    max-width: 90px;
    min-width: 55px;
    min-height: 35px;
    margin-top: 5px;
    margin-bottom: 10px;
}

.btn-Container{

    display: flex;
    flex-direction: row;
    row-gap: 15px;
    column-gap: 15px;
    justify-content: center;
    align-items: center;
    width: 275px;
    height: 50px;
    background-color: transparent;
    margin-left: auto;
    margin-right: auto;
    margin-top: 10px;
    margin-bottom: 0px;
    z-index: 5;
}
.log-meal-btn {
    margin-top: -10px;
    margin-bottom: 0px;
    background-color: #3cb043;
    color: white;
    border: none;
    max-width: 450px;
    max-height: 39px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: bolder;
    cursor: pointer;
    margin-left: auto;
    margin-right: auto;
}
.log-meal-btn:hover {
    
    background-color: #54f75f;
}
.log-meal-btn:active {
    
    background-color: #a8fbad;
}
.resetBtn{
    margin-top: -10px;
    margin-bottom: 0px;
    background-color: #b03c3c;
    color: white;
    border: none;
    max-width: 300px;
    height: 39px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-left: auto;
    margin-right: auto;
}
.resetBtn:hover{
    
    background-color: #fa5454;
  
}
.resetBtn:active{
    
    background-color: #ff9797;
  
}


#SuggestedMealHeading{
    text-align: center;
    width: 400px;
    margin-bottom: -10px;
    margin-top: 5px;
}
#leaf_icon{
    width: 180px;
    height: 180px;
    background-color: transparent;
    margin-left: -20px;
    margin-top: -5px;
    
}


/* ---- Radio-driven ingredient carousel (works with the EJS you have) ---- */
.ing-window{
    overflow: hidden;
    margin-top: 10px;
}
.ing-toggle { position: absolute; opacity: 0; pointer-events: none; }


.ing-viewport {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  overflow: hidden;
  width: auto;
  height: auto;
  transform: translateX(0%);
  transition: transform .35s ease;
  will-change: transform;
  margin-top: 5px;
  margin-bottom: 15px;
}

.ing-page { 
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-top: 5px;
    height: 250px;
    width: 150px;
 }

.calorie-card.expanded .drag-Wrapper.active { 
    width: 100%; 
}

/* Optional: unify list layout inside pages to avoid flex/grid clashes */
.ingredients-container .ing-page .ingredient-list{
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  row-gap: 7px;
  column-gap: 7px;
  margin: 0;
  padding: 0;
}

/* Bottom controls */
.ing-controls{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.ing-prev,
.ing-next{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  font-size: 20px;
  cursor: pointer;
  user-select: none;
}

.ing-dots{ 
    display: flex; 
    gap: 6px; 
    align-items: center; 
}

.ing-dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.25);
  cursor: pointer;
}

/* ---- Slide positions per card (2 pages each) ---- */
/* Breakfast */
#bf-p1:checked ~ .ingredients-container .ing-viewport { 
    transform: translateX(0%);
 }
#bf-p2:checked ~ .ingredients-container .ing-viewport { 
    transform: translateX(-100%);
 }
/* Breakfast dots */
#bf-p1:checked ~ .ingredients-container .ing-dots label:nth-child(1),
#bf-p2:checked ~ .ingredients-container .ing-dots label:nth-child(2){
  background: #2E7D32;
  transform: scale(1.2);
}

/* Lunch */
#lu-p1:checked ~ .ingredients-container .ing-viewport { transform: translateX(0%); }
#lu-p2:checked ~ .ingredients-container .ing-viewport { transform: translateX(-100%); }
/* Lunch dots */
#lu-p1:checked ~ .ingredients-container .ing-dots label:nth-child(1),
#lu-p2:checked ~ .ingredients-container .ing-dots label:nth-child(2){
  background: #2E7D32;
  transform: scale(1.2);
}

/* Dinner */
#di-p1:checked ~ .ingredients-container .ing-viewport { transform: translateX(0%); }
#di-p2:checked ~ .ingredients-container .ing-viewport { transform: translateX(-100%); }
/* Dinner dots */
#di-p1:checked ~ .ingredients-container .ing-dots label:nth-child(1),
#di-p2:checked ~ .ingredients-container .ing-dots label:nth-child(2){
  background: #2E7D32;
  transform: scale(1.2);
}






/* Carousel core */
.ing-carousel{
  width: 100%;
  overflow: hidden;
}

.ing-viewport{ 
  overflow: hidden; 
  width: 100%;
  margin-top: 15px;
}

/* Track shows one page at a time; JS translates it */
.ing-track{
  display: flex;
  width: 100%;
  transition: transform .35s ease;
  will-change: transform;
}

/* Each page equals the viewport width */
.ing-page{
  flex: 0 0 100%;
  width: auto;
  height: auto;
}

/* Grid of pills inside a page */
.ing-page .ingredient-list{
  list-style: none;
  margin-top: 25px;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}

/* Tighten pills so 3× rows fit nicely */
.ingredient{
  width: auto;           
  min-width: 0;
  justify-content: center;
}

/* Controls pinned to bottom of the drag wrapper */
.ing-controls{
  
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: auto;
  background-color: transparent;
  color: #000000;
}

.ing-arrow,
.ing-prev,
.ing-next{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  font-size: 20px;
  line-height: 34px;
  cursor: pointer;
}

.ing-dots{
  display: flex;
  gap: 6px;
  align-items: center;
}

.ing-dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,.25);
  border: none;
  cursor: pointer;
}

.ing-dot.active{
  background: rgba(0,0,0,.6);
  transform: scale(1.1);
}

/* Drop-zone spacing so it sits neatly under the list */
.drop-zone{
  margin-top: 10px;
}
.Lang{
    position: fixed;
    left: 83%;
    min-width: 200px;
    max-width: 200px;
    max-height: 45px;

}


.lang-select-wrap{ 
        position:relative; 
}

.lang-select{
      appearance:none; -webkit-appearance:none; -moz-appearance:none;
      font:inherit; line-height:1.2; padding:.45rem 2rem .45rem .75rem;
      border:1px solid #d9d9d9; border-radius:10px; background:#fff; cursor:pointer;
       min-width:100px;
      max-width: 100px;
      max-height: 45px;
}

.lang-select-wrap::after{
      content:"▾"; position:absolute; inset-inline-end:.6rem; top:50%; transform:translateY(-50%);
      pointer-events:none; opacity:.7; font-size:1rem;
}
.Registration-Area{
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 415px;
    height: 225px;
    background-color: hsl(0, 0%, 100%);
    align-items: center;
    margin-top: 25px;
    margin-bottom: 15px;
    border-radius: 20px;
    border: solid 4px hsl(100, 62%, 48%);
    margin-left: -8px;
    margin-right: -8px;

}

    
.login-group{
    position: relative;
    display: flex;
    flex-direction: column;
    margin-top: 28px;
    align-items: center;
}
.login-group input{
    width: 93.5%;
    padding: 20px 12px 12px;
    font-size: 22px;
    color: #373737;
    border: 1px solid #d9e8dd;
    border-radius: 8px;
    background-color: #fefefe;
    transition: border-color 0.3s ease;
}
.login-group input:focus {
    border-color: #4CAF50;
    outline: none;
    font-size: 21px;
  }
  
.login-group label {
    position: absolute;
    top: -7px;
    left: 12px;
    background-color: #fefefe;
    padding: 0px 0px;
    font-size: 21px;
    color: #2a8146;
    opacity: 1;
    transform: translateY(15px);
    transition: 0.25s ease all;
    pointer-events: none;
    
}
  
.login-group input:focus + label,
.login-group input:not(:placeholder-shown) + label {
    transform: translateY(-10.5px);
}
#label-email {
     
     background-color: #fefefe;
}
#label-password{
     background-color: #fefefe;
}
.log-in_input{
  min-width: 375px;
  height: 50px;
  margin-bottom: 0px;
  margin-top: 0px;
}
#Log-in-Btn{
    position: relative;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 5px;
    margin-left: 14px;
    background-color: #b8e02a;
    color: #7b7b7b;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
}
#log-in-bttn{
    background-color: hsl(146, 92%, 47%);
    color: white;
    border: none;
    max-width: 125px;
    max-height: 40px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
    margin-top: 15px;
    margin-bottom: 15px;
}
#log-in-bttn:hover{
    background-color: hsl(157, 84%, 40%);
}
#log-in-bttn:active{
    background-color: hsl(157, 84%, 30%);
}
.log-reset-btn{
    max-width: 125px;
    max-height: 50px;
    background: #e0e0e0;
    color: #333;
}
.log-reset-btn:hover{
    background: hsl(0, 0%, 75%);
    
}
.log-reset-btn:active{
    background: hsl(0, 0%, 65%);
    
}
.log-inbuttons-container{
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  
}
html[dir="rtl"] .Registration-Area .log-in_input + label{
            top: 2px;
            left: auto;
            right: 10px;
            text-align: right;
            direction: ltr !important;
}
 html[dir="rtl"] .login-group input:focus + label,
.login-group input:not(:placeholder-shown):valid + label {
    transform: translateY(5px);
}
html[dir="rtl"] #Log-in-Btn {margin-right: 14px;}
html[dir="rtl"] #label-email { margin-left: -20px; margin-top: -8px;}
html[dir="rtl"] #label-password{ margin-left: 20px; margin-top: -8px;}
html[dir="rtl"] .header_wrapper{flex-direction:row-reverse !important} 
html[dir="rtl"] .calorie-card.expanded .drag-Wrapper.active{ margin-left: 0px; margin-right: -15px;}
html[dir="rtl"] .Header{flex-direction:row-reverse !important }
html[dir="ltr"] .Header{flex-direction:row !important} 
html[dir="rtl"] .meal-header h3{margin-left: auto !important; margin-right: 0px; }
html[dir="ltr"] .meal-header h3{margin-right: auto !important;}
html[dir="ltr"] .calorie-card.expanded .drag-Wrapper.active{ margin-left: -15px; margin-right: 0px;}
html[dir="ltr"] .header_wrapper{flex-direction:row !important}
html[dir="ltr"] .ing-viewport{direction: ltr !important}
html[dir="rtl"] .ing-viewport{direction: ltr !important}
html[dir="ltr"] .ing-window{direction: ltr !important}
html[dir="rtl"] .ing-window{direction: ltr !important}
html[dir="ltr"] .ingredients-container{direction: ltr !important}
html[dir="rtl"] .ingredients-container{direction: ltr !important}
html[dir="ltr"] .ing-page{direction: ltr !important}
html[dir="rtl"] .ing-page{direction: ltr !important}
html[dir="ltr"] .user-form{direction: ltr !important}
html[dir="rtl"] .user-form{direction: rtl !important}
html[dir="rtl"] .calorie-card.expanded .add-meal-btn {
    opacity: 1;
    transition: all 0.85s ease;
    position: absolute;           
    bottom: 79%;             
    right: 86%;
}

html[dir="rtl"] .form-group label{
    position: absolute;
    top: 0;
    left: 64%;
    font-size: 22px; 
    direction: ltr;
    
}
html[dir="rtl"] .form-group .label-age{
    position: absolute;
    top: 0;
    left: 80%;
    font-size: 22px; 
    direction: ltr;
    
}
html[dir="rtl"] .form-group .label-weight{
    position: absolute;
    top: 0;
    left: 80%;
    font-size: 22px; 
    direction: ltr;
    
}
html[dir="rtl"] .form-group .label-height{
    position: absolute;
    top: 0;
    left: 77.5%;
    font-size: 22px; 
    direction: ltr;
    
}

html[dir="ltr"] .form-group label {
    position: absolute;
    top: -8px;
    left: 6%;
    font-size: 27px; 
    
}


html[dir="ltr"] .form-group input:focus + label,
.form-group input:not(:placeholder-shown):valid + label {
    transform: translateY(-5.5px);
}

/* Exact match: iPhone 13 Pro Max, portrait */
@media screen and (min-width: 300px ) and (max-width: 899px) {
           
           .meal-header {
            margin-top: 10px;
           }
          html[dir="rtl"] .Header{
                     margin-top: 10px !important;
}
html[dir="rtl"] .header_wrapper{
        display: flex;
        flex-direction: column !important;
        height: 100%;
        width: 100vw;
        column-gap: 15px;
        align-items: center;
        justify-content: center;
        row-gap: 15px;
        flex-wrap: nowrap;
        margin-top: 65px;
        margin-left: 0px;
    }
html[dir="rtl"] .header_wrapper .Menu{
        order: -1;
        margin-top: 10px;
        margin-left: 0px;
        margin-right: 0px;
        align-self: center;
    }
html[dir="rtl"] .header_wrapper .Header{
        order: 0;
        margin-top: 5px;

    }
    html[dir="rtl"] #Menuicon{
        width: 445px;
        height: 75px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    html[dir="rtl"] .sidebar{
    position: absolute;
    top: 175px;
    right: 0px;
    left: 2.5px;
    bottom: 0px; 
      }
    html[dir="rtl"] .ingredient {
    color: black;
    font-weight: 550;
}
    html[dir="rtl"] .Lang{
    position: absolute !important;
    right: 5.5%;
    margin-top: 0px;
}
html[dir="rtl"] .meal-header h3{margin-inline: auto; }




html[dir="ltr"] .header_wrapper{
        display: flex;
        flex-direction: column !important;
        height: 100%;
        width: 100vw;
        column-gap: 15px;
        align-items: center;
        justify-content: center;
        row-gap: 15px;
        flex-wrap: nowrap;
        margin-top: 65px;
        margin-left: 0px;
    }
    html[dir="ltr"] .header_wrapper .Menu{
        order: -1;
        margin-top: 10px;
        margin-left: 0px;
        margin-right: 0px;
        align-self: center;
        
        
    }
    html[dir="ltr"] .header_wrapper .Header{
        order: 0;
        margin-top: 10px;

    }
    html[dir="ltr"] #Menuicon{
        width: 445px;
        height: 75px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    html[dir="ltr"] .sidebar{
    position: absolute;
    top: 175px;
    right: 0px;
    left: 2.5px;
    bottom: 0px; 
    }
    html[dir="ltr"] .ingredient {
    color: black;
    font-weight: 550;
}
    html[dir="ltr"] .Lang{
    position: absolute !important;
    top: -0.35% !important;
    left: 5%;
    margin-top: 10px;
    margin-bottom: 0px;
}


  .caloriePlan{
    min-width: 80vw !important;
    max-width: 88vw !important;
    min-height: 900px !important;
    max-height: 1600px !important;
    padding: 14px 12px !important;
  }

  .calorie-card{
    max-width: 500px !important;
    min-height: 155px !important;
    max-height: 100% !important;
    row-gap: 2px;
    margin: 0 auto;
  }
  .calorie-card.expanded{
    transform: scale(1.15) !important;
    height: auto !important;
    min-width: 415px;
    max-width: 50vw;
  }
  .calorie-card.expanded .card-details{
    max-height: 55vh !important;
    overflow: auto !important;
  }
  .calorie-card.expanded .drag-Wrapper.active{
    min-width: 415px !important;
  }
  .meal-header #maintenance{
    margin-inline: auto;
  }
  .meal-header{ justify-content: space-between !important;  gap: 10px !important; }
  .meal-icon{ font-size: 26px !important;
     }
  .meal-header h3{ font-size: 18px !important; margin-inline: auto; }
  .kcal-number{ font-size: 24px !important; }

  .add-meal-btn,
  .mealBtn{
    position: absolute !important;
    bottom: 70% !important;
    right: 15px !important;
    width: 40px !important;
    height: 40px !important;
  }

  .calorie-card.expanded .drag-Wrapper.active{
    min-width: 390px;
    max-width: 395px;
    margin-left: 15px;
  }
  html[dir="rtl"] .add-meal-btn,
  html[dir="rtl"] .mealBtn{
    left: 12px !important;
    right: auto !important;
  }
}





@media (orientation: landscape) and (max-height: 480px){

  .caloriePlan{
    width: 70vw !important;
    max-height: 86vh !important;
  }

  .calorie-card{
    width: 100% !important;
    height: auto !important;
    padding-bottom: 54px !important;
  }

  .calorie-card.expanded .card-details{
    max-height: 42vh !important;
    overflow: auto !important;
  }

  .add-meal-btn,
  .mealBtn{
    bottom: 8px !important;
    right: 8px !important;
  }
  html[dir="rtl"] .add-meal-btn,
  html[dir="rtl"] .mealBtn{
    left: 8px !important;
    right: auto !important;
  }
}


* {
  -webkit-tap-highlight-color: transparent;
}
