body {
    font-family: Open Sans, sans-serif;
    background-color: #f5f5f5;
}

.nutrition-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Open Sans', sans-serif;
    color: #333;
    padding: 30px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.food-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.food-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    margin-right: 25px;
}

.food-title h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 36px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #081158;
}

.food-description {
    color: #666;
    margin: 0;
    font-size: 16px;
}

.food-description-panel {
    background-color: #f8f8f8;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    line-height: 1.6;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.03);
}

.food-description-panel p {
    margin: 0;
}

.portion-control {
    background-color: #f2f9ff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 30px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.03);
}

.portion-size {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    text-align: center;
}

.portion-size label {
    margin-right: 10px;
    font-weight: 600;
    font-size: 16px;
}

.portion-size input {
    width: 80px;
    padding: 8px 12px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.portion-size select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    background-color: white;
}

.nutrition-summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.macro-card {
    flex: 1;
    min-width: 120px;
    padding: 15px;
    margin: 5px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.macro-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.macro-label {
    text-transform: lowercase;
    font-size: 14px;
    color: #666;
}

.macro-card.calories {
    background-color: #fff3e6;
}

.macro-card.calories .macro-value {
    color: #ff9933;
}

.macro-card.protein {
    background-color: #e6f6ff;
}

.macro-card.protein .macro-value {
    color: #3399ff;
}

.macro-card.carbs {
    background-color: #e6fff2;
}

.macro-card.carbs .macro-value {
    color: #33cc99;
}

.macro-card.fat {
    background-color: #fff6e6;
}

.macro-card.fat .macro-value {
    color: #ffcc66;
}

.nutrition-chart {
    background-color: #f8f8f8;
    border-radius: 10px;
    padding: 20px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.03);
}

.nutrition-chart h2 {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    color: #081158;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.nutrition-label {
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
    border: none;
}

.nutrition-label table {
    width: 100%;
    border-collapse: collapse;
}

.nutrition-label th,
.nutrition-label td {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    color: #333;
}

.nutrition-label th {
    text-align: left;
    font-weight: 600;
}

.nutrition-label td {
    text-align: left;
}

.nutrition-label .indent {
    width: 20px;
}

.section-header {
    font-weight: 700;
    font-size: 16px;
}

.nutrition-label .highlight {
    font-weight: 700;
}

.nutrition-label .daily-value {
    text-align: right;
    font-weight: 700;
    color: #666;
}

.divider {
    height: 8px;
    background-color: #081158;
    margin: 10px 0;
}

.divider-thin {
    height: 1px;
    background-color: #ccc;
    margin: 8px 0;
}

.nutrition-label .small-text {
    font-size: 12px;
    color: #666;
    margin-top: 15px;
    line-height: 1.4;
    padding: 0;
    border-top: none;
}

/* Source of calories chart */
.nutrition-source {
    margin-top: 40px;
    margin-bottom: 30px;
    width: 100%;
}

.nutrition-source h3 {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #081158;
}

.calories-chart {
    display: flex;
    justify-content: center;
}

.chart-bar-container {
    display: flex;
    align-items: center;
}

.bar-wrapper {
    width: 150px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column-reverse;
    margin-right: 30px;
}

.bar-segment {
    width: 100%;
}

.bar-segment.fat {
    background-color: #8c54ff;
}

.bar-segment.protein {
    background-color: #6fb5e9;
}

.bar-segment.carbs {
    background-color: #4695ff;
}

.chart-legend {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.legend-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 8px;
}

.legend-color.fat {
    background-color: #8c54ff;
}

.legend-color.protein {
    background-color: #6fb5e9;
}

.legend-color.carbs {
    background-color: #4695ff;
}

/* Redesigned SnapCalorie App Download Section */
.app-download-promo.snapcalorie-style {
    background-color: #f2f9ff;
    border-radius: 10px;
    padding-top: 20px;
    padding-bottom: 20px;
    padding-left: 45px;
    padding-right: 45px;
    margin: 30px 0;
    border-left: 5px solid #081158;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sc-content-wrapper {
    flex: 1;
    min-width: 0;
    padding-right: 0;
}

