/*
Metodología utilizada: BEM (Block__Element--Modifier)
*/

/*
Orden de los atributos:
1. Posicionamiento
2. Modelo caja (box model)
3. Tipografia
4. Visuales
5. Otros
*/

:root {
    /* Colores */
    --bitcoin-orange: #F7931A;
    --soft-orange: #FFE9D5;
    --secondary-blue: #1A9AF7;
    --soft-blue: #E7F5FF;
    --warm-black: #201E1C;
    --warm-black-1: #282623;
    --black: #282623;
    --grey: #BABABA;
    --hard-grey: #757575;
    --hard-grey-1: #808080;
    --off-white: #FAF8F7;
    --just-white: #fff;
}

/* Global */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
    font-size: 6.25%;
    font-family: 'DM Sans', sans-serif;
}
body {
    min-width: 320px;
    font-size: 16rem;
}

/* Header */
header {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 36px;
    width: 100%;
    padding-top: 36px;
    text-align: center;
    background: linear-gradient(207.8deg, var(--warm-black) 16.69%, var(--bitcoin-orange) 100%);
}
header .logo {
    width: 151px;
    height: 24px;
}
.header__main-container {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 90%;
    max-width: 500px;
}
.header__main-container h1 {
    color: var(--just-white);
    font-size: 24rem;
    font-weight: bold;
    line-height: 26rem;
}
.header__main-container p {
    color: var(--soft-orange);
    font-size: 14rem;
    font-weight: 500;
    line-height: 18rem;
}
.header__title-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.header__main-container .header__button {
    position: relative;
    top: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: var(--warm-black);
    font-size: 14rem;
    font-weight: bold;
    text-decoration: none;
    background-color: var(--off-white);
    border: none;
    border-radius: 4px;
    box-shadow: 0px 4px 8px 0px rgba(89, 73, 30, 0.16);
}
.header__main-container .header__button img {
    width: 24px;
    height: 24px;
}

/* Main */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: auto;
}

/* First section: Exchange */
.main-exchange-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
    height: auto;
    padding: 50px 10px 38px;
    background: var(--off-white);
}
.main-exchange-container .bitcoin-background {
    width: 195px;
    height: 195px;
}
.main-exchange-container .main-exchange-container__title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
    max-width: 500px;
}
.main-exchange-container .main-exchange-container__title h2 {
    font-size: 24rem;
    font-weight: bold;
    line-height: 26rem;
    color: var(--warm-black);
}
.main-exchange-container .main-exchange-container__title p {
    font-size: 14rem;
    font-weight: 500;
    line-height: 18rem;
    color: var(--hard-grey);
}

/* Subsection tables */
/* Global values for all tables*/
.main-tables-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    width: 100%;
    padding: 0 64px 12px;
}
.main-tables-container .table-section {
    display: flex;
    flex-direction: column;
    scroll-snap-align: center;
    gap: 12px;
    width: 80%;
    min-width: 230px;
    max-width: 260px;
}
.main-tables-container .table-section .table-section__title {
    position: relative;
    left: 12px;
    width: fit-content;
    font-size: 18rem;
    font-weight: bold;
}
.main-tables-container .table-section .table-section__table {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Inter', sans-serif;
}
.table-section .table-section__table table {
    width: 100%;
    height: 100%;
}
.table-section__table table tbody {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.table-section__table table tr {
    display: flex;
    gap: 2px;
}
.table-section__table table tr:first-child td:first-child {
    border-radius: 8px 0px 0px 0px;
}
.table-section__table table tr:first-child td:last-child {
    border-radius: 0px 8px 0px 0px;
}
.table-section__table table tr:last-child td:first-child {
    border-radius: 0px 0px 0px 8px;
}
.table-section__table table tr:last-child td:last-child {
    border-radius: 0px 0px 8px 0px;
}
.table-section__table table td {
    width: 50%;
    word-wrap: break-word;
    background: var(--just-white);
}
.table-section__table table .table__first-column {
    padding: 10px 12px;
    color: #B5B0AC;
    font-size: 16rem;
    font-weight: 500;
    letter-spacing: -0.32px;
}
.table-section__table table .table__second-column {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    color: var(--hard-grey);
    text-align: center;
    font-size: 14rem;
    letter-spacing: -0.28px;
}
.table-section__table .table__second-column img {
    width: 12px;
    height: 12px;
}
.main-tables-container .table-section .table-section__date {
    align-self: center;
    width: fit-content;
    padding: 8px;
    font-family: 'Inter', sans-serif;
    border-radius: 8px;
}
.table-section .table-section__date p {
    color: var(--warm-black);
    text-align: center;
    font-size: 12rem;
}

/* Currency table */
.main-tables-container .table-section .currency-table-title {
    color: #FF9536;
}
.main-tables-container .table-section .currency-table-date {
    background-color: var(--soft-orange);
}

/* Commission table */
.main-tables-container .table-section .commission-table-title {
    color: var(--secondary-blue);
}
.main-tables-container .table-section .commission-table-date {
    background-color: var(--soft-blue);
}

/* Second section: Benefits */
.main-product-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    position: relative;
    width: 100%;
    height: auto;
    padding: 50px 16px 40px;
    background-color: var(--warm-black);
}

