/* Color Palette:
- Primary Accent (Coral Pop): #FF6B6B
- Secondary Accent (Zesty Lemon): #FFE66D
- Main Text (Deep Charcoal): #333333
- Background (Soft White): #F9F9F9
- Highlight (Muted Mint): #A8DADC
- Breadcrumb menu (Muted Charcoal): #656565
*/

/* Basic Body & Font Styling */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    color: #333333;
    background-image: url('/assets/images/regal.png');
    background-repeat: repeat;
    background-attachment: fixed; 
}

.site-header {
    background-color: #A8DADC;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

header h1 {
    color: #333333; /* Main Text: Deep Charcoal */
}

.site-title {
    font-family: "Lilita One", sans-serif;
    margin: 0;
    padding-bottom: 20px;
}

nav a {
    margin: 0 15px;
    text-decoration: none;
    color: #333333; /* Main Text: Deep Charcoal */
    font-weight: bold;
    transition: color 0.2s ease;
    margin: 20px;
}

.active-link {
    background-color: #8AC6C8; /* A darker shade of Muted Mint */
    color: #333333; /* Deep Charcoal text */
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none; /* Remove any underlines */
}

/* Add the primary accent color on hover for interactivity */
nav a:hover {
    color: #FF6B6B; /* Primary Accent: Coral Pop */
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto; /* Center the main content */
}

/* Style the section titles (e.g., "Recently Added") */
main h2 {
    color: #FF6B6B; /* Primary Accent: Coral Pop */
    font-family: PT Sans, sans-serif;
    text-align: center;
    font-size: 2em;
    margin-bottom: 30px;
}

/* The Recipe Grid (using CSS Grid) */
.recipe-grid {
    display: grid;
    /* This creates responsive columns between 250px and 350px wide */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px; /* Space between tiles */
    justify-content: center; /* This is the key fix! It centers the tiles */
}

/* The Recipe Tile */
.recipe-tile {
    background-color: #fff;
    border: 1px solid #eee;
    font-family: PT Sans, sans-serif;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* This shadow is key */
    text-decoration: none;
    color: #333;
    overflow: hidden;
    transition: all 0.3s ease;
}

.recipe-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-color: #FFE66D; /* Secondary Accent: Zesty Lemon */
}

.recipe-tile img {
    width: 100%;
    height: 200px;
    object-fit: cover; /* Ensures images fill the space nicely */
}

.recipe-tile h3 {
    margin: 0;
    padding: 15px;
}

footer {
    text-align: center;
    padding: 10px;
    margin-top: 20px;
    background-color: #A8DADC; /* Highlight: Muted Mint */
    color: #333333;
    box-shadow: 0 -4px 8px rgba(0,0,0,0.05); /* Shadow on top edge */
}

.footer-link {
    color: #333333;
    text-decoration: none;
}
.footer-link:hover {
    text-decoration: underline;
}

/*
========================================
RESPONSIVE HAMBURGER MENU STYLES
========================================
*/

/* --- Container for Header Content --- */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-title {
    padding-bottom: 0;
}

/* --- Hamburger Menu Button --- */
.hamburger-menu {
    display: none; /* Hidden on desktop */
    position: relative; /* Crucial for positioning the 'X' */
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 20;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 0.25rem; /* Explicitly set height */
    background: #333333;
    border-radius: 10px;
    position: absolute; /* Allows precise positioning */
    left: 0;
    transition: all 0.3s ease-in-out;
}

/* Position the three lines within the button */
.hamburger-menu span:nth-child(1) {
    top: 0.25rem;
}
.hamburger-menu span:nth-child(2) {
    top: 0.875rem; /* Center line */
}
.hamburger-menu span:nth-child(3) {
    top: 1.5rem;
}

/* --- Mobile Menu Styles (Media Query) --- */
/* This block applies only to screens 768px wide or smaller */
@media (max-width: 768px) {
    .main-nav {
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: #A8DADC; /* Muted Mint */
        height: 100vh; /* Full screen height */
        width: 100%;
        text-align: center;
        position: fixed; /* Takes it out of the normal flow */
        top: 0;
        left: 0;
        transform: translateX(100%); /* Hides it off-screen to the right */
        transition: transform 0.s ease-in-out;
        z-index: 15; /* Sits below the hamburger button but above other content */
        opacity: 0; /* Start fully transparent */
        pointer-events: none; /* Can't click hidden links */
        transform: translateY(-20px); /* Start slightly moved up */
        transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    }

    .main-nav.active {
        opacity: 1; /* Become fully visible */
        pointer-events: auto; /* Links are now clickable */
        transform: translateY(0); /* Move to its final position */
    }

    .main-nav a {
        font-size: 1.5rem;
        padding: 20px 0;
    }

    .hamburger-menu {
        display: flex; /* Show the hamburger on mobile */
    }
}

/*
========================================
HAMBURGER TO "X" ANIMATION
========================================
*/

/* --- The "X" Transformation --- */
/* Move top line to center and rotate */
.hamburger-menu.active span:nth-child(1) {
    top: 0.875rem;
    transform: rotate(135deg);
}

