@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

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

:root {
    --limeGreen: hsl(163, 72%, 41%);
    --brightRed: hsl(356, 69%, 56%);
    --fbColor: hsl(208, 92%, 53%);
    --twitterColor: hsl(203, 89%, 53%);
    --igColor: linear-gradient(to right, hsl(37, 97%, 70%), hsl(329, 70%, 58%));
    --ytColor: hsl(348, 97%, 39%);

    --darkTheme: linear-gradient(to right,hsl(210, 78%, 56%), hsl(146, 68%, 55%));
    --dkBlueBottom: hsl(230, 17%, 14%);
    --dkBlueTop: hsl(232, 19%, 15%);
    --darkCardBG: hsl(228, 28%, 20%);
    --dkText: hsl(228, 34%, 66%);
    --dkLightText: hsl(0, 0%, 100%);

    --lightTheme: hsl(0, 0%, 100%);
    --ltBlueTop: hsl(225, 100%, 98%);
    --ltCardBG: hsl(227, 47%, 96%);
    --ltText: hsl(228, 12%, 44%);
    --ltDarkText: hsl(230, 17%, 14%);
}

body {
    min-width: 60vw;
    max-width: 90vw;
    max-height: 330px;
    margin: 0 auto;
    padding: 5%;
    transition: all 0.5s ease;
}

.inter-regular {
  font-family: "Inter", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

.inter-bold {
    font-family: "Inter", serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
}

.facebook-brand {
    border-top: 5px solid var(--fbColor);
}

.twitter-brand {
    border-top: 5px solid var(--twitterColor);
}

.instagram-brand {
    border-top: 5px solid;
    border-image: var(--igColor) 1;
    border-bottom: 0;
    border-left: 0;
    border-right: 0;
}

.youtube-brand {
    border-top: 5px solid var(--ytColor);
}

header {
    margin-bottom: 10%;
}

/** TOGGLE THEME SWITCH */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
  }
  
  .switch input { 
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
  }
  
  .slider:before {
    position: absolute;
    content: "";
    height: 23px;
    width: 23px;
    left: 4px;
    bottom: 4px;
    background-color: var(--lightTheme);
    -webkit-transition: .4s;
    transition: .4s;
  }

  .slider.dark::before {
    background-color: var(--dkBlueTop);
  }
  
  input:checked + .slider {
    background-color: var(--darkTheme);
  }
  
  input:focus + .slider {
    box-shadow: 0 0 1px var(--darkTheme);
  }
  
  input:checked + .slider:before {
    -webkit-transform: translateX(29px);
    -ms-transform: translateX(29px);
    transform: translateX(29px);
  }
  
  /* Rounded sliders */
  .slider.round {
    border-radius: 34px;
  }
  
  .slider.round:before {
    border-radius: 50%;
  }

  /**END TOGGLE THEME SWITCH */


h1,h2,h3 {
    /** ADD TO JS FUNCTION */
    color: var(--ltDarkText);
    /** ADD TO JS FUNCTION */
}

h4,h5 {
    /** ADD TO JS FUNCTION */
    color: var(--ltText);
    /** ADD TO JS FUNCTION */
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2rem;
}

h4 {
    font-weight: 300;
    letter-spacing: 3px;
}

hr {
    /** ADD TO JS FUNCTION */
    border: 1px solid var(--ltText);
    /** ADD TO JS FUNCTION */
    margin: 7% 0;
}

.positive {
    color: var(--limeGreen);
}

.negative {
    color: var(--brightRed);
}

.selectDarkMode {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

main {
    display: flex;
    flex-direction: column;
}

section {
    display: flex;
    flex-direction: column;
}

.section-header {

    /** ADD TO JS FUNCTION */
    color: var(--ltText);
    /** ADD TO JS FUNCTION */
}

.card {
    display: flex;
    position: relative;
    flex-direction: column;
    justify-content: space-evenly;
    width: 100%; 
    height: 250px;
}

.card,
.sub-card {
    border-radius: 5px;
    margin: 3% 0;

    /** ADD TO JS FUNCTION */
    color: var(--ltText);
    background-color: var(--ltCardBG);
    /** ADD TO JS FUNCTION */
}


.card-font {
    font-size: 14px;
}

.card-header,
.card-body,
.card-footer {
    display: flex;
    align-items: center;
    margin: 0 auto;
}

.card-header {
    width: 125px;
    padding: 3% 0;
    justify-content: center;
}

.card-header img {
    margin-right: 5%;
}

.card-body {
    flex-direction: column;
}

.card-footer {
    padding: 3% 0;
    width: 100%;
    justify-content: center;
}

.card-footer img {
    margin-right: 1%;
}


.sub-card {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    border-top: none;
    padding: 3% 10%;
    height: 160px;
    width: 100%;
}

.sub-card-left,
.sub-card-right {
    display:flex;
    flex-direction: column;
    justify-content: space-around;
    width: 50%;
}

.sub-card-right img {
    width: 25px;
}

.sub-card-right {
    align-items: flex-end;
}

.sub-card-right-footer {
    display: flex;
    align-items: center;
}

.sub-card-right-footer img {
    width: auto;
    height: 5px;
    margin-right: 2%;
}

/** FOOTER */
footer {
    margin-top: 1%;
}
.attribution { font-size: 11px; text-align: center; }
.attribution a { color: hsl(228, 45%, 44%); }

@media screen and (min-width: 576px) {
    header {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    hr {
        display: none;
    }

    .selectDarkMode {
        width: 175px;
    }

    section {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .card {
        width: 45%;
    }
}

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

    header {
        margin-bottom: 3%;
    }

    .sub-card {
        width: 45%;
        padding: 3% 5%;
    }
}

@media screen and (min-width: 992px) {

    h1 {
        font-size: 5rem;
    }

    h4 {
        letter-spacing: 0.45rem;
    }

    .sub-card h1 {
        padding: unset;
        padding: 1%;
        font-size: 3rem;
    }
}

@media screen and (min-width: 1200px) {
    body {
        padding: unset;
        padding-top: 3%;
        max-width: 90vw;
    }

    section {
        width: 100%;
        justify-content: space-between;
    }

    .card {
        margin: unset;
        margin: 1% 0;
        width: 24%;
    }

    .sub-card {
        margin: unset;
        margin: 1% 0;
        padding: unset;
        padding: 1% 3%;
    }
}

@media screen and (min-width: 1400px) {
    body {
        max-width: 85vw;
    }

    .sub-card {
        width: 24%;
    }
}

@media screen and (min-width: 1600px) {
    body {
        max-width: 80vw;
    }

    .sub-card {
        width: 24%;
    }
}