/* =========================================================
   FAMILY MEALS — style.css
   Pastel, kid-friendly, readable cards + smooth animations
   ========================================================= */

:root{
  --bg1: rgba(255,182,193,0.55);
  --bg2: rgba(255,250,205,0.55);
  --bg3: rgba(173,216,230,0.55);
  --bg4: rgba(221,160,221,0.45);

  --text: rgba(17,24,39,0.95);
  --muted: rgba(17,24,39,0.60);
  --border: rgba(17,24,39,0.10);

  --card: rgba(255,255,255,0.82);
  --card2: rgba(255,255,255,0.68);

  --shadow: 0 18px 45px rgba(17,24,39,0.10);
  --shadow2: 0 10px 22px rgba(17,24,39,0.10);
}

*{ box-sizing: border-box; }

html, body{
  height:100%;
}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue";
  color: var(--text);
  background:
    radial-gradient(1000px 500px at 0% 0%, var(--bg1), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, var(--bg3), transparent 60%),
    radial-gradient(900px 500px at 25% 100%, var(--bg4), transparent 60%),
    radial-gradient(900px 500px at 95% 100%, var(--bg2), transparent 60%),
    linear-gradient(180deg, #ffffff, #f6f7ff);
}

/* =========================
   TOP BAR
   ========================= */

.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 14px 18px;
  background: rgba(255,255,255,0.68);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.brand{
  display:flex;
  gap: 12px;
  align-items:center;
}

.logo{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background:
    radial-gradient(18px 18px at 30% 30%, rgba(255,182,193,0.75), transparent 60%),
    radial-gradient(20px 20px at 75% 35%, rgba(173,216,230,0.70), transparent 60%),
    radial-gradient(24px 24px at 50% 80%, rgba(255,250,205,0.70), transparent 60%),
    rgba(255,255,255,0.90);
  box-shadow: var(--shadow2);
}

.brandText .title{
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.brandText .sub{
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.nav{
  display:flex;
  gap: 10px;
  align-items:center;
}

.tab{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.76);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.tab:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow2);
}

.tab.active{
  background: linear-gradient(90deg,
    rgba(255,182,193,0.70),
    rgba(255,250,205,0.65),
    rgba(173,216,230,0.65),
    rgba(221,160,221,0.60)
  );
}

/* =========================
   LAYOUT
   ========================= */

.container{
  max-width: 1120px;
  margin: 0 auto;
  padding: 34px 18px 40px;
}

.hidden{ display:none !important; }

.headerRow{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

h1{
  font-size: 28px;
  margin: 0;
  letter-spacing: -0.03em;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.70);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn{
  border: 1px solid var(--border);
  background: linear-gradient(90deg,
    rgba(255,182,193,0.70),
    rgba(255,250,205,0.65),
    rgba(173,216,230,0.65)
  );
  color: rgba(17,24,39,0.95);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 12px;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}

.btn:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow2);
}

.btnSmall{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.70);
  color: rgba(17,24,39,0.90);
  padding: 8px 10px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 12px;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}

.btnSmall:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow2);
}

/* =========================
   DAY TABS (Week view)
   ========================= */

.dayTabs{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 16px;
}

.dayTab{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.75);
  color: rgba(17,24,39,0.92);
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}

.dayTab:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow2);
}

.dayTab.active{
  background: linear-gradient(90deg,
    rgba(221,160,221,0.55),
    rgba(173,216,230,0.60),
    rgba(255,250,205,0.60)
  );
}

/* =========================
   CARD GRID
   ========================= */

.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
}


.card{
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow:hidden;
  cursor:pointer;
  transform: translateZ(0);
  transition: transform .14s ease, box-shadow .14s ease;
}

.card:hover{
  transform: translateY(-2px);
  box-shadow: 0 22px 55px rgba(17,24,39,0.13);
}

