/* Custom CSS Variables */
:root {
    --primary-color: #0dcaf0;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --white: #ffffff;
    --transition: all 0.3s ease;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --border-radius: 10px;
}
 /* Hero Section (Overall Structure & Padding) */
.hero-section {
    /* **REMOVE ALL background properties here** (except potentially background-color: transparent;) */
    background-color: transparent; 
    color: var(--white, #fff); 
    padding: 4rem 0;
    text-align: center;
    position: relative; /* Essential for positioning children */
    /* Height is determined by padding */
}

/* NEW: Dedicated Image Element */
.hero-background {
    /* Make this element cover the whole hero-section */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0; /* Behind the content */
    
    /* Apply the ESSENTIAL fixed background properties here */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Fixed scrolling is applied here */
}

/* ⚠️ NEW: Dedicated Gradient Overlay (Replaces the gradient in the background property) */
.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1; /* Above the image (z-index: 0) */
    /* This creates the dark gradient overlay that was in your background property */
    background: linear-gradient(135deg, rgba(245, 246, 252, 0.52), rgba(117, 19, 93, 0.73));
}

/* --- Dynamic Background Images --- */

/* Default Image (Optional) */
.hero-background {
    background-image: url('../img/bg-img/breadcumb3.jpg');
}

/* Style for Soup Recipes */
.hero-section.soup .hero-background {
    background-image: url('../img/bg-img/breadcrumb1.jpg');
}

/* Style for Savoury Recipes */
.hero-section.savoury .hero-background {
    background-image: url('../img/bg-img/breadcrumb3.jpg');
}

/* Style for Sweet Recipes */
.hero-section.sweet .hero-background {
    background-image: url('../img/bg-img/breadcrumb5.jpg');
}

/* Content needs a higher z-index to sit on top of the background layers */
.hero-content {
    position: relative;
    z-index: 2; /* Highest z-index */
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1;
}


.hero-content {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 4rem;
    font-weight: 300;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    -webkit-text-stroke-width: 1px;
    -webkit-text-stroke-color: black;
}

.hero-section p {
    font-size: 1.2rem;
    opacity: 0.9;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}
 
/* Header Styles */
.navbar {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, var(--danger-color), #aa0a67) !important;
    padding: 1rem 0;
    min-height: 80px;
}
 
.navbar-brand img {
    width: 90px;
    height: 60px;
}
 
.nav-link {
    color: var(--white) !important;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem !important;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
 
.nav-link:hover {
    color: var(--warning-color) !important;
    transform: translateY(-2px);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
   .recipe-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 1.5rem;
            padding: 2rem 0;
        }
        
        .img-container {
            position: relative;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            transition: var(--transition);
        }
        
        .img-container:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        }
        
        .img-container img {
            width: 100%;
            height: 200px;
            object-fit: cover;
            display: block;
        }
        
        .overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, var(--hover-color), var(--primary-color));
            opacity: 0;
            transition: opacity 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .img-container:hover .overlay {
            opacity: 0.9;
        }
        
        .overlay span {
            color: var(--white);
            font-weight: 600;
            text-align: center;
            padding: 1rem;
            font-size: 1.1rem;
        }
        
        .category-header {
            background: var(--primary-color);
            color: var(--white);
            font-weight: bold;
            font-size: 1.2rem;
            pointer-events: none;
        }
        
        .category-header .overlay {
            background: rgba(0,0,0,0.3);
            opacity: 1;
        }
        
        .site-header {
            background: linear-gradient(135deg, var(--primary-color), var(--hover-color));
            color: var(--white);
            text-align: center;
            padding: 2rem 0;
            margin-bottom: 2rem;
        }
        
        .site-header h1 {
            font-size: 2.5rem;
            margin-bottom: 0.5rem;
            font-weight: 300;
        }
        
        .search-container {
            background: var(--white);
            border-radius: 25px;
            padding: 0.5rem;
            display: inline-flex;
            align-items: center;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        .search-container input {
            border: none;
            padding: 0.5rem 1rem;
            border-radius: 20px;
            outline: none;
            width: 200px;
        }
        
        .search-container button {
            background: var(--primary-color);
            border: none;
            color: var(--white);
            padding: 0.5rem 1rem;
            border-radius: 20px;
            cursor: pointer;
            transition: var(--transition);
        }
        
        .search-container button:hover {
            background: var(--hover-color);
        }
        
        .navbar {
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        .latest-recipe {
            background: linear-gradient(135deg, #ff6b6b, #ee5a24);
            color: var(--white);
            padding: 1rem;
            border-radius: 10px;
            margin: 2rem 0;
            text-align: center;
        }
        
        .latest-recipe a {
            color: var(--white);
            text-decoration: none;
            font-weight: bold;
        }
        
        .latest-recipe a:hover {
            text-decoration: underline;
        }
        
        .footer {
            background: var(--text-dark);
            color: var(--white);
            text-align: center;
            padding: 2rem 0;
            margin-top: 3rem;
        }
        
        /* Responsive improvements */
        @media (max-width: 768px) {
            .recipe-grid {
                grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
                gap: 1rem;
                padding: 1rem 0;
            }
            
            .site-header h1 {
                font-size: 2rem;
            }
            
            .search-container input {
                width: 150px;
            }
        }
		.visually-hidden {
  position:absolute;
  width:1px;
  height:1px;
  margin:-1px;
  padding:0;
  border:0;
  clip:rect(0 0 0 0);
  overflow:hidden;
}
  
 
/* Ingredients Section */
.ingredients-section {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}
 
.ingredients-list {
    list-style: none;
    padding: 0;
}
 
.ingredients-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--light-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}
 
.ingredients-list li:last-child {
    border-bottom: none;
}
 
.ingredients-list li::before {
    content: '🥄';
    font-size: 1.2rem;
    flex-shrink: 0;
}
 
/* Method Section */
.method-section {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}
 
.method-list {
    list-style: none;
    padding: 0;
    counter-reset: step-counter;
}
 
.method-list li {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--light-color);
    position: relative;
    padding-left: 4rem;
    counter-increment: step-counter;
}
 
.method-list li:last-child {
    border-bottom: none;
}
 
.method-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 1.5rem;
    background: var(--primary-color);
    color: var(--white);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}
 
