@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100..900&display=swap');

:root {
    --header-height: 3.5rem;

    --first-color: hsl(210, 100%, 50%);
    --second-color:hsl(194, 100%, 50%);
    --stars-color: hsl(18, 95%, 55%);
    --first-gradient: linear-gradient(90deg,
    hsl(207, 97%, 49%),
    hsl(200, 95%, 57%));
    --second-gradient: linear-gradient(90deg,
    hsl(140, 97%, 49%),
    hsl(138, 100%, 40%));
    --title-color:hsl(255, 12%, 12%);
    --text-color: hsl(225, 12%, 24%);
    --text-color-light: hsl(255, 4%, 70%);
    --body-color: hsl(0, 0%, 100%);
    --container-color: hsl(0, 0%, 100%);
    --white-color: hsl(0, 0%, 100%);
    --black-color:hsl(255, 20%, 10%);
    --gray-border:hsl(255, 6%, 90%); 
    --black-border: hsl(255, 10%, 20%);

    --body-font: "Montserrat", sans-serif;
    --big-font-size: 2.25rem;
    --h1-font-size: 1.5rem;
    --h2-font-size: 1.25rem;
    --h3-font-size: 1rem;
    --normal-font-size: 0.938rem;
    --small-font-size: 0.813rem;

    --font-regular: 400;
    --font-medium: 500;
    --font-semi-bold: 600;
    --font-bold: 700;

    --z-tooltip: 10;
    --z-fixed: 100;
}

@media screen and (min-width: 1150px) {
    :root {
        --big-font-size: 3.5rem;
        --h1-font-size: 2.25rem;
        --h2-font-size: 1.5rem;
        --h3-font-size: 1.25rem;
        --normal-font-size: 1rem;
        --small-font-size: 0.875rem;
    }
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
}

h1, h2, h3, h4 {
    color: var(--title-color);
    font-weight: var(--font-semi-bold);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1120px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.section {
    padding-block: 5rem 1rem;
}

.section-title, .section-subtitle {
    text-align: center;
}

.section-title {
    font-size: var(--h1-font-size);
    font-weight: var(--font-bold);
    margin-bottom: 1.5rem;
}

.section-subtitle {
    display: block;
    font-size: var(--normal-font-size);
    font-weight: var(--font-semi-bold);
    color: var(--second-color);
    margin-bottom: 0.5rem;
}

.main {
    overflow: hidden;
}


/*-----------------------------HEADER AND NAV-----------------------------*/
.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-color: transparent;
    z-index: var(--z-fixed);
    transition: background-color 0.4s;
}

.nav {
    position: relative;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo { 
    display: flex;
    align-items: center;
    column-gap: 0.25rem;
}

.nav-logo span {
    color: var(--white-color);
    font-weight: var(--font-semi-bold);
    transition: color 0.4s;
}

.main-logo {
    width: 50px;
    height: auto; 
    margin-right: 0.35rem;
    left: 0;
}

.navToggle, .navClose {
    font-size: 1.5rem;
    color: var(--white-color);
    cursor: pointer;
    transition: color 0.4s;
}

/*nav mobile*/
@media screen and (max-width: 1150px) {
    .navMenu {
        position: fixed;
        top: 0;
        right: -100%;
        background-color: var(--black-color);
        width: 80%;
        height: 100%;
        padding: 7.5rem 3.5rem 0;
        border-left: 2px solid var(--black-border);
        transition: right 0.4s;
    }
}

.navList {
    display: flex;
    flex-direction: column;
    row-gap: 4rem;
}

.navLink {
    color: var(--text-color-light);
    font-weight: var(--font-semi-bold);
    transition: color 0.4s;
}

.navLink:hover {
    color: var(--first-color);
}

.navClose {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.bg-header {
    background-color: var(--body-color);
    box-shadow: 0 4px 16px hsla(255, 90%, 8%, 0.1);
}

.bg-header .nav-logo span, .bg-header .navToggle {
    color: var(--title-color);
}

/*button*/
.show-menu {
    right: 0;
}

.button {
    display: inline-flex;
    background: var(--first-gradient);
    color: var(--white-color);
    font-weight: var(--font-semi-bold);
    padding: 1rem 2rem;
    transition: box-shadow 0.4s;
}

.button:hover {
    box-shadow: 0 8px 32px hsla(202, 100%, 50%, 0.3);
    color: var(--white-color);
}

.button-link {
    display: flex;
    align-items: center;
    column-gap: 0.25rem;
    color: var(--first-color);
}

.button-link span {
    font-weight: var(--font-semi-bold);
}

.button-link i {
    font-size: 1.5rem;
    transition: transform 0.4s;
}

.button-link:hover i {
    transform: translateX(0.25rem);
}

/*-----------------------------MAIN-----------------------------*/
.main-check { 
    position: relative; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    height: 100vh; 
    overflow: visible; 
    background-color: var(--black-color); 
}

.check-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right;
}

/*-----------------------------SELECTS-----------------------------*/
.check-selects-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white-color);
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 0.5px;
}

