
   /* TFC RECIPE PAGE STYLES */

/* Reuse TFC Variables for consistency */

:root {
    --card-bg: #fff;
    --shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}

/* Hero Section  */

.recipe-hero {
    background-color: var(--dawn-pink-clr);
    text-align: center;
    padding: 4rem 0;
    border-radius: 0 0 2rem 2rem;
    margin-bottom: 2rem;
}

.recipe-hero h1 {
    font-size: 3rem;
    color: var(--dark-browm-clr);
    margin-bottom: 0.5rem;
}

.recipe-hero p {
    color: var(--gray-clr);
    font-size: 1.1rem;
}

/*  Controls  */
.recipe-controls {
    text-align: center;
    margin-bottom: 3rem;
}

#recipe-search {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    border: 2px solid var(--light-gray-clr);
    border-radius: 5rem;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

#recipe-search:focus {
    border-color: var(--orange-clr);
}

/* Recipe Grid  */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Recipe Card  */
.recipe-card {
    background: var(--white-clr);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.card-img-box {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #fff6ee; /* Light orange bg for img */
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img-box svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    color: var(--dark-browm-clr);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.meta-tags {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--gray-clr);
}

.meta-tags i {
    color: var(--orange-clr);
}

.view-recipe-btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--orange-clr);
    color: white;
    border-radius: 5rem;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s;
}

.view-recipe-btn:hover {
    background-color: var(--browm-clr);
}


   /* RECIPE MODAL (The Pop-up) */


.modal-overlay {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.recipe-modal-card {
    background: white;
    width: 100%;
    max-width: 800px;
    max-height: 90vh; 
    overflow-y: auto;
    border-radius: 1.5rem;
    position: relative;
    padding: 0;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 2rem;
    background-color: var(--website-body-clr);
    border-bottom: 1px solid var(--light-gray-clr);
    text-align: center;
}

.modal-img-container {
    height: 180px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.modal-img-container svg {
    height: 100%;
    width: auto;
}

.modal-title-block h2 {
    font-size: 2rem;
    color: var(--dark-browm-clr);
}

.badge {
    display: inline-block;
    background: var(--orange-clr);
    color: white;
    padding: 4px 12px;
    border-radius: 1rem;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.modal-body-split {
    display: flex;
    flex-wrap: wrap;
}

.ingredients-section {
    flex: 1;
    min-width: 250px;
    padding: 2rem;
    background-color: #fafafa;
    border-right: 1px solid #eee;
}

.steps-section {
    flex: 2;
    min-width: 300px;
    padding: 2rem;
}

.modal-body-split h3 {
    color: var(--browm-clr);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--dawn-pink-clr);
    padding-bottom: 0.5rem;
    display: inline-block;
}

ul, ol {
    padding-left: 1.2rem;
    color: var(--gray-clr);
    line-height: 1.7;
}

li {
    margin-bottom: 0.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.print-btn {
    background: transparent;
    border: 1px solid var(--gray-clr);
    padding: 10px 20px;
    border-radius: 5rem;
    cursor: pointer;
    color: var(--gray-clr);
}

.shop-btn {
    background: var(--orange-clr);
    color: white;
    padding: 10px 20px;
    border-radius: 5rem;
    text-decoration: none;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-clr);
    z-index: 10;
}

.modal-close:hover {
    color: var(--orange-clr);
}

/* --- Mobile Adjustments --- */
@media (max-width: 768px) {
    .modal-body-split {
        flex-direction: column;
    }
    .ingredients-section {
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    .recipe-hero h1 {
        font-size: 2rem;
    }
}

/* --- Print Styles --- */
@media print {
    body * { visibility: hidden; }
    .modal-overlay, .modal-overlay * { visibility: visible; }
    .modal-overlay { position: absolute; left: 0; top: 0; background: white; }
    .modal-footer, .modal-close, .recipe-controls { display: none; }
    .recipe-modal-card { box-shadow: none; border: none; }
}