@font-face {
    font-family: "Poppins";
    src: url("../fonts/Poppins-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Poppins";
    src: url("../fonts/Poppins-SemiBold.ttf") format("truetype");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: "Poppins";
    src: url("../fonts/Poppins-Bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

:root {
    --blue: #073d7d;
    --blue-dark: #06346b;
    --orange: #ff941f;
    --orange-dark: #e87a00;
    --ink: #222222;
    --muted: #777777;
    --surface: #ffffff;
    --soft: #f5f5f5;
    --page-width: 1440px;
    --page-gutter: clamp(20px, 6vw, 96px);
    --type-page-title: clamp(30px, 2.35vw, 45px);
    --type-section-title: clamp(28px, 2.2vw, 42px);
    --type-subtitle: clamp(14px, 1.2vw, 23px);
    --type-body: clamp(12px, 0.8vw, 15px);
    --type-note: clamp(9px, 0.65vw, 12px);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: #fff;
}

body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    color: var(--ink);
    background: #fff;
    font-family: "Poppins", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

/* El <dialog> del modal de receta (webcolosov2/includes/recipe_dialog.html) no
   bloquea el scroll del fondo de forma confiable en mobile por si solo -- sin
   esto, tras cerrarlo queda un area de scroll de mas hasta el proximo reflow.
   Mismo patron que body.menu-open de arriba. */
body.recipe-dialog-open {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    color: inherit;
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid #48a8ff;
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    padding: 10px 16px;
    color: #fff;
    background: var(--blue);
    border-radius: 8px;
    transform: translateY(-180%);
}

.skip-link:focus {
    transform: translateY(0);
}

.section-shell {
    width: min(100% - (var(--page-gutter) * 2), var(--page-width));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    z-index: 100;
    top: 0;
    height: 104px;
    background: #fff;
    box-shadow: none;
    transition: height 240ms ease, box-shadow 240ms ease;
}

.header-default,
.compact-header {
    position: absolute;
    inset: 0 0 auto;
    background: #fff;
    transition: none;
}

.header-default {
    height: 104px;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.compact-header {
    height: 64px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-24px);
    visibility: hidden;
}

.site-header.is-scrolled {
    height: 64px;
    box-shadow: 0 5px 18px rgb(9 44 84 / 16%);
}

.site-header.is-scrolled .header-default {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-58px);
    visibility: hidden;
}

.site-header.is-scrolled .compact-header {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
}

.header-inner {
    display: grid;
    grid-template-columns: 150px minmax(250px, 1fr) 170px auto;
    align-items: start;
    gap: 16px;
    width: min(100% - (var(--page-gutter) * 2), 1040px);
    height: 104px;
    padding-top: 14px;
    margin-inline: auto;
}

.brand {
    width: 120px;
    margin-top: -7px;
}

.header-search {
    position: relative;
    display: flex;
    justify-self: center;
    width: 250px;
    height: 32px;
    background: #f4f4f4;
    border-radius: 24px;
}

.header-search input,
.mobile-search input {
    width: 100%;
    min-width: 0;
    padding: 0 38px 0 16px;
    background: transparent;
    border: 0;
    outline: 0;
}

.header-search input {
    color: #777;
    font-size: 9px;
}

.header-search button,
.mobile-search button {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    width: 36px;
    height: 100%;
    padding: 0;
    place-items: center;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.header-search button::before,
.mobile-search button::before {
    position: absolute;
    left: 0;
    width: 1px;
    height: 18px;
    content: "";
    background: #d8d8d8;
}

.header-search svg,
.mobile-search svg,
.mobile-control svg {
    width: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.7;
}

.catalog-button {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 155px;
    padding: 9px 17px;
    color: #fff;
    background: var(--orange);
    border-radius: 24px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 180ms ease, transform 180ms ease;
}

.catalog-button:hover {
    background: var(--orange-dark);
    transform: translateY(-2px);
}

.catalog-button img {
    width: 15px;
    height: 15px;
    object-fit: contain;
}

.language-selector {
    display: flex;
    gap: 8px;
    margin: 0;
}

.language-selector button {
    width: 30px;
    height: 30px;
    padding: 0;
    overflow: hidden;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    filter: grayscale(0.25);
    opacity: 0.58;
}

.language-selector button.active {
    border-color: var(--orange);
    box-shadow: 0 0 0 2px #fff;
    filter: none;
    opacity: 1;
}

.language-selector button img { width: 100%; height: 100%; object-fit: cover; }
.language-selector button small { display: none; }
.language-selector-mobile { display: none; }

.language-selector-default {
    justify-self: end;
    margin-left: 4px;
}

.primary-navigation {
    position: absolute;
    top: 55px;
    right: 0;
    left: 0;
    border: 0;
}

.nav-inner {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: min(100% - (var(--page-gutter) * 2), 960px);
    min-height: 49px;
    margin-inline: auto;
}

.nav-inner ul {
    display: flex;
    gap: 34px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-inner li a {
    position: relative;
    display: block;
    padding: 9px 0 15px;
    color: #555;
    font-size: 11px;
    font-weight: 400;
}

.nav-inner li a::after {
    position: absolute;
    right: 50%;
    bottom: 9px;
    left: 50%;
    height: 2px;
    content: "";
    background: var(--orange);
    transition: right 180ms ease, left 180ms ease;
}

.nav-inner li a:hover::after,
.nav-inner li a.active::after {
    right: 0;
    left: 0;
}

.social-links {
    position: absolute;
    right: 0;
    display: flex;
    right: 0;
    gap: 7px;
}

.social-links a {
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    background: #fff;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    transition: transform 180ms ease;
}

.social-links a:hover {
    transform: translateY(-2px);
}

.social-links a:nth-child(1) {
    color: #ff4e88;
}

.social-links a:nth-child(2) {
    color: #3977bf;
}

.social-links a:nth-child(3) {
    color: #f24557;
}

.social-links img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.mobile-control,
.mobile-search,
.mobile-back,
.mobile-catalog-button {
    display: none;
}

.compact-inner {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) auto minmax(270px, 1fr);
    align-items: center;
    column-gap: 34px;
    width: min(100% - (var(--page-gutter) * 2), 928px);
    height: 64px;
    margin-inline: auto;
}

.compact-brand {
    width: 90px;
    justify-self: start;
}

.compact-menu-group,
.compact-actions {
    display: flex;
    align-items: center;
}

.compact-menu-group {
    gap: 26px;
}

.compact-actions {
    justify-self: end;
    gap: 16px;
}

.language-selector-compact {
    margin-left: 4px;
}

.compact-navigation {
    display: flex;
    gap: 34px;
}

.compact-navigation a {
    position: relative;
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0;
    color: #555;
    font-size: 11px;
}

.compact-navigation a::after {
    position: absolute;
    right: 50%;
    bottom: 17px;
    left: 50%;
    height: 2px;
    content: "";
    background: var(--orange);
    transition: right 180ms ease, left 180ms ease;
}

.compact-navigation a:hover::after,
.compact-navigation a.active::after {
    right: 0;
    left: 0;
}

.compact-search-wrap {
    position: relative;
    flex: 0 0 auto;
}

.compact-search-button {
    display: grid;
    width: 32px;
    height: 32px;
    padding: 0;
    place-items: center;
    color: #777;
    background: #fff;
    border: 1.5px solid #ffad4b;
    border-radius: 50%;
    cursor: pointer;
}

.compact-search-button svg,
.compact-search-panel button svg {
    width: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.7;
}

.compact-search-panel {
    position: absolute;
    top: 43px;
    right: 0;
    display: flex;
    width: 310px;
    height: 46px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 24px;
    box-shadow: 0 8px 22px rgb(0 0 0 / 16%);
}

.compact-search-panel[hidden] {
    display: none;
}

.compact-search-panel input {
    width: 100%;
    min-width: 0;
    padding: 0 52px 0 20px;
    background: transparent;
    border: 0;
    font-size: 10px;
    outline: 0;
}

.compact-search-panel button {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    width: 48px;
    height: 100%;
    padding: 0;
    place-items: center;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.compact-catalog {
    min-width: 158px;
    padding: 8px 14px;
    font-size: 9px;
}

@media (min-width: 901px) and (max-width: 1050px) {
    .compact-inner {
        width: calc(100% - 48px);
        column-gap: 22px;
    }

    .compact-menu-group {
        gap: 18px;
    }

    .compact-navigation {
        gap: 20px;
    }

    .compact-actions {
        gap: 12px;
    }

    .compact-catalog {
        padding-inline: 16px;
        font-size: 10px;
    }
}

.site-footer {
    position: relative;
    z-index: 2;
    color: #fff;
    background: var(--blue-dark);
    font-size: 12px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 32px;
    width: min(100% - (var(--page-gutter) * 2), var(--page-width));
    min-height: 68px;
    margin-inline: auto;
}

.footer-inner p {
    margin: 0;
}

.footer-credit {
    justify-self: center;
    color: inherit;
    text-align: center;
    white-space: nowrap;
}

.footer-inner nav {
    display: flex;
    justify-self: end;
    gap: 48px;
}

.footer-inner a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    :root {
        --page-gutter: 20px;
        --type-page-title: 22px;
        --type-section-title: 27px;
        --type-subtitle: 19px;
        --type-body: 12px;
        --type-note: 10px;
    }

    .site-header {
        height: 70px;
        border-bottom: 2px solid var(--orange);
    }

    .header-default {
        position: relative;
        transform: none;
    }

    .compact-header,
    .site-header.is-scrolled .compact-header {
        display: none;
    }

    .site-header.is-scrolled {
        height: 70px;
    }

    .site-header.is-scrolled .header-default {
        opacity: 1;
        pointer-events: auto;
        transform: none;
        visibility: visible;
    }

    .header-inner {
        position: relative;
        display: flex;
        align-items: center;
        height: 70px;
        min-height: 70px;
        padding-top: 0;
        gap: 12px;
    }

    .brand {
        position: absolute;
        left: 50%;
        width: 84px;
        margin: 0;
        transform: translateX(-50%);
    }

    .header-search,
    .catalog-button,
    .language-selector-default {
        display: none;
    }

    .mobile-control {
        display: grid;
        width: 36px;
        height: 36px;
        padding: 0;
        place-items: center;
        color: #fff;
        background: var(--orange);
        border: 0;
        border-radius: 50%;
        cursor: pointer;
    }

    .mobile-back {
        position: absolute;
        left: 0;
        display: grid;
        width: 32px;
        height: 32px;
        place-items: center;
        color: #fff;
        background: var(--orange);
        border-radius: 50%;
        font-size: 25px;
        line-height: 1;
    }

    .mobile-search-button {
        margin-left: auto;
        transition: opacity 180ms ease, visibility 180ms ease;
    }

    body.menu-open .mobile-search-button {
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
    }

    .menu-button {
        gap: 4px;
        align-content: center;
    }

    .menu-button span {
        display: block;
        width: 16px;
        height: 2px;
        background: currentColor;
        transition: transform 180ms ease, opacity 180ms ease;
    }

    .menu-button[aria-expanded="true"] span:first-child {
        transform: translateY(6px) rotate(45deg);
    }

    .menu-button[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .menu-button[aria-expanded="true"] span:last-child {
        transform: translateY(-6px) rotate(-45deg);
    }

    .mobile-search {
        position: absolute;
        z-index: 10;
        top: 70px;
        right: 0;
        left: 0;
        padding: 8px 24px 10px;
        color: #555;
        background: #002c78;
    }

    .mobile-search:not([hidden]) {
        display: block;
    }

    .mobile-search form {
        position: relative;
        display: flex;
        width: min(100%, 520px);
        height: 32px;
        margin-inline: auto;
        background: #f4f4f4;
        border-radius: 24px;
    }

    .mobile-search input {
        font-size: 10px;
    }

    .primary-navigation {
        position: fixed;
        z-index: 20;
        top: 70px;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-height: none;
        padding: 42px 24px 28px;
        overflow-y: auto;
        background: #fff;
        box-shadow: none;
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform 220ms ease, visibility 220ms ease;
    }

    .primary-navigation.open {
        transform: translateX(0);
        visibility: visible;
    }

    .nav-inner {
        display: block;
        width: 100%;
    }

    .nav-inner ul {
        display: block;
        text-align: center;
    }

    .nav-inner li a {
        padding: 14px 0;
        border-bottom: 0;
        font-size: 18px;
        font-weight: 600;
    }

    .nav-inner li a::after {
        display: none;
    }

    .mobile-catalog-button {
        display: flex;
        width: min(100%, 280px);
        min-height: 48px;
        margin: 24px auto 0;
        padding: 12px 22px;
        align-items: center;
        justify-content: center;
        gap: 10px;
        color: #fff;
        background: var(--orange);
        border-radius: 26px;
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
    }

    .language-selector-mobile {
        display: flex;
        justify-content: center;
        margin-top: 22px;
    }

    .language-selector-mobile button {
        width: 38px;
        height: 38px;
    }

    .language-selector-mobile button img { width: 100%; height: 100%; }

    .mobile-catalog-button img {
        width: 17px;
        height: 17px;
        object-fit: contain;
    }

    .social-links {
        position: static;
        justify-content: center;
        margin-top: 30px;
    }

    .social-links a {
        width: 34px;
        height: 34px;
    }

    .social-links img {
        width: 22px;
        height: 22px;
    }

    .footer-inner {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 82px;
        padding-block: 12px;
        gap: 6px;
        font-size: 9px;
    }

    .footer-inner p {
        display: none;
    }

    .footer-credit {
        white-space: normal;
    }

    .footer-inner nav {
        justify-self: auto;
        gap: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
