/* Jeff C Cooks - Recipe Website Styles */

/* ==================== */
/* CSS Variables & Reset */
/* ==================== */
:root {
    --primary-color: #8fbc8f;
    --primary-dark: #6b9b6b;
    --secondary-color: #5a8a7a;
    --accent-color: #a8c5a8;
    --success-color: #7cb87c;
    --danger-color: #c97c7c;
    --text-dark: #2c3e2f;
    --text-light: #6b806b;
    --bg-light: #f8faf8;
    --bg-white: #ffffff;
    --border-color: #d8e5d8;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* ==================== */
/* Layout Components */
/* ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ==================== */
/* Header */
/* ==================== */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.site-tagline {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ==================== */
/* Navigation */
/* ==================== */
.main-nav {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav .container {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

/* ==================== */
/* Main Content */
/* ==================== */
main {
    padding: 3rem 0;
    min-height: calc(100vh - 300px);
}

/* ==================== */
/* Search Section */
/* ==================== */
.search-section {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-bar {
    display: flex;
    gap: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    background: var(--bg-white);
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ==================== */
/* Recipe Grid */
/* ==================== */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.recipe-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.recipe-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.recipe-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-light);
}

.recipe-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f5e8 0%, #c8dfc8 100%);
}

.placeholder-icon {
    font-size: 4rem;
    opacity: 0.5;
}

.recipe-card-content {
    padding: 1rem;
}

.recipe-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.recipe-description {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}

.meta-item {
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.meta-item.difficulty-easy { color: var(--success-color); font-weight: 600; }
.meta-item.difficulty-medium { color: var(--accent-color); font-weight: 600; }
.meta-item.difficulty-hard { color: var(--danger-color); font-weight: 600; }

.recipe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--bg-light);
    color: var(--text-dark);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
}

.tag-large {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ==================== */
/* Recipe Detail Page */
/* ==================== */
.recipe-detail {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.recipe-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #e8f5e8 0%, #c8dfc8 100%);
}

.recipe-header-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.recipe-detail-title {
    font-size: 2rem;
    color: var(--text-dark);
}

.recipe-detail-description {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.5;
}

.recipe-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.75rem;
}

.meta-card {
    background: var(--bg-white);
    padding: 0.75rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.meta-label {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.35rem;
}

.meta-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.meta-value.difficulty-easy { color: var(--success-color); }
.meta-value.difficulty-medium { color: var(--accent-color); }
.meta-value.difficulty-hard { color: var(--danger-color); }

.recipe-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.recipe-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.recipe-header-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.recipe-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 400px;
}

.recipe-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    padding: 2rem;
}

.recipe-sidebar h2,
.recipe-main h2 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.ingredients-section,
.instructions-section,
.notes-section {
    margin-bottom: 1.5rem;
}

.ingredients-list {
    list-style: none;
}

.ingredient-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.ingredient-item:hover {
    background: var(--bg-light);
}

.ingredient-checkbox {
    margin-top: 0.2rem;
    cursor: pointer;
}

.ingredient-item input:checked + span {
    text-decoration: line-through;
    color: var(--text-light);
}

.ingredient-notes {
    color: var(--text-light);
    font-size: 0.85rem;
}

.instructions-list {
    list-style: none;
    counter-reset: step-counter;
}

.instruction-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.instruction-item:last-child {
    border-bottom: none;
}

.instruction-number {
    background: var(--primary-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.instruction-text {
    flex: 1;
    line-height: 1.6;
}

.notes-section {
    background: var(--bg-light);
    padding: 1.25rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.notes-content {
    line-height: 1.8;
    color: var(--text-dark);
}

/* ==================== */
/* Forms */
/* ==================== */
.form-container {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    max-width: 900px;
    margin: 0 auto;
}

.form-container h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.tags-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.checkbox-label:hover {
    background: var(--bg-light);
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
}

.ingredient-row,
.instruction-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.ingredient-row input,
.instruction-row textarea {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    font-family: inherit;
}

.input-small {
    width: 80px;
}

.input-medium {
    flex: 1;
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.5rem;
}

.instruction-row textarea {
    flex: 1;
    resize: vertical;
}

.current-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

/* ==================== */
/* Buttons */
/* ==================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #003d6b;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    padding-top: 2rem;
}

/* ==================== */
/* Alerts */
/* ==================== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.alert-error {
    background: #fee;
    border-left: 4px solid var(--danger-color);
    color: var(--danger-color);
}

.alert-error ul {
    margin-left: 1.5rem;
}

/* ==================== */
/* Modal */
/* ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    box-shadow: var(--shadow-lg);
}

.modal-content h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.modal-content p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ==================== */
/* Footer */
/* ==================== */
.site-footer {
    background: var(--text-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

/* ==================== */
/* Utility Classes */
/* ==================== */
.no-results,
.no-content {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ==================== */
/* Responsive Design */
/* ==================== */
@media (max-width: 768px) {
    .site-title {
        font-size: 2rem;
    }
    
    .search-bar {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .search-bar .btn {
        width: 100%;
    }
    
    .recipe-header {
        grid-template-columns: 1fr;
    }
    
    .recipe-content {
        grid-template-columns: 1fr;
    }
    
    .recipes-grid {
        grid-template-columns: 1fr;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .recipe-detail-meta {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .ingredient-row {
        flex-wrap: wrap;
    }
    
    .input-small,
    .input-medium {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .search-section {
        padding: 1.5rem;
    }
    
    .recipe-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .recipe-detail-meta {
        grid-template-columns: 1fr;
    }
}
/* Additional styles for layout without images */

.recipe-header-single {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #e8f5e8 0%, #c8dfc8 100%);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.recipe-content-single {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    padding: 2rem;
}

@media (max-width: 768px) {
    .recipe-content-single {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 20px;
    }
}