.cs-button {
    display: inline-flex;
    background: var(--second-gradient);
    border-radius: 0.5em;
    margin-top: 1.5rem;
    transition: box-shadow 0.4s;
}

.cs-button a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 2rem;
    color: var(--white-color);
    font-weight: var(--font-semi-bold);
    font-size: var(--h3-font-size);
}

.cs-button a i {
    font-size: var(--h3-font-size);
}

.cs-button:hover {
    box-shadow: 0 8px 32px hsla(162, 100%, 50%, 0.3);
}

/*-----------------------------ONGKIR RESULT-----------------------------*/
.ongkir-result {
    display: block;
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    border-radius: 1rem;
    background: #111;
    color: #fff;
    box-shadow: 0 10px 75px var(--first-color);
    box-sizing: border-box;

    max-height: 300px;
    overflow-y: auto;

    animation: growDown 0.3s ease-out;
}

@keyframes growDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ongkir-result-item:not(:first-child) {
    margin-top: 1.5rem; /* adjust as needed */
}

/*-----------------------------FOOTER-----------------------------*/
.footer {
    background-color: var(--black-color);
    color: var(--text-color-light);
    padding-block: 3.5rem 2rem;
}

.footer-container {
    row-gap: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--black-border);
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    column-gap: 0.25rem;
}

.footer-logo span {
    color: var(--white-color);
    font-size: var(--h3-font-size);
    font-weight: var(--font-semi-bold);
}

.footer-logo i {
    color: var(--first-color);
    font-size: 1.5rem;
}

.footer-description {
    margin-block: 1rem;
}

.footer-email, .footer-info {
    font-style: normal;
}

.footer-email a {
    text-decoration: underline;
    color: var(--white-color);
    transition: color 0.4s;
}

.footer-email a:hover {
    color: var(--first-color);
}

.footer-content { 
    grid-template-columns: repeat(2, max-content);
    gap: 4rem 3rem;
}

.footer-title {
    font-size: var(--h3-font-size);
    color: var(--white-color);
    margin-bottom: 1rem;
}

.footer-links, .footer-list {
    display: grid;
    row-gap: 0.5rem;
}

.footer-link {
    color: var(--text-color-light);
    transition: color 0.4s;
}

.footer-link:hover {
    color: var(--first-color);
}

.footer-copy {
    display: block;
    text-align: center;
    font-size: var(--small-font-size);
    margin-top: 4rem;
}

/*-----------------------------SCROLL BAR-----------------------------*/
::-webkit-scrollbar {
    width: 0.6rem;
    background-color: hsl(255, 5%, 75%);
}

::-webkit-scrollbar-thumb {
    background-color: hsl(255, 5%, 65%);
}

::-webkit-scrollbar-thumb:hover {
    background-color: hsl(255, 5%, 55%);
}

/*-----------------------------BREAKPOINTS-----------------------------*/
/*For small devices*/
@media screen and (max-width: 340px) {
  .container {
    margin-inline: 1rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .footer-content {
    grid-template-columns: repeat(1, max-content);
  }
}

/*For medium devices*/
@media screen and (min-width: 540px) {
  .footer-content {
    grid-template-columns: repeat(3, max-content);
  }
}

@media screen and (max-width: 540px) {

    .check-selects-wrapper {
        left: 0;
        transform: translateY(-50%);
        width: 100%;
        padding-inline: 1rem;
        box-sizing: border-box;
    }

    .ongkir-result {
        width: 100%;
        min-width: 0 !important;
        max-width: 100%;
        box-sizing: border-box;
        padding: 1.5rem;

        max-height: 250px;
    }

    .cs-button {
        width: 70%;
        min-width: 0 !important;
        max-width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }
}

@media screen and (min-width: 768px) {
    .nav-menu {
        width: 50%;
    }

    .footer-container {
        grid-template-columns: repeat(2, max-content);
        justify-content: space-between;
    }

  .check-selects {
        gap: 1rem;
    }

    .select {
        min-width: 420px;
    }

    .ongkir-result {
        min-width: 800px;
    }
}

/*For large devices*/
@media screen and (min-width: 1150px) {
    .container {
        margin-inline: auto;
    }

    .section {
        padding-block: 7rem 2rem;
    }

    .nav {
        height: calc(var(--header-height) + 2rem);
    }

    .navToggle, .navClose {
        display: none;
    }

    .navList {
        flex-direction: row;
        align-items: center;
        column-gap: 4rem;
    }

    .bg-header .navLink {
        color: var(--text-color);
    }

    .bg-header .active-link, .bg-header .navLink:hover {
        color: var(--first-color);
    }

    .bg-header .button, .bg-header .button:hover {
        color: var(--white-color);
    }

    .footer {
        padding-block: 4.5rem 3rem;
    }

    .footer-container {
        padding-bottom: 6rem;
    }

    .footer-content {
        column-gap: 7rem;
    }

    .footer-description {
        margin-block: 1.5rem;
    }

    .footer-title {
        margin-bottom: 1.5rem;
    }

    .footer-links, .footer-list {
        row-gap: 1rem;
    }

    .scrollup {
        right: 3rem;
    }
}