/*-----------------------------------*\
  #style.css
\*-----------------------------------*/

/** 
 * copyrights 2022 codewithsadee
 */





/*-----------------------------------*\
  #CUSTOM PROPERTY
\*-----------------------------------*/

:root {

  /**
   * colors
   */

   
    --primary-color: rgb(211, 210, 202);
    --primary-colors: rgb(223, 222, 215);
    --secondary-color: rgb(77, 79, 16);
    --tertiary-color: rgb(189, 178, 115);

  
  --cadet-blue-crayola: hsl(227, 13%, 73%);
  --maximum-yellow-red: hsl(41, 95%, 61%);
  --medium-sea-green: hsl(142, 43%, 54%);
  --blue-crayola_10: hsla(222, 100%, 61%, 0.05);
  --smocky-black_30: hsla(0, 0%, 6%, 0.3);
   --primary-color: rgb(211, 210, 202);;
  --primary-colors: rgb(223, 222, 215);
  --raisin-black: hsl(225, 15%, 16%);
  --secondary-color: rgb(77, 79, 16);
  --roman-silver: hsl(223, 10%, 52%);
  --presian-red: hsl(0, 64%, 52%);
  --gunmetal_50: rgb(189, 178, 115);
  --gainsboro: rgb(51, 48, 33);
  --cultured: hsl(0, 0%, 93%);
  --white_50: hsla(0, 0%, 100%, 0.5);
  --white_30: hsla(0, 0%, 100%, 0.3);
  --white_10: hsla(0, 0%, 100%, 0.1);
  --black_10: hsla(0, 0%, 0%, 0.1);
  --white: rgb(54, 56, 8);

  /**
   * gradient color
   */

  --gradient: linear-gradient(90deg, var(--white_10) 0px 77%, var(--white_50) 92%, transparent);

  /**
   * typography
   */

  --ff-dm-sans: 'DM Sans', sans-serif;

  --fs-1: 3.2rem;
  --fs-2: 3rem;
  --fs-3: 2.4rem;
  --fs-4: 2rem;
  --fs-5: 1.8rem;
  --fs-6: 1.5rem;
  --fs-7: 1.4rem;
  --fs-8: 1.2rem;

  --fw-500: 500;
  --fw-700: 700;

  /**
   * spacing
   */

  --section-padding: 100px;

  /**
   * shadow
   */

  --shadow-1: 0px 4px 8px var(--black_10);
  --shadow-2: 0px 30px 10px -20px var(--smocky-black_30);
  --shadow-3: 0px 15px 10px -20px var(--smocky-black_30);

  /**
   * radius
   */

  --radius-12: 12px;
  --radius-24: 24px;

  /**
   * transition
   */

  --transition-1: 0.25s ease;
  --transition-2: 0.5s ease;
  --transition-3: 1s ease;
  --cubic-out: cubic-bezier(0.33, 0.85, 0.4, 0.96);

}


.main-container{
  width: 90%;
}


/*-----------------------------------*\
  #RESET
\*-----------------------------------*/

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

li { list-style: none; }

a {
  text-decoration: none;
  color: inherit;
}

a,
img,
svg,
data,
span,
button,
ion-icon { display: block; }

img { height: auto; }

button {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

ion-icon { pointer-events: none; }

address { font-style: normal; }

table { border-collapse: collapse; }

html {
  font-family: var(--ff-dm-sans);
  font-size: 10px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--primary-colors);
  color: var(--cadet-secondary-color);
  font-size: 1.6rem;
  line-height: 1.4;
 
}
.whole{
   display: flex;
  justify-content: center;
}

body.active { overflow: hidden; }

::-webkit-scrollbar { width: 10px; }

::-webkit-scrollbar-track { background-color: hsl(220, 4%, 5%); }

::-webkit-scrollbar-thumb { background-color: hsl(220, 5%, 20%); }

::-webkit-scrollbar-thumb:hover { background-color: hsl(220, 5%, 30%); }

:focus-visible { outline-offset: 4px; }





/*-----------------------------------*\
  #REUSED STYLE
\*-----------------------------------*/

.container { padding-inline: 15px; }
.header-icon img{
    width: 40px !important;
}

.btn {
  color: var(--white);
  border-radius: 50px;
}
.btn-primary{
  color: white;
}

.btn-outline {
  font-size: var(--fs-6);
  font-weight: var(--fw-500);
  border: 1px solid var(--white);
  padding: 5px 15px;
  transition: var(--transition-1);
}

