/* Main Content */
.main-content {
    margin: 0px 160px;
    display: flex;
    flex: 1;
    justify-content: center;
}

.content-container {
    margin: 0px 40px;
    display: flex;
    flex-direction: column;
    max-width: 960px;
    flex: 1;
}

section[id="plant-protein-benefits"] {
    scroll-margin-top: 100px;
}

/* Page Header */
.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0px;
    padding: 70px 0 10px 0px;
}

.left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.page-title {
    color: #1D4F25;
    font-size: 60px;
    font-weight: 500;
    line-height: 1;
    min-width: 280px;
}

.icon{
    width: 120px;
    height: auto;
}

/* Main Content*/
.text-container{
    display: grid;
    grid-template-columns: 1fr;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}
.intro-text {
    color: #1D4F25;
    font-size: 17px;
    font-weight: 300;
}

.section-title {
    font-size: 40px;
    font-weight: 300;
    color: #1D4F25;
    margin-top: 40px;
    margin-bottom: 10px;
    text-align: left;

}
/*Our protein section*/
.benefit-list {
    padding-left: 20px;
    margin: 0;
}

.benefit-list li {
    position: relative;
    padding-left: 5px;
    margin-bottom: 5px;
    line-height: 26px; 
    color: #333;
    font-size: 17px;
}
.benefit-list li strong{
    font-weight: 500;
    font-size: 20px;
}

.sub-section-title{
    font-size: 30px;
    font-weight: 400;
    text-align: center;
    color: var(--A-green-pr);
}

.our-yoghurt li{
    position: relative;
    padding-left: 5px;
    margin-bottom: 5px;
    line-height: 26px; 
    color: #333;
    font-size: 17px;
}

/*OPEN MODEL*/

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 25px;
    width: 80%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden; /* hides scrollbar overflow */
    display: flex;
    flex-direction: column;
    position: relative;
    animation: slideIn 0.3s;

}

/* This part scrolls */
.modal-scroll {
    overflow-y: auto;
    padding: 30px;
    max-height: 80vh;
    box-sizing: border-box;
    border-radius: 20px; /* optional: keeps corners if bg is visible */
    scrollbar-gutter: stable;
}

.modal-content h2{
    font-size: 50px;
    font-weight: 400;
    margin: 0;
    padding-bottom: 20px;
}

.modal-content h3{
    font-size: 25px;
    font-weight: 400;
    margin: 0;
    padding-bottom: 10px;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    padding-right: 8px;
}
.close:hover {
    color: black;
}

body.no-scroll {
    overflow: hidden;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.source-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.source-list li {
    margin-bottom: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}

.source-link {
    color: #007bff;
    text-decoration: none;
    word-break: break-all;
    display: block;
    transition: color 0.3s;
}

.source-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.source-description {
    font-size: 14px;
    color: #6c757d;
    margin-top: 5px;
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
    gap: 12px;
}

.benefit-card {
    display: flex;
    flex: 1;
    gap: 12px;
    border-radius: 20px;
    background-color: #ffdcd1;
    padding: 16px;
    flex-direction: column;
}

.benefit-icon {
    color: black;
    width: 24px;
    height: 24px;
}

.benefit-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.benefit-title {
    color: black;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;
}

/* Table Styles */
.table-container {
    padding: 12px 16px;
}

.table-wrapper {
    display: flex;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid black;
    background-color: #F6F4DD;
}

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

.nutrition-table thead tr {
    background-color: #F6F4DD;
}

.nutrition-table th {
    padding: 12px 16px;
    text-align: left;
    color: black;
    width: 400px;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.4;
}

.nutrition-table tbody tr {
    border-top: 1px solid black;
}

.nutrition-table td {
    height: 72px;
    padding: 8px 16px;
    width: 400px;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.4;
}

.nutrition-table td.col-flavor {
    color: #0e1a13;
}

.nutrition-table td.col-calories, 
.nutrition-table td.col-protein,
.nutrition-table td.col-potassium,
.nutrition-table td.col-carb {
    color: #1D4F25;
    font-weight: 300;
}

/* Responsive Table Behavior */
@container (max-width: 120px) {
    .col-flavor {
        display: none;
    }
}

@container (max-width: 240px) {
    .col-calories {
        display: none;
    }
}

@container (max-width: 360px) {
    .col-protein {
        display: none;
    }
}

@container (max-width: 480px) {
    .col-sugar {
        display: none;
    }
}

@container (max-width: 600px) {
    .col-fat {
        display: none;
    }
}

/* Ingredients Grid */
.ingredients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
    gap: 12px;
    padding: 16px;
}

