/* style.css */
body {
    font-family: 'Georgia', serif;
    background-color: #fcfbf9; /* Back to a clean, warm neutral */
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

header {
    /* Gentle gradient from Heaven (Blue) to Tranquil Pastel Green */
    background: linear-gradient(135deg, #B0E3F5, #B1DFAE);
    padding: 40px 20px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
    font-weight: normal;
    color: #333;
}

header p {
    font-style: italic;
    color: #555;
}

nav {
    /* Flat Blue for a solid, grounding navigation bar */
    background-color: #78AEE3;
    text-align: center;
    padding: 15px 0;
}

nav a {
    text-decoration: none;
    color: #fff; /* Changed to white to pop against the blue */
    margin: 0 15px;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    transition: color 0.3s;
}

nav a:hover {
    /* Pastel Light Green on hover for a subtle interaction */
    color: #E6F2D3; 
}

.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    border-bottom: 1px solid #92C7F0; /* Soft Blue accent line */
    padding-bottom: 10px;
    margin-bottom: 30px;
    font-weight: normal;
    color: #4a4a4a;
}

.memory-box, .recipe-box, .fav-box {
    background: #fff; /* Kept neutral for readability */
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.fav-box ul {
    list-style-type: square;
    padding-left: 20px;
}

.fav-box li {
    margin-bottom: 10px;
}

/* Random Generator Specific Styles */
.random-container {
    text-align: center;
    margin-top: 50px;
}

.random-image-wrapper {
    max-width: 500px;
    height: 400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0; /* Neutral backdrop for photos */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.random-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

/* .random-quote {
    font-size: 1.2em;
    font-style: italic;
    margin: 30px 0;
    color: #4a4a4a;
} */

.random-quote {
    font-size: 1.2em;
    font-style: normal;
    margin: 20px auto; /* Slightly reduced margin */
    color: #4a4a4a;
    line-height: 1.4;   /* Better spacing for multi-line quotes */
    max-width: 700px;  /* Keeps long quotes readable */
}

/* Optional: This ensures the bold name stands out but isn't italicized like the quote */
.random-quote strong {
    font-style: normal; 
    display: block;      /* Helps with spacing */
    margin-bottom: 2px;  /* Small gap between name and quote */
    color: #333;         /* Slightly darker for contrast */
}

button {
    /* Flat Blue for interactive buttons */
    background-color: #78AEE3; 
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Georgia', serif;
    transition: background-color 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

button:hover {
    /* Soft Blue for the hover state */
    background-color: #92C7F0; 
}

footer {
    text-align: center;
    padding: 40px 20px; /* Increased padding to give it more space */
    font-size: 1.3em; /* Made the text significantly larger */
    font-weight: bold; /* Made the text bold */
    color: #4a4a4a; /* Darkened the text slightly so it's easier to read */
    margin-top: 50px;
    border-top: 1px solid #eaeaea; 
}

/* Memory Box Image Layout */
.memory-images {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.memory-images img {
    flex: 1 1 200px; /* This makes images responsive. They will try to be 200px wide, but stretch to fill space evenly */
    max-width: 100%;
    height: 250px; /* Locks the height so uneven images look unified */
    object-fit: cover; /* Ensures images aren't stretched weirdly */
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Image Carousel Layout (For memories with multiple photos) */
.carousel-container {
    position: relative;
    max-width: 100%;
    margin-top: 20px;
    display: flex;
    flex-direction: column; /* Stacks image and counter vertically */
    align-items: center;    /* Centers the counter horizontally */
    justify-content: center;
    background-color: #f0f0f0; 
    border-radius: 6px;
    overflow: hidden;
    height: 400px; /* This locks the height so the page doesn't jump */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.carousel-slides {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide {
    display: none; /* This is the line that hides all images by default! */
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; 
}

/* Only the image with the 'active' class is shown */
.slide.active {
    display: block;
    animation: fade 0.4s ease-in-out;
}

/* Arrow Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(120, 174, 227, 0.8);
    color: white;
    border: none;
    font-size: 24px;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
    z-index: 10;
}

.carousel-btn:hover {
    background-color: rgba(146, 199, 240, 1);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

/* Simple fade animation for switching photos */
@keyframes fade {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

/* Scroll smoothly to a given section.*/
html {
    scroll-behavior: smooth;
}

/* Optional: Add some spacing for the jump links */
.jump-links {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.jump-links a {
    text-decoration: none;
    color: #333; /* Or your preferred theme color */
    font-weight: bold;
}

.jump-links a:hover {
    text-decoration: underline;
}

/* Smooth transition to the top of the page when clicking the "Back to Top" link */
/* Makes the jump to the top feel smooth instead of a sudden snap */
html {
    scroll-behavior: smooth;
}

.back-to-top-btn {
    text-decoration: none;
    background-color: #f4f4f4; /* Light grey background */
    color: #333;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    transition: background-color 0.3s ease;
}

.back-to-top-btn:hover {
    background-color: #e2e2e2;
    color: #000;
}
