:root {
    --brand-primary: rgb(240, 234, 124);
    --brand-secondary: rgb(251, 249, 223);
}

html, body {
    font-family: 'Nunito', sans-serif;
    background: white !important;
    min-height: 100vh;
    color: #04062B !important;
}

body {
    background: white !important;
}

/* Navigation Bar Styles */
.navbar {
    background: white !important;
    padding: 0.5rem 0;
    border-bottom: none !important;
}

.navbar-light {
    border-bottom: none !important;
}

.navbar-brand {
    color: #04062B !important;
    font-weight: normal;
}

.passport-container {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
}

.header {
    color: #04062B;
}

.passport-content {
    background: white;
}

.passport-footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.info-item {
    border-left: 4px solid var(--brand-primary);
    transition: transform 0.2s ease;
    background: white;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

.info-item:hover {
    transform: translateY(-2px);
}

.info-item h3 {
    color: var(--brand-primary);
    font-weight: 600;
}

.impact-value {
    color: var(--brand-primary);
    font-weight: 700;
}

.bom-percentage {
    background: var(--brand-primary);
    color: #333;
}

.section-title {
    border-bottom: 1px solid #B9BBC1;
    padding-bottom: 1rem;
    font-weight: 300 !important;
    font-size: 1.5rem !important;
    text-transform: uppercase !important;
}

h2.section-title {
    font-weight: 300 !important;
    font-size: 1.5rem !important;
    text-transform: uppercase !important;
}

h3.section-title {
    font-weight: 300 !important;
    font-size: 1.5rem !important;
    text-transform: uppercase !important;
}

/* Center the column containing qr-info */
.section-spacing .row.justify-content-center > .col-md-2 {
    display: flex;
    justify-content: center;
}

.qr-info {
    background: rgba(240, 234, 124, 1);
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    min-width: 200px;
    width: fit-content;
}

/* QR Code Styles */
.qr-code-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-code-display {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    padding: 0.5rem;
    border-radius: 0.5rem;
    max-width: 100%;
    max-height: 150px;
    width: 100%;
    height: auto;
}

.qr-code-display img {
    display: block;
    max-width: 120px;
    width: 120px;
    height: 120px;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Accordion Styles */
.accordion-button {
    border: none;
    border-radius: 0.5rem !important;
    font-size: 1.25rem;
    padding: 1rem 3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
}

.accordion-button:not(.collapsed) {
    background-color: inherit !important;
    color: inherit !important;
    box-shadow: none !important;
}

.accordion-button:focus {
    box-shadow: none !important;
    border-color: transparent !important;
}

.accordion-button::after {
    background-image: none !important;
    content: "+" !important;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
    transform: none !important;
    transition: transform 0.2s ease-in-out;
}

.accordion-button:not(.collapsed)::after {
    content: "−" !important;
    transform: none !important;
}

.accordion-item {
    border: none;
    border-radius: 90px !important;
    overflow: hidden;
    box-shadow: none !important;
    transition: border-radius 0.3s ease;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
}

.accordion-item:not(.collapsed) {
    border-radius: 50px !important;
}

.accordion-body {
    padding: 1.5rem;
    background: white;
}

/* Clean accordion styles for section headers */
.accordion-button.clean-accordion {
    border-radius: 0 !important;
    font-size: 1.5rem;
    padding: 0 0 1rem 0;
    background: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
    border-bottom: 1px solid #B9BBC1 !important;
    text-align: left;
    width: 100%;
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}

.accordion-button.clean-accordion:not(.collapsed) {
    background: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
    border-bottom: 1px solid #B9BBC1 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}

.accordion-button.clean-accordion.collapsed {
    background: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
    border-bottom: 1px solid #B9BBC1 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}

.accordion-button.clean-accordion:focus {
    box-shadow: none !important;
    border-bottom: 1px solid #B9BBC1 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    background: transparent !important;
    outline: none !important;
}

.accordion-item.clean-accordion {
    border: none;
    border-radius: 0 !important;
    overflow: hidden;
    box-shadow: none !important;
    background: transparent !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    /* Remove all border radius to prevent macOS curved border issue */
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;
}

.accordion-body.clean-accordion {
    padding: 1.5rem 0;
    background: transparent !important;
}

/* Make accordion containers equal height only when expanded */
.accordion {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.accordion-item {
    display: flex;
    flex-direction: column;
}

.accordion-item.expanded {
    flex: 1;
}

.accordion-collapse {
    display: flex;
    flex-direction: column;
}

.accordion-collapse.show {
    flex: 1;
}

.accordion-body {
    flex: 1;
}

/* Accordion border colors when expanded */
/* JavaScript-controlled border classes */
.accordion-item.border-yellow {
    border: 2px solid #F0EA7C !important;
}

.accordion-item.border-blue {
    border: 2px solid #F0EA7C !important;
}

/* Supply Chain Pills */
.pill-yellow {
    background-color: rgb(240, 234, 124) !important;
    color: #333 !important;
}

.pill-blue {
    background-color: rgba(4, 6, 43, 1) !important;
    color: white !important;
}

/* Supply Chain Section Specific Pills */
.supply-chain-flow .pill-yellow {
    background-color: #F3F3F3 !important;
    color: #04062B !important;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: normal !important;
}

.supply-chain-flow .pill-yellow:hover,
.supply-chain-flow .pill-yellow:focus {
    background-color: #F0EA7C !important;
    color: #04062B !important;
    font-weight: normal !important;
}

.supply-chain-flow .pill-yellow:active,
.supply-chain-flow .pill-yellow.active {
    background-color: #F0EA7C !important;
    font-weight: bold !important;
    color: #04062B !important;
}

.supply-chain-flow .pill-blue {
    background-color: #F3F3F3 !important;
    color: #04062B !important;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: normal !important;
}

.supply-chain-flow .pill-blue:hover,
.supply-chain-flow .pill-blue:focus {
    background-color: #F0EA7C !important;
    color: #04062B !important;
    font-weight: normal !important;
}

.supply-chain-flow .pill-blue:active,
.supply-chain-flow .pill-blue.active {
    background-color: #F0EA7C !important;
    font-weight: bold !important;
    color: #04062B !important;
}

/* Supply Chain Horizontal Layout for Desktop */
.supply-chain-horizontal {
    margin-bottom: 1rem;
}

.supply-chain-flow-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.supply-chain-item-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.supply-chain-box {
    width: 180px !important;
    height: 180px !important;
    min-width: 180px;
    max-width: 180px;
    min-height: 180px;
    max-height: 180px;
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    font-size: 0.85rem;
    line-height: 1.3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    color: #04062B !important;
    flex-shrink: 0;
    box-sizing: border-box;
}

.supply-chain-box.pill-yellow {
    background-color: #F3F3F3 !important;
    color: #04062B !important;
}

.supply-chain-box.pill-yellow:hover {
    background-color: #F0EA7C !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.supply-chain-box.pill-blue {
    background-color: #F3F3F3 !important;
    color: #04062B !important;
}

.supply-chain-box.pill-blue:hover {
    background-color: #F0EA7C !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.supply-chain-flag {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    flex-shrink: 0;
    display: block;
}

.supply-chain-box-text {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
    font-weight: 500;
    line-height: 1.3;
    max-height: 4em;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

.supply-chain-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 0 0.25rem;
}

.supply-chain-arrow svg {
    width: 100%;
    height: 100%;
}

/* Mobile vertical supply chain layout */
.supply-chain-mobile {
    margin-bottom: 1rem;
}

.supply-chain-flow-container-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.supply-chain-item-wrapper-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 180px;
}

.supply-chain-arrow-mobile {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 0.25rem 0;
}

.supply-chain-arrow-mobile svg {
    width: 100%;
    height: 100%;
}

/* Override specific text colors to #04062B but preserve white text */
.text-muted,
.text-dark,
h1, h2, h3, h4, h5, h6,
p, span, div,
.accordion-button:not(.pill-blue),
.navbar-brand,
.header {
    color: #04062B !important;
}

/* Keep white text white - don't override these */
.pill-blue {
    color: white !important;
}

/* Keep equivalent content text white */
.equivalent-content {
    color: white !important;
}

/* HR Styles */
hr {
    border-color: #B9BBC1 !important;
    border-width: 1px;
}

/* Section Spacing */
.section-spacing {
    margin-bottom: 6rem !important;
}

.dpp-section {
    margin-bottom: 12rem;
}

/* Equivalent Boxes */
.equivalent-box {
    width: 75%;
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 0.75rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carbon-equivalent {
    background-image: url('/images/carbon_impact_animation.gif');
}

.water-equivalent {
    background-image: url('/images/water_impact_animation.gif');
}

.energy-equivalent {
    background-image: url('/images/energy_impact_animation.gif');
}

.equivalent-content {
    border-radius: 0.375rem;
    padding: 1rem;
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    line-height: 1.2;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(1px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes flowArrow {
    0% {
        transform: translateX(0);
        opacity: 0.7;
    }
    50% {
        transform: translateX(10px);
        opacity: 1;
    }
    100% {
        transform: translateX(0);
        opacity: 0.7;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Animation classes */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure impact cards are visible even if JS doesn't run - fallback after 1 second */
.fade-in-up {
    animation: fadeInFallback 0.1s ease-out 1s forwards;
}

@keyframes fadeInFallback {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flow-arrow {
    animation: flowArrow 2s ease-in-out infinite;
    display: inline-block; /* Ensure animation works */
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}



/* Global share button styling */
.share-button {
    background-color: transparent;
    color: #04062B;
    border: none;
    padding: 0.5rem 0;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.share-button:hover {
    background-color: transparent;
    color: #4FC7DF;
    text-decoration: none;
}

/* Bottom half container default padding (was inline 55px) */
.bottom-half-container {
    padding: 55px;
}

/* ============================================
   Accordion '+' / '−' icon vertical alignment
   ============================================ */
.accordion-button {
    display: flex;
    align-items: center;
}

.accordion-button::after {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    margin-left: auto;
}

/* ============================================
   Mobile Responsive Fixes
   ============================================ */
@media (max-width: 767.98px) {
    /* --- Reduce overall container padding --- */
    .passport-content.p-4 {
        padding: 1rem !important;
    }

    .bottom-half-container {
        padding: 1.25rem !important;
    }

    /* --- Product image: constrain height --- */
    .product-image-container img,
    .product-image-background img {
        max-height: 200px !important;
    }

    /* --- Map: reduce height --- */
    #map {
        height: 250px !important;
    }

    /* --- Environmental impact equivalent boxes --- */
    .equivalent-box {
        width: 60% !important;
    }

    .equivalent-content {
        font-size: 0.9rem !important;
        padding: 0.75rem !important;
    }

    /* --- Supply chain boxes: smaller on mobile --- */
    .supply-chain-box {
        width: 140px !important;
        height: 140px !important;
        min-width: 140px !important;
        max-width: 140px !important;
        min-height: 140px !important;
        max-height: 140px !important;
        font-size: 0.8rem !important;
        padding: 0.75rem !important;
    }

    .supply-chain-item-wrapper-mobile {
        max-width: 140px !important;
    }

    /* --- Accordion buttons: allow text wrapping, reduce padding --- */
    .accordion-button {
        white-space: normal !important;
        padding: 0.75rem 1rem !important;
        font-size: 1rem !important;
    }

    .accordion-button.clean-accordion {
        padding: 0 0 0.75rem 0 !important;
        font-size: 1.15rem !important;
    }

    /* --- Section spacing: tighten on mobile --- */
    .section-spacing {
        margin-bottom: 3rem !important;
    }

    .dpp-section {
        margin-bottom: 5rem !important;
    }

    /* --- Section title: smaller on mobile --- */
    .section-title {
        font-size: 1.2rem !important;
    }
}

@media print {
    body {
        background: white !important;
    }
    .no-print {
        display: none !important;
    }
} 