/* RESET & BASE */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: #f4f6f8;
    color: #333;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }

/* HEADER */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}
.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #e65100;
    letter-spacing: -0.5px;
}

/* HERO & SEARCH FORM */
.hero {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid #eaeaea;
}
.hero h1 { font-size: 2rem; margin-bottom: 0.5rem; color: #111; }
.hero p { color: #666; margin-bottom: 2rem; }

.search-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
}
.search-input, .source-select, .btn-search, .btn-clear {
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}
.search-input { flex-grow: 1; }
.source-select { background-color: #fff; cursor: pointer; }
.btn-search {
    background-color: #e65100;
    color: white;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-search:hover { background-color: #cc4800; }
.btn-clear {
    background-color: #eee;
    color: #555;
    text-align: center;
    font-weight: 600;
}

/* MAIN GRID */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}
.recipe-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* RECIPE CARDS */
.recipe-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.08);
}
.card-image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
    background-color: #eee;
}
.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.recipe-card:hover .card-image-wrapper img { transform: scale(1.05); }

/* Source Badge */
.source-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.card-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.card-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.3; }
.card-desc {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-meta {
    margin-top: auto;
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
}

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}
.page-link {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
}
.page-link:hover {
    border-color: #e65100;
    color: #e65100;
}
.page-info { color: #666; font-size: 0.95rem; }

.empty-state { text-align: center; padding: 4rem 1rem; color: #666; }

/* Header Flexbox Layout */
.nav-container {
    display: flex;
    justify-content: space-between; /* Pushes items to opposite ends */
    align-items: center; /* Centers them vertically */
    max-width: 1200px; /* Adjust this to match your site's max width */
    margin: 0 auto;
    width: 100%;
}

/* Email Icon Styles */
.contact-link {
    color: #333333; /* Matches your dark text color */
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: #0056b3; /* Changes to your brand blue on hover */
}

.email-icon {
    width: 24px;
    height: 24px;
}


/* FOOTER */
footer { text-align: center; padding: 2rem; color: #888; font-size: 0.9rem; }

/* MEDIA QUERIES (Mobile First Upgrades) */
@media (min-width: 600px) {
    .recipe-grid { grid-template-columns: repeat(2, 1fr); }
    .search-form { flex-direction: row; }
}
@media (min-width: 900px) {
    .recipe-grid { grid-template-columns: repeat(3, 1fr); }
    .hero h1 { font-size: 2.5rem; }
}
@media (min-width: 1200px) {
    .recipe-grid { grid-template-columns: repeat(4, 1fr); }
}