/* ===================================================
   YumHaven – Master Stylesheet
   =================================================== */

:root {
  --primary:       #e85d04;
  --primary-dark:  #c44b00;
  --primary-light: #fff3e8;
  --accent:        #ffb347;
  --dark:          #1a1a1a;
  --text:          #3d3d3d;
  --text-light:    #777;
  --surface:       #fff;
  --bg:            #fafaf8;
  --border:        #ece8e0;
  --success:       #2d9b5c;
  --font-display:  'Playfair Display', Georgia, serif;
  --font-body:     'Lato', 'Helvetica Neue', sans-serif;
  --radius:        12px;
  --radius-lg:     20px;
  --shadow-sm:     0 2px 8px rgba(0,0,0,.07);
  --shadow:        0 6px 24px rgba(0,0,0,.10);
  --shadow-lg:     0 16px 48px rgba(0,0,0,.14);
  --transition:    .3s cubic-bezier(.4,0,.2,1);
}

/* ---- Reset / Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
  padding-top: 72px;
}
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); color: var(--dark); line-height: 1.25; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; border-radius: var(--radius); }
p { margin-bottom: 1rem; }

/* ---- Page transitions ---- */
.page-section { display: none; animation: fadeIn .45s ease; }
.page-section.active { display: block; }
@keyframes fadeIn { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }

/* ===================================================
   NAVBAR
   =================================================== */
#mainNavbar {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: .85rem 0;
  transition: box-shadow var(--transition);
}
#mainNavbar.scrolled { box-shadow: var(--shadow); }
.brand-icon { font-size: 1.4rem; }
.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
}
.nav-link {
  font-weight: 600;
  font-size: .93rem;
  color: var(--dark) !important;
  padding: .45rem .9rem !important;
  border-radius: 8px;
  letter-spacing: .02em;
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover, .nav-link.active-nav {
  background: var(--primary-light);
  color: var(--primary) !important;
}

/* ===================================================
   HOME – HERO
   =================================================== */
.hero-section {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #1a0a00 0%, #3d1a00 60%, #6b2e00 100%);
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?w=1600&q=80');
  background-size: cover; background-position: center;
  opacity: .28;
}
.hero-content { position: relative; z-index: 2; padding: 80px 0; }
.hero-eyebrow {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .35rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  font-weight: 700;
}
.hero-title span { color: var(--accent); }
.hero-subtitle { font-size: 1.15rem; color: rgba(255,255,255,.82); max-width: 520px; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-hero-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: .85rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  box-shadow: 0 4px 20px rgba(232,93,4,.45);
}
.btn-hero-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(232,93,4,.55); color: #fff; }
.btn-hero-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.7);
  padding: .85rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.btn-hero-outline:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.hero-stats { display: flex; gap: 2.5rem; margin-top: 3rem; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat-num { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--accent); display: block; }
.hero-stat-label { font-size: .82rem; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .08em; }
.hero-image-col { display: flex; align-items: center; justify-content: center; }
.hero-image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: rotate(2deg);
  transition: transform var(--transition);
  width: 100%; max-width: 440px;
}
.hero-image-wrap:hover { transform: rotate(0deg) scale(1.02); }
.hero-image-wrap img { width: 100%; height: 420px; object-fit: cover; border-radius: var(--radius-lg); }
.hero-badge {
  position: absolute;
  bottom: 20px; left: 20px;
  background: #fff;
  padding: .7rem 1.1rem;
  border-radius: var(--radius);
  display: flex; align-items: center; gap: .6rem;
  box-shadow: var(--shadow);
  font-size: .88rem; font-weight: 700; color: var(--dark);
}
.hero-badge-icon { font-size: 1.4rem; }

/* ===================================================
   SECTION COMMONS
   =================================================== */
.section-pad { padding: 80px 0; }
.section-label {
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary); margin-bottom: .5rem; display: block;
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .75rem; }
.section-subtitle { font-size: 1.05rem; color: var(--text-light); max-width: 560px; }
.section-divider { width: 52px; height: 4px; background: var(--primary); border-radius: 2px; margin: 1rem 0 2.5rem; }

/* ===================================================
   FEATURE ICONS STRIP
   =================================================== */
.features-strip { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 36px 0; }
.feature-item { display: flex; align-items: center; gap: .9rem; }
.feature-icon { font-size: 1.8rem; color: var(--primary); flex-shrink: 0; }
.feature-text strong { display: block; font-weight: 700; font-size: .95rem; color: var(--dark); }
.feature-text span { font-size: .82rem; color: var(--text-light); }

/* ===================================================
   RECIPE CARDS
   =================================================== */
.recipe-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
  cursor: pointer;
}
.recipe-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.recipe-card-img {
  position: relative; overflow: hidden; height: 220px;
}
.recipe-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; border-radius: 0; }
.recipe-card:hover .recipe-card-img img { transform: scale(1.06); }
.recipe-card-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--primary); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .3rem .75rem; border-radius: 50px;
}
.recipe-card-save {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,.92); width: 34px; height: 34px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--text-light); cursor: pointer;
  transition: color var(--transition), background var(--transition);
  border: none;
}
.recipe-card-save:hover { color: var(--primary); background: #fff; }
.recipe-card-body { padding: 1.25rem; }
.recipe-card-meta { display: flex; gap: 1rem; margin-bottom: .75rem; flex-wrap: wrap; }
.recipe-meta-item { font-size: .8rem; color: var(--text-light); display: flex; align-items: center; gap: .3rem; }
.recipe-meta-item i { color: var(--primary); }
.recipe-card-title { font-size: 1.1rem; font-weight: 700; color: var(--dark); margin-bottom: .5rem; line-height: 1.35; font-family: var(--font-display); }
.recipe-card-desc { font-size: .87rem; color: var(--text-light); line-height: 1.6; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.btn-view-recipe {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--primary-light); color: var(--primary);
  font-weight: 700; font-size: .85rem;
  padding: .5rem 1.1rem; border-radius: 50px; border: none; cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.btn-view-recipe:hover { background: var(--primary); color: #fff; }

/* ===================================================
   FEATURED SECTION (homepage)
   =================================================== */
.featured-section { background: var(--bg); }
.featured-hero-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.featured-hero-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.featured-hero-img { height: 360px; object-fit: cover; width: 100%; border-radius: 0; }
.featured-hero-body { padding: 2rem; }
.featured-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--primary); }
.featured-hero-title { font-size: 1.6rem; margin: .5rem 0; }
.featured-hero-desc { color: var(--text-light); font-size: .95rem; }
.featured-side-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex; gap: 1rem; padding: .9rem; align-items: center;
}
.featured-side-card:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.featured-side-img { width: 80px; height: 80px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.featured-side-title { font-size: .95rem; font-weight: 700; color: var(--dark); margin-bottom: .25rem; font-family: var(--font-display); }
.featured-side-meta { font-size: .78rem; color: var(--text-light); }

/* ===================================================
   SEARCH & FILTER
   =================================================== */
.search-filter-bar { background: var(--surface); border-bottom: 1px solid var(--border); padding: 24px 0; position: sticky; top: 72px; z-index: 100; }
.search-input-wrap { position: relative; }
.search-input-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 1.05rem; }
.search-input {
  width: 100%; padding: .7rem 1rem .7rem 2.6rem;
  border: 2px solid var(--border); border-radius: 50px;
  font-size: .95rem; color: var(--dark); background: var(--bg);
  outline: none; transition: border-color var(--transition);
  font-family: var(--font-body);
}
.search-input:focus { border-color: var(--primary); background: #fff; }
.filter-btn {
  padding: .5rem 1.3rem;
  border-radius: 50px;
  border: 2px solid var(--border);
  background: transparent; color: var(--text); font-weight: 600; font-size: .88rem;
  cursor: pointer; transition: all var(--transition);
  white-space: nowrap;
}
.filter-btn:hover, .filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.filter-scroll { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: 2px; }
.filter-scroll::-webkit-scrollbar { display: none; }

/* ===================================================
   NO RESULTS
   =================================================== */
.no-results { text-align: center; padding: 60px 20px; color: var(--text-light); }
.no-results i { font-size: 3rem; color: var(--border); display: block; margin-bottom: 1rem; }

/* ===================================================
   ABOUT PAGE
   =================================================== */
.about-hero { background: linear-gradient(135deg, var(--primary-light) 0%, #fff 100%); padding: 80px 0 60px; }
.about-hero-title { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1rem; }
.about-hero-img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); height: 420px; object-fit: cover; width: 100%; }
.value-card {
  background: var(--surface); border-radius: var(--radius); padding: 1.75rem;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.value-icon { font-size: 2rem; color: var(--primary); margin-bottom: .75rem; }
.team-card { text-align: center; }
.team-avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; display: block; border: 4px solid var(--primary-light); }
.team-name { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: .2rem; }
.team-role { font-size: .85rem; color: var(--text-light); }

/* ===================================================
   CONTACT PAGE
   =================================================== */
.contact-hero { background: linear-gradient(135deg, var(--primary-light) 0%, #fff 100%); padding: 60px 0 40px; }
.contact-card { background: var(--surface); border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow); border: 1px solid var(--border); }
.contact-info-item { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.contact-info-icon { width: 48px; height: 48px; background: var(--primary-light); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--primary); flex-shrink: 0; }
.form-label { font-weight: 700; font-size: .88rem; color: var(--dark); margin-bottom: .4rem; }
.form-control {
  border: 2px solid var(--border); border-radius: 10px; padding: .75rem 1rem;
  font-size: .95rem; font-family: var(--font-body); color: var(--dark);
  background: var(--bg); transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(232,93,4,.1); background: #fff; outline: none; }
.btn-submit {
  background: var(--primary); color: #fff; border: none;
  padding: .85rem 2.5rem; border-radius: 50px; font-weight: 700; font-size: 1rem;
  cursor: pointer; transition: background var(--transition), transform var(--transition);
  width: 100%;
}
.btn-submit:hover { background: var(--primary-dark); transform: translateY(-2px); }
.form-success { display: none; background: #e8f8f0; border: 1.5px solid var(--success); color: var(--success); border-radius: var(--radius); padding: 1rem 1.5rem; margin-bottom: 1rem; font-weight: 600; }

/* ===================================================
   LEGAL PAGES (Privacy, Terms, Disclaimer)
   =================================================== */
.legal-hero { background: var(--primary-light); padding: 60px 0 40px; border-bottom: 1px solid var(--border); }
.legal-title { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.legal-content { padding: 60px 0; }
.legal-card { background: var(--surface); border-radius: var(--radius-lg); padding: 2.5rem 3rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.legal-card h2 { font-size: 1.4rem; color: var(--primary); margin: 2rem 0 .75rem; border-bottom: 2px solid var(--primary-light); padding-bottom: .5rem; }
.legal-card h2:first-child { margin-top: 0; }
.legal-card p, .legal-card li { font-size: .97rem; color: var(--text); line-height: 1.75; }
.legal-card ul { padding-left: 1.4rem; margin-bottom: 1rem; }
.legal-card ul li { margin-bottom: .4rem; }
.legal-last-updated { font-size: .82rem; color: var(--text-light); margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* ===================================================
   RECIPE MODAL
   =================================================== */
.recipe-modal-content { border: none; border-radius: var(--radius-lg); overflow: hidden; }
.recipe-modal-header { background: linear-gradient(135deg, #1a0a00, #6b2e00); border-bottom: none; padding: 1.5rem 2rem; }
.recipe-modal-header .modal-title { font-family: var(--font-display); color: #fff; font-size: 1.6rem; }
.modal-recipe-hero { height: 300px; object-fit: cover; width: 100%; border-radius: 0; }
.modal-recipe-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; padding: 1.25rem 2rem; background: var(--primary-light); border-bottom: 1px solid var(--border); }
.modal-meta-item { display: flex; align-items: center; gap: .45rem; font-size: .9rem; font-weight: 600; color: var(--dark); }
.modal-meta-item i { color: var(--primary); font-size: 1rem; }
.modal-recipe-body { padding: 2rem; }
.modal-recipe-body h3 { font-size: 1.3rem; color: var(--dark); margin-bottom: 1rem; border-left: 4px solid var(--primary); padding-left: .75rem; }
.ingredient-list { list-style: none; padding: 0; margin-bottom: 1.5rem; }
.ingredient-list li { padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .95rem; display: flex; align-items: center; gap: .5rem; }
.ingredient-list li::before { content: "✓"; color: var(--primary); font-weight: 700; flex-shrink: 0; }
.step-list { list-style: none; padding: 0; counter-reset: step; }
.step-list li { padding: 1rem 0 1rem 3.5rem; border-bottom: 1px solid var(--border); font-size: .95rem; position: relative; counter-increment: step; }
.step-list li::before {
  content: counter(step);
  position: absolute; left: 0; top: 1rem;
  width: 32px; height: 32px;
  background: var(--primary); color: #fff;
  border-radius: 50%; font-weight: 700; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
}
.modal-category-badge { display: inline-block; background: var(--primary-light); color: var(--primary); font-size: .75rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; padding: .3rem .8rem; border-radius: 50px; margin-bottom: .5rem; }

/* ===================================================
   NEWSLETTER SECTION
   =================================================== */
.newsletter-section { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); padding: 70px 0; }
.newsletter-section h2 { color: #fff; font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: .5rem; }
.newsletter-section p { color: rgba(255,255,255,.85); margin-bottom: 1.5rem; }
.newsletter-form { display: flex; gap: .75rem; max-width: 480px; margin: 0 auto; flex-wrap: wrap; }
.newsletter-input {
  flex: 1; padding: .8rem 1.25rem; border: none; border-radius: 50px;
  font-size: .95rem; outline: none; font-family: var(--font-body);
  min-width: 200px;
}
.btn-newsletter {
  background: var(--accent); color: var(--dark); border: none;
  padding: .8rem 1.75rem; border-radius: 50px; font-weight: 700; cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn-newsletter:hover { background: #ffca6a; transform: translateY(-2px); }

/* ===================================================
   TIPS SECTION
   =================================================== */
.tips-section { background: var(--surface); }
.tip-card { background: var(--bg); border-radius: var(--radius); padding: 1.5rem; border: 1px solid var(--border); height: 100%; }
.tip-icon { font-size: 2rem; margin-bottom: .75rem; }
.tip-title { font-size: 1.05rem; font-weight: 700; color: var(--dark); margin-bottom: .5rem; }
.tip-text { font-size: .88rem; color: var(--text-light); }

/* ===================================================
   FOOTER
   =================================================== */
.site-footer { background: #111; color: #aaa; padding: 60px 0 30px; }
.footer-brand { font-family: var(--font-display); color: #fff; font-size: 1.4rem; margin-bottom: .75rem; }
.footer-tagline { font-size: .88rem; color: #888; line-height: 1.7; margin-bottom: 1.25rem; }
.social-links { display: flex; gap: .75rem; }
.social-links a { width: 38px; height: 38px; background: #222; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 1rem; transition: background var(--transition), color var(--transition); }
.social-links a:hover { background: var(--primary); color: #fff; }
.footer-heading { font-family: var(--font-display); color: #fff; font-size: .95rem; font-weight: 600; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: .55rem; }
.footer-links a { color: #888; font-size: .88rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-note { font-size: .78rem; color: #666; line-height: 1.6; }
.footer-note a { color: #888; }
.footer-divider { border-color: #222; margin: 2rem 0 1.5rem; }
.footer-copy { font-size: .82rem; color: #666; margin: 0; }

/* ===================================================
   HOME STATS SECTION
   =================================================== */
.stats-section { background: var(--primary); padding: 50px 0; }
.stat-item { text-align: center; padding: 1rem; }
.stat-num { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: #fff; display: block; }
.stat-label { font-size: .85rem; color: rgba(255,255,255,.78); text-transform: uppercase; letter-spacing: .08em; }

/* ===================================================
   PAGE HEADER (recipes page top)
   =================================================== */
.page-hero { background: linear-gradient(135deg, var(--primary-light) 0%, #fff 100%); padding: 60px 0 40px; border-bottom: 1px solid var(--border); }
.page-hero-title { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: .5rem; }
.page-hero-sub { color: var(--text-light); font-size: 1.05rem; }

/* ===================================================
   BACK-TO-TOP
   =================================================== */
#backToTop {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none; cursor: pointer;
  font-size: 1.2rem; box-shadow: var(--shadow);
  display: none; align-items: center; justify-content: center;
  transition: background var(--transition), transform var(--transition);
}
#backToTop:hover { background: var(--primary-dark); transform: translateY(-3px); }
#backToTop.visible { display: flex; }

/* ===================================================
   LOADING INDICATOR
   =================================================== */
.recipe-count-badge { background: var(--primary-light); color: var(--primary); font-size: .82rem; font-weight: 700; padding: .3rem .8rem; border-radius: 50px; }

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 991px) {
  .hero-image-col { display: none; }
  .hero-stats { gap: 1.5rem; }
  .modal-recipe-body { padding: 1.25rem; }
  .legal-card { padding: 1.5rem; }
}
@media (max-width: 576px) {
  .hero-section { min-height: auto; }
  .hero-content { padding: 60px 0 40px; }
  .filter-scroll { gap: .4rem; }
  .filter-btn { padding: .45rem .9rem; font-size: .82rem; }
  .newsletter-form { flex-direction: column; }
  .newsletter-input { min-width: unset; }
}
