/* ========== Reset & Global Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Font Face */
@font-face {
    font-family: 'Arial';
    src: url('fonts/Cooper-Regular.woff2') format('woff2'),
    url('fonts/Cooper-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: Arial, sans-serif;
    background-color: #e8d6c1; /* Warm beige */
    color: #333;
    line-height: 1.5;
    font-size: 1.125rem; /* Ensure proper font size on large screens */
}

/* ========== Header (Top Menu) ========== */
.header {
    width: 80%;
    margin: 0 auto;
    background-color: #d3c0aa;
    position: relative; /* Ensure positioning context for absolute elements */
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

/* Logo */
.logo-img {
    display: block;
    width: 300px;
    height: auto;
    margin: 0;
}

/* ========== Navigation Menu ========== */
.nav-menu > ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
    position: relative;
    padding-left: 0;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-size: 1.4rem;
    padding: 0px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: #F79420;
    color: #fff;
    border-radius: 5px;
}

/* ========== Submenu Styles ========== */
.submenu-items {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #d3c0aa;
    padding: 10px 0;
    min-width: 150px;
    border-radius: 4px;
    list-style: none;
    z-index: 999;
}

.submenu:hover .submenu-items {
    display: block;
}

/* ========== Hamburger Menu Styles ========== */
.hamburger {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #333;
    position: relative;
    z-index: 1001;
}

/* ========== Main Content Layout ========== */
.content-wrapper, .footer-wrapper {
    width: 80%;
    margin: 0 auto;
    padding: 10px 20px;
}

.split-layout {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    height: calc(100vh - 200px); /* Adjust based on your header and padding */
}

/* Right Column (Ingredients) */
.split-right {
    flex: 1;
    font-size: 1.125rem;
    text-align: left;
    max-width: 50%;
    overflow-y: auto; /* Enable vertical scrolling */
}

/* Left Column (How to Prepare) */
.split-left {
    flex: 1;
    font-size: 1.125rem;
    padding: 0;
    max-width: 50%;
    overflow-y: auto; /* Enable vertical scrolling */
}

.split-right ul,
.split-right li {
    list-style: none;
    font-size: 22px; /* Ensure font size consistency */
    margin: 0;
    padding: 0;
}

.split-right img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* ========== Recipe Steps ========== */
.recipe-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: step-counter;
}

.recipe-steps li {
    position: relative;
    counter-increment: step-counter;
    margin-bottom: 1.5rem; /* Spacing between steps */
    padding-bottom: 1rem;  /* Space before the bottom border */
    border-bottom: 1px solid #ccc; /* Divider line under each step */
    font-size: 22px;       /* Larger instructions */
}

/* Large, bold step number on the left */
.recipe-steps li::before {
    content: counter(step-counter);
    float: left;
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
    margin: -8px 14px 0 7px;
}

/* Prevent text from colliding with the step number */
.recipe-steps li p,
.recipe-steps li a {
    margin-left: 0.5rem;
    font-size: 22px; /* Match the instruction text */
}

/* ========== Responsive Design ========== */
@media (max-width: 1660px) {
    .header-inner {
        flex-direction: column;
        align-items: center;
    }

    /* Show Hamburger Button */
    .hamburger {
        display: block;
        position: absolute;
        top: 10px;
        right: 15px;
    }

    /* Ensure menu appears directly below the header */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #d3c0aa;
        flex-direction: column;
        text-align: left;
        padding: 10px 0;
        border-radius: 5px;
        z-index: 1001; /* Ensure it appears above other content */
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 10px;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 15px;
        font-size: 1.2rem;
        text-align: center;
    }

    /* Stack .split-right above .split-left */
    .split-layout {
        flex-direction: column-reverse;
        height: auto; /* Adjust height for stacked layout */
    }

    .split-left,
    .split-right {
        width: 100%;
        max-width: 100%;
        /*overflow: auto; /* Enable scrolling if content overflows */
    }


}

@media (min-width: 1024px) {
    /* Fix the header and center it */
    .header {
        position: fixed;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 80%; /* same as before */
        z-index: 1000; /* ensure it stays above content */
    }

    /* Push down main content to account for the fixed header */
    .content-wrapper {
        margin-top: 200px; /* Adjust this value if your header’s actual height is different */
    }
}

/* ===== Affiliate Page Specific Styles ===== */

/* Always display the affiliate notice at the very bottom of the screen */
.affiliate-notice p {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: #d3c0aa;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
    width: 80%;
    margin: 0;
}

/* Parent container for all affiliate items */
.affiliate-grid {
    display: flex;
    flex-wrap: nowrap;            /* keep them on one row */
    justify-content: space-between;
    align-items: stretch;         /* stretch each item to the same height */
    width: 90%;
    margin: 0 auto 2rem;         /* center, add bottom space */
}

/* Each product card */
.affiliate-item {
    flex: 0 0 32%;                /* 3 items across */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;       /* stack image area + text vertically */
    text-align: center;
    border: 1px solid #ccc;       /* optional visual boundary */
    padding: 10px;                /* optional padding */
    background-color: #fff;       /* optional background color */
}

/* Image container with fixed height */
.affiliate-image {
    width: 100%;
    height: 200px;                /* pick a height that works for you */
    display: flex;
    align-items: center;          /* center image within this box */
    justify-content: center;
    overflow: hidden;             /* hides any overflow if image is too large */
    margin-bottom: 10px;          /* space between image and text */
}

/* Make images fill the container without stretching */
.affiliate-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;          /* ensures image scales properly inside box */
}

/* Price/title links stay black and un-underlined */
.affiliate-item a.black-link {
    color: black;
    text-decoration: none;
}

/* Let the affiliate-content wrapper scroll if needed */
.affiliate-content {
    width: 100%;
    margin: 0 auto;
    height: calc(100vh - 180px);  /* or another offset that suits your header */
    overflow-y: auto;
    padding-top: 1rem;
    padding-bottom: 3rem;         /* room for disclaimers, etc. */
}

/* Responsive: stack items vertically on small screens */
@media (max-width: 768px) {
    .affiliate-grid {
        flex-direction: column;
        align-items: center;
    }
    .affiliate-item {
        width: 90%;                 /* full width in mobile view */
        margin-bottom: 20px;
    }
    .affiliate-content {
        padding-bottom: 8rem; /* or any larger value */
    }
}

@media (max-width: 1024px) {  /* Previously 768px, now includes iPads */
    .header-inner {
        flex-direction: column;
        align-items: center;
    }

    /* Show Hamburger Button for iPads */
    .hamburger {
        display: block;
        position: absolute;
        top: 10px;
        right: 15px;
    }

    /* Ensure menu appears directly below the header */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #d3c0aa;
        flex-direction: column;
        text-align: left;
        padding: 10px 0;
        border-radius: 5px;
        z-index: 1001; /* Ensure it appears above other content */
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 10px;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 15px;font-size: 3.2vw;
        font-size: 1.2rem;
        text-align: center;
    }

    /* Ensure submenus stay hidden until clicked */
    .submenu-items {
        display: none;
        position: static;
        background: none;
        border-radius: 0;
    }

    .submenu.active .submenu-items {
        display: block;
    }
}



.login-container {
            display: flex;
            justify-content: center;
            align-items: center;
            height: calc(100vh - 200px); /* Adjusted height to accommodate header and footer */
        }
        .login-form {
            width: 100%;
            max-width: 400px;
            padding: 20px;
            box-sizing: border-box;
            background-color: #f9f9f9;
            border: 1px solid #ddd;
            border-radius: 5px;
        }
        .login-form h2 {
            text-align: center;
            margin-bottom: 20px;
        }
        .login-form label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }
        .login-form input[type="text"],
        .login-form input[type="password"] {
            width: 100%;
            padding: 10px;
            margin-bottom: 15px;
            border: 1px solid #ccc;
            border-radius: 3px;
        }
        .login-form button {
            width: 100%;
            padding: 10px;
            background-color: #F79420;
            color: white;
            border: none;
            border-radius: 3px;
            font-size: 16px;
            cursor: pointer;
        }
        .login-form button:hover {
            background-color: #F79920;
        }
        .error-message {
            color: red;
            margin-bottom: 15px;
            text-align: center;
        }


        .save-form button {
            width: 10%;
            padding: 10px;
            background-color: #F79420;
            color: white;
            border: none;
            border-radius: 3px;
            font-size: 16px;
            cursor: pointer;
        }




/* Two-column layout with 35% / 65% split on larger screens */
.split-layout-home {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

/* 35% for left column */
.split-left-home {
    flex: 0 0 40%;
    font-size: 1rem;
}

/* 65% for right column */
.split-right-home {
    flex: 0 0 60%;
    display: flex;
    justify-content: center;
    align-items: center;
}


.hidden {
     visibility: hidden;
}
/* Add top spacing to image on large screens */
@media (min-width: 1024px) {
    .split-right-home .home-image {
        margin-top: 30px;
    }
}

@media (min-width: 1024px) {
    .split-left-home {
        margin-top: 30px;
    }
}

.split-right-home img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* ========== Responsive Media Queries ========== */
@media (max-width: 1024px) {
    /* Stack columns on smaller screens */
    .split-layout-home {
        flex-direction: column;
    }

    /* Let header items stack if needed */
    .header-inner {
        flex-direction: column;
        gap: 10px;
    }

    /* Shrink the logo from 300px to 150px on small screens */
    .logo-img {
        width: 150px;
    }
}

@media (min-width: 1200px) {
    body {
        font-size: 1.125rem; /* ~18px */
    }

    .content-wrapper {
        max-width: 90%;
    }

    .content-wrapper h1 {
        font-size: 2.25rem;
    }
}

/* Optional bigger paragraphs in side-by-side layout */
@media (min-width: 1024px) {
    .split-layout-home p {
        font-size: 1.2em !important;
        line-height: 1.6;
    }
}

@media (max-width: 1420px) and (min-width: 1025px) {
    .nav-menu a {
        font-size: calc(9.5px + (11.4 * ((100vw - 1020px) / 400)));

    }

    .submenu-items a {
        font-size: calc(9px + (11.4 * ((100vw - 1020px) / 400)));

    }
}