.btn-outline:is(:hover, :focus) {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-primary {
  position: relative;
  background-color: var(--secondary-color);
  max-width: max-content;
  font-weight: var(--fw-700);
  padding: 13px 30px;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: -50px;
  background-image: var(--gradient);
  transform: translateX(-100%);
  opacity: 0;
  z-index: -1;
  transition: var(--transition-2);
}

.btn-primary:is(:hover, :focus)::after {
  transform: translateX(0);
  opacity: 1;
}

.section { padding-block: var(--section-padding); }

[data-section] > * {
  transform: translateY(50px);
  opacity: 0;
  transition: var(--transition-3);
}

[data-section].active > * {
  opacity: 1;
  transform: translateY(0);
}

.h1,
.h2,
.h3 {
  color: var(--white);
  line-height: 1.1;
}

.h1 { font-size:var(--fs-2); }

.h2 { font-size: var(--fs-2); }

.h3 { font-size: var(--fs-3); }

.w-100 { width: 100%; }

.badge {
  color: var(--white);
  font-size: var(--fs-8);
  font-weight: var(--fw-700);
  padding: 4px 8px;
  border-radius: 50px;
}

.badge.red { background-color: var(--presian-red); }

.badge.green { background-color: var(--medium-sea-green); }

.last-update.red { color: var(--presian-red); }

.last-update.green { color: var(--medium-sea-green); }

.section-text {
  font-size: var(--fs-5);
  margin-block: 15px 35px;
}

.section-list { margin-block-end: 35px; }

.section-item:not(:last-child) { margin-block-end: 25px; }

.section-item .title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-block-end: 15px;
}

.section-item .title-wrapper ion-icon {
  flex-shrink: 0;
  color: var(--secondary-color);
  font-size: 24px;
}





/*-----------------------------------*\
  #HEADER
\*-----------------------------------*/

.header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--primary-color);
  padding-block: 15px;
  z-index: 4;
}

.header.active {
  position: fixed;
  top: -66px;
  background-color: var(--white);
  border-block-start: 1px solid var(--cultured);
  box-shadow: var(--shadow-1);
  animation: slideIn 0.25s var(--cubic-out) forwards;
}

@keyframes slideIn {

  0% {
    transform: translateY(0);
    background-color: var(--white);
  }

  100% {
    transform: translateY(100%);
    background-color: var(--primary-colors);
  }

}

.header > .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.logo {
  color: var(--white);
  font-size: 2.5rem;
  font-weight: var(--fw-700);
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-toggle-btn .line {
  width: 26px;
  height: 3px;
  background-color: var(--white);
  transition: var(--transition-1);
}

.nav-toggle-btn .line:not(:last-child) { margin-block-end: 4px; }

.nav-toggle-btn {
  padding: 8px 5px;
  margin-inline-start: auto;
}

.nav-toggle-btn.active .line-1 { transform: rotate(45deg) translate(5px, 6px); }

.nav-toggle-btn.active .line-2 { opacity: 0; }

.nav-toggle-btn.active .line-3 { transform: rotate(-45deg) translate(4px, -5px); }

.navbar {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--primary-color);
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: 0.25s var(--cubic-out);
}

.navbar.active {
  max-height: calc(100vh - 63px);
  visibility: visible;
  transition-duration: 0.5s;
}

.navbar-item:not(:last-child) { border-block-end: 1px solid var(--white_30); }

.navbar-link {
  color: black;
  font-weight: var(--fw-700);
  padding: 12px 30px;
  transition: var(--transition-1);
}

.navbar-link:is(:hover, :focus, .active) { color: white; }







/* Wrapper */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Slides */
.carousel-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
}

.carousel-slide.active {
    opacity: 1;
}

/* Video background */
.carousel-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

/* Dark overlay */
.carousel-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
}

/* Text Content */
.carousel-content {
    position: absolute;
    z-index: 3;
    color: #fff;
    width: 100%;
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 1s ease;
    padding: 20px;
}

/* Appears when slide becomes active */
.carousel-slide.active .carousel-content {
    opacity: 1;
    animation: slideUpFade 1.2s ease forwards;
}

/* Text animation */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%);
    }
}

