/* ========================================
   ME-NUTRE
   Ficha dinámica de ingrediente
======================================== */

/* ========================================
   HERO
======================================== */

.ingredient-hero {
    padding: 54px 0 58px;

    background:
        linear-gradient(
            135deg,
            rgba(239, 246, 237, 0.72),
            rgba(255, 253, 248, 0.96)
        );

    border-bottom: 1px solid rgba(23, 107, 104, 0.12);
}

.ingredient-hero .container {
    max-width: 1180px;
}

.ingredient-back {
    display: inline-flex;
    align-items: center;

    margin-bottom: 42px;

    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;

    color: var(--color-primary);
    text-decoration: none;

    transition: opacity 160ms ease;
}

.ingredient-back:hover {
    opacity: 0.72;
}

.ingredient-hero-content {
    max-width: 820px;
}

.ingredient-eyebrow {
    display: block;

    margin-bottom: 12px;

    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.14em;

    color: var(--color-primary);
}

.ingredient-title {
    margin: 0 0 18px;

    font-family: "Playfair Display", serif;
    font-size: clamp(2.8rem, 5vw, 4.8rem);
    line-height: 0.98;
    font-weight: 600;

    color: var(--color-text);
}

.ingredient-hero-intro {
    max-width: 720px;

    margin: 0;

    font-size: 1.04rem;
    line-height: 1.75;

    color: var(--color-text-soft);
}

/* ========================================
   MÓDULOS EDITORIALES
======================================== */

.ingredient-modules {
    background: #fff;
}

.ingredient-module {
    position: relative;
}

.ingredient-module .container {
    max-width: 1180px;
}

.ingredient-module-inner {
    position: relative;

    max-width: 900px;

    padding: 64px 0 68px;

    border-bottom: 1px solid rgba(23, 107, 104, 0.14);
}

.ingredient-module:last-child .ingredient-module-inner {
    border-bottom: 0;
}


/* TÍTULO DEL MÓDULO */

.ingredient-module-title {
    position: relative;

    max-width: 780px;

    margin: 0 0 26px;
    padding-left: 54px;

    font-family: "Playfair Display", serif;
    font-size: clamp(2rem, 3.2vw, 2.75rem);
    line-height: 1.12;
    font-weight: 600;

    color: var(--color-text);
}


/* MARCADOR EDITORIAL */

.ingredient-module-title::before {
    position: absolute;
    left: 0;
    top: 0.38em;

    width: 30px;
    height: 2px;

    content: "";

    background: var(--color-primary);
}


/* TEXTO */

.ingredient-module-text {
    max-width: 760px;

    margin: 0 0 16px;

    font-size: 1rem;
    line-height: 1.78;

    color: var(--color-text-soft);
}

.ingredient-module-text:last-of-type {
    margin-bottom: 0;
}


/* LISTAS */

.ingredient-module-list {
    max-width: 760px;

    margin: 24px 0 0;
    padding-left: 22px;

    color: var(--color-text-soft);
}

.ingredient-module-list li {
    margin-bottom: 10px;
    line-height: 1.7;
}


/* DESTACADO EDITORIAL */

.ingredient-module-highlight {
    position: relative;

    max-width: 760px;

    margin-top: 30px;
    padding: 22px 26px 24px;

    background: rgba(239, 246, 237, 0.72);

    border-left: 3px solid var(--color-primary);
}

.ingredient-module-highlight-label {
    display: block;

    margin-bottom: 10px;

    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.14em;

    color: var(--color-primary);
}

.ingredient-module-highlight p {
    margin: 0;

    font-family: "Playfair Display", serif;
    font-size: 1.08rem;
    line-height: 1.6;

    color: var(--color-text);
}


/* ========================================
   PANEL NUTRICIONAL ME-NUTRE
======================================== */

.ingredient-nutrition {
    max-width: 760px;

    margin: 0 0 34px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            rgba(239, 246, 237, 0.82),
            rgba(255, 253, 248, 0.96)
        );

    border: 1px solid rgba(23, 107, 104, 0.18);
    border-radius: 4px;
}


/* PORCIÓN */

.ingredient-nutrition-portion {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;

    padding: 24px 28px 22px;

    border-bottom: 1px solid rgba(23, 107, 104, 0.16);
}

.ingredient-nutrition-label {
    display: block;

    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.14em;

    color: var(--color-primary);
}

.ingredient-nutrition-portion-value {
    flex: 0 0 auto;

    font-family: "Playfair Display", serif;
    font-size: 2rem;
    line-height: 1;
    font-weight: 600;

    color: var(--color-text);
}


/* VALORES */

.ingredient-nutrition-values {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));

    padding: 0 14px;
}

.ingredient-nutrition-value {
    min-width: 0;

    padding: 22px 14px 24px;

    border-right: 1px solid rgba(23, 107, 104, 0.13);
}

.ingredient-nutrition-value:last-child {
    border-right: 0;
}