/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}
 
.btn-custom {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(13, 202, 240, 0.3);
    /* Essential for <a> tags to act like buttons */
    text-decoration: none;
    display: inline-flex; /* Use flex for alignment with emojis */
    align-items: center;
    justify-content: center;
}
 
.btn-custom:hover {
    background: var(--info-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 202, 240, 0.4);
    color: var(--white);
}
 
.btn-print {
    background: var(--success-color);
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
}
 
.btn-print:hover {
    background: #157347;
    box-shadow: 0 6px 20px rgba(25, 135, 84, 0.4);
}
 
/* Footer */
.footer {
    background: linear-gradient(135deg, var(--danger-color), #aa0a67) !important;
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}
 /* --- Footer Styling Overrides --- */

/* 1. Ensure the footer container is wide enough (Override existing 600px max-width) */
.footer-content {
    max-width: 900px; /* Increased width significantly to prevent wrapping */
    margin: 0 auto;
}

/* 2. Target Action Buttons specifically inside the footer */
.footer .action-buttons {
    /* Use a fixed, smaller gap */
    gap: 0.5rem;
    /* Ensure they stay in a row unless the screen is very small (use nowrap) */
    flex-wrap: nowrap; 
    /* Use padding to create space instead of relying solely on the row gap */
    padding: 0 5px; 
}

/* 3. Re-enable wrapping only on smaller mobile screens (where you want them to stack) */
@media (max-width: 768px) {
    /* The .action-buttons block for small screens will now override the nowrap */
    .action-buttons {
        flex-direction: column;
        align-items: center;
        flex-wrap: wrap; /* Restore wrapping for vertical stack */
        gap: 1rem; /* Use a larger gap when stacking vertically */
    }
}
.footer p {
    margin-bottom: 1rem;
    opacity: 0.8;
}
 
/* Kept the container class but relies on .action-buttons for layout now */
.footer-links {
    /* These styles are largely overwritten by .action-buttons class in HTML */
    display: flex; /* Kept for legacy */
    justify-content: center; /* Kept for legacy */
    gap: 6rem; /* Now overruled by .action-buttons gap: 1rem; */
    margin-top: 2rem;
}
 
/* REMOVED ORIGINAL .footer-links a and .footer-links a:hover */
/* The new buttons will use .btn-custom and .btn-custom:hover styles */
 
 
/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
     
    .recipe-title {
        font-size: 2rem;
    }
     
    .recipe-meta {
        gap: 1rem;
    }
     
    .meta-item {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
     
    .method-list li {
        padding-left: 3rem;
    }
     
    .method-list li::before {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }
     
    /* This .action-buttons block now handles both main content and footer buttons */
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
     
    /* This block is largely redundant if .action-buttons is used in HTML */
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}
 /* --- Recipe Page Specific Styles (NEWLY ADDED) --- */
 
 .recipe-card .recipe-title {
    /* Set the fill color for the text */
    color: black; 
    /* Apply the thin black outline (WebKit browsers: Chrome, Safari) 
    -webkit-text-stroke: 1px white;*/
    /* Optional: Add a text-shadow fallback for better cross-browser support */
    text-shadow: 
        -1px -1px 0 #000,  
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
}
.recipe-content-area {
    padding: 4rem 0;
    background: var(--light-color);
}

.recipe-header {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: var(--white);
    padding: 2rem;
    text-align: center;
}

.recipe-image {
    width: 100%;
    max-width: 300px;
    height: 250px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: 2rem auto;
    display: block;
}

.recipe-body {
    padding: 2rem;
}
/* Enhanced Print Styles for A4 Paper */
@media print {
    @page {
        size: A4;
        margin: 15mm;
    }
     
    /* Hide all non-essential elements */
    .navbar,
    .hero-section,
    .footer,
    .action-buttons, /* Hides all action buttons including the new footer ones */
    .recipe-image {
        display: none !important;
    }
     
    body {
        font-family: 'Times New Roman', serif;
        font-size: 11pt;
        line-height: 1.4;
        color: #000;
        background: white;
        margin: 0;
        padding: 0;
    }
     
    .recipe-content-area {
        padding: 0 !important;
        background: white !important;
    }
     
    .container {
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
     
    .recipe-card {
        box-shadow: none !important;
        border: none !important;
        background: white !important;
        margin: 0 !important;
        page-break-inside: avoid;
    }
     
    .recipe-header {
        background: none !important;
        color: #000 !important;
        padding: 0 0 15pt 0 !important;
        page-break-after: avoid;
    }
     
    .recipe-title {
        font-size: 18pt !important;
        color: #000 !important;
        margin-bottom: 8pt !important;
        font-weight: bold !important;
        text-align: center;
    }
     
    .recipe-meta {
        justify-content: center;
        gap: 15pt !important;
        font-size: 9pt !important;
        margin-bottom: 15pt;
    }
     
    .meta-item {
        background: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
        backdrop-filter: none !important;
        color: #666 !important;
    }
     
    .recipe-body {
        padding: 0 !important;
    }
     
    .row {
        display: flex !important;
        margin: 0 !important;
        gap: 20pt;
    }
     
    .col-lg-4 {
        flex: 0 0 35% !important;
    }
     
    .col-lg-8 {
        flex: 0 0 65% !important;
    }
     
    .ingredients-section,
    .method-section {
        background: white !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
     
    .section-title {
        color: #000 !important;
        font-size: 14pt !important;
        font-weight: bold !important;
        margin-bottom: 8pt !important;
        padding-bottom: 3pt !important;
        border-bottom: 1pt solid #000 !important;
        page-break-after: avoid;
    }
     
    .ingredients-list {
        margin: 0;
        padding: 0;
    }
     
    .ingredients-list li {
        padding: 3pt 0 !important;
        border-bottom: 0.5pt solid #eee !important;
        font-size: 9pt !important;
        line-height: 1.3 !important;
        display: block !important;
        page-break-inside: avoid;
    }
     
    .ingredients-list li::before {
        content: '• ' !important;
        font-size: 9pt !important;
    }
     
    .method-list {
        margin: 0;
        padding: 0;
    }
     
    .method-list li {
        padding: 5pt 0 5pt 20pt !important;
        border-bottom: 0.5pt solid #eee !important;
        font-size: 9pt !important;
        line-height: 1.3 !important;
        page-break-inside: avoid;
    }
     
    .method-list li::before {
        background: #000 !important;
        color: white !important;
        width: 14pt !important;
        height: 14pt !important;
        font-size: 7pt !important;
        top: 5pt !important;
        left: 0 !important;
    }
     
    /* Ensure content fits on one page */
    .ingredients-section {
        page-break-inside: avoid;
    }
     
    .method-list li:last-child {
        border-bottom: none !important;
    }
     
    .ingredients-list li:last-child {
        border-bottom: none !important;
    }
}