/* Navigation arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: #fff;
    padding: 10px 18px;
    background: rgba(0,0,0,0.45);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    user-select: none;
    transition: background 0.3s;
}

.carousel-arrow:hover {
    background: rgba(0,0,0,0.7);
}

.carousel-arrow.left {
    left: 20px;
}

.carousel-arrow.right {
    right: 20px;
}

/* Dots */
.carousel-dots {
    position: absolute;
    bottom: 25px;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.carousel-dots span {
    width: 12px;
    height: 12px;
    display: inline-block;
    background: rgba(255,255,255,0.5);
    margin: 0 6px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-dots span.active {
    background: #fff;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .carousel-arrow {
        font-size: 28px;
        padding: 8px 12px;
    }

    .carousel-content h1 {
        font-size: 28px;
    }

    .carousel-content p {
        font-size: 16px;
    }
}





.trend {
  background-color: var(--primary-color);
  padding-block-end: 0;
}

.trend-tab {
  background-color: var(--primary-colors);
  border-radius: var(--radius-24);
  padding: 20px;
  box-shadow: var(--shadow-2);
  margin-block-start: -160px;
}

.trend-tab .tab-nav {
  display: flex;
  flex-wrap: wrap;
  padding-block-end: 20px;
  margin-block-end: 20px;
  border-block-end: 1px solid var(--raisin-black);
}

.trend-tab .tab-btn {
  color: var(--white);
  font-size: var(--fs-7);
  font-weight: var(--fw-700);
  padding: 7px 15px;
  border-radius: 50px;
  transition: var(--transition-1);
}

.trend-tab .tab-btn.active { background-color: var(--tetiary-color); }

.trend-tab .tab-content {
  display: grid;
  gap: 20px;
}

.trend-card {
  padding: 20px;
  border-radius: var(--radius-12);
  transition: var(--transition-1);
}

.trend-card:is(:hover, .active) {
  background-color: var(--gunmetal_50);
  box-shadow: var(--shadow-3);
}

.trend-card .card-title-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trend-card .card-title {
  color: var(--white);
  font-size: var(--fs-7);
  font-weight: var(--fw-700);
  transition: var(--transition-1);
}

.trend-card .card-title:is(:hover, :focus) { color: var(--secondary-color); }

.trend-card .card-title .span {
  color: var(--cadet-blue-crayola);
  display: inline-block;
  margin-inline-start: 5px;
}

.trend-card .card-value {
  color: var(--white);
  font-size: var(--fs-3);
  font-weight: var(--fw-700);
  margin-block: 10px;
}

.trend-card .card-analytics {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trend-card .current-price { font-size: var(--fs-7); }







.market {
  background-color: var(--primary-color);
  color: var(--white);
}

.market .title-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-block-end: 25px;
}

.market .btn-link {
  position: relative;
  min-width: max-content;
  font-weight: var(--fw-700);
  transition: var(--transition-1);
}

.market .btn-link:is(:hover, :focus) { color: var(--secondary-color); }

.market .btn-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--raisin-black);
  transition: var(--transition-1);
}

.market .btn-link:is(:hover, :focus)::after { background-color: var(--secondary-color); }

.market-tab {
  overflow-x: auto;
  padding-block-end: 30px;
}

.market-tab::-webkit-scrollbar { height: 14px; }

.market-tab::-webkit-scrollbar-thumb {
  border: 2px solid hsl(220, 4%, 5%);
  border-width: 2px 10px;
}

.market-tab .tab-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-block-end: 40px;
}

.market-tab .tab-btn {
  min-width: max-content;
  color: var(--white);
  font-size: var(--fs-7);
  font-weight: var(--fw-700);
  padding: 7px 24px;
  border-radius: 50px;
}

.market-tab .tab-btn.active { background-color: var(--secondary-color); }

.market-table { width: 100%; }

.table-heading,
.table-data { padding: 8px; }

.table-heading {
  font-size: var(--fs-5);
  text-align: left;
  white-space: nowrap;
}

.market-table .table-head { border-block-end: 2px solid var(--white); }

.table-row:not(.table-title) { height: 90px; }

.market-table .table-row {
  font-size: var(--fs-5);
  border-block-end: 1px solid var(--raisin-black);
  transition: var(--transition-1);
}

.market-table .table-body .table-row:is(:hover, :focus-within) {
  background-color: var(--blue-crayola_10);
}

.market-table .add-to-fav {
  color: var(--cadet-blue-crayola);
  font-size: 18px;
}

