/* CS330 Team Project - Main Styles */
/* Refined, modern styles — improved hero, cards, nav, and responsive behavior */
/* Import Google font for nicer typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --danger-color: #dc3545;
    --container: 1100px;
    --bg: #f6f8fb;
    --card: #ffffff;
    --muted: #6b7280;
    --accent: #2563eb;
    --accent-600: #1f49d7;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 14px;
    --glass: rgba(255, 255, 255, 0.6);
    --shadow-sm: 0 6px 18px rgba(18, 24, 40, 0.06);
    --shadow-lg: 0 18px 40px rgba(18, 24, 40, 0.08);
    --muted-2: #98a0b0;
    font-size: 16px;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
    background: linear-gradient(180deg, var(--bg), #ffffff 40%);
    color: #0b1220;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.45;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 1rem;
}

/* Header */
.site-header {
    background: linear-gradient(180deg, #ffffff, #fbfcff);
    border-bottom: 1px solid #eef2f6;
    position: sticky;
    top: 0;
    z-index: 60;
    backdrop-filter: blur(6px);
}

.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand .logo {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--accent);
}

.nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav a {
    color: #0b1724;
    text-decoration: none;
    padding: 0.45rem 0.7rem;
    border-radius: 10px;
    font-weight: 600;
}

.nav a.active {
    background: linear-gradient(180deg, #eef6ff, #ffffff);
    color: var(--accent-600);
    box-shadow: var(--shadow-sm);
}

.hamburger {
    display: none;
    background: transparent;
    border: none;
    padding: 0.45rem;
    border-radius: 10px;
    font-size: 1.1rem;
}

/* Hero */
.hero {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2.5rem 0 1.25rem;
    align-items: flex-start;
}

.hero-inner {
    display: flex;
    gap: 2rem;
    align-items: center;
    width: 100%;
}

.hero-left {
    flex: 1;
    max-width: 640px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(1.6rem, 3.6vw, 2.4rem);
    line-height: 1.02;
}

.hero p.lead {
    color: var(--muted);
    margin: 0.6rem 0 1rem;
    font-size: 1.02rem;
}

.hero-cta {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.cta-primary {
    background: var(--accent);
    color: #fff;
    padding: 0.7rem 1.1rem;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.cta-ghost {
    background: transparent;
    border: 1px solid #e6ecff;
    color: var(--accent);
    padding: 0.62rem 0.95rem;
    border-radius: 12px;
    cursor: pointer;
}

/* Decorative card on hero right */
.hero-right {
    flex: 0 0 360px;
    display: flex;
    justify-content: center;
}

.hero-card {
    width: 100%;
    background: linear-gradient(180deg, #fff, #fbfbff);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.feature {
    display: flex;
    gap: 0.75rem;
    align-items: start;
    background: #fff;
    padding: 0.75rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.feature .icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #eef6ff, #fff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

/* Search small */
.mini-search {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    width: 100%;
}

.input,
select {
    padding: 0.6rem;
    border: 1px solid #e7edf7;
    border-radius: 10px;
    background: #fff;
    outline: none;
    flex: 1;
}

.input[type="search"] {
    min-width: 0;
}

.btn {
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 700;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    border: 1px solid #e6e9ef;
    color: var(--accent);
    font-weight: 600;
}

/* Filters and results */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 0.75rem 0;
    padding: 0.5rem 0;
}

.results {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
    margin-top: 0.75rem;
}

.status-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 0.95rem;
    padding: 0 0.25rem;
}

/* Card */
.card {
    background: var(--card);
    border-radius: 12px;
    padding: 0.9rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 120px;
}

.card-head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: start;
}

.card-title {
    margin: 0;
    font-size: 1.05rem;
}

.card-meta {
    color: var(--muted);
    font-size: 0.95rem;
}

.chips {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chip {
    font-weight: 700;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    font-size: 0.85rem;
    color: #fff;
}

.chip.easy {
    background: var(--success);
}

.chip.medium {
    background: var(--warning);
    color: #111;
}

.chip.hard {
    background: var(--danger);
}

.card-body {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 0.5rem;
}

.card-left {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid #eef2f8;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    padding: 0.45rem 0.65rem;
    border: none;
    cursor: pointer;
}

.card .muted {
    color: var(--muted);
    font-size: 0.92rem;
}

/* Empty / error */
.empty,
.error {
    padding: 1.25rem;
    border-radius: 10px;
    background: #fff;
    border: 1px dashed #eef3fb;
    color: var(--muted);
    text-align: center;
}

/* Footer */
.site-footer {
    margin-top: 2rem;
    padding: 1.25rem 0;
    color: var(--muted);
    text-align: center;
}

/* Larger layouts */
@media (min-width: 640px) {
    .results {
        grid-template-columns: repeat(2, 1fr);
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 980px) {
    .results {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero {
        padding: 3rem 0 1.5rem;
    }

    .features {
        grid-template-columns: repeat(3, 1fr);
    }

    .hamburger {
        display: none;
    }

    .nav {
        display: flex;
    }
}

@media (max-width: 979px) {
    .nav {
        display: none;
    }

    .hamburger {
        display: block;
    }
}

/* Accessible focus */
a:focus,
button:focus,
input:focus,
select:focus {
    outline: 3px solid rgba(37, 99, 235, 0.14);
    outline-offset: 3px;
}

/* Utilities */
.kv {
    font-weight: 600;
    color: var(--muted);
    font-size: 0.92rem;
}

.small {
    font-size: 0.92rem;
    color: var(--muted);
}

.difficulty-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: bold;
  color: #fff;
  z-index: 5;
}

.difficulty-badge.easy {
  background-color: #4CAF50; /* Green */
}

.difficulty-badge.medium {
  background-color: #F4A100; /* Orange */
}

.difficulty-badge.hard {
  background-color: #E63946; /* Red */
}
/* MAKE TEAM CARDS FIT MORE PER ROW */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));  /* smaller min width */
    gap: 1rem;                                                    /* tighter spacing */
    max-width: 1500px;                                            /* prevents stretching */
    margin: 2rem auto;                                            /* center it */
    padding: 0 1rem;
}

/* SLIMMER CARD STYLE */
.team-card {
    padding: 1rem;                   /* reduced padding */
    border-radius: var(--radius);
    text-align: center;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: .2s ease-in-out;
}

.team-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* SMALLER PHOTO */
.team-photo {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: .75rem;
}

/* TIGHTER TEXT SPACING */
.team-name {
    font-size: 1rem;
    margin-bottom: .2rem;
}

.team-role {
    font-size: .85rem;
    margin-bottom: .5rem;
    color: var(--accent);
}

.team-bio {
    font-size: .8rem;
    line-height: 1.3;
    color: var(--muted);
}
/* ===== FEATURED RECIPES LAYOUT ===== */

.featured-section {
  margin-top: 2rem;
}

.featured-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shuffle-btn {
  padding: 6px 10px;
}

/* Default: Desktop (3 columns) */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 1.5rem;
}

