:root {
    --background-color: #f4f7f6;
    --text-color: #333;
    --card-background: #ffffff;
    --button-background: #4CAF50;
    --button-text: white;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --accent-color: #2c3e50;
}

body.dark-mode {
    --background-color: #2c3e50;
    --text-color: #ecf0f1;
    --card-background: #34495e;
    --button-background: #52b788;
    --button-text: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --accent-color: #ecf0f1;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    display: flex;
    flex-direction: column;
    align-items: center; /* Added for horizontal centering of children */
    min-height: 100vh;
    margin: 0;
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

header {
    width: 100%;
    background-color: var(--card-background);
    box-shadow: 0 1px 3px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}

nav ul li a {
    padding: 20px 25px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: background-color 0.2s ease-in-out;
}

nav ul li a:hover {
    background-color: var(--background-color);
}

main {
    flex-grow: 1;
    width: 100%;
    max-width: 800px;
    padding: 40px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1, h2 {
    color: var(--accent-color);
    text-align: center;
}

h1 {
    font-size: 2.5em;
    font-weight: 800;
    margin-bottom: 0.5em;
}

h2 {
    font-size: 1.8em;
    margin-top: 1.5em;
    border-bottom: 2px solid var(--button-background);
    padding-bottom: 0.3em;
    display: inline-block;
}

p {
    max-width: 650px;
    text-align: center;
    font-size: 1.1em;
    margin-bottom: 1em;
}

.toggle-buttons {
    position: fixed;
    top: 15px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1001;
}

.toggle-button {
    padding: 8px 12px;
    border: none;
    background: var(--button-background);
    color: var(--button-text);
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.toggle-button:hover {
    filter: brightness(110%);
    transform: translateY(-1px);
}

.contact-form-section {
    margin-top: 40px;
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--shadow-color);
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
}

.contact-form-section h2 {
    border-bottom: none;
    margin-bottom: 25px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 600;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: var(--background-color);
    color: var(--text-color);
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--button-background);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form button[type="submit"] {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background-color: var(--button-background);
    color: var(--button-text);
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.contact-form button[type="submit"]:hover {
    filter: brightness(110%);
    transform: translateY(-2px);
}

footer {
    width: 100%;
    background-color: var(--card-background);
    box-shadow: 0 -1px 3px var(--shadow-color);
    padding: 25px;
    text-align: center;
    margin-top: auto; /* Pushes footer to the bottom */
    font-weight: 500;
}
footer a {
    color: var(--button-background);
    text-decoration: none;
    font-weight: 700;
}
footer a:hover {
    text-decoration: underline;
}
section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}

/* Featured Recipes Section */
.featured-recipes {
    margin-top: 40px;
}

.recipe-cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.recipe-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    max-width: 250px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recipe-card-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px var(--shadow-color);
}

.recipe-card {
    background: var(--card-background);
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--shadow-color);
    overflow: hidden;
    text-align: left;
}

.recipe-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.recipe-card h3 {
    font-size: 1.2em;
    margin: 15px;
    color: var(--accent-color);
}

.recipe-card p {
    font-size: 0.9em;
    margin: 0 15px 15px;
    text-align: left;
}


/* About Us Teaser Section */
.about-us-teaser {
    margin-top: 40px;
    text-align: center;
    background: var(--card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.cta-button {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 25px;
    background-color: var(--button-background);
    color: var(--button-text);
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.cta-button:hover {
    transform: scale(1.05);
    filter: brightness(110%);
}

/* Recipe Details Page */
.recipe-details {
    width: 100%;
    max-width: 800px;
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--shadow-color);
    margin-top: 20px;
    text-align: left;
}

.recipe-details h1 {
    text-align: center;
}

.recipe-details img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.recipe-section {
    margin-top: 30px;
    text-align: left;
    align-items: flex-start;
}

.recipe-section h2 {
    border-bottom: 2px solid var(--button-background);
    padding-bottom: 5px;
    display: inline-block;
    text-align: left;
}

.recipe-section ul,
.recipe-section ol {
    margin-top: 15px;
    padding-left: 20px;
}

.recipe-section ul li,
.recipe-section ol li {
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Social Share Section */
.social-share-section {
    margin-top: 40px;
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--shadow-color);
    width: 100%;
    max-width: 600px; /* Adjust as needed */
    box-sizing: border-box;
    text-align: center;
}

.social-share-section h2 {
    border-bottom: none;
    margin-bottom: 25px;
    text-align: center;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: white; /* Default text color for share buttons */
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.share-button.facebook {
    background-color: #3b5998;
}

.share-button.twitter {
    background-color: #00acee;
}

.share-button.copy-link {
    background-color: #6c757d; /* A neutral gray */
}