.market-table .add-to-fav.active .icon-outline,
.market-table .add-to-fav .icon-fill { display: none; }

.market-table .add-to-fav .icon-outline,
.market-table .add-to-fav.active .icon-fill { display: block; }

.market-table .add-to-fav.active ion-icon { color: var(--maximum-yellow-red); }

.market-table .wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
}

.market-table .coin-name {
  font-size: var(--fs-5);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-1);
}

.market-table .coin-name .span {
  color: var(--roman-silver);
  font-size: var(--fs-7);
}

.market-table .coin-name:is(:hover, :focus) { color: var(--secondary-color); }

.market-table :is(.rank, .last-price, .market-cap) { font-weight: var(--fw-700);
font-size: 8pt; }

.market-table .btn-outline {
  border-width: 2px;
  padding-inline: 10px;
}

.market-table .table-row:is(:hover, :focus-within) .btn-outline {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}
.main-trade{
  position: relative;
  top: -100px;
}


 





/*-----------------------------------*\
  #INSTRUCTION
\*-----------------------------------*/

.instruction :is(.section-title, .section-text) { text-align: center; }

.instruction .section-title { margin-block-end: 15px; }

.instruction-list {
  display: grid;
  gap: 30px;
  margin-block-start: 50px;
}

.instruction-card { text-align: center; }

.instruction-card .card-banner { transition: var(--transition-2); }

.instruction-card:hover .card-banner { transform: rotateY(1turn); }

.instruction-card .img {
  margin-inline: auto;
  margin-block-end: 12px;
}

.instruction-card .card-subtitle {
  font-size: var(--fs-8);
  font-weight: var(--fw-700);
  text-transform: uppercase;
}

.instruction-card .card-title {
  font-size: var(--fs-4);
  margin-block: 5px 15px;
}

.instruction-card .card-text { padding-inline: 20px; }





/*-----------------------------------*\
  #ABOUT
\*-----------------------------------*/

.about { background-color: var(--primary-color); }

.about-banner { margin-block-end: 40px; }





/*-----------------------------------*\
  #APP
\*-----------------------------------*/

.app {
  overflow: hidden;
  padding-block-end: 0;
}

.app-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
}

.app-banner {
  position: relative;
  margin-block-start: 60px;
}

.app-banner .span {
  position: absolute;
  top: 10%;
  left: 0;
  color: var(--white);
  font-size: var(--fs-7);
  font-weight: var(--fw-700);
  padding: 8px 15px;
  border: 2px solid var(--white);
  border-radius: 50px;
}





/*-----------------------------------*\
  #FOOTER
\*-----------------------------------*/

.footer-top {
  background-color: var(--primary-color);
  padding-block: 80px 50px;
}

.footer-top .container {
  display: grid;
  gap: 50px;
}

.footer .logo { font-size: 3rem; }

.footer-title {
  color: var(--white);
  font-size: var(--fs-3);
  margin-block: 25px 20px;
}

.footer-contact-link:not(:last-child) { margin-block-end: 12px; }

address.footer-contact-link { max-width: 30ch; }