.sc-header {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.sc-logo-container {
    display: flex;
    align-items: flex-start;
}

.sc-logo {
    width: 42px;
    padding: 0px;
    border-radius: 8px;
    margin-right: 14px;
    margin-top: 2px;
}

.sc-title h3 {
    font-size: 22px;
    color: #081158;
    margin: 0 0 5px 0;
    font-weight: 600;
    line-height: 1.2;
    font-family: 'Montserrat', sans-serif;
}

.sc-rating {
    display: flex;
    align-items: center;
    font-size: 13px;
}

.stars {
    color: #5b95d2;
    margin-right: 6px;
    letter-spacing: -1px;
}

.rating-text {
    color: #666;
}

.sc-benefits {
    margin-bottom: 25px;
    text-align: left;
}

.benefit-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.benefit-check {
    color: #33cc99;
    font-weight: bold;
    margin-right: 10px;
    font-size: 16px;
}

.benefit-text {
    color: #333;
    font-size: 15px;
}

.sc-image-container {
    flex: 0 0 auto;
    width: 35%;
    max-width: 220px;
    text-align: center;
    align-self: center;
}

.sc-screenshot {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.sc-action {
    margin-top: 5px;
}

.sc-log-food-button {
    background-color: #081158;
    color: white;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    padding: 12px 28px;
    border-radius: 6px;
    display: inline-block;
    text-decoration: none;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: transform 0.3s, background-color 0.3s;
}

.sc-log-food-button:hover {
    transform: translateY(-3px);
    background-color: #192276;
}

/* Food Attributes Styling */
.food-attributes {
    background-color: #f8f8f8;
    border-radius: 10px;
    padding: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.03);
}

.attributes-title {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 20px;
    color: #081158;
    font-family: 'Montserrat', sans-serif;
}

.attributes-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.attribute-tag {
    background-color: #f2f9ff;
    border-left: 3px solid #081158;
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.attribute-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.12);
}

.attribute-icon {
    font-size: 18px;
    margin-right: 8px;
}

@media (max-width: 768px) {
    .nutrition-container {
        padding: 20px;
        margin: 0 10px;
    }
    
    .food-header {
        flex-direction: column;
        text-align: center;
    }
    
    .food-image {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .macro-card {
        min-width: 45%;
        margin-bottom: 10px;
    }
    
    .portion-size {
        flex-direction: column;
    }
    
    .portion-size label, .portion-size input {
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    .chart-bar-container {
        flex-direction: column;
    }
    
    .bar-wrapper {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .chart-legend {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-around;
    }
    
    .legend-item {
        margin-right: 10px;
    }
    
    .macros-container {
        flex-direction: column;
    }
    
    .macro-item {
        margin-bottom: 10px;
    }
    
    .app-download-promo.snapcalorie-style {
        padding: 25px;
        flex-direction: column;
    }
    
    .sc-image-container {
        width: 70%;
        max-width: 250px;
        margin-top: 25px;
        order: -1; /* Makes the image appear first on mobile */
    }
    
    .sc-header {
        justify-content: center;
    }
    
    .sc-benefits {
        text-align: center;
    }
    
    .benefit-item {
        justify-content: center;
    }
    
    .sc-action {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .macro-card {
        min-width: 100%;
    }
    
    .legend-item {
        width: 100%;
        margin-bottom: 5px;
    }
}

.section {
    background-color: #eef0f4; /* Slightly different from the previous #f5f5f5 to enhance contrast */
    padding-top: 100px;
    padding-bottom: 100px;
}

/* Source of calories chart */
.nutrition-source {
    background-color: #f8f8f8;
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
    margin-bottom: 30px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.03);
    width: 100%;
}

.nutrition-source h3 {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 25px;
    color: #081158;
    font-family: 'Montserrat', sans-serif;
}

.calories-chart {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.chart-bar-container {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 600px;
    width: 100%;
    justify-content: center;
}

.bar-wrapper {
    position: relative;
    width: 130px;
    height: 100px;
    border-radius: 8px;
    background-color: #f1f1f1;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column-reverse;
    overflow: hidden;
}

.bar-wrapper:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        to top,
        rgba(255,255,255,0.1),
        rgba(255,255,255,0.1) 26px,
        rgba(0,0,0,0.02) 26px,
        rgba(0,0,0,0.02) 52px
    );
    pointer-events: none;
}

.bar-segment {
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
}

.bar-segment.fat {
    background-color: #FF6B6B; /* Vibrant red */
    border-radius: 0 0 4px 4px;
}

.bar-segment.protein {
    background-color: #4ECDC4; /* Teal */
    z-index: 1;
}

.bar-segment.carbs {
    background-color: #5D78FF; /* Bright blue */
    border-radius: 4px 4px 0 0;
    z-index: 2;
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
}

.legend-color {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-right: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.legend-color.fat {
    background-color: #FF6B6B;
}

.legend-color.protein {
    background-color: #4ECDC4;
}

.legend-color.carbs {
    background-color: #5D78FF;
}

.legend-text {
    color: #333;
}

.legend-text strong {
    color: #081158;
    font-weight: 600;
    margin-right: 5px;
}

/* Percentage labels on the bar */
.bar-label {
    position: absolute;
    text-align: center;
    width: 100%;
    font-size: 11px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bar-segment:hover .bar-label {
    opacity: 1;
}

.bar-segment.fat:hover {
    filter: brightness(1.1);
}

.bar-segment.protein:hover {
    filter: brightness(1.1);
}

.bar-segment.carbs:hover {
    filter: brightness(1.1);
}
