:root {
    --primary-orange: #F29603;
    --secondary-orange: #FEF4E5;
    --gray: #dbdbdb;
    --light-gray: #f6f6f6;
    --primary-black: rgb(0,0,0);
    --site-background: #f9f9f9;
    --bar-chart-orange: #e8c285;
    --bar-chart-domestic: rgb(112, 212, 239);
    --bar-chart-foreign: rgb(85, 148, 96);
}

#carbon-storage main h1 {
    font-family: 'NotoSansJP-Light';
    font-size: clamp(3rem, 2rem + 2.5vw, 3.4rem);
    margin: 20px 0;
}

#carbon-storage main h2 {
    margin: 10px 0 10px 0;
    font-family: 'NotoSansJP-Medium';
    font-size: clamp(2.0rem, 1rem + 2.5vw, 2.4rem);
    padding: 0 0 8px 0;
    border-bottom: 1px solid var(--gray);
    gap: 0;
}

#carbon-storage main h3 {
    display: inline-block;
    font-size: clamp(1.2rem, 1rem + 1.5vw, 1.8rem);
}

#carbon-storage main p {
    font-size: clamp(1rem, .75rem + 1.5vw, 1.6rem);
    line-height: 1.9;
}



/* Main content -------------------------------------------------------------------------------------*/

#carbon-storage .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 25px;
    width: 100%;
}

#carbon-storage .content-box {
    width: 100%;
    max-width: 96ch;
}

#carbon-storage .content {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    gap: 60px;
}

.mobile-only {
    display: none;
}

@media screen and (max-width: 768px) {
    #carbon-storage .content-box {
        width: 100%;
    }

    .mobile-only {
        display: block;
    }

    #carbon-storage .flex_container .flexbox_100_sp {
        padding-bottom: 2em;
    }

    #carbon-storage .flex_container .flexbox_100_sp:last-of-type {
        padding-bottom: 0;
    }
}

#carbon-storage .text a {
    text-decoration: underline;

}

#carbon-storage .text a:hover {
    color: var(--primary-orange);
}

#carbon-storage .reference {
    font-weight: 600;
}

/* Table ------------------------------------------------------------------------------------------------------------- */
#carbon-storage table p,
#carbon-storage table a,
#carbon-storage table td,
#carbon-storage table th {
    font-size: clamp(1rem, .75rem + 1.5vw, 1.4rem);
}

#carbon-storage .table-container {
    display: flex; 
    flex-direction: column;
    overflow: auto;
    position: relative;
    width: 100%;
    text-align: center;
}

#carbon-storage table {
    border-collapse: separate;
}

#carbon-storage th {
    background-color: var(--light-gray);
    color: var(--primary-black);
    font-weight: bold;
}

#carbon-storage table caption {
    text-align: left;
    padding: 5px 0;
}

#carbon-storage table caption::before {
    content: "";
    margin-right: .5em;
    border: 2px solid var(--primary-orange);
}

#carbon-storage table td:last-child,
#carbon-storage table th:last-child {
    border-right: 0;
}

#carbon-storage table td,
#carbon-storage table th {
    border-right: 1px solid var(--gray);
}

#carbon-storage table th,
#carbon-storage table tr,
#carbon-storage table td {
    padding: 5px 10px;
    vertical-align: middle;
    border-bottom: solid 1px var(--gray);
    line-height: 1.3;
}

#carbon-storage .additional-info {
    display: block;
    padding-top: .5em;
    font-size: clamp(1rem, .75rem + 2.5vw, 1.2rem);
    text-align: left;
}

@media screen and (max-width: 768px) {

    #carbon-storage table,
    th,
    tr,
    td {
        padding: 5px;
    }
}

#carbon-storage th.base, #carbon-storage td.base  {
    background-color: var(--primary-orange);
    border-color: var(--primary-orange);
}


/* Bar Graph ------------------------------------------------------------------------------------------------------------- */

.graph-container {
    padding: 0 2em 0 1em;
    display: grid;
    grid-template-areas:
        "years graph"
        "years graph"
        "years x-labels";
    grid-template-columns: max-content;
    grid-template-rows: max-content;
}

.bar-graph {
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    padding: 2em 0;
    grid-area: graph;
}

.y-axis-labels {
    grid-area: years;
    padding: 2em .5em 2em 0;
    display: flex;
    flex-direction: column;
    gap: 1.5em;
    position: relative;
    overflow: hidden;
}

.year {
    display: flex;
    align-items: center;
    height: 4em;
}

.line {
    position: absolute;
    height: 100%;
    border-right: solid 2px var(--gray);
}

.bar-graph-wrap {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.bar-graph-wrap .graph {
    position: relative;
    height: 4em;
    width: 100%;
    border-radius: 0 4px 4px 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    -webkit-animation: graphAnim 2.5s forwards;
    animation: graphAnim 2.5s forwards;
}

.bar-graph-wrap .graph span {
    font-size: 14px;
    color: var(--site-background);
}

@media screen and (max-width: 750px) {
    .bar-graph-wrap .graph span {
        font-size: 12px;
    }
}

.domestic {
    height: 100%;
    background: var(--bar-chart-domestic);
    color: var(--bar-chart-domestic);
}

.foreign {
    height: 100%;
    background: var(--bar-chart-foreign);
    color: var(--bar-chart-foreign);
    border-radius: 0 4px 4px 0;
}

.legenda .domestic, .legenda .foreign {
    border-radius: 0;
}

.base   {
    background: var(--primary-orange);
}

.annotation {
    padding: 0 0 0 .5em;
    position: absolute;
    right: 50%;
    text-align: center;
    color: var(--site-background);
}


.x-axis-labels {
    position: relative;
    grid-area: x-labels;
}

.x-axis-labels p {
    position: absolute;
    top: 5px;
}

@media screen and (max-width: 768px) {
    .x-axis-labels p {
        transform: rotate(45deg);
    }
}

@-webkit-keyframes graphAnim {
    0% {
        -webkit-transform: translateX(-100%);
        transform: translateX(-100%);
    }

    100% {
        -webkit-transform: translateX(0);
        transform: translateX(0);
    }
}

@keyframes graphAnim {
    0% {
        -webkit-transform: translateX(-100%);
        transform: translateX(-100%);
    }

    100% {
        -webkit-transform: translateX(0);
        transform: translateX(0);
    }
}

.legenda {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5em;
    width: 100%;
}

/* Products ------------------------------------------------------------------------------------------------------------- */

.product-card {
    display: grid;
    grid-template-rows: auto 250px 1fr;
    /* box-shadow: 0 2px 5px 2px rgba(0,0,0, .2); */
    background-color: var(--light-gray);
    width: calc(50% - 1em);
}

@media screen and (max-width: 762px) {
    .product-card {
        /* width: 100%; */
    }
}

.product-card figure {
    overflow: hidden;
}

.product-card img {
    width: 100%;
    height: 100%; 
    object-fit: cover;
    transform: scale(1.2);
}

.storage-amount {
    color: var(--primary-black);
    font-weight: bold;
}

.product-category {
 padding: .5em 1em;
 border-left: 6px solid var(--primary-orange);
}

.product-text {
    display: grid;
    grid-template-rows: 1fr auto;
    padding: .5em 1em;
}

.product-text h5 {
    border-bottom: 1px solid rgba(0,0,0,0.2);
}