/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
}

/* BODY */
body {
  font-family: "PT Sans", sans-serif;
  background: #f6f8fb;
  color: #2a845d;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ================= HEADER ================= */
.header {
  position: sticky;
  top: 0;
  height: 70px;
  background: #ffffff;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  flex-shrink: 0;
  
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: #1b5e20;
}

.logout-btn {
  background: #2e7d32;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
}

/* ================= HERO (FULL SCREEN) ================= */
.hero {
  min-height: 100vh; /* full screen */
  width: 100%;

  background:
    linear-gradient(
      rgba(46, 125, 50, 0.75),
      rgba(46, 125, 50, 0.75)
    ),
    url("hero-bg.jpg");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  color: #ffffff;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  padding: 20px;
}


.hero-content {
  max-width: 720px;
}

.hero h1 {
  font-size: 44px;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero p {
  font-size: 17px;
  line-height: 1.6;
  opacity: 0.95;
  margin-bottom: 30px;
}

.hero-btn {
  background: #ffffff;
  color: #2e7d32;
  border: none;
  padding: 13px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  
}

.hero-btn a {
  background:  #ffffff;
  transform: translateY(-1px);
}

#login-btn{
  background-color: black;
  color: white;
}

/* ================= HOW IT WORKS ================= */
.how-it-works {
  padding: 80px 40px;
  text-align: center;
  background: #f6f8fb;
}

.how-it-works h2 {
  font-size: 32px;
  margin-bottom: 45px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  max-width: 1100px;
  margin: auto;
}

.how-card {
  background: #ffffff;
  padding: 30px 22px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.how-card .icon {
  width: 56px;
  height: 56px;
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 18px;
}

.how-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.how-card p {
  font-size: 14px;
  line-height: 1.5;
  color: #4b5563;
}

/* ================= AUTH / DASHBOARD ================= */
.container {
  
  width: 100%;
  margin: 0 auto;
  padding: 50px 20px;
}

.card {
  max-width: 420px;
  margin: 40px auto;
  text-align: center;
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  margin-bottom: 30px;
}
.card1 {
  max-width: 70vw;
  margin: 40px auto;
  text-align: center;
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  margin-bottom: 30px;
}
/* Default (landing page) */
.auth-card {
  max-width: 420px;
  margin: 40px auto;
  text-align: center;
}

.mess-card {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  margin-bottom: 30px;
}

.ngo-card {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  margin-bottom: 30px;
}

/* Only for sign-in & sign-up pages */
.auth-page .auth-card {
  width: 50%;
  max-width: 600px;
}

input, select {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.primary-btn {
  background: #2e7d32;
  color: white;
  border: none;
  padding: 10px 18px;
  margin: 10px 0px;
  border-radius: 6px;
  cursor: pointer;
}



.secondary-btn {
  background: #2e7d32;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  margin: 10px 0px;
}

.secondary-btn a{
  text-decoration: none;
  color: #2e7d32;
  font-weight: 600;
}

.secondary-btn a:hover {
  text-decoration: none;
}

/* ================= UTILITY ================= */
.hidden {
  display: none;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Ensure sections fill screen height properly */
.hero,
.how-it-works,
#auth-section {
  min-height: 70vh;
  scroll-margin-top: 80px; /* prevents header overlap */
}
.hero{
  min-height: 100vh;
  scroll-margin-top: 80px; /* prevents header overlap */
}

/* Optional: slight highlight when auth section is targeted */
#auth-section:target {
  animation: focusGlow 0.6s ease;
}

@keyframes focusGlow {
  from {
    box-shadow: 0 0 0 rgba(46,125,50,0);
  }
  to {
    box-shadow: 0 0 0 rgba(46,125,50,0.25);
  }
}


/* FIX GET STARTED LINK LOOKING LIKE BLUE LINK */
.hero-btn,
.hero a,
a.hero-btn {
  display: inline-block;
  background: #ffffff;
  color: #2e7d32 !important;
  text-decoration: none !important;   /* remove underline */
  border: none;
  padding: 12px 26px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

/* Hover effect like real button */
.hero-btn:hover,
.hero a:hover,
a.hero-btn:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
 
}

/* Remove blue / purple visited link color */
.hero-btn:visited,
.hero a:visited,
a.hero-btn:visited {
  color: #2e7d32 !important;
}

/* ================= HEADER BUTTONS ================= */

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
   text-decoration: none;
  color: inherit;
}

.header-actions a:hover {
  text-decoration: none;
}

.header-btn {
  display: inline-block;              /* 🔥 important */
  background: white;
  color: #21c82c;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;              /* 🔥 remove underline */
}

.header-btn:visited {
  color: #1b5e20;                      /* 🔥 stop purple */
}

.header-btn:hover {
  background: #e8f5e9;
}

.header-btn.outline {
  background: white;
  color: #1b5e20;
  border: none;
}
.header-actions a,
.header-actions a:hover {
  text-decoration: none !important;
}

.food-card {
  background: #f9fafb;
  padding: 14px;
  border-radius: 8px;
  border-left: 3px solid #2e7d32;
  border-right: 3px solid #2e7d32;
  border-top: 1px solid #2e7d32;
  border-bottom: 1px solid #2e7d32;
  margin-top: 12px;
}


.auth-link a {
  text-decoration: none;
  color: #2e7d32;
  font-weight: 600;
}

.auth-link a:hover {
  text-decoration: none;
}

/* ================= MAP LOCATION PICKER ================= */

.location-wrapper {
  position: relative;
}

.location-btn {
  position: absolute;
  right: 8px;
  top: 17px;
  border-radius: 5px;
  background-color: rgb(218, 216, 213);
  border: none;
  cursor: pointer;
  font-size: 18px;
}

.map-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
}

.map-modal-content {
  background: white;
  width: 90%;
  max-width: 600px;
  margin: 40px auto;
  padding: 10px;
  border-radius: 8px;
}

#map {
  height: 400px;
  margin-bottom: 10px;
}


#foodMap {
  height: 60vh;
  width: 100%;
  border-radius: 8px;
  margin-top: 10px;
}

.role-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 15px;
}

/* One row per role */
.role-option {
  display: flex;
  align-items: center;
  gap: 12px;              /* space between circle & text */
  font-size: 16px;
  cursor: pointer;
  padding: 5px;
  margin-bottom: 10px;
  white-space: nowrap;   /* 🔥 text stays in ONE LINE */
}

.role-option:hover {
  background: #c2f5d6;
  border-radius: 6px;
}

/* Bigger radio circle */
.role-option input[type="radio"] {
  transform: scale(1.3); /* 🔥 increase circle size */
  margin: 0;
  cursor: pointer;
}


/* ================= NGO DASHBOARD LAYOUT ================= */

.ngo-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;   /* side by side */
  gap: 30px;
  align-items: start;
}

/* Make cards full width inside grid */
.ngo-dashboard-grid .card {
  max-width: 100%;
  margin: 0;
}

/* 📱 Mobile friendly */
@media (max-width: 900px) {
  .ngo-dashboard-grid {
    grid-template-columns: 1fr;    /* stack on mobile */
  }
}

/* NGO header row */
.ngo-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* NGO food map */
#ngoFoodMap {
  height: 400px;
  width: 100%;
  border-radius: 8px;
}

/* 🔹 NGO map close button spacing */
#ngoMapModal .secondary-btn {
  margin-top: 13px;   /* increase space above */
  margin-left: 0;   
}

.ngo-header-row button {
  border-left: 0.5px solid #f45252;
  border-right: 0.5px solid #f45252;
  border-top: 0.5px solid #f45252;
  border-bottom: 0.5px solid #f45252;
}

/* 🔥 Active date selection button */
.secondary-btn.active {
  background: #2e7d32;
  color: #ffffff;
  border: 1px solid #2e7d32;
}

/* 🔹 Smaller Today / Tomorrow buttons (Mess dashboard) */
#todayBtn,
#tomorrowBtn {
  padding-top: 6px;     
  font-size: 13px;     
  margin-left: 0;        
}

/* ================= AI ASSISTANT ================= */

.ai-btn {
  margin-top: 15px;
  background: #ffffff;
  color: #3b552d;
  border: 2px solid #2e7d32;
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.ai-btn:hover {
  background: #e8f5e9;
}

.ai-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
}

.ai-modal-content {
  background: white;
  width: 90%;
  max-width: 500px;
  margin: 60px auto;
  padding: 25px;
  border-radius: 10px;
  text-align: center;
}

.ai-options {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}

.chat-area {
  margin-top: 15px;
}

.chat-messages {
  max-height: 200px;
  overflow-y: auto;
  background: #f9fafb;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  text-align: left;
  font-size: 14px;
}

.chat-messages p {
  margin-bottom: 8px;
}

.close-ai {
  margin-top: 15px;
}

/* ================= FLOATING AI BUTTON ================= */

.ai-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #1d2e1d;
  color: white;
  border: none;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  z-index: 1200;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: transform 0.2s ease, box-shadow 0.2s ease;

  /* 🔥 JUMP ANIMATION */
  animation: aiJump 0.8s ease-in-out infinite;
}




/* ================= AI BUTTON JUMP ANIMATION ================= */

@keyframes aiJump {
  0% {
    transform: translateY(0);
  }
  20% {
    transform: translateY(-8px);
  }
  70% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(0);
  }
}




.ai-fab:hover {
  animation-play-state: paused;
  transform: translateY(-10px) scale(1.1);
}


.ai-fab:active {
  transform: scale(0.95);
}

/* ================= VOICE FOOD POST BUTTON ================= */


.voice-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;          /* ✅ moved to bottom-right */
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #2e7d32;
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
  z-index: 1200;

  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-fab:hover {
  background: #1b5e20;
}


/* ================= VOICE CANCEL BUTTON ================= */

.voice-cancel {
  position: fixed;
  bottom: 90px;
  right: 24px;      /* ✅ align with voice button */
  background: #ffffff;
  color: #b71c1c;
  border: 2px solid #b71c1c;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  z-index: 1200;
}


.voice-cancel:hover {
  background: #fdecea;
}

/* ================= VOICE BUTTON ================= */
.voice-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #2e7d32;
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 1200;
}

/* ================= VOICE MODAL ================= */
.voice-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  z-index: 1300;
  display: none;          /* ✅ DEFAULT HIDDEN */
}

.voice-modal.show {
  display: flex;          /* ✅ ONLY when active */
}

.voice-modal-content {
  background: white;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  width: 260px;
}

.mic-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.voice-cancel-btn {
  margin-top: 15px;
  background: #c62828;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
}
#confirmPostModal {
  z-index: 1200;
}


/* ================= HEADER (PC DEFAULT) ================= */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  

  position: sticky;
  top: 0;
  z-index: 1000;

  background: white;        /* important */
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.header-actions {
  display: flex;
  gap: 15px;
}

/* Hamburger hidden on PC */
.hamburger {
  display: none;
  font-size: 26px;
  cursor: pointer;
}

/* ================= MOBILE ONLY ================= */
@media (max-width: 768px) {

  /* Hide buttons on phone */
  .header-actions {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 65px;
    right: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 1000;
  }

  /* Show menu when active */
  .header-actions.active {
    display: flex;
  }

  /* Show hamburger ONLY on phone */
  .hamburger {
    display: block;
  }
}


.header-btn.active {
  background-color: rgba(22, 163, 74, 0.2); /* green with 20% opacity */
  color: #166534; /* darker green text */
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
}


/* ================= MESS DASHBOARD LAYOUT ================= */
#todayBtn,
#tomorrowBtn {
  background: #ffffff;
  color: #2e7d32;
  border: 1px solid #2e7d32;
  transition: all 0.2s ease;
}

/* Active (green) */
#todayBtn.active,
#tomorrowBtn.active {
  background: #2e7d32;
  color: #ffffff;
}

.input-label {
  display: block;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
  margin-bottom: 4px;
  color: #374151;
}