.footer-list-title {
  color: var(--white);
  font-size: var(--fs-7);
  font-weight: var(--fw-700);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-list > li:not(:last-child) { margin-block-end: 10px; }

.footer-list > li:first-child { margin-block-end: 20px; }

.footer-link {
  color: var(--gainsboro);
  transition: var(--transition-1);
}

.footer-link:is(:hover, :focus) { color: var(--secondary-color); }

.footer-bottom {
  background-color: var(--primary-colors);
  padding-block: 20px;
}

.copyright {
  text-align: center;
  margin-block-end: 20px;
}

.copyright-link {
  display: inline-block;
  color: var(--secondary-color);
}

.social-list {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-link {
  font-size: 18px;
  transition: var(--transition-1);
}

.social-link:is(:hover, :focus) { color: var(--secondary-color); }





/*-----------------------------------*\
  #MEDIA QUERIES
\*-----------------------------------*/

/**
 * responsive for larger than 575px screen
 */

 @media (max-width: 700px) {
     .main-container{
  width: 100%;
}
 }

@media (min-width: 575px) {
  
  /**
   * CUSTOM PROPERTY
   */


  :root {

    /**
     * typography
     */

    --fs-1: 4rem;
    --fs-2: 3.4rem;

  }



  /**
   * REUSED STYLE
   */

  .container {
    max-width: 540px;
    width: 100%;
    margin-inline: auto;
  }



  /**
   * HERO
   */

  .hero-text { --fs-5: 2rem; }

}





/**
 * responsive for larger than 768px screen
 */

@media (min-width: 768px) {

  /**
   * CUSTOM PROPERTY
   */


  :root {

    /**
     * typography
     */

    --fs-1: 5rem;
    --fs-2: 4rem;

  }



  /**
   * REUSED STYLE
   */

  .container { max-width: 750px; }



  /**
   * HERO
   */

  .hero-banner {
    max-width: max-content;
    margin-inline: auto;
  }



  /**
   * TREND
   */

  .trend-tab .tab-content { grid-template-columns: 1fr 1fr; }



  /**
   * INSTRUCTION
   */

  .instruction { overflow: hidden; }

  .instruction .section-text {
    max-width: 40ch;
    margin-inline: auto;
  }

  .instruction-list { grid-template-columns: 1fr 1fr; }

  .instruction-card { position: relative; }

  .instruction-card::after {
    content: "";
    width: 160px;
    height: 12px;
    background-image: url('../images/connect-line.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    position: absolute;
    top: 50px;
    right: -95px;
  }

  .instruction-list > li:nth-child(even) .instruction-card::after {
    display: none;
  }



  /**
   * APP
   */

  .app-banner { max-width: max-content; }



  /**
   * FOOTER
   */

  .footer-top .container { grid-template-columns: repeat(3, 1fr); }

  .footer-brand { grid-column: 1 / 3; }

  .footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .copyright { margin-block-end: 0; }

}





/**
 * responsive for larger than 992px screen
 */

@media (min-width: 992px) {

  /**
   * REUSED STYLE
   */

  .container { max-width: 960px; }



  /**
   * HEADER
   */

  .header { padding-block: 5px; }

  .header.active { top: -60px; }

  .header > .container { gap: 50px; }

  .nav-toggle-btn { display: none; }

  .navbar,
  .navbar.active {
    all: unset;
    margin-inline-end: auto;
  }

  .navbar-list {
    display: flex;
    align-items: center;
  }

  .navbar-item:not(:last-child) { border-block-end: none; }

  .navbar-link {
    font-size: var(--fs-7);
    padding: 15px 12px;
  }

  .navbar-link:is(:hover, :focus, .active) {
    background-color: var(--secondary-color);
    color: var(--white);
  }



  /**
   * HERO
   */

  .hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 30px;
  }

  .hero-content { margin-block-end: 0; }



  /**
   * MARKET
   */

  .market-tab { padding-block-end: 0; }



  /**
   * ABOUT
   */

  .about .container {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    align-items: center;
    gap: 30px;
  }

  .about-banner { margin-block-end: 0; }



  /**
   * APP
   */

  .app { padding-block: 0; }

  .app .container {
    display: grid;
    grid-template-columns: 0.8fr 1fr;
    align-items: flex-end;
    gap: 30px;
  }

  .app-banner { margin-block-start: 0; }

  .app-content { margin-block: 50px; }

}





/**
 * responsive for larger than 1200px screen
 */

@media (min-width: 1200px) {

  /**
   * CUSTOM PROPERTY
   */


  :root {

    /**
     * typography
     */

    --fs-1: 6.4rem;
    --fs-2: 4.8rem;

  }



  /**
   * REUSED STYLE
   */

  .container { max-width: 1280px; }



  /**
   * HEADER
   */

  .header.active { top: -64px; }

  .navbar-link { font-size: unset; }



  /**
   * HERO
   */

  .hero .container { gap: 100px; }



  /**
   * TREND
   */

  .trend-tab .tab-content { grid-template-columns: repeat(4, 1fr); }



  /**
   * INSTRUCTION
   */

  .instruction-list { grid-template-columns: repeat(4, 1fr); }

  .instruction-list > li:nth-child(even) .instruction-card::after {
    display: block;
  }

  .instruction-list > li:last-child .instruction-card::after {
    display: none;
  }



  /**
   * ABOUT, APP
   */

  :is(.about, .app) .container { gap: 60px; }



  /**
   * APP
   */

  .app-content { margin-block: 100px; }



  /**
   * FOOTER
   */

  .footer-top { padding-block: 100px 90px; }

  .footer-top .container { grid-template-columns: 1fr 0.5fr 0.5fr 0.5fr 0.5fr; }

  .footer-brand { grid-column: auto; }

}