/* 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);
}

/* ============================================
   MOBILE VIEW STYLE 
   ============================================ */

/* Featured Recipes */
@media (max-width: 600px) {
    .results-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }

    .card {
        width: 100% !important;
        min-height: auto !important;
        padding: 0.75rem !important;
    }

    .card img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
        border-radius: 8px;
    }
}

/* Search Bar */
@media (max-width: 600px) {
    .search-large,
    .mini-search,
    .search-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.75rem !important;
        flex-wrap: wrap !important;
    }

    .search-container input[type="search"],
    input[type="search"] {
        width: 100% !important;
        font-size: 1rem !important;
        padding: 0.65rem !important;
    }

    .search-container button,
    .search-large button {
        margin-top: 0.5rem !important;
        width: 100% !important;
    }
}