.ingredient-card {
    display: flex;
    flex: 1;
    gap: 12px;
    border-radius: 20px;
    background-color: #ffdcd1;
    padding: 16px 20px;
    flex-direction: column;
}

.ingredient-icon {
    color: #0e1a13;
    width: 24px;
    height: 24px;
}

.ingredient-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ingredient-title {
    color: black;
    font-size: 25px;
    font-weight: 500;
    line-height: 1.2;
    padding: 15px 0;
    margin: 0;
    text-align: center;
}

.ingredient-description {
    color: black;
    font-size: 17px;
    font-weight: 300;
    line-height: 1.4;
    margin:0;
}
.ingredient-description strong {
    color: black;
    font-size: 20px;
    font-weight: 500 !important;
}
.credits-text {
    color: #0e1a13 !important;
    font-size: 10px !important;
    font-weight: 300 !important;
    line-height: 1.4 !important;
    padding: 4px 16px 12px !important;
    text-align: right !important;
    cursor: pointer !important;
}

:any-link{
    color: black;
    text-decoration: none;
}

.widget {
    width: 80vw;
    max-width: 960px;
    padding: 1rem;
    margin: 2rem auto;
    border-radius: 20px;
    background-color: #F6F4DD;
    box-shadow: 0 10px 20px 0 rgba(0, 0, 0, 0.25);
}

.section-title +.widget {
    margin-top: 0px;
}

/* ======== DROPDOWN PROTEIN SELECTOR ======== */
.protein-dropdown {
    position: relative;
    width: 100%;
    margin-bottom: 0px;
    min-width: 0;
    box-sizing: border-box;
    contain: layout;
}

.dropdown-button {
    position: relative;
    top: 100%;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background-color: #DEE08C;
    border: 2px solid #DEE08C;
    border-radius: 12px;
    font-family: 'Host Grotesk', prompt, sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: black;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    user-select: none;
}

.dropdown-button:hover {
    background-color: #d4d678;
    border-color: #d4d678;
}

.dropdown-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(222, 224, 140, 0.3);
}

.dropdown-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.dropdown-arrow.open {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    max-height: 250px;
    overflow-y: auto;
}

.dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0);
}

.dropdown-option {
    padding: 14px 20px;
    font-family: 'Host Grotesk', prompt, sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #333;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background-color: #f8f8f8;
}

.dropdown-option.selected {
    background-color: #DEE08C;
    font-weight: 500;
    color: black;
}

.tabs {
    display: none;
}

.tab-content {
    display: none;
    padding: 15px 17px;
    animation: fadeIn 0.3s ease-in-out;
}

/* CRITICAL FIX: Ensure active content always displays */
.tab-content.active {
    display: block !important;
}

/* Content typography */
.tab-content h3 {
    color: #1D4F25;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 5px;
    margin-top: 8px;
    font-family: 'Host Grotesk', prompt, sans-serif;
}
.tab-content h2 {
    color: #1D4F25;
    font-size: 25px;
    font-weight: 500;
    margin-bottom: 10px;
    margin-top: 10px;
    font-family: 'Host Grotesk', prompt, sans-serif;
}
.tab-content p {
    color: #1D4F25;
    font-size: 17px;
    font-weight: 300;
    line-height: 1.6;
    font-family: 'Host Grotesk', prompt, sans-serif;
    margin: 0;
}
.tab-content ul {
    color: black;
    padding-left: 30px;
}

.closing-text {
    color: #1D4F25;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    padding: 4px 16px 12px;
}

/* ========== RESPONSIVE DESIGN ========== */

/* Large Tablets and Small Desktop */
@media (max-width: 1024px) {
    /* .widget {
        width: 85vw;
    } */
}