/* Tablet: 2 columns */
@media (max-width: 1024px) {
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: 1 column (flex stack) */
@media (max-width: 650px) {
  .featured-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .featured-card {
    width: 100%;
  }
}

/* ===== CARD ELEMENT REFINEMENTS ===== */

.badge-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #16a34a;
  color: white;
  padding: 6px 12px;
  border-radius: 10px 10px 0 0;
  font-weight: 600;
  font-size: 0.85rem;
}

.badge-time {
  background: #2563eb;
  padding: 2px 10px;
  border-radius: 20px;
  color: white;
}

.recipe-info {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.recipe-thumb {
  width: 75px;
  height: 75px;
  border-radius: 6px;
  object-fit: cover;
}

.recipe-title {
  margin: 0;
}
/* ---------- HEADER MAIN WRAPPER ---------- */
.header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

/* ---------- LOGO ---------- */
.header-logo {
  display: flex;
  flex-direction: column;
  color: white;
  white-space: nowrap;
}

/* ---------- SEARCH BAR ---------- */
.header-search {
  flex: 1;
  display: flex;
  justify-content: center;
}

.header-search-form {
  display: flex;
  width: 100%;
  max-width: 800px;
}

.header-search-input {
  height: 36px;
  font-size: 0.9rem;
}

.header-search-btn {
  height: 36px;
  font-weight: 600;
  margin-left: 0.5rem;
}

/* ---------- RIGHT SIDE ---------- */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* NAV LINKS inline on desktop */
.header-nav {
  display: flex;
  gap: 1rem;
}

/* ---------- MOBILE BREAKPOINTS ---------- */
@media (max-width: 850px) {

  /* STACK WHOLE HEADER */
  .header-wrapper {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 1.2rem;
  }

  /* LOGO: center */
  .header-logo {
    align-items: center;
  }

  /* SEARCH: full width */
  .header-search {
    width: 100%;
    justify-content: center;
  }

  .header-search-form {
    flex-direction: row;
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
  }

  /* NAV STACK VERTICALLY */
  .header-nav {
    flex-direction: column;
    gap: 0.3rem;
  }

  .header-right {
    flex-direction: column;
    gap: 0.7rem;
  }
}

@media (max-width: 480px) {
  .header-search-form {
    flex-direction: column;
    gap: 0.5rem;
  }

  .header-search-btn {
    margin-left: 0 !important;
    width: 100%;
  }
}
/* --- FULL FEATURED STYLE FOR LIBRARY CARDS --- */

.full-recipe-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: 0.2s ease;
}

