/* ========================================================================
   Recipe Page Styles - Isolated from other blocks
   ======================================================================== */

/* Recipe Page Container */
.recipe-page {
    padding: 30px 0;
    /*background-color: var(--color-white, #ffffff);*/
}

@media screen and (min-width: 768px) {
    .recipe-page {
        /*padding: 30px 50px;*/
        padding: 0px 0px;
    }
}

/* Recipe Page Header */
.recipe-page-header {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

@media screen and (min-width: 768px) {
    .recipe-page-header {
        flex-wrap: nowrap;
        align-items: center;
        margin-bottom: 45px;
    }
}

/* Recipe Page Info (Title section) */
.recipe-page-info {
    flex: 0 0 100%;
    margin-bottom: 20px;
    order: 2;
}

@media screen and (min-width: 768px) {
    .recipe-page-info {
        flex: 0 0 36%;
        margin-left: 8%;
        margin-bottom: 0;
        order: 3;
    }
}

/* Decoration Image (from Recipe Page Settings) */
.recipe-page-header .decor {
    flex: 0 0 auto;
    width: 208px;
    height: 208px;
    display: none;
    order: 1;
}

@media screen and (min-width: 768px) {
    .recipe-page-header .decor {
        display: flex;
        align-self: flex-end;
    }
}

.recipe-page-header .decor img {
    width: 100%;
    height: auto;
}

/* Recipe Page Image */
.recipe-page-image {
    flex: 0 0 100%;
    position: relative;
    display: flex;
    margin-bottom: 20px;
    order: 3;
}

@media screen and (min-width: 768px) {
    .recipe-page-image {
        flex: 0 0 auto;
        max-width: 42%;
        margin-bottom: 0;
        order: 2;
    }
}

.recipe-page-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

/* Recipe Page Title (H1) */
.recipe-page-title {
    font-size: 32px;
    font-weight: bold;
    line-height: 1.2;
    margin: 0 0 20px 0;
    color: var(--color-text, #333333);
}

@media screen and (min-width: 768px) {
    .recipe-page-title {
        font-size: 48px;
    }
}

/* Recipe Page Description (H3) */
.recipe-page-description {
    font-size: 18px;
    font-weight: normal;
    line-height: 1.5;
    margin: 0 0 20px 0;
    color: var(--color-text, #333333);
}

@media screen and (min-width: 768px) {
    .recipe-page-description {
        font-size: 22px;
    }
}

/* Remove uppercase from recipe description when using u-heading class */
.recipe-page-info .u-heading[itemprop="description"] {
    text-transform: none !important;
}

/* Recipe Page Tags */
.recipe-page-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.recipe-page-tag {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: capitalize;
    transition: all 0.3s ease;
}

/* Tag 1: Meal Type */
.recipe-page-tag-meal-type {
    background-color: #f0f0f0;
    color: #333333;
}

/* Tag 2: Meal Plan */
.recipe-page-tag-meal-plan {
    background-color: #e8f5e9;
    color: #2e7d32;
}

/* Tag 3: Cuisine */
.recipe-page-tag-cuisine {
    background-color: #fff3e0;
    color: #e65100;
}

/* ========================================================================
   Recipe Page Weekly Menu Slider - Independent Styles
   ======================================================================== */

/* Wrapper for the entire slider section */
.recipe-page .recipe-page-slider-wrapper {
    margin-top: 40px;
    margin-bottom: 10px;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-page-slider-wrapper {
        margin-top: 60px;
        margin-bottom: 5px;
    }
}

/* Title block - OUTSIDE slider container */
.recipe-page .recipe-page-slider-wrapper .title {
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-page-slider-wrapper .title {
        flex-direction: row;
        align-items: center;
        gap: 20px;
        margin-bottom: 30px;
    }
}

.recipe-page .recipe-page-slider-wrapper .title h2,
.recipe-page .recipe-page-slider-wrapper .title .u-heading {
    font-size: 50px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    order: 1;
    margin: 0;
}

.recipe-page .recipe-page-slider-wrapper .title .btn {
    order: 2;
    flex-shrink: 0;
}

@media screen and (min-width: 1100px) {
    .recipe-page .recipe-page-slider-wrapper .title h2,
    .recipe-page .recipe-page-slider-wrapper .title .u-heading {
        font-size: 80px;
    }
}

/* Slider container - contains only the slider */
.recipe-page .recipe-page-slider-wrapper .recipe-page-slider-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    flex-wrap: wrap;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-page-slider-wrapper .recipe-page-slider-container {
        flex-wrap: nowrap;
        align-items: flex-end;
    }
}

.recipe-page .recipe-page-slider-wrapper .menu-slider {
    flex: 0 0 100%;
    padding: 0;
    margin: 0;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-page-slider-wrapper .menu-slider {
        flex: 0 0 100%;
        margin: 0;
    }
}

.recipe-page .recipe-page-slider-wrapper .menu-slider .swiper-wrapper {
    display: flex;
}

.recipe-page .recipe-page-slider-wrapper .menu-slider .menu-slider-item {
    display: flex;
    flex-direction: column;
}

.recipe-page .recipe-page-slider-wrapper .menu-slider .menu-slider-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Recipe slider link styles */
.recipe-page .recipe-page-slider-wrapper .menu-slider .recipe-slider-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.recipe-page .recipe-page-slider-wrapper .menu-slider .recipe-slider-link:hover {
    opacity: 0.8;
}

/* Navigation buttons */
.recipe-page .recipe-page-slider-wrapper .swiper-button-next {
    position: absolute;
    display: none;
}

.recipe-page .recipe-page-slider-wrapper .swiper-button-next:after {
    color: var(--color-text);
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-page-slider-wrapper .swiper-button-next {
        display: block;
    }
}

@media screen and (min-width: 1100px) {
    .recipe-page .recipe-page-slider-wrapper .swiper-button-next {
        right: -40px !important;
    }
}

/* Pagination */
.recipe-page .recipe-page-slider-wrapper .swiper-pagination {
    display: block;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-page-slider-wrapper .swiper-pagination {
        display: none;
    }
}

.recipe-page .recipe-page-slider-wrapper .swiper-pagination-bullet-active {
    background: var(--color-text);
}

/* ========================================================================
   Recipe Action Buttons - Order and Cook
   ======================================================================== */

.recipe-page-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 25px;
}

@media screen and (min-width: 768px) {
    .recipe-page-buttons {
        gap: 20px;
        margin-top: 30px;
    }
}

/* Recipe page buttons use the same .btn class as menu page "Show more" button */
.recipe-page-buttons .btn {
    border: none;
    outline: none;
    box-shadow: none;
    background: var(--bg-green, #004839);
    color: var(--color-white, #ffffff);
    padding: 11px 50px;
    display: inline-flex;
    text-align: center;
    justify-content: center;
    min-width: 100px;
    text-decoration: none;
    border-radius: 40px;
    font-size: 24px;
    font-family: var(--font-primary, "Montserrat", sans-serif);
    white-space: nowrap;
    transition: all 0.3s ease;
}

.recipe-page-buttons .btn:hover {
    opacity: 0.8;
}

.recipe-page-buttons .btn:focus,
.recipe-page-buttons .btn:active,
.recipe-page-buttons .btn:focus-visible {
    border: none;
    outline: none;
    box-shadow: none;
}

/* Mobile: Stack buttons vertically and adjust font size */
@media screen and (max-width: 767px) {
    .recipe-page-buttons {
        flex-direction: column;
    }

    .recipe-page-buttons .btn {
        width: 100%;
        font-size: 18px;
        padding: 11px 30px;
    }
}

/* ========================================================================
   Recipe Rating Styles
   ======================================================================== */

/* Rating Container */
.recipe-rating {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Stars Container */
.recipe-rating-stars {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Individual Star */
.recipe-rating-star {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.1s ease;
    user-select: none;
}

/* Filled Star */
.recipe-rating-star.filled {
    color: #000;
}

/* Half Star */
.recipe-rating-star.half {
    position: relative;
    color: #ddd;
}

.recipe-rating-star.half::before {
    content: '★';
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #000;
}

/* Hover Effect */
.recipe-rating-star:hover {
    transform: scale(1.1);
}

/* Rating Text */
.recipe-rating-text {
    font-size: 14px;
    color: #0066cc;
    font-weight: normal;
    margin: 0;
}

.recipe-rating-text a {
    color: #0066cc;
    text-decoration: none;
}

.recipe-rating-text a:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media screen and (max-width: 767px) {
    .recipe-rating-star {
        font-size: 20px;
    }

    .recipe-rating-text {
        font-size: 13px;
    }
}

/* ========================================================================
   Ingredients & Preparation Block Styles
   ======================================================================== */

/* Wrapper for the entire Ingredients & Preparation section */
.recipe-page .recipe-ingredients-preparation-wrapper {
    margin-top: 40px;
    margin-bottom: 30px;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-ingredients-preparation-wrapper {
        margin-top: 60px;
        margin-bottom: 40px;
    }
}

/* Container with two columns */
.recipe-page .recipe-ingredients-preparation-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    background-color: #f5f7fa;
    border-radius: 12px;
    padding: 30px 20px;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-ingredients-preparation-container {
        flex-direction: row;
        gap: 40px;
        padding: 40px;
    }
}

/* Left Column: Ingredients */
.recipe-page .recipe-ingredients-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Right Column: Preparation */
.recipe-page .recipe-preparation-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Section Titles (Ingredients / Preparation) */
.recipe-page .recipe-section-title {
    font-size: 28px;
    font-weight: bold;
    line-height: 1.2;
    margin: 0 0 20px 0;
    color: var(--color-text, #333333);
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-section-title {
        font-size: 36px;
        margin-bottom: 25px;
    }
}

/* Ingredients Content */
.recipe-page .recipe-ingredients-content {
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text, #333333);
}

.recipe-page .recipe-ingredients-content p {
    margin: 0 0 10px 0;
}

.recipe-page .recipe-ingredients-content p:last-child {
    margin-bottom: 0;
}

/* Preparation Content */
.recipe-page .recipe-preparation-content {
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text, #333333);
}

.recipe-page .recipe-preparation-content p {
    margin: 0 0 15px 0;
}

.recipe-page .recipe-preparation-content p:last-child {
    margin-bottom: 0;
}

/* Links in Preparation Content */
.recipe-page .recipe-preparation-content a {
    color: #007bff;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.recipe-page .recipe-preparation-content a:hover {
    color: #0056b3;
    text-decoration: none;
}

.recipe-page .recipe-preparation-content a:visited {
    color: #6610f2;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-ingredients-content,
    .recipe-page .recipe-preparation-content {
        font-size: 18px;
    }
}

/* ========================================================================
   Recipe Section Preparation - SwissMilk Style Structure
   ======================================================================== */

/* Main Container */
.recipe-page .recipe-section-preparation {
    margin: 0;
    padding: 0;
}

/* Header Section */
.recipe-page .recipe-section-preparation-header {
    margin-bottom: 20px;
}

.recipe-page .recipe-section-preparation-title {
    font-size: 24px;
    font-weight: bold;
    line-height: 1.2;
    margin: 0 0 15px 0;
    color: var(--color-text, #333333);
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-section-preparation-title {
        font-size: 28px;
        margin-bottom: 20px;
    }
}

/* Quick Facts (Time Information) */
.recipe-page .recipe-section-quick-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-section-quick-facts {
        gap: 20px;
        padding: 20px;
        height: 72px;
    }
}

.recipe-page .recipe-section-quick-facts-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-section-quick-facts-item {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
}

.recipe-page .recipe-section-quick-facts-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text, #333333);
}

.recipe-page .recipe-section-quick-facts-value {
    font-size: 14px;
    color: var(--color-text-secondary, #666666);
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-section-quick-facts-label,
    .recipe-page .recipe-section-quick-facts-value {
        font-size: 16px;
    }
}

/* Body Section */
.recipe-page .recipe-section-preparation-body {
    margin-bottom: 25px;
}

/* Preparation Steps */
.recipe-page .recipe-section-preparation-steps {
    margin: 0 0 20px 0;
    padding-left: 20px;
    list-style-position: outside;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-section-preparation-steps {
        padding-left: 25px;
    }
}

.recipe-page .recipe-section-preparation-step {
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text, #333333);
    margin-bottom: 15px;
}

.recipe-page .recipe-section-preparation-step:last-child {
    margin-bottom: 0;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-section-preparation-step {
        font-size: 18px;
        margin-bottom: 18px;
    }
}

/* Links in Preparation Steps */
.recipe-page .recipe-section-preparation-step a {
    color: #007bff;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.recipe-page .recipe-section-preparation-step a:hover {
    color: #0056b3;
    text-decoration: none;
}

.recipe-page .recipe-section-preparation-step a:visited {
    color: #6610f2;
}

/* Tips Section (Optional) */
.recipe-page .recipe-section-preparation-tips {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-section-preparation-tips {
        padding: 20px;
    }
}

.recipe-page .recipe-section-preparation-tips p {
    font-size: 15px;
    line-height: 1.5;
    color: var(--color-text, #333333);
    margin: 0 0 10px 0;
}

.recipe-page .recipe-section-preparation-tips p:last-child {
    margin-bottom: 0;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-section-preparation-tips p {
        font-size: 16px;
    }
}

/* Links in Tips Section */
.recipe-page .recipe-section-preparation-tips a {
    color: #007bff;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.recipe-page .recipe-section-preparation-tips a:hover {
    color: #0056b3;
    text-decoration: none;
}

.recipe-page .recipe-section-preparation-tips a:visited {
    color: #6610f2;
}

/* Footer (Nutritional Information) */
.recipe-page .recipe-section-preparation-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-section-preparation-footer {
        margin-top: 30px;
        padding-top: 25px;
    }
}

.recipe-page .recipe-section-preparation-nutrition-title {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.2;
    margin: 0 0 12px 0;
    color: var(--color-text, #333333);
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-section-preparation-nutrition-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
}

.recipe-page .recipe-section-preparation-nutrition {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-section-preparation-nutrition {
        gap: 20px;
    }
}

.recipe-page .recipe-section-nutrition-item {
    font-size: 14px;
    color: var(--color-text, #333333);
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-section-nutrition-item {
        font-size: 15px;
        padding: 10px 15px;
    }
}


/* ========================================================================
   Recipe Section Ingredients Calculator - Ingredients Content Styles
   ======================================================================== */

/* Main Container */
.recipe-page .recipe-section-ingredients-calculator {
    margin: 0;
    padding: 0;
}

/* Portions Display */
.recipe-page .recipe-section-portions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-section-portions {
        gap: 10px;
        padding: 20px;
    }
}

.recipe-page .recipe-section-portions-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text, #333333);
}

.recipe-page .recipe-section-portions-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text, #333333);
    min-width: 30px;
    text-align: center;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-section-portions-label,
    .recipe-page .recipe-section-portions-value {
        font-size: 16px;
    }
}

/* Portion Control Buttons */
.recipe-page .recipe-portion-btn {
    width: 28px;
    height: 28px;
    border: 2px solid var(--color-text, #333333);
    background-color: var(--color-white, #ffffff);
    color: var(--color-text, #333333);
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    user-select: none;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-portion-btn {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
}

.recipe-page .recipe-portion-btn:hover:not(:disabled) {
    background-color: var(--color-text, #333333);
    color: var(--color-white, #ffffff);
    transform: scale(1.1);
}

.recipe-page .recipe-portion-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.recipe-page .recipe-portion-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.recipe-page .recipe-portion-btn:focus {
    outline: 2px solid var(--color-text, #333333);
    outline-offset: 2px;
}

/* Ingredients List Container */
.recipe-page .recipe-section-ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-section-ingredients-list {
        gap: 15px;
    }
}

/* Individual Ingredient Item */
.recipe-page .recipe-section-ingredient-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text, #333333);
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-section-ingredient-item {
        font-size: 18px;
    }
}

/* Ingredient Amount */
.recipe-page .recipe-section-ingredient-amount {
    font-weight: 600;
    color: var(--color-text, #333333);
    white-space: nowrap;
}

/* Ingredient Text */
.recipe-page .recipe-section-ingredient-text {
    color: var(--color-text, #333333);
}

/* Ingredient Group Title (e.g., "Béchamel sauce:") */
.recipe-page .recipe-section-ingredient-group-title {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.3;
    margin: 15px 0 12px 0;
    color: var(--color-text, #333333);
}

@media screen and (min-width: 768px) {
    .recipe-page .recipe-section-ingredient-group-title {
        font-size: 20px;
        margin: 20px 0 15px 0;
    }
}

/* First group title (no top margin) */
.recipe-page .recipe-section-ingredients-list > .recipe-section-ingredient-group-title:first-child {
    margin-top: 0;
}

/* Links in Ingredients */
.recipe-page .recipe-section-ingredient-item a {
    color: #007bff;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.recipe-page .recipe-section-ingredient-item a:hover {
    color: #0056b3;
    text-decoration: none;
}

.recipe-page .recipe-section-ingredient-item a:visited {
    color: #6610f2;
}