.ingredient-nutrition-value strong {
    display: block;

    margin-bottom: 6px;

    font-family: "Playfair Display", serif;
    font-size: 1.55rem;
    line-height: 1;
    font-weight: 600;

    color: var(--color-text);
}

.ingredient-nutrition-value span {
    display: block;

    font-size: 0.68rem;
    line-height: 1.35;

    color: var(--color-text-soft);
}

/* ========================================
   FUENTES Y REFERENCIAS
======================================== */

.ingredient-sources {
    padding: 12px 0 72px;
}

.ingredient-sources .container {
    max-width: 1180px;
}

.ingredient-sources-inner {
    max-width: 900px;

    padding-top: 34px;

    border-top: 1px solid rgba(23, 107, 104, 0.14);
}

.ingredient-sources-intro {
    max-width: 680px;

    margin: 0 0 16px;

    font-size: 0.88rem;
    line-height: 1.65;

    color: var(--color-text-soft);
}


/* BOTÓN */

.ingredient-sources-details {
    max-width: 760px;
}

.ingredient-sources-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 10px 0;

    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.02em;

    color: var(--color-primary);

    cursor: pointer;
    list-style: none;
}

.ingredient-sources-button::-webkit-details-marker {
    display: none;
}

.ingredient-sources-button span {
    display: inline-block;

    transition: transform 180ms ease;
}

.ingredient-sources-details[open]
.ingredient-sources-button span {
    transform: rotate(90deg);
}


/* CONTENIDO DESPLEGADO */

.ingredient-sources-content {
    margin-top: 20px;
    padding: 28px 30px 30px;

    background: rgba(239, 246, 237, 0.46);

    border: 1px solid rgba(23, 107, 104, 0.12);
}

.ingredient-sources-title {
    margin: 0 0 24px;

    font-family: "Playfair Display", serif;
    font-size: 1.55rem;
    line-height: 1.2;
    font-weight: 600;

    color: var(--color-text);
}

.ingredient-sources-list {
    margin: 0;
    padding-left: 22px;
}

.ingredient-source {
    margin-bottom: 18px;
    padding-left: 4px;

    font-size: 0.82rem;
    line-height: 1.6;

    color: var(--color-text-soft);
}

.ingredient-source:last-child {
    margin-bottom: 0;
}

.ingredient-source strong,
.ingredient-source span {
    display: block;
}

.ingredient-source strong {
    color: var(--color-text);
}

.ingredient-source a {
    display: inline-block;

    margin-top: 4px;

    font-size: 0.78rem;
    font-weight: 600;

    color: var(--color-primary);
    text-decoration: none;
}

.ingredient-source a:hover {
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE — MÓDULOS
======================================== */

@media (max-width: 700px) {

    .ingredient-module-inner {
        padding: 46px 0 50px;
    }

    .ingredient-module-title {
        margin-bottom: 22px;
        padding-left: 38px;

        font-size: clamp(1.8rem, 8vw, 2.3rem);
    }

    .ingredient-module-title::before {
        width: 22px;
    }

    .ingredient-module-text {
        font-size: 0.96rem;
        line-height: 1.72;
    }

    .ingredient-module-highlight {
        margin-top: 24px;
        padding: 18px 20px;
    }
    
        .ingredient-nutrition {
        margin-bottom: 28px;
    }

    .ingredient-nutrition-portion {
        display: block;

        padding: 22px 20px 20px;
    }

    .ingredient-nutrition-label {
        margin-bottom: 10px;
    }

    .ingredient-nutrition-portion-value {
        font-size: 1.8rem;
    }

    .ingredient-nutrition-values {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        padding: 0;
    }

    .ingredient-nutrition-value {
        padding: 18px 20px;

        border-right: 0;
        border-bottom: 1px solid rgba(23, 107, 104, 0.13);
    }

    .ingredient-nutrition-value:nth-child(odd) {
        border-right: 1px solid rgba(23, 107, 104, 0.13);
    }

    .ingredient-nutrition-value:last-child {
        grid-column: 1 / -1;

        border-right: 0;
        border-bottom: 0;
    }

    .ingredient-nutrition-value strong {
        font-size: 1.4rem;
    }

    .ingredient-sources {
        padding: 4px 0 54px;
    }

    .ingredient-sources-inner {
        padding-top: 28px;
    }

    .ingredient-sources-content {
        padding: 22px 20px 24px;
    }

    .ingredient-sources-title {
        font-size: 1.4rem;
    }

    .ingredient-source {
        font-size: 0.8rem;
    }

}
/* ========================================
   404
======================================== */

.ingredient-not-found {
    padding: 80px 0;
}


/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 700px) {

    .ingredient-hero {
        padding: 38px 0 44px;
    }

    .ingredient-back {
        margin-bottom: 32px;
    }

    .ingredient-title {
        font-size: clamp(2.45rem, 12vw, 3.5rem);
    }

    .ingredient-hero-intro {
        font-size: 0.98rem;
        line-height: 1.65;
    }

    .ingredient-development {
        padding: 44px 0 64px;
    }

}