/* Icon in the section separator */
.main-product-detail .batata-icon {
    position: absolute;
    top: -10px;
    width: 40.6px;
    height: 24px;
}

/* Second section title */
.main-product-detail .product-detail__title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 90%;
    max-width: 466px;
    height: auto;
    text-align: center;
}
.main-product-detail .product-detail__title h2 {
    color: var(--just-white);
    font-size: 24rem;
    font-weight: bold;
    line-height: 26rem;
}
.main-product-detail .product-detail__title p {
    color: var(--hard-grey-1);
    font-size: 14rem;
    font-weight: 500;
    line-height: 18rem;
}

/* Cards subsection */
.main-product-detail .product-cards-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}
.main-product-detail .product-cards-container .product-detail__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    max-width: 345px;
    height: auto;
    padding: 14px 20px 22px 16px;
    border-radius: 4px;
    background: var(--warm-black-1);
    box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.16);
}
.product-cards-container .product-detail__card .card__icon {
    width: 24px;
    height: 24px;
}
.product-cards-container .product-detail__card .card__title {
    color: var(--just-white);
    font-size: 18rem;
    font-weight: bold;
    line-height: 18rem;
}
.product-cards-container .product-detail__card .card__body {
    color: var(--hard-grey-1);
    font-size: 14rem;
    font-weight: 500;
    line-height: 18rem;
}

/* Third section: Bitcoin */
/* Bitcoin background */
.bitcoin-img-container {
    width: 100%;
    height: 50vh;
    background-image: url(../assets/imgs/bitcoinbaby-mobile.jpg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}
.bitcoin-img-container h2 {
    position: relative;
    top: 20%;
    color: var(--just-white);
    text-align: center;
    font-size: 24rem;
    font-weight: bold;
    line-height: 26rem;
}

/* Fourth section: Plans */
.plans-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 34px;
    width: 100%;
    padding: 64px 16px 48px;
    text-align: center;
    background-color: var(--off-white);
}

/* Title */
.plans-section__title {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 466px;
    height: auto;
}
.plans-section__title h2 {
    color: var(--warm-black);
    font-size: 24rem;
    font-weight: bold;
    line-height: 26rem;
}
.plans-section__title p {
    color: var(--hard-grey);
    font-size: 14rem;
    font-weight: 500;
    line-height: 18rem;
}

/* Plans */
/* Plans container */
.plans-section__all-plans {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: auto;
    min-height: 280px;
    padding: 0 65px;
}

/* Plan */
.plans-section__plan {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    scroll-snap-align: center;
    width: 66%;
    min-width: 190px;
    max-width: 223px;
    height: auto;
    max-height: 247px;
    padding: 31px 16px 24px;
    border-radius: 8px;
    background: var(--just-white);
    box-shadow: 0px 4px 8px 0px rgba(89, 73, 30, 0.16);
}
.plan__recommended {
    position: absolute;
    top: -16px;
    padding: 8px;
    color: var(--just-white);
    font-size: 12rem;
    font-weight: bold;
    background: var(--bitcoin-orange);
    border-radius: 8px;
}
.plan__main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* Plan's elements */
.plan__name-price-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.plan__main-container h3 {
    font-size: 14rem;
    font-weight: 500;
    line-height: 18rem;
}
.plan__price {
    position: relative;
    color: var(--grey);
    font-family: 'Inter', sans-serif;
    font-size: 52px;
    font-weight: bold;
    letter-spacing: -2.16px;
}
.plan__price--recommended {
    color: black;
}
.plan__price span {
    position: absolute;
    top: 8px;
    left: -8px;
    font-size: 12rem;
    font-weight: 500;
    letter-spacing: 0;
}
.plan__details {
    color: var(--hard-grey);
    font-family: 'Inter', sans-serif;
    font-size: 12rem;
    font-weight: 500;
}
.plan__button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--grey);
    font-size: 14rem;
    font-weight: bold;
    border-radius: 4px;
    border: 2px solid var(--grey);
    background: var(--just-white);
}
.plan__button--recommended {
    color: var(--warm-black);
    border: 2px solid var(--bitcoin-orange);
    background: var(--off-white);
}
.plan__button span {
    display: inline-block;
    width: 24px;
    min-width: 24px;
    height: 24px;
    background-image: url("../assets/icons/large-arrow-right-gray.svg");
    background-repeat: no-repeat;
    background-size: cover;
}
.plan__button--recommended span {
    background-image: url("../assets/icons/large-arrow-right-orange.svg");
}

/* Footer */
footer {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    height: auto;
    padding: 40px 0;
    background-color: var(--bitcoin-orange);
}
.footer__left-section ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
}
.footer__left-section ul a {
    text-decoration: none;
    color: var(--just-white);
    font-size: 14rem;
    font-weight: 500;
    line-height: 18rem;
}

/* Global (override) */
.horizontal-scroll {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
}

/* Media queries */
@media (min-width: 705px) {
    .main-tables-container {
        justify-content: center;
    }
}