/* Desktop - Show tabs with animation (above 990px to match navbar) */
@media (min-width: 991px) {
    /* Show tabs on desktop, hide dropdown */
    .tabs {
        display: flex;
        --indicator-width: 0px;
        --indicator-left: 0px;

        position: relative;
        isolation: isolate;
        height: 50px;
        background-color: #F6F4DD;
        border-radius: 15px;
        padding: 6px;
        gap: 4px;
        justify-content: center;
    }

    .tabs input {
        display: none;
    }

    .tabs label {
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        font-weight: 400;
        color: #656d7b;
        font-size: 18px;
        transition: color 0.3s ease-in-out;
        padding: 8px 10px;
        border-radius: 10px;
        white-space: nowrap;
        position: relative;
        z-index: 2;
        text-align: center;
        min-width: fit-content;
    }

    .tabs input:checked + label {
        color: black;
        font-weight: 400;
        font-size: 18px;
    }

    .tabs label:hover {
        color: #333;
    }

    .tabs::after {
        pointer-events: none;
        position: absolute;
        content: "";
        z-index: 1;
        top: 50%;
        transform: translateY(-50%);
        left: var(--indicator-left);
        width: var(--indicator-width);
        height: 38px;
        border-radius: 10px;
        background-color: #DEE08C;
        transition: all 0.3s ease-in-out;
    }

    .protein-dropdown {
        display: none;
    }

    /* Show content for checked tabs on desktop */
    .widget:has(#Almond-Protein:checked) .tab-content.Almond-Protein,
    .widget:has(#Soy-Isolate-Protein:checked) .tab-content.Soy-Isolate-Protein,
    .widget:has(#Pea-Protein:checked) .tab-content.Pea-Protein,
    .widget:has(#Rice-Protein:checked) .tab-content.Rice-Protein,
    .widget:has(#Pumpkin-Seed-Powder:checked) .tab-content.Pumpkin-Seed-Powder {
        display: block !important;
    }

    /* Fallback for browsers without :has() support */
    #Almond-Protein:checked ~ .tab-content.Almond-Protein,
    #Soy-Isolate-Protein:checked ~ .tab-content.Soy-Isolate-Protein,
    #Pea-Protein:checked ~ .tab-content.Pea-Protein,
    #Rice-Protein:checked ~ .tab-content.Rice-Protein,
    #Pumpkin-Seed-Powder:checked ~ .tab-content.Pumpkin-Seed-Powder {
        display: block !important;
    }
}
@media (max-width: 990px) {
    .page-title {
        font-size: 50px;
    }
    .page-header {
        justify-content: center;
    }
}
/* Tablets and Mobile - Use Dropdown (990px and below to match navbar) */
/* Ensure no content gets cut off */
@media (max-width: 768px) {
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    .content-container {
        max-width: 550px;
    }
    .widget {
        max-width: 550px;
    }
    .design-root {
        overflow-x: hidden;
    }
    .table-container{
        overflow-x: auto;
        overflow-y: visible;
    }
    .table-wrapper {
        overflow-x: auto;
    }

    .content-container > *:last-child {
        margin-bottom: 0;
    }

    /* CRITICAL: Ensure active content always shows on mobile */
    .tab-content.active {
        display: block !important;
    }
}
/* Medium mobile screens - Fix margins (495px to 600px) */
@media (max-width: 600px) {
    .main-content {
        padding: 0px 25px ;
    }
    .content-container {
        max-width: 480px;
    }
    .page-header {
        text-align: center;
    }

    .page-title {
        font-size: 50px;
        text-align: center;
        width: 100%;
    }

    .intro-text {
        margin: 0 8px ;
        padding: 8px 15px 16px ;
    }

    .section-title {
        margin: 0 8px ;
        padding: 22px 15px 14px ;
    }

    .benefits-grid,
    .ingredients-grid {
        margin: 0 8px ;
        padding: 10px 15px ;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .closing-text {
        margin: 0 8px ;
        padding: 8px 18px 20px ;
    }

    .widget {
        width: calc(100vw - 50px) ;
        margin: 15px auto ;
        padding: 16px 12px ;
        border-radius: 16px;
        max-width: 400px;
    }

    .tab-content {
        padding: 16px 12px 12px;
        margin: 0 ;
        display: none;
    }

    .tab-content.active {
        display: block !important;
    }

    .dropdown-button {
        padding: 14px 16px;
        font-size: 16px;
    }

    .dropdown-option {
        padding: 12px 16px;
        font-size: 15px;
    }

    /* Ensure benefit and ingredient cards don't overflow */
    .benefit-card,
    .ingredient-card {
        margin: 0 0 8px 0;
        padding: 16px 14px;
    }
}
/* Small screens - Fix protein section margins (492px and below) */
@media (max-width: 492px) {
    .widget {
        width: calc(100vw - 30px);
        margin: 15px auto;
        padding: 16px 15px;
        border-radius: 16px;
    }

    .tab-content {
        padding: 16px 15px 12px;
        margin: 0;
        display: none;
    }

    .tab-content.active {
        display: block !important;
    }

    .tab-content h2 {
        font-size: 20px;
        margin: 12px 0 10px;
        padding: 0;
    }

    .tab-content h3 {
        font-size: 17px;
        margin: 10px 0 6px;
        padding: 0;
    }

    .tab-content p {
        font-size: 14px;
        line-height: 1.6;
        margin: 0 0 10px 0;
        padding: 0;
    }

    .tab-content .benefit {
        margin-bottom: 12px;
        padding: 0;
    }

    .tab-content ul {
        padding-left: 20px;
        margin: 6px 0;
    }

    .tab-content ul li {
        margin-bottom: 3px;
        font-size: 14px;
        line-height: 1.5;
        padding: 0;
    }

    .dropdown-button {
        padding: 14px 18px;
        font-size: 16px;
        border-radius: 10px;
        margin: 0;
    }

    .dropdown-menu {
        border-radius: 10px;
        max-height: 200px;
        margin: 0;
    }

    .dropdown-option {
        padding: 12px 18px;
        font-size: 15px;
        margin: 0;
    }
}
/* Mobile Devices */
@media (max-width: 480px) {
    .main-content {
        padding: 16px;
    }

    .content-container {
        max-width: 400px;
        padding: 0;
    }

    .page-title {
        font-size: 34px;
    }

    .intro-text {
        font-size: 15px;
        padding: 8px 15px 16px;
        text-align: left;
        line-height: 1.6;
        margin: 0 5px;
    }

    .section-title {
        font-size: 30px;
        padding: 20px 15px 12px;
        text-align: center;
        margin: 0 5px;
    }

    .benefits-grid,
    .ingredients-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 8px 15px;
        margin: 0 5px;
    }

    .benefit-card,
    .ingredient-card {
        padding: 18px 16px;
        margin-bottom: 8px;
        border-radius: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .benefit-title,
    .ingredient-title {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .benefit-description,
    .ingredient-description {
        font-size: 15px;
        line-height: 1.5;
    }

    .table-container {
        padding: 8px 15px;
        margin: 0 5px;
        overflow-x: auto;
        overflow-y: visible;
    }

    .table-wrapper {
        min-width: 350px;
        overflow: visible;
        border-radius: 8px;
        overflow-x: auto;
    }

    .nutrition-table {
        font-size: 13px;
    }

    .nutrition-table th,
    .nutrition-table td {
        padding: 8px 10px;
        min-width: 60px;
        font-size: 13px;
        width: auto;
    }

    .nutrition-table td.col-flavor {
        min-width: 90px;
        font-weight: 500;
    }

    .widget {
        max-width: 350px;
    }

    /* Dropdown styling for mobile */
    .dropdown-button {
        padding: 14px 18px;
        font-size: 16px;
        border-radius: 10px;
    }

    .dropdown-menu {
        border-radius: 10px;
        max-height: 200px;
    }

    .dropdown-option {
        padding: 12px 18px;
        font-size: 15px;
    }

    .tab-content {
        padding: 16px 8px 12px;
        display: none;
    }

    .tab-content.active {
        display: block !important;
    }

    .tab-content h2 {
        font-size: 20px;
        margin: 12px 0 10px;
    }

    .tab-content h3 {
        font-size: 17px;
        margin: 10px 0 6px;
    }

    .tab-content p {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 10px;
    }

    .tab-content ul {
        padding-left: 20px;
        margin: 6px 0;
    }

    .tab-content ul li {
        margin-bottom: 3px;
        font-size: 14px;
        line-height: 1.5;
    }

    .credits-text {
        font-size: 10px;
        text-align: right;
    }

    .closing-text {
        font-size: 14px;
        padding: 8px 20px 20px;
        text-align: center;
        line-height: 1.6;
        margin: 0 5px;
    }
}
/* iPhone 14 Plus/Pro Max (430x932) and similar large phones */
@media (max-width: 450px) {
    .page-title {
        font-size: 34px;
    }

    .section-title {
        font-size: 30px;
    }

    .widget {
        max-width: 350px;
    }

    .tab-content {
        padding: 18px 18px 14px;
        margin: 0;
        display: none;
    }

    .tab-content.active {
        display: block !important;
    }

    .benefits-grid,
    .ingredients-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 14px;
    }

}
/* iPhone 12/13/14 Pro (393x852) */
@media (max-width: 430px) {
    .main-content {
        padding: 16px 24px;
    }

    .page-title {
        font-size: 34px;
    }

    .section-title {
        font-size: 28px;
    }

    .widget {
        width: calc(100vw - 48px);
        padding: 18px 16px;
        margin: 15px auto;
    }

    .tab-content {
        padding: 16px 16px 12px;
        margin: 0;
        display: none;
    }

    .tab-content.active {
        display: block !important;
    }

    .dropdown-button {
        padding: 15px 20px;
        font-size: 17px;
    }

    .dropdown-option {
        padding: 13px 20px;
        font-size: 16px;
    }
}
/* Very small screens (426px and below) - Single scroll bar fix */
@media (max-width: 426px) {
    .table-container {
        padding: 6px 10px;
        margin: 0;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        /* Ensure smooth scrolling on iOS */
        scrollbar-width: thin;
        /* Firefox */
    }

    .table-wrapper {
        overflow: visible;
        min-width: 340px;
        width: max-content;
        /* Ensure table takes natural width */
    }

    .nutrition-table {
        width: 100%;
        min-width: 340px;
        border-collapse: collapse;
    }

    .nutrition-table th,
    .nutrition-table td {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 60px;
        white-space: nowrap;
    }

    .nutrition-table td.col-flavor {
        min-width: 80px;
        font-weight: 500;
    }

    /* Custom scrollbar styling for webkit browsers */
    .table-container::-webkit-scrollbar {
        height: 6px;
    }

    .table-container::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }

    .table-container::-webkit-scrollbar-thumb {
        background: #DEE08C;
        border-radius: 3px;
    }

    .table-container::-webkit-scrollbar-thumb:hover {
        background: #d4d678;
    }

    .tab-content.active {
        display: block !important;
    }
}
@media (max-width: 400px) {
    .content-container {
        max-width: 360px;
    }
}
/* Extra small phones (iPhone 5/SE) */
@media (max-width: 375px) {
    .page-title {
    font-size: 28px;
    }

    .section-title {
    font-size: 22px;
    }

    .widget {
    width: calc(100vw - 32px);
    margin: 12px auto;
    padding: 14px 12px;
    }

    .tab-content {
    padding: 14px 12px 10px;
    margin: 0;
    display: none;
    }

    .tab-content.active {
    display: block !important;
    }

    .dropdown-button {
    padding: 12px 16px;
    font-size: 15px;
    }

    .dropdown-option {
    padding: 10px 16px;
    font-size: 14px;
    }

    .table-container {
    padding: 6px 12px;
    margin: 0 3px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    }

    .table-wrapper {
    overflow: visible;
    min-width: 320px;
    }

    .nutrition-table th,
    .nutrition-table td {
    padding: 6px 8px;
    font-size: 12px;
    min-width: 55px;
    }
}
/* Landscape orientation for mobile phones */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 900px) {
    body {
    margin-top: 50px;
    }

    .dropdown-menu {
    max-height: 150px;
    }

    .tab-content.active {
    display: block !important;
    }
}