/* RecipeNexa Classic Food homepage */
.cf-home {
    --cf-primary: #639b0b;
    --cf-primary-dark: #477606;
    --cf-accent: #f2a12a;
    color: #333;
    background: #fff;
    padding: 24px 0 56px;
}
.cf-home *, .cf-home *::before, .cf-home *::after { box-sizing: border-box; }
.cf-home a { color: var(--cf-primary-dark); }
.cf-home-intro { margin-bottom: 24px; }
.cf-home-intro h1 { margin: 0 0 8px; font-size: clamp(25px, 3vw, 36px); }
.cf-home-intro p { margin: 0; color: #666; }
.cf-home-columns { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 26px; }
.cf-home-primary, .cf-home-sidebar { min-width: 0; }
.cf-section { margin-top: 30px; }
.cf-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 9px; margin-bottom: 16px; border-bottom: 3px solid var(--cf-primary); }
.cf-section-heading h2 { font-size: 22px; margin: 0; color: #333; }
.cf-section-heading > a { font-size: 13px; font-weight: 700; text-decoration: none; }
.cf-featured-card { position: relative; min-height: 270px; overflow: hidden; background: #f7f0e4; display: flex; align-items: end; }
.cf-featured-card > img { width: 100%; height: 330px; object-fit: cover; }
.cf-featured-copy { background: #fff; padding: 17px 20px; width: 100%; }
.cf-featured-card:has(> img) .cf-featured-copy { position: absolute; inset: auto 0 0; background: #fffffff2; }
.cf-featured-copy h3 { font-size: 24px; margin: 0 0 6px; }
.cf-featured-copy p { margin: 0 0 12px; }
.cf-action { display: inline-block; background: var(--cf-primary); color: #fff !important; text-decoration: none; padding: 9px 16px; font-size: 13px; font-weight: 700; border-radius: 3px; }
.cf-recipe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cf-recipe-card { min-width: 0; }
.cf-recipe-card > a { display: block; text-decoration: none; }
.cf-recipe-card img, .cf-image-placeholder { display: block; width: 100%; height: 138px; object-fit: cover; background: #eee9dd; }
.cf-image-placeholder { display: grid; place-items: center; color: #777; }
.cf-recipe-card h3 { font-size: 16px; line-height: 1.3; margin: 9px 0 6px; }
.cf-recipe-card p { color: #666; font-size: 13px; line-height: 1.55; }
.cf-weekly { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 18px; }
.cf-weekly img { display: block; width: 100%; height: 175px; object-fit: cover; }
.cf-weekly h3 { font-size: 21px; margin: 0 0 10px; }
.cf-weekly h3 a { text-decoration: none; }
.cf-weekly p, .cf-news-teaser { color: #666; line-height: 1.6; }
.cf-sidebar-block { border: 1px solid #e1e1e1; margin-bottom: 20px; }
.cf-sidebar-block h2 { margin: 0; padding: 12px 14px; color: #fff; background: var(--cf-primary); font-size: 17px; }
.cf-sidebar-block form { display: flex; padding: 13px; gap: 5px; }
.cf-sidebar-block input { min-width: 0; flex: 1; padding: 9px 7px; border: 1px solid #ccc; }
.cf-sidebar-block button { border: 0; background: var(--cf-primary); color: #fff; padding: 9px 10px; cursor: pointer; }
.cf-sidebar-block ul { padding: 11px 15px 11px 33px; margin: 0; }
.cf-sidebar-block li { margin: 8px 0; line-height: 1.4; font-size: 14px; }
.cf-sidebar-block li a { text-decoration: none; }
.cf-empty { padding: 18px; background: #f7f7f4; color: #666; }
@media (max-width: 970px) {
    .cf-home-columns { grid-template-columns: minmax(0, 1fr) 240px; gap: 18px; }
    .cf-recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .cf-home-columns { grid-template-columns: minmax(0, 1fr); }
    .cf-home-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; align-items: start; }
    .cf-sidebar-block { margin-bottom: 0; }
    .cf-recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 430px) {
    .cf-home-sidebar, .cf-recipe-grid, .cf-weekly { grid-template-columns: minmax(0, 1fr); }
    .cf-featured-card > img { height: 245px; }
    .cf-section-heading h2 { font-size: 19px; }
}


/* Classic Food Owner Edition homepage carousel */
.cf-featured-carousel {
    position: relative;
    overflow: hidden;
}

.cf-featured-carousel .carousel-item {
    min-width: 0;
}

.cf-featured-carousel .cf-featured-card {
    width: 100%;
    margin: 0;
}

.cf-featured-carousel .carousel-control-prev,
.cf-featured-carousel .carousel-control-next {
    width: 42px;
    height: 42px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, .65);
    border-radius: 50%;
    opacity: .9;
    z-index: 3;
}

.cf-featured-carousel .carousel-control-prev {
    left: 12px;
}

.cf-featured-carousel .carousel-control-next {
    right: 12px;
}

.cf-featured-carousel .carousel-control-prev:hover,
.cf-featured-carousel .carousel-control-next:hover {
    opacity: 1;
}

.cf-featured-carousel .carousel-indicators {
    top: 12px;
    bottom: auto;
    margin-bottom: 0;
    z-index: 3;
}

.cf-featured-carousel .carousel-indicators button {
    width: 22px;
    height: 4px;
}

@media (max-width: 600px) {
    .cf-featured-carousel .carousel-control-prev,
    .cf-featured-carousel .carousel-control-next {
        width: 34px;
        height: 34px;
    }

    .cf-featured-carousel .cf-featured-copy h3 {
        font-size: 19px;
    }
}


/* Owner Edition slider full image fix 3163 */

/* Keep the complete image visible without cropping. */
.cf-featured-carousel .cf-featured-card {
    display: block;
    min-height: 0;
    overflow: hidden;
    background: #f7f0e4;
}

.cf-featured-carousel .cf-featured-card > img {
    display: block;
    width: 100%;
    height: clamp(260px, 38vw, 360px);
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    background: #f7f0e4;
}

/* Show title and description below the image. */
.cf-featured-carousel .cf-featured-copy,
.cf-featured-carousel .cf-featured-card:has(> img) .cf-featured-copy {
    position: static;
    inset: auto;
    width: 100%;
    padding: 18px 20px;
    background: #fff;
    box-sizing: border-box;
}

.cf-featured-carousel .cf-featured-copy h3 {
    margin: 0 0 8px;
    line-height: 1.3;
}

.cf-featured-carousel .cf-featured-copy p {
    margin: 0 0 12px;
}

@media (max-width: 600px) {
    .cf-featured-carousel .cf-featured-card > img {
        height: 260px;
        object-fit: contain;
    }

    .cf-featured-carousel .cf-featured-copy,
    .cf-featured-carousel .cf-featured-card:has(> img) .cf-featured-copy {
        padding: 14px 16px;
    }
}

@media (max-width: 400px) {
    .cf-featured-carousel .cf-featured-card > img {
        height: 220px;
    }
}


/* Owner Edition Smart Slider 3166 */

/* Blurred copy of the uploaded image fills unused side space. */
.cf-featured-carousel .cf-featured-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.cf-featured-carousel .cf-featured-card:has(> img)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: clamp(260px, 38vw, 360px);
    background-image: var(--cf-slide-blur-image, none);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    filter: blur(22px) brightness(.82);
    transform: scale(1.08);
    transform-origin: center;
    pointer-events: none;
    z-index: 0;
}

.cf-featured-carousel .cf-featured-card > img {
    position: relative;
    z-index: 1;
    background: transparent;
    object-fit: contain;
}

/* Title and description remain below the image. */
.cf-featured-carousel .cf-featured-copy,
.cf-featured-carousel .cf-featured-card:has(> img) .cf-featured-copy {
    position: relative;
    z-index: 2;
    inset: auto;
    background: #fff;
}

@media (max-width: 600px) {
    .cf-featured-carousel .cf-featured-card:has(> img)::before {
        height: 260px;
    }
}

@media (max-width: 400px) {
    .cf-featured-carousel .cf-featured-card:has(> img)::before {
        height: 220px;
    }
}


/* Owner Edition Natural Image Slider 3168 */

/* Remove the blurred image background completely. */
.cf-featured-carousel .cf-featured-card:has(> img)::before {
    content: none;
    display: none;
}

/* Display each uploaded image at its natural aspect ratio. */
.cf-featured-carousel .cf-featured-card > img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
    background: transparent;
}

/* No fixed image frame height. */
.cf-featured-carousel .cf-featured-card {
    display: block;
    width: 100%;
    min-height: 0;
    height: auto;
    background: transparent;
    overflow: hidden;
}

/* Keep title and description below the image. */
.cf-featured-carousel .cf-featured-copy,
.cf-featured-carousel .cf-featured-card:has(> img) .cf-featured-copy {
    position: relative;
    inset: auto;
    width: 100%;
    background: #fff;
}


/* Owner Edition Fixed Height Slider 3169 */

/* Keep the slider compact and consistent across slides. */
.cf-featured-carousel .cf-featured-card {
    display: block;
    width: 100%;
    min-height: 0;
    height: auto;
    overflow: hidden;
    background: #fff;
}

/* Remove previous blurred background. */
.cf-featured-carousel .cf-featured-card::before,
.cf-featured-carousel .cf-featured-card:has(> img)::before {
    content: none;
    display: none;
}

/* Full-width image with fixed desktop height. */
.cf-featured-carousel .cf-featured-card > img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 360px;
    max-height: 360px;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center;
    background: transparent;
}

/* Keep text below the picture. */
.cf-featured-carousel .cf-featured-copy,
.cf-featured-carousel .cf-featured-card:has(> img) .cf-featured-copy {
    position: relative;
    inset: auto;
    width: 100%;
    background: #fff;
    padding: 16px 20px;
    z-index: 2;
}

@media (max-width: 600px) {
    .cf-featured-carousel .cf-featured-card > img {
        height: 240px;
        max-height: 240px;
    }
}

@media (max-width: 400px) {
    .cf-featured-carousel .cf-featured-card > img {
        height: 200px;
        max-height: 200px;
    }
}


/* RecipeNexa approved homepage design - Hero and CTA */
.cf-home .cf-design-hero {
    min-height: 215px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 28px 48px;
    margin-bottom: 16px;
    color: #fff;
    background:
        linear-gradient(90deg,
            rgba(16,54,33,.97) 0%,
            rgba(16,54,33,.84) 39%,
            rgba(16,54,33,.10) 100%),
        url('/images/auth/recipenexa-login-food-hero.webp')
        center / cover no-repeat;
}
.cf-design-hero-content {
    max-width: 490px;
    width: 100%;
}
.cf-design-eyebrow {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    background: #f5f8ee;
    color: #365b2a;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
}
.cf-design-hero h1 {
    margin: 12px 0 7px;
    color: #fff;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.2;
    font-weight: 800;
}
.cf-design-hero p {
    color: #f3f8f0;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 14px;
}
.cf-design-search {
    display: flex;
    max-width: 440px;
    width: 100%;
}
.cf-design-search input {
    flex: 1;
    min-width: 0;
    background: #fff;
    color: #26312a;
    border: 0;
    border-radius: 6px 0 0 6px;
    padding: 11px 14px;
}
.cf-design-search button {
    border: 0;
    border-radius: 0 6px 6px 0;
    background: #579b08;
    color: #fff;
    font-weight: 700;
    padding: 0 24px;
}
.cf-home .cf-design-cta {
    margin-top: 26px;
    padding: 23px 24px;
    border-radius: 9px;
    background:
        radial-gradient(circle at 5% 95%,
            #c4dcb6 0, transparent 24%),
        radial-gradient(circle at 95% 20%,
            #c4dcb6 0, transparent 24%),
        #f0f5ed;
    text-align: center;
}
.cf-design-cta > span {
    color: #4b8414;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
}
.cf-design-cta h2 {
    font-size: 25px;
    font-weight: 800;
    margin: 6px 0;
    color: #18231b;
}
.cf-design-cta p {
    color: #536057;
    font-size: 13px;
}
.cf-design-cta a {
    display: inline-block;
    margin-top: 5px;
    padding: 10px 23px;
    border-radius: 4px;
    color: #fff;
    background: #579b08;
    text-decoration: none;
    font-weight: 700;
}
@media (max-width: 767px) {
    .cf-home .cf-design-hero {
        padding: 26px 20px;
        min-height: 230px;
    }
    .cf-design-hero h1 {
        font-size: 27px;
    }
    .cf-design-cta h2 {
        font-size: 21px;
    }
}


/* RECIPENEXA APPROVED HOMEPAGE - CARDS AND SIDEBAR */

.cf-home {
    background: #fff;
    color: #263328;
}

.cf-home .cf-home-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 23px;
    align-items: start;
}

.cf-home .cf-home-primary,
.cf-home .cf-home-sidebar {
    min-width: 0;
}

.cf-home .cf-section,
.cf-home .cf-featured {
    margin-bottom: 23px;
}

.cf-home .cf-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 2px solid #e7eee0;
    padding: 0 0 10px;
    margin-bottom: 15px;
}

.cf-home .cf-section-heading h2 {
    margin: 0;
    color: #243428;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.3;
}

.cf-home .cf-section-heading > a {
    color: #4e8913;
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
}

.cf-home .cf-section-heading > a:hover {
    text-decoration: underline;
}

/* Featured Recipes */

.cf-home .cf-featured-carousel {
    overflow: hidden;
    border-radius: 9px;
    background: #f5f7f2;
}

.cf-home .cf-featured-carousel .cf-featured-card {
    border-radius: 9px;
    overflow: hidden;
}

.cf-home .cf-featured-carousel .cf-featured-copy h3 {
    font-weight: 800;
}

.cf-home .cf-featured-carousel .cf-featured-copy a {
    text-decoration: none;
}

/* Recipe cards and section content */

.cf-home .cf-section article {
    overflow: hidden;
    border-radius: 8px;
}

.cf-home .cf-section article img {
    max-width: 100%;
    object-fit: cover;
}

.cf-home .cf-section article h3 {
    color: #243428;
    font-weight: 750;
    line-height: 1.35;
}

.cf-home .cf-section article h3 a {
    color: inherit;
    text-decoration: none;
}

.cf-home .cf-section article h3 a:hover {
    color: #4e8913;
}

.cf-home .cf-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

/* Weekly Special */

.cf-home .cf-weekly {
    display: grid;
    grid-template-columns: minmax(0, 210px) minmax(0, 1fr);
    gap: 17px;
    align-items: center;
}

.cf-home .cf-weekly img {
    display: block;
    width: 100%;
    height: 155px;
    border-radius: 7px;
    object-fit: cover;
}

.cf-home .cf-weekly h3 {
    font-size: 19px;
    line-height: 1.35;
}

.cf-home .cf-weekly p,
.cf-home .cf-news-teaser {
    color: #68746b;
    font-size: 13px;
    line-height: 1.7;
}

/* Recent and Popular Recipes Sidebar */

.cf-home .cf-sidebar-block {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e7eee1;
    border-radius: 8px;
    margin-bottom: 18px;
}

.cf-home .cf-sidebar-block h2 {
    background: #568e14;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    padding: 13px 15px;
}

.cf-home .cf-sidebar-block ul {
    list-style: none;
    margin: 0;
    padding: 8px 14px;
}

.cf-home .cf-sidebar-block li {
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid #edf0e9;
}

.cf-home .cf-sidebar-block li:last-child {
    border-bottom: 0;
}

.cf-home .cf-home-recipe-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cf-home .cf-home-recipe-thumb {
    display: block;
    flex: 0 0 64px;
    width: 64px;
    height: 53px;
    overflow: hidden;
    background: #edf1e7;
    border-radius: 5px;
}

.cf-home .cf-home-recipe-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.cf-home .cf-home-recipe-title {
    color: #263328;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.5;
    text-decoration: none;
}

.cf-home .cf-home-recipe-title:hover {
    color: #4e8913;
}

/* Responsive */

@media (max-width: 991px) {
    .cf-home .cf-home-columns {
        grid-template-columns: minmax(0, 1fr) 240px;
        gap: 16px;
    }
}

@media (max-width: 767px) {
    .cf-home .cf-home-columns {
        grid-template-columns: minmax(0, 1fr);
    }

    .cf-home .cf-weekly {
        grid-template-columns: 1fr;
    }

    .cf-home .cf-weekly img {
        height: 200px;
    }

    .cf-home .cf-section-heading h2 {
        font-size: 19px;
    }
}

/* RECIPENEXA APPROVED DESIGN - HOT RECIPES AND NEWS */

.cf-home .cf-recipe-grid,
.cf-home .cf-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.cf-home .cf-recipe-card,
.cf-home .cf-news-card {
    background: #fff;
    border: 1px solid #e8ede4;
    border-radius: 8px;
    overflow: hidden;
    min-width: 0;
}

.cf-home .cf-recipe-card > a,
.cf-home .cf-news-image {
    display: block;
    text-decoration: none;
}

.cf-home .cf-recipe-card img,
.cf-home .cf-news-image img {
    display: block;
    width: 100%;
    height: 135px;
    object-fit: cover;
}

.cf-home .cf-recipe-card h3 {
    padding: 12px 12px 0;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.cf-home .cf-recipe-card p {
    padding: 6px 12px 13px;
    margin: 0;
    color: #68746b;
    font-size: 12px;
    line-height: 1.5;
}

.cf-home .cf-news-image {
    height: 130px;
    background: #edf3e8;
}

.cf-home .cf-news-image span {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #62834e;
    font-size: 13px;
}

.cf-home .cf-news-card-body {
    padding: 12px;
}

.cf-home .cf-news-card h3 {
    font-size: 14px;
    margin: 0 0 8px;
    line-height: 1.4;
}

.cf-home .cf-news-card h3 a {
    color: #243428;
    text-decoration: none;
}

.cf-home .cf-news-card p {
    color: #68746b;
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 9px;
}

.cf-home .cf-news-read {
    color: #508719;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 600px) {
    .cf-home .cf-recipe-grid,
    .cf-home .cf-news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

@media (max-width: 380px) {
    .cf-home .cf-recipe-grid,
    .cf-home .cf-news-grid {
        grid-template-columns: 1fr;
    }
}


/* RecipeNexa QA dynamic homepage colors — SSH #164 */

/* Search and primary action buttons */
.cf-home .cf-design-search button,
.cf-home .cf-design-cta a {
    background: var(--cf-primary, #639b0b);
    color: #fff;
}

.cf-home .cf-design-search button:hover,
.cf-home .cf-design-cta a:hover {
    background: var(--cf-primary-dark, #477606);
}

/* Recent / Popular recipe sidebar */
.cf-home .cf-sidebar-block h2 {
    background: var(--cf-primary, #639b0b);
    color: #fff;
}

/* Homepage themed accents */
.cf-home .cf-design-cta > span,
.cf-home .cf-design-news a,
.cf-home .cf-design-weekly a {
    color: var(--cf-primary-dark, #477606);
}

/* CTA soft background follows selected skin */
.cf-home .cf-design-cta {
    background: var(--cf-primary-light, #e7f3cd);
}
