/* Nutrition calculator — modern interactive UI */

.s1-page--nutrition {
    background: linear-gradient(180deg, #fff8f4 0%, #fff 35%, #f8fafc 100%);
}

.s1-nut-hero {
    position: relative;
    padding: 2.5rem 0 1.5rem;
    overflow: hidden;
}

.s1-nut-hero__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.s1-nut-hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.45;
    animation: s1NutOrb 8s ease-in-out infinite alternate;
}

.s1-nut-hero__orb--1 {
    width: 280px;
    height: 280px;
    background: #ff4800;
    top: -80px;
    left: -60px;
    animation-delay: 0s;
}

.s1-nut-hero__orb--2 {
    width: 220px;
    height: 220px;
    background: #ff9a6c;
    top: 20px;
    right: -40px;
    animation-delay: -3s;
}

.s1-nut-hero__orb--3 {
    width: 160px;
    height: 160px;
    background: #ffd4c2;
    bottom: -40px;
    left: 40%;
    animation-delay: -5s;
}

@keyframes s1NutOrb {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(20px, 15px) scale(1.08); }
}

.s1-nut-hero__inner {
    position: relative;
    z-index: 1;
}

.s1-nut-hero__back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    text-decoration: none;
    margin-bottom: 1rem;
    transition: color 0.2s, transform 0.2s;
}

.s1-nut-hero__back:hover {
    color: var(--s1-primary, #ff4800);
    transform: translateX(4px);
}

.s1-nut-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 72, 0, 0.1);
    color: var(--s1-primary, #ff4800);
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    animation: s1NutFadeUp 0.6s ease both;
}

.s1-nut-hero__title {
    font-size: clamp(1.65rem, 4vw, 2.25rem);
    font-weight: 800;
    color: var(--s1-dark, #1a2332);
    margin-bottom: 0.5rem;
    animation: s1NutFadeUp 0.6s ease 0.08s both;
}

.s1-nut-hero__sub {
    color: #64748b;
    max-width: 42ch;
    margin: 0;
    line-height: 1.7;
    animation: s1NutFadeUp 0.6s ease 0.16s both;
}

@keyframes s1NutFadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.s1-nut-body {
    padding-bottom: 4rem;
}

/* —— Form card —— */
.s1-nut-form-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 72, 0, 0.12);
    border-radius: 24px;
    padding: 1.75rem;
    box-shadow:
        0 4px 24px rgba(255, 72, 0, 0.06),
        0 24px 48px rgba(26, 35, 50, 0.06);
    animation: s1NutCardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes s1NutCardIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.s1-nut-form-card__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.s1-nut-form-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ff4800, #ff7a45);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 8px 20px rgba(255, 72, 0, 0.35);
}

.s1-nut-form-card__head h2 {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0;
    color: var(--s1-dark, #1a2332);
}

.s1-nut-form-card__head p {
    font-size: 0.78rem;
    color: #94a3b8;
    margin: 0;
}

.s1-nut-field {
    margin-bottom: 1.35rem;
}

.s1-nut-field__label {
    display: block;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--s1-dark, #1a2332);
    margin-bottom: 0.55rem;
}

/* Pills (gender, goal) */
.s1-nut-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.s1-nut-pill {
    flex: 1;
    min-width: calc(50% - 0.25rem);
    cursor: pointer;
    margin: 0;
}

.s1-nut-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.s1-nut-pill span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 0.65rem;
    border-radius: 14px;
    border: 2px solid #e8ecef;
    background: #fafbfc;
    font-size: 0.88rem;
    font-weight: 700;
    color: #64748b;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.s1-nut-pill span i {
    font-size: 1.1rem;
}

.s1-nut-pill:hover span {
    border-color: rgba(255, 72, 0, 0.35);
    background: #fff;
    transform: translateY(-2px);
}