/* Hide the middle line */
.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: translateY(-100%); /* Move it away */
}

/* Move bottom line to center and rotate */
.hamburger-menu.active span:nth-child(3) {
    top: 0.875rem;
    transform: rotate(-135deg);
}

/*
========================================
ABOUT ME SECTION STYLES
========================================
*/

.about-me-content {
    display: flex;
    align-items: flex-start; 
    gap: 30px; 
}

.about-me-image {
    min-height: 30px;
    max-height: 500px;
    width: 100%;
    object-fit: cover;
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
}

/* Responsive adjustment for mobile */
@media (max-width: 600px) {
    .about-me-content {
        flex-direction: column; /* Stacks image and text on top of each other */
        text-align: top;
    }
}

/*
========================================
CAROUSEL STYLES
========================================
*/
.carousel-container {
    background-color: #fff;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.carousel-wrapper {
    position: relative;
}

.carousel {
    display: flex; /* Makes the items line up horizontally */
    overflow-x: auto; /* Allows horizontal scrolling */
    scroll-snap-type: x mandatory; /* Snaps items into place */
    scroll-behavior: smooth; /* Smooth scrolling animation */
    -ms-overflow-style: none;  /* Hide scrollbar for IE and Edge */
    scrollbar-width: none;  /* Hide scrollbar for Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.carousel::-webkit-scrollbar {
    display: none;
}

.carousel .recipe-tile {
    flex: 0 0 300px; /* Each tile will be 300px wide and not shrink */
    margin: 0 10px;
}

/* --- Carousel Buttons --- */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    z-index: 10;
    cursor: pointer; 
    transition: background-color 0.2s ease;
}

.carousel-button:hover {
    background-color: rgba(255, 255, 255, 1);
}

.carousel-button.prev {
    left: -20px;
}

.carousel-button.next {
    right: -20px;
}

/*
========================================
BREADCRUMB STYLES
========================================
*/

.breadcrumb-nav {
    font-size: 75%;
    color: #656565;
    margin: 0 0 0 50px;
    padding: 0 0 0 0px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/"; /* The separator between items */
    margin: 0 0px;
    color: #6c757d;
}

.breadcrumb-item a {
    color: #656565; /* Muted Charcoal */
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d; /* A muted color for the current page */
}

/*
========================================
SITEMAP STYLES
========================================
*/
.sitemap-container {
    background-color: #fff;
    padding: 25px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.sitemap-list {
    list-style: none;
    padding-left: 0;
}

.sitemap-list li {
    margin-bottom: 15px;
}

.sitemap-list a {
    text-decoration: none;
    color: #333333;
    font-size: 1.2em;
    font-weight: bold;
}

.sitemap-list a:hover {
    color: #FF6B6B; /* Coral Pop */
    text-decoration: underline;
}

/* Styles for the nested recipe lists */
.sitemap-list ul {
    list-style: none;
    padding-left: 30px;
    margin-top: 10px;
}

.sitemap-list ul a {
    font-size: 1em;
    font-weight: normal;
}

/*
========================================
STYLES FOR SINGLE RECIPE PAGE
========================================
*/

.recipe-article {
    max-width: 800px;
    margin: 20px auto;
}

.recipe-article h1 {
    position: sticky;
    top: 0;
    z-index: 10; /* Ensures it stays on top of other content */
    font-family: PT Sans, sans-serif;
    background-color: #fff; /* Prevents text from showing through from behind */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Adds a subtle shadow when stuck */
    text-align: center;
    color: #333333; 
    margin-bottom: 20px;
    padding-top: 15px; 
    padding-bottom: 15px; 
}

.recipe-article h1 {
    text-align: center;
    color: #333333; /* Deep Charcoal */
    margin-top: 0;
    margin-bottom: 20px;
    border-radius: 8px;;
}

.recipe-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 25px;
}

.recipe-intro {
    font-size: 1.1em;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 30px;
}

.recipe-details div {
    margin: 5px 10px;
}

.details-grid {
    display: flex;
    flex-wrap: wrap; 
    gap: 10px 20px; /* Adds space between rows and columns */
}

.details-grid > div {
    flex: 1 1 45%; /* Each item will try to take up about 45% of the space */
}

.recipe-section h2 {
    color: #FF6B6B; /* Coral Pop */
    border-bottom: 2px solid #FF6B6B;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.recipe-ingredients, .recipe-instructions {
    padding-left: 20px;
    line-height: 1.8;
    font-size: 1.05em;
}

.recipe-ingredients li, .recipe-instructions li {
    margin-bottom: 12px;
}

.recipe-notes h3 {
    margin-top: 0;
    color: #333333;
    font-family: PT Sans, sans-serif;
}

.recipe-details,
.recipe-section,
.recipe-notes {
    background-color: #fff;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 25px; /* This creates space between the tiles */
}

/*
========================================
TIPS & GLOSSARY PAGE STYLES
========================================
*/
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.info-tile {
    background-color: #fff;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.info-tile h3 {
    margin-top: 0;
    color: #FF6B6B; /* Coral Pop */
}

.info-tile p {
    line-height: 1.6;
}