.full-recipe-card:hover {
  transform: translateY(-4px);
}

/* --- BADGE BAR (green top) --- */
.card-badge-bar {
  background: #16a34a;
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 14px 14px 0 0;
}

.badge-time {
  background: #2563eb;
  padding: 3px 12px;
  border-radius: 20px;
}

.badge-difficulty {
  padding: 3px 12px;
  border-radius: 20px;
}

.badge-difficulty.easy { background: #16a34a; }
.badge-difficulty.medium { background: #f59e0b; }
.badge-difficulty.hard { background: #dc2626; }

/* --- CARD BODY --- */
.card-content {
  display: flex;
  padding: 1rem;
  gap: 1rem;
}

/* Left image */
.card-left img {
  width: 110px;
  height: 110px;
  border-radius: 10px;
  object-fit: cover;
}

/* Right content */
.card-right {
  flex: 1;
}

/* Title */
.recipe-title {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
  color: #0b1220;
}

/* Meta */
.recipe-meta {
  color: #6b7280;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* Buttons */
.favorite-actions {
  display: flex;
  gap: 10px;
}

.favorite-actions .btn {
  flex: 1;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 12px;
}

/* View */
.view-btn {
  background: #2563eb;
  color: #fff;
}

/* Remove */
.remove-btn {
  background: #ffecec;
  color: #dc2626;
}

/* --- MOBILE (Stack layout) --- */
@media (max-width: 650px) {
  .card-content {
    flex-direction: column;
    text-align: center;
  }

  .card-left img {
    width: 100%;
    height: 200px;
    border-radius: 12px;
  }

  .favorite-actions {
    flex-direction: column;
  }
}
/* Featured-style View button (white background, blue border) */
.view-btn {
  background: #ffffff !important;
  border: 2px solid #2563eb !important;
  color: #2563eb !important;
  border-radius: 10px;
  padding: 6px 14px;
  font-weight: 600;
  transition: 0.2s ease;
}

.view-btn:hover {
  background: #2563eb !important;
  color: white !important;
}
/* ==========================================================
   FAVORITE CARDS — MATCH FEATURED RECIPES EXACTLY
========================================================== */

/* Main card container */
.full-recipe-card {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: 0.2s ease;
}

.full-recipe-card:hover {
    transform: translateY(-4px);
}

/* Badge bar (green strip across top) */
.card-badge-bar {
    background: #16a34a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 20px 20px 0 0;
}

.badge-time {
    background: #2563eb;
    padding: 3px 12px;
    border-radius: 20px;
}

.badge-difficulty {
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.badge-difficulty.easy { background: #16a34a; }
.badge-difficulty.medium { background: #f59e0b; }
.badge-difficulty.hard { background: #dc2626; }

/* Inside card layout */
.card-content {
    display: flex;
    gap: 1.2rem;
    padding: 1.4rem;
}

/* Left image */
.card-left img {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
}

/* Right text area */
.card-right {
    flex: 1;
}

.recipe-title {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: #0b1220;
}

.recipe-meta {
    color: #6b7280;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* Buttons */
.favorite-actions {
    display: flex;
    gap: 10px;
}

/* View button (white background with blue border) */
.view-btn {
    background: #fff;
    border: 2px solid #2563eb;
    color: #2563eb;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: 0.2s ease;
    flex: 1;
}

.view-btn:hover {
    background: #2563eb;
    color: white;
}

/* Remove button */
.remove-btn {
    background: #ffecec;
    border: 2px solid #dc2626;
    color: #dc2626;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 600;
    flex: 1;
    transition: 0.2s ease;
}

.remove-btn:hover {
    background: #dc2626;
    color: white;
}

/* Mobile layout */
@media (max-width: 650px) {
    .card-content {
        flex-direction: column;
        text-align: center;
    }

    .card-left img {
        width: 100%;
        height: 220px;
        border-radius: 12px;
    }

    .favorite-actions {
        flex-direction: column;
    }
}
.full-recipe-card {
    width: 100%;
    margin-bottom: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* Badge bar stays as-is */
.card-badge-bar {
    background: #16a34a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}
/* ==========================================================
   FINAL FAVORITE CARD STYLES — MATCH FEATURED EXACTLY
   (Use this block LAST in your CSS file)
========================================================== */

/* Full card wrapper */
.full-recipe-card {
    width: 100%;
    margin: 0 auto 2rem auto;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: 0.2s ease;
}

.full-recipe-card:hover {
    transform: translateY(-4px);
}

/* Top badge bar */
.card-badge-bar {
    width: 100%;
    background: #16a34a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Time chip */
.badge-time {
    background: #2563eb;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Difficulty chip */
.badge-difficulty {
    padding: 4px 12px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-difficulty.easy { background: #16a34a; }
.badge-difficulty.medium { background: #f59e0b; color: #111; }
.badge-difficulty.hard { background: #dc2626; }

/* Card inner layout */
.card-content {
    display: flex;
    gap: 1.25rem;
    padding: 1.4rem;
}

/* Image */
.card-left img {
    width: 115px;
    height: 115px;
    border-radius: 12px;
    object-fit: cover;
}

/* Text column */
.card-right {
    flex: 1;
}

.recipe-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #0b1220;
}

.recipe-meta {
    margin: 0.25rem 0 1rem;
    color: #6b7280;
    font-size: 0.95rem;
}

/* Action buttons */
.favorite-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.view-btn {
    flex: 1;
    background: #ffffff;
    border: 2px solid #2563eb;
    color: #2563eb;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    transition: 0.2s ease;
}

.view-btn:hover {
    background: #2563eb;
    color: #ffffff;
}

.remove-btn {
    flex: 1;
    background: #ffeaea;
    border: 2px solid #dc2626;
    color: #dc2626;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    transition: 0.2s ease;
}

.remove-btn:hover {
    background: #dc2626;
    color: #ffffff;
}

/* Mobile layout */
@media (max-width: 700px) {
    .card-content {
        flex-direction: column;
        text-align: center;
    }

    .card-left img {
        width: 100%;
        height: 220px;
        border-radius: 14px;
    }

    .favorite-actions {
        flex-direction: column;
    }
}
/* ===============================================
   FLEX WRAPPER FOR FAVORITE RECIPES
   Auto-wrap, mobile friendly, no broken layout
================================================= */
.favorite-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center; /* centers rows nicely */
    width: 100%;
}

/* Each favorite card takes up responsive width */
.full-recipe-card {
    flex: 1 1 330px;  /* Grows / shrinks naturally, min width ~330px */
    max-width: 420px; /* Prevents super wide cards */
}

/* Tablet spacing fix */
@media (max-width: 900px) {
    .full-recipe-card {
        flex: 1 1 45%;
    }
}

/* Mobile: full width */
@media (max-width: 600px) {
    .full-recipe-card {
        flex: 1 1 100%;
    }
}
/* ==========================================
   FAVORITE CARDS — UPDATED VIEW BUTTON STYLE
   Matches Featured Recipes solid blue button
========================================== */

.favorite-actions .view-btn {
    background: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 10px 16px !important;
    font-weight: 700 !important;
    font-size: 1rem;
    text-align: center;
    display: inline-block;
    transition: 0.2s ease;
}

.favorite-actions .view-btn:hover {
    background: #1e4fcc !important;
    color: #fff !important;
}
/* ==========================================
   FAVORITE CARDS — UPDATED REMOVE BUTTON STYLE
   Matches Featured Recipes remove interaction
========================================== */

.favorite-actions .remove-btn {
    background: #ffffff !important;        /* white background */
    color: #dc2626 !important;             /* red text */
    border: 2px solid #dc2626 !important;  /* red border */
    border-radius: 12px !important;
    padding: 10px 16px !important;
    font-weight: 700 !important;
    font-size: 1rem;
    text-align: center;
    transition: 0.2s ease;
}

/* Hover → solid red with white text */
.favorite-actions .remove-btn:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}
/* ==========================================
   FAVORITES GRID (Dashboard)
   Matches Featured Recipes layout exactly
========================================== */

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
    width: 100%;
}

/* Force cards to behave and not stretch weirdly */
.full-recipe-card {
    width: 100%;
    margin: 0;
}
/* ==========================================================
   FAVORITE RECIPES — MATCH FEATURED RECIPES EXACTLY
========================================================== */

/* Use same grid */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}

@media (max-width: 1024px) {
    .favorites-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .favorites-grid {
        grid-template-columns: 1fr;
    }
}

/* Card height normalization */
.featured-card.full-recipe-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
}

.featured-card .card-content {
    flex: 1;
}


/* Button alignment — PERFECT MATCH TO FEATURED */
.favorite-actions {
    margin-top: auto;
    display: flex;
    gap: 12px;
}

/* View button */
.favorite-actions .view-btn {
    flex: 1;
    background: #2563eb;
    color: white;
    border-radius: 12px;
    padding: 10px 0;
    font-weight: 700;
    text-align: center;
    transition: 0.2s;
}

.favorite-actions .view-btn:hover {
    background: #1e49c9;
}

/* Remove button */
.favorite-actions .remove-btn {
    flex: 1;
    background: #fff;
    border: 2px solid #dc2626;
    color: #dc2626;
    border-radius: 12px;
    padding: 10px 0;
    font-weight: 700;
    text-align: center;
    transition: 0.2s;
}

.favorite-actions .remove-btn:hover {
    background: #dc2626;
    color: #fff;
}
.team-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.team-card {
  text-align: center;
  padding: 20px;
}

.team-bio {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #6b7280;
}
.team-avatar {
  width: 170px;           /* set exact same size for ALL */
  height: 170px;          /* forces uniform circle */
  border-radius: 50%;
  object-fit: cover;
  object-position: center;  /* centers your face perfectly */
  display: block;
  margin: 0 auto 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.team-avatar,
.team-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0 auto 15px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .team-avatar,
  .team-photo {
    width: 130px;
    height: 130px;
  }
}

@media (max-width: 480px) {
  .team-avatar,
  .team-photo {
    width: 110px;
    height: 110px;
  }
}
/* ==========================================================
   HEADER RESPONSIVE FIXES (Admin + All Pages)
   ========================================================== */

@media (max-width: 900px) {
  .header-wrapper {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
    gap: 1rem;
  }

  .header-logo {
    align-items: center;
  }

  .header-search {
    width: 100%;
  }

  .header-search-form {
    width: 100% !important;
    max-width: 100% !important;
  }

  .header-nav {
    flex-direction: column !important;
    gap: 0.4rem !important;
  }

  .header-right {
    flex-direction: column !important;
    gap: 0.6rem !important;
  }
}

@media (max-width: 480px) {
  .header-search-form {
    flex-direction: column !important;
    gap: 0.5rem;
  }

  .header-search-btn {
    width: 100%;
    margin-left: 0 !important;
  }

  /* Prevent profile image from shrinking weirdly */
  .header-right img {
    width: 34px !important;
    height: 34px !important;
  }
}
/* ==========================================================
   ADMIN DASHBOARD — TABLE RESPONSIVE REWRITE
   ========================================================== */

.admin-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
}

/* MOBILE: Convert table rows to cards */
@media (max-width: 780px) {

  .table thead {
    display: none;
  }

  .table tr {
    display: block;
    background: #fff;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  }

  .table td {
    display: flex;
    justify-content: space-between;
    padding: 0.45rem 0;
    font-size: 0.9rem;
    border: none !important;
  }

  .table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6b7280;
    margin-right: 1rem;
  }

  /* Vertical button group should not overflow */
  .btn-group-vertical {
    width: 100%;
  }

  .btn-group-vertical .btn {
    width: 100%;
    margin-bottom: 6px;
  }
}
/* ==========================================================
   HEADER RESPONSIVE FIXES
   ========================================================== */
@media (max-width: 900px) {
  .header-wrapper {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
    gap: 1rem;
  }

  .header-search {
    width: 100%;
  }

  .header-search-form {
    width: 100% !important;
    max-width: 100% !important;
  }

  .header-nav {
    flex-direction: column !important;
    gap: 0.4rem !important;
  }

  .header-right {
    flex-direction: column !important;
    gap: 0.6rem !important;
  }
}

@media (max-width: 480px) {
  .header-search-form {
    flex-direction: column !important;
    gap: 0.5rem;
  }

  .header-search-btn {
    width: 100% !important;
    margin-left: 0 !important;
  }
}

/* ==========================================================
   ADMIN DASHBOARD — TABLE → MOBILE CARDS
   ========================================================== */
.admin-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

@media (max-width: 780px) {

  .table thead {
    display: none !important;
  }

  .table tr {
    display: block;
    background: #fff;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  }

  .table td {
    display: flex;
    justify-content: space-between;
    padding: 0.45rem 0 !important;
    font-size: 0.92rem;
    border: none !important;
  }

  .table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6b7280;
    margin-right: 1rem;
  }

  .btn-group-vertical {
    width: 100%;
  }

  .btn-group-vertical .btn {
    width: 100%;
    margin-bottom: 6px;
  }
}
/* ==========================================================
   UNIVERSAL RESPONSIVE GRID FIX — FEATURED + FAVORITES
   ========================================================== */

/* One clean grid for ALL recipe card layouts */
.featured-grid,
.favorites-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
    width: 100%;
}

/* Cards scale naturally inside the auto-fit grid */
.full-recipe-card,
.featured-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

/* Force proper wrap when the screen is tall/narrow */
@media (max-width: 1200px) {
    .featured-grid,
    .favorites-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
    }
}

@media (max-width: 800px) {
    .featured-grid,
    .favorites-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    }
}

@media (max-width: 500px) {
    .featured-grid,
    .favorites-grid {
        grid-template-columns: 1fr !important;
    }
}
/* ==========================================================
   DASHBOARD FAVORITES — FINAL RESPONSIVE GRID FIX
   ========================================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 1.6rem;
    width: 100%;
    margin-top: 1.2rem;
}

/* Force the card to behave normally inside grid */
.dashboard-grid .full-recipe-card {
    width: 100%;
    margin: 0;   /* prevents random spacing issues */
}
/* ===============================
   RECIPES GRID (responsive)
================================= */
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

@media (max-width: 1024px) {
  .recipes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 650px) {
  .recipes-grid {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   SMALL RECIPE CARDS
================================= */
.recipe-card {
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  padding: 1rem;
  box-shadow: 0 6px 24px rgba(0,0,0,0.06);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* --- Badges --- */
.recipe-badges {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.badge-difficulty,
.badge-time,
.badge-ingredients {
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}

.badge-difficulty.easy { background: #16a34a; }
.badge-difficulty.medium { background: #f59e0b; color:#111; }
.badge-difficulty.hard { background: #dc2626; }

.badge-time { background: #2563eb; }
.badge-ingredients { background: #10b981; }

/* --- Image --- */
.recipe-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
}

/* --- Info --- */
.recipe-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.recipe-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.recipe-meta {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
}

/* --- Buttons --- */
.view-btn,
.fav-btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
  font-size: 0.9rem;
}

.view-btn {
  background: #2563eb;
  color: white;
}

.fav-btn {
  background: #ffffff;
  border: 1px solid #dc2626;
  color: #dc2626;
}

.fav-btn:hover {
  background: #dc2626;
  color: white;
}

.login-btn {
  border-color: #6b7280;
  color: #6b7280;
}
/* ==========================================================
   HOME FEATURED RECIPES GRID — IDENTICAL TO DASHBOARD
   ========================================================== */

.home-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 1.6rem;
    width: 100%;
    margin-top: 1.2rem;
}

/* Match dashboard card behavior */
.home-dashboard-grid .full-recipe-card,
.home-dashboard-grid .featured-card {
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Responsive breakpoints (same as dashboard) */
@media (max-width: 900px) {
    .home-dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    }
}

@media (max-width: 600px) {
    .home-dashboard-grid {
        grid-template-columns: 1fr;
    }
}
/* ============================== */
/* CLEAN FLOATING HEADER (Library/Profile) */
/* ============================== */

.clean-mobile-header {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px 22px;
  margin: 0 auto;
  margin-top: -35px; /* overlaps the blue block nicely */
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
  width: 92%;
  position: relative;
  z-index: 20;
}

.compact-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.compact-subtitle {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
}

/* MOBILE ONLY CLEANUP */
@media (max-width: 768px) {
  
  /* shrink giant blue header */
  .site-header {
    padding-bottom: 45px !important;
  }

  /* keep nav clean */
  .header-nav {
    margin-top: 6px;
  }
}