.s1-nut-pill input:checked + span {
    border-color: var(--s1-primary, #ff4800);
    background: linear-gradient(135deg, #fff4ee, #fff);
    color: var(--s1-primary-dark, #e04000);
    box-shadow: 0 6px 20px rgba(255, 72, 0, 0.15);
    transform: translateY(-2px);
}

.s1-nut-pills--goals .s1-nut-pill {
    min-width: calc(33.333% - 0.35rem);
}

.s1-nut-pills--goals .s1-nut-pill span {
    flex-direction: column;
    padding: 0.85rem 0.4rem;
    font-size: 0.78rem;
    gap: 0.25rem;
}

.s1-nut-pills--goals .s1-nut-pill span i {
    font-size: 1.35rem;
}

/* Age stepper */
.s1-nut-age {
    text-align: center;
}

.s1-nut-age__ring {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 1rem;
}

.s1-nut-age__ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.s1-nut-age__ring-bg {
    fill: none;
    stroke: #f1f5f9;
    stroke-width: 8;
}

.s1-nut-age__ring-fill {
    fill: none;
    stroke: url(#s1NutAgeGrad);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326.7;
    stroke-dashoffset: 326.7;
    transition: stroke-dashoffset 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.s1-nut-age__center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.s1-nut-age__value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--s1-dark, #1a2332);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transition: transform 0.2s;
}

.s1-nut-age__value.is-bump {
    animation: s1NutBump 0.3s ease;
}

@keyframes s1NutBump {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

.s1-nut-age__unit {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    margin-top: 0.15rem;
}

.s1-nut-age__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.s1-nut-age__btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #e8ecef;
    background: #fff;
    color: var(--s1-primary, #ff4800);
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.s1-nut-age__btn:hover {
    border-color: var(--s1-primary, #ff4800);
    background: var(--s1-primary-light, #fff4ee);
    transform: scale(1.08);
}

.s1-nut-age__btn:active {
    transform: scale(0.95);
}

.s1-nut-age__slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to left, var(--s1-primary, #ff4800) 0%, #f1f5f9 0%);
    border-radius: 999px;
    outline: none;
}

.s1-nut-age__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--s1-primary, #ff4800);
    box-shadow: 0 2px 10px rgba(255, 72, 0, 0.35);
    cursor: pointer;
    transition: transform 0.15s;
}

.s1-nut-age__slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

/* Metric sliders (height / weight) */
.s1-nut-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.s1-nut-metric {
    background: #f8fafc;
    border: 1px solid #eef0f3;
    border-radius: 16px;
    padding: 1rem;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.s1-nut-metric:focus-within {
    border-color: rgba(255, 72, 0, 0.35);
    box-shadow: 0 4px 16px rgba(255, 72, 0, 0.08);
}

.s1-nut-metric__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.s1-nut-metric__label {
    font-size: 0.78rem;
    font-weight: 800;
    color: #64748b;
}

.s1-nut-metric__label i {
    color: var(--s1-primary, #ff4800);
    margin-left: 0.2rem;
}

.s1-nut-metric__val {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--s1-dark, #1a2332);
    font-variant-numeric: tabular-nums;
}

.s1-nut-metric__val small {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
}

.s1-nut-metric input[type="range"] {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    border-radius: 999px;
    outline: none;
}

.s1-nut-metric input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--s1-primary, #ff4800);
    box-shadow: 0 2px 8px rgba(255, 72, 0, 0.4);
    cursor: pointer;
}

.s1-nut-metric input[type="hidden"] {
    display: none;
}

/* Activity cards */
.s1-nut-activity-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.s1-nut-activity {
    cursor: pointer;
    margin: 0;
}

.s1-nut-activity input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.s1-nut-activity__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    border-radius: 14px;
    border: 2px solid #e8ecef;
    background: #fafbfc;
    min-height: 88px;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.s1-nut-activity__inner i {
    font-size: 1.35rem;
    color: #94a3b8;
    transition: color 0.2s, transform 0.2s;
}

.s1-nut-activity__name {
    font-size: 0.72rem;
    font-weight: 800;
    color: #475569;
    line-height: 1.3;
}

.s1-nut-activity:hover .s1-nut-activity__inner {
    border-color: rgba(255, 72, 0, 0.3);
    transform: translateY(-3px);
}

.s1-nut-activity input:checked + .s1-nut-activity__inner {
    border-color: var(--s1-primary, #ff4800);
    background: linear-gradient(160deg, #fff7f2, #fff);
    box-shadow: 0 8px 24px rgba(255, 72, 0, 0.12);
}

.s1-nut-activity input:checked + .s1-nut-activity__inner i {
    color: var(--s1-primary, #ff4800);
    transform: scale(1.1);
}

/* Submit */
.s1-nut-submit {
    width: 100%;
    margin-top: 0.5rem;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #ff4800 0%, #ff6b2b 50%, #ff4800 100%);
    background-size: 200% 100%;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(255, 72, 0, 0.35);
    transition: transform 0.2s, box-shadow 0.2s, background-position 0.4s;
    animation: s1NutShine 3s ease infinite;
}

@keyframes s1NutShine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.s1-nut-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(255, 72, 0, 0.42);
}

.s1-nut-submit:active {
    transform: translateY(0);
}

.s1-nut-submit i {
    margin-left: 0.35rem;
}

.s1-nut-errors {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 0.82rem;
}

/* —— Results panel —— */
.s1-nut-results {
    animation: s1NutCardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.s1-nut-results__hero {
    background: linear-gradient(135deg, #1a2332 0%, #2d3a4f 100%);
    border-radius: 24px;
    padding: 1.75rem;
    color: #fff;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}

.s1-nut-results__hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 72, 0, 0.25);
    border-radius: 50%;
    filter: blur(40px);
    animation: s1NutOrb 6s ease infinite alternate;
}

.s1-nut-results__hero h2 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.s1-nut-results__hero h2 i {
    color: #ff7a45;
}

.s1-nut-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    position: relative;
}

.s1-nut-stat {
    text-align: center;
    padding: 0.85rem 0.5rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    transition: transform 0.25s, background 0.25s;
}

.s1-nut-stat:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.12);
}

.s1-nut-stat--main {
    background: rgba(255, 72, 0, 0.2);
    border-color: rgba(255, 122, 69, 0.4);
}

.s1-nut-stat__label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0.35rem;
}

.s1-nut-stat__num {
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #fff;
}

.s1-nut-stat--main .s1-nut-stat__num {
    color: #ffb899;
}

.s1-nut-stat__unit {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.5);
}

.s1-nut-results__updated {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
    margin: 1rem 0 0;
    position: relative;
}

/* Empty state */
.s1-nut-empty {
    background: rgba(255, 255, 255, 0.85);
    border: 2px dashed rgba(255, 72, 0, 0.2);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    animation: s1NutCardIn 0.7s ease 0.2s both;
}

.s1-nut-empty__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff4ee, #ffe8dc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--s1-primary, #ff4800);
    animation: s1NutPulse 2s ease infinite;
}

@keyframes s1NutPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 72, 0, 0.25); }
    50% { box-shadow: 0 0 0 16px rgba(255, 72, 0, 0); }
}

.s1-nut-empty h2 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.s1-nut-empty p {
    color: #64748b;
    font-size: 0.9rem;
    max-width: 36ch;
    margin: 0 auto;
    line-height: 1.7;
}

/* Package cards */
.s1-nut-packages__title {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.s1-nut-pkg {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #eef0f3;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s;
    animation: s1NutFadeUp 0.5s ease both;
}

.s1-nut-pkg:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(26, 35, 50, 0.1);
}

.s1-nut-pkg--best {
    border: 2px solid var(--s1-primary, #ff4800);
    box-shadow: 0 12px 32px rgba(255, 72, 0, 0.15);
}

.s1-nut-pkg__ribbon {
    background: linear-gradient(90deg, #ff4800, #ff7a45);
    color: #fff;
    text-align: center;
    padding: 0.4rem;
    font-size: 0.72rem;
    font-weight: 800;
}

.s1-nut-pkg__body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.s1-nut-pkg__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.s1-nut-pkg__name {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0;
}

.s1-nut-pkg__cal {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    background: #fff4ee;
    color: var(--s1-primary, #ff4800);
    white-space: nowrap;
}

.s1-nut-pkg__desc {
    font-size: 0.8rem;
    color: #64748b;
    flex: 1;
    margin-bottom: 0.75rem;
}

.s1-nut-pkg__price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--s1-dark, #1a2332);
    margin-bottom: 0.75rem;
}

.s1-nut-pkg__price small {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
}

.s1-nut-pkg__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.75rem;
    border-radius: 12px;
    background: var(--s1-dark, #1a2332);
    color: #fff !important;
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.s1-nut-pkg__btn:hover {
    background: var(--s1-primary, #ff4800);
    transform: scale(1.02);
}

@media (max-width: 991.98px) {
    .s1-nut-stats {
        grid-template-columns: 1fr;
    }

    .s1-nut-pills--goals .s1-nut-pill {
        min-width: 100%;
    }

    .s1-nut-activity-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 575.98px) {
    .s1-nut-metrics {
        grid-template-columns: 1fr;
    }

    .s1-nut-form-card {
        padding: 1.25rem;
    }
}