.imgWrap{
  position: relative;
  height: 160px; /* thumbnail height */
  overflow:hidden;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background:
    radial-gradient(150px 120px at 20% 20%, rgba(255,182,193,0.45), transparent 60%),
    radial-gradient(180px 160px at 80% 30%, rgba(173,216,230,0.45), transparent 60%),
    radial-gradient(200px 180px at 45% 90%, rgba(255,250,205,0.40), transparent 60%),
    rgba(255,255,255,0.65);
}


.mealImg{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
  transform: scale(1.02);
  transition: transform .25s ease;
}

.card:hover .mealImg{
  transform: scale(1.06);
}

/* cute sparkle overlay */
.imgWrap::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(2px 2px at 15% 20%, rgba(255,255,255,0.9), transparent 60%),
    radial-gradient(2px 2px at 30% 60%, rgba(255,255,255,0.8), transparent 60%),
    radial-gradient(2px 2px at 70% 30%, rgba(255,255,255,0.75), transparent 60%),
    radial-gradient(2px 2px at 85% 70%, rgba(255,255,255,0.7), transparent 60%);
  opacity: 0.55;
  pointer-events:none;
}

.cardTop{
  display:flex;
  justify-content: space-between;
  align-items:flex-start;
  gap: 10px;
  padding: 12px 14px 8px;
}

.mealType{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(17,24,39,0.55);
}

.mealName{
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -0.02em;
  margin-top: 3px;
  color: rgba(17,24,39,0.95);
}

.small{
  font-size: 12px;
  color: rgba(17,24,39,0.60);
  margin-top: 2px;
}

.kcal{
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,250,205,0.75);
  border: 1px solid rgba(255,206,86,0.35);
  color: rgba(17,24,39,0.90);
  white-space: nowrap;
}

.tags{
  display:flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 12px;
}

.tag{
  font-size: 11px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.72);
  color: rgba(17,24,39,0.75);
}

/* =========================
   EXPAND DETAILS (FIXED + BONUS)
   ========================= */

/* container reserved space */
.details{
  margin: 0 14px 14px;
  padding: 12px 12px;

  border: 1px solid rgba(17,24,39,0.10);
  border-radius: 16px;

  background: rgba(255,255,255,0.88);
  box-shadow: 0 10px 22px rgba(17,24,39,0.08);

  color: rgba(17,24,39,0.92);

  /* animation default */
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);
  transition: max-height .32s ease, opacity .25s ease, transform .25s ease;
}

/* show on expand */
.card.expanded .details{
  max-height: 520px; /* enough room */
  opacity: 1;
  transform: translateY(0);
}

/* section headings with emoji */
.details h3{
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 950;
  color: rgba(17,24,39,0.95);
}

.details h3.ingredients::before{
  content:"✨ ";
}
.details h3.recipe::before{
  content:"👩🏾‍🍳 ";
}

.details ul, .details ol{
  margin: 0 0 10px;
  padding-left: 18px;
  color: rgba(17,24,39,0.92);
}

.details li{
  margin: 4px 0;
  line-height: 1.35;
}

/* little “tip” badge style if you ever add notes */
.note{
  margin-top: 10px;
  font-size: 12px;
  font-weight: 800;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(90deg,
    rgba(173,216,230,0.35),
    rgba(255,250,205,0.35),
    rgba(255,182,193,0.35)
  );
  border: 1px solid rgba(17,24,39,0.08);
}

/* =========================
   FOOTER
   ========================= */

.footer{
  text-align:center;
  margin-top: 26px;
  padding: 18px 10px;
  border-top: 1px solid var(--border);
  color: rgba(17,24,39,0.55);
  background: rgba(255,255,255,0.35);
}

/* =========================
   PRINT MODE (clean)
   ========================= */

@media print{
  .topbar, .actions, .dayTabs, .footer{ display:none !important; }
  body{ background:#fff; }
  .card{ box-shadow:none; }
  .details{ max-height: none !important; opacity:1 !important; transform:none !important; }
}
