/*-----------------------------------*\
  #style.css
\*-----------------------------------*/

/**
 * copyright 2022 codewithsadee
 */

/*-----------------------------------*\
  #CUSTOM PROPERTY
\*-----------------------------------*/

:root {
  /**
   * colors
   */

  --oxford-blue_60: hsla(224, 34%, 13%, 0.6);
  --main-red: #dc2828;
  --oxford-blue: hsl(224, 34%, 13%);
  --maximum-red: hsl(0, 72%, 51%);
  --eerie-black: hsl(0, 0%, 9%);
  --mint-cream: hsl(146, 41%, 97%);
  --cadet-gray: hsl(215, 20%, 65%);
  --light-gray: hsl(216, 12%, 84%);
  --carcoal_20: hsla(214, 19%, 29%, 0.2);
  --carcoal_15: hsla(214, 19%, 29%, 0.15);
  --carcoal_10: hsla(214, 19%, 29%, 0.1);
  --sea-green: hsl(0, 63%, 48%);
  --gainsboro: hsl(220, 13%, 91%);
  --white_70: hsla(0, 0%, 100%, 0.7);
  --gunmetal: hsl(215, 28%, 17%);
  --manatee: hsl(218, 11%, 65%);
  --mango: hsl(43, 96%, 56%);
  --white: hsl(0, 0%, 100%);
  --black: hsl(0, 0%, 0%);

  /**
   * typography
   */

  --ff-spartan: "League Spartan", sans-serif;

  --fs-1: 3.6rem;
  --fs-2: 2.4rem;
  --fs-3: 2rem;
  --fs-4: 1.8rem;
  --fs-5: 1.7rem;

  --fw-600: 600;
  --fw-500: 500;

  /**
   * spacing
   */

  --section-padding: 35px;

  /**
   * shadow
   */

  --shadow-1: 0 1px 2px hsla(0, 0%, 0%, 0.2);
  --shadow-2: 0 10px 15px -5px var(--carcoal_20);
  --shadow-3: 0 10px 25px -3px var(--carcoal_20);
  --shadow-4: 0 0 3px var(--carcoal_15);
  --shadow-5: 0 20px 25px -5px var(--carcoal_10),
    0 10px 10px -5px var(--carcoal_10);

  /**
   * border radius
   */

  --radius-16: 16px;
  --radius-12: 12px;
  --radius-6: 6px;
  --radius-4: 4px;

  /**
   * transition
   */

  --transition: 0.25s ease;
  --cubic-out: cubic-bezier(0.33, 0.85, 0.4, 0.96);
}

/*-----------------------------------*\
  #RESET
\*-----------------------------------*/

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

li {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

a,
img,
span,
label,
input,
select,
button,
ion-icon {
  display: block;
}

img {
  height: auto;
}

input,
select,
button {
  background: none;
  border: none;
  font: inherit;
}

input,
select {
  width: 100%;
}

a,
img,
span,
input,
label,
button,
ion-icon,
textarea {
  display: block;
}
.span {
  color: black;
}
button {
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
}

input,
textarea {
  border: none;
  font: inherit;
  width: 100%;
}

ion-icon {
  pointer-events: none;
}

address {
  font-style: normal;
}

html {
  font-family: var(--ff-spartan);
  font-size: 10px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--white);
  font-size: var(--fs-5);
  color: var(--cadet-gray);
}

/*-----------------------------------*\
  #REUSED STYLE
\*-----------------------------------*/

.container {
  padding-inline: 15px;
}

p {
  color: black;
}

.grid-list {
  display: grid;
  gap: 25px;
}

.headline-md {
  padding: 20px 0;
  font-size: 4rem;
  font-weight: 700;
  font-family: "Bebas Neue", sans-serif;
  line-height: 1.3;
  color: var(--main-red);
  display: flex;
}

.btn {
  background-color: var(--main-red);
  color: #fff;
  font-weight: 700;
  max-width: max-content;
  padding: var(--padding, 12px 28px);
}

.w-100 {
  width: 100%;
}

.link {
  padding-bottom: 20px;
  font-weight: 700;
  color: rgb(255, 255, 255);
  text-transform: uppercase;
}

.link:hover {
  color: var(--main-red);
}

.btn-secondary {
  border-radius: 50px;
}

.btn-primary {
  border-radius: var(--radius-6);
}

.h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 3em;
  font-weight: 900;
}

.h2,
.h3 {
  color: var(--oxford-blue);
  line-height: 1.5;
}

.h2 {
  font-size: var(--fs-2);
  font-weight: var(--fw-500);
}

.h3 {
  font-size: var(--fs-3);
  font-weight: var(--fw-500);
}

.section {
  padding-block: 90px;
}

.bg {
  width: 100%;
  height: 100%;
  background-image: url("../images/services-bg.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.img-holder {
  aspect-ratio: var(--width) / var(--height);
  background-color: var(--gainsboro);
}

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-title {
  color: var(--oxford-blue);
}

.section-text {
  line-height: 1.6;
}

.section-text-1 {
  line-height: 1.6;
}

/*-----------------------------------*\
  #HEADER
\*-----------------------------------*/

.header {
  background-color: var(--white);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding-block: 15px;
  z-index: 4;
}

.header.active {
  box-shadow: var(--shadow-1);
}

.header > .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.logo {
  font-size: 2.2rem;
  font-weight: var(--fw-600);
  color: var(--black);
}

.logo ion-icon {
  display: inline-block;
  color: var(--sea-green);
  --ionicon-stroke-width: 50px;
}

.nav-toggle-btn {
  font-size: 35px;
  color: var(--oxford-blue);
}

.nav-toggle-btn ion-icon {
  --ionicon-stroke-width: 30px;
}

.nav-toggle-btn.active .menu-icon,
.nav-toggle-btn .close-icon {
  display: none;
}

.nav-toggle-btn .menu-icon,
.nav-toggle-btn.active .close-icon {
  display: block;
}

.header .btn {
  margin-inline-start: auto;
}

.navbar {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  background-color: var(--white);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: 0.25s var(--cubic-out);
}

.navbar.active {
  max-height: 260px;
  visibility: visible;
  box-shadow: var(--shadow-1);
  transition-duration: 0.5s;
}

.navbar-list {
  margin-block: 10px;
  opacity: 0;
  transition: var(--transition);
}

.navbar.active .navbar-list {
  opacity: 1;
}

.navbar-link {
  color: black;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 12px 25px;
}

.navbar-link:is(:hover, :focus) {
  color: var(--main-red);
}

/*-----------------------------------*\
  #HERO
\*-----------------------------------*/

.article {
  position: relative;
}

.hero {
  padding-block-start: 80px;
}

.hero-bg {
  background-image: url("../images/hero-bg-1.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-16);
  overflow: hidden;
}

.hero-content {
  background-color: var(--oxford-blue_60);
  padding-block: 180px;
  padding-inline: 40px;
  display: grid;
  grid-template-columns: 1fr;
  place-content: center;
  text-align: center;
}

.hero-title {
  max-width: 16ch;
  margin-inline: auto;
  color: var(--white);
  line-height: 1;
  margin-block-end: 20px;
}

.hero-title .span {
  display: inline-block;
  color: var(--main-red);
}

.hero-text {
  color: var(--white_70);
  font-size: var(--fs-3);
  line-height: 1.4;
  padding-bottom: 20px;
}

.btn-outline {
  color: #fff;
  border-radius: 10px;
  max-width: max-content;
  margin-inline: auto;
  font-size: var(--fs-9);
  font-weight: 600;
  text-transform: uppercase;
  border: 2px solid var(--white);
  padding: 8px 20px;
  transition: var(--transition);
}

.btn-outline:is(:hover, :focus) {
  background-color: var(--main-red);
  border-color: var(--main-red);
}

.hero-form-wrapper {
  background-color: var(--white);
  margin-block-start: -100px;
  width: calc(100% - 10px);
  margin-inline: auto;
  border-radius: var(--radius-16);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}

.form-tab {
  padding: 16px;
  border-block-end: 1px solid var(--gainsboro);
  display: flex;
  justify-content: center;
}

.tab-btn {
  padding: 12px 24px;
  color: var(--oxford-blue);
  font-weight: var(--fw-500);
  border-radius: var(--radius-6);
  transition: var(--transition);
}

.tab-btn:is(:hover, :focus) {
  color: var(--main-red);
}

.tab-btn.active {
  color: var(--white);
  background-color: var(--main-red);
}

.hero-form {
  display: grid;
  gap: 25px;
  padding: 25px;
}

.hero-form .input-wrapper {
  position: relative;
}

.hero-form :is(.input-label, .input-field) {
  color: var(--oxford-blue);
}

.hero-form .input-label {
  font-weight: var(--fw-500);
  margin-block-end: 10px;
}

.hero-form :is(.input-field, .dropdown-list) {
  min-height: 40px;
  border: 1px solid var(--gainsboro);
  border-radius: var(--radius-4);
  outline: none;
  transition: var(--transition);
}

.hero-form :is(.input-field, .dropdown-list):focus {
  border-color: var(--main-red);
}

.hero-form .input-wrapper ion-icon {
  position: absolute;
  top: 50%;
  transform: translateY(20%);
  left: 15px;
  color: var(--oxford-blue);
  --ionicon-stroke-width: 40px;
}

.hero-form .input-field {
  padding-inline: 45px 15px;
}

.hero-form .input-field::placeholder {
  color: var(--manatee);
}

.hero-form .dropdown-list {
  padding-inline: 15px;
}

.hero-form .btn {
  max-width: 100%;
}

/*-----------------------------------*\
  #ABOUT
\*-----------------------------------*/

.about {
  padding-block-end: 0;
}

.about .container {
  display: grid;
  gap: 20px;
}

.about .section-text {
  margin-block: 20px 35px;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 15px;
  padding-top: 35px;
}

.tab-btn {
  background-color: hsl(187, 25%, 94%);
  color: rgb(0, 0, 0);
  padding: 7px 30px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1.6rem;
}

.tab-btn.active {
  background-color: var(--main-red);
  color: var(--white);
}

.tab-text {
  color: hsl(0, 0%, 0%);
  margin-block: 35px;
  line-height: 1.6;
}

.about-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-block-end: 10px;
}

.about-item ion-icon {
  color: var(--main-red);
  font-size: 2rem;
  flex-shrink: 0;
}

/*-----------------------------------*\
  #INSTRUCTION
\*-----------------------------------*/

.instruction .section-title {
  margin-block-end: 15px;
}

.card-text {
  padding-bottom: 20px;
  color: rgb(0, 0, 0);
  line-height: 1.6;
}

.instruction-list {
  display: grid;
  gap: 30px;
  margin-block-start: 50px;
}

.instruction-card {
  text-align: center;
}

.instruction-card .card-banner {
  transition: 0.5s ease;
}

.instruction-card:hover .card-banner {
  transform: rotateY(1turn);
}

.instruction-card .img {
  margin-inline: auto;
  margin-block-end: 12px;
}

.instruction-card .card-subtitle {
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
}

.instruction-card .card-title {
  font-size: 2rem;
  margin-block: 5px 15px;
}

.instruction-card .card-text {
  padding-inline: 20px;
}

/*-----------------------------------*\
  #CHAPTERS
\*-----------------------------------*/

.chapters .container {
  padding-top: 100px;
}

.chapter-card {
  height: 100%;
  background-color: #fff7f7;
  padding: 25px;
  border-radius: 5px;
  box-shadow: 2px 0 15px 5px hsla(231, 94%, 7%, 0.06);
  transition: 0.5s ease;
}

.chapter-card:is(:hover, :focus-within) {
  transform: translateY(-10px);
}

.chapter-card .card-title {
  margin-block-end: 15px;
}

/*-----------------------------------*\
  #CONTACT
\*-----------------------------------*/

.contact {
  padding-block: 90px;
  background: hsl(240, 100%, 99%);
}

.contact .section-title {
  margin-bottom: 15px;
}

.contact .section-text {
  margin-bottom: 60px;
}

.contact-form {
  margin-bottom: 50px;
}

.input-wrapper {
  margin-bottom: 20px;
}

.contact label {
  color: hsl(245, 17%, 27%);
  font-weight: 500;
  margin-bottom: 10px;
}

.contact .input-field {
  background: transparent;
  color: hsl(245, 17%, 27%);
  font-size: 14px;
  padding: 10px 15px;
  border: 1px solid hsla(244, 17%, 67%, 0.3);
  border-radius: 4px;
}

.contact .input-field:focus {
  outline: none;
  background: hsl(228, 50%, 96%);
}

.contact .input-field::placeholder {
  color: hsl(244, 17%, 61%);
}

textarea.input-field {
  margin-bottom: 20px;
  resize: vertical;
  min-height: 50px;
  height: 100px;
  max-height: 200px;
}

.contact .btn-primary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.contact .btn-primary ion-icon {
  --ionicon-stroke-width: 40px;
}

.contact-list li:not(:last-child) {
  margin-bottom: 25px;
}

.contact-link {
  color: hsl(244, 17%, 61%);
  font-weight: 500;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 5px;
}

.contact-link ion-icon {
  font-size: 20px;
  --ionicon-stroke-width: 30px;
}

.contact-link :is(span, address) {
  width: calc(100% - 25px);
}

.contact-link address {
  font-style: normal;
}

/*-----------------------------------*\
  #FOOTER
\*-----------------------------------*/

.footer-text {
  line-height: 1.6;
}

.footer-top {
  padding-block: 60px;
}

.footer-top .container {
  display: grid;
  gap: 30px;
}

.footer-list-title {
  color: var(--mint-cream);
  font-weight: var(--fw-600);
  letter-spacing: 1px;
  margin-block-end: 25px;
}

.footer-list li:not(:last-child) {
  margin-block-end: 15px;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.footer-link ion-icon {
  font-size: 14px;
}

.footer-link:is(:hover, :focus) {
  opacity: 0.8;
}

.footer-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-item:nth-child(2) {
  align-items: flex-start;
}

.footer-list .footer-item:not(:last-child) {
  margin-block-end: 25px;
}

.footer-item ion-icon {
  color: var(--green-pigment);
  font-size: 22px;
  --ionicon-stroke-width: 40px;
}

.address {
  line-height: 1.5;
}

.address-link {
  color: var(--green-pigment);
  margin-block-start: 10px;
  transition: var(--transition);
}

.address-link:is(:hover, :focus) {
  opacity: 0.8;
}

.footer-bottom {
  background-color: var(--main-red);
  padding-block: 30px;
  text-align: center;
}

.copyright {
  line-height: 1.6;
  margin-block-end: 30px;
  color: #fff;
}

.copyright-link {
  display: inline-block;
  color: #fff;
}

.social-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.social-link {
  padding: 11px;
  background-color: hsla(0, 0%, 100%, 0.2);
  color: var(--white);
  font-size: 18px;
  border-radius: 50%;
}

.social-link:is(:hover, :focus) {
  background-color: hsla(0, 0%, 1%, 0.2);
  border-color: var(--green-pigment);
  color: var(--white);
}

/*-----------------------------------*\
  #BACK TO TOP
\*-----------------------------------*/

.back-top-btn {
  position: fixed;
  bottom: 10px;
  right: 20px;
  background-color: var(--main-red);
  color: var(--white);
  font-size: 14px;
  padding: 12px;
  border-radius: 50px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 4;
}

.back-top-btn.active {
  visibility: visible;
  opacity: 1;
  transform: translateY(-10px);
}

/*-----------------------------------*\
  #MEDIA QUERIES
\*-----------------------------------*/

/**
 * responsive for larger than 640px screen
 */

@media (min-width: 640px) {
  /**
   * REUSED STYLE
   */

  .container {
    max-width: 640px;
    width: 100%;
    margin-inline: auto;
  }

  /**
   * HERO
   */

  .hero .container {
    max-width: unset;
  }

  .btn-outline {
    margin-inline: 0;
  }

  .hero-form-wrapper {
    max-width: 600px;
    margin-inline: auto;
    background-color: unset;
  }

  .hero .form-tab,
  .hero-form {
    background-color: var(--white);
  }

  .hero .form-tab {
    max-width: max-content;
    border-top-left-radius: var(--radius-16);
    border-top-right-radius: var(--radius-16);
  }

  .hero-form {
    border-top-right-radius: var(--radius-16);
  }

  /** 
   * NEWSLETTER
   */

  .newsletter {
    width: calc(100% - 130px);
  }

  /**
   * FOOTER
   */
}

/**
 * responsive for larger than 768px screen
 */

@media (min-width: 768px) {
  /**
   * CUSTOM PROPERTY
   */

  :root {
    /**
     * typography
     */

    --fs-2: 3rem;
  }

  /**
   * REUSED STYLE
   */

  .container,
  .hero-form-wrapper {
    max-width: 700px;
  }

  .section-text {
    max-width: 55ch;
    margin-inline: auto;
  }

  .section-text-1 {
    max-width: 90ch;
  }

  .grid-list {
    grid-template-columns: 1fr 1fr;
  }

  /**
   * HERO
   */

  .hero-content {
    text-align: left;
    padding-inline: calc(50% - 350px);
  }

  .hero-title {
    max-width: 25ch;
    margin-inline: 0;
  }
  .hero-title {
    font-size: 3.5em;
  }

  .hero-text {
    max-width: 50ch;
  }

  .hero-form {
    grid-template-columns: 1fr 1fr;
  }

  .btn-outline {
    font-size: var(--fs-7);
    padding: 12px 30px;
  }

  /**
   * ABOUT
   */

  .about-banner {
    max-width: max-content;
    margin-inline: auto;
  }

  /**
   * CHAPTERS, PRICING
   */

  :is(.chapters, .pricing) .grid-list li:last-child {
    grid-column: 1 / 3;
    max-width: calc(50% - 12.5px);
    width: 100%;
    margin-inline: auto;
  }

  /**
   * INSTRUCTION
   */

  .instruction {
    overflow: hidden;
  }

  .instruction .section-text {
    max-width: 80ch;
    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;
  }

  /**
   * CONTACT
   */

  .contact-form .wrapper-flex {
    display: flex;
    gap: 30px;
  }

  .wrapper-flex .input-wrapper {
    width: 50%;
  }

  /**
   * FOOTER
   */

  .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) {
  /**
   * CUSTOM PROPERTY
   */

  :root {
    /**
     * typography
     */

    --fs-1: 4.8rem;

    /**
     * spacing
     */

    --section-padding: 40px;
  }

  /**
   * REUSED STYLE
   */

  .container,
  .hero-form-wrapper {
    max-width: 900px;
  }

  .grid-list {
    grid-template-columns: repeat(3, 1fr);
  }

  /**
   * HEADER
   */

  .header > .container {
    gap: 30px;
  }

  .nav-toggle-btn {
    display: none;
  }

  .navbar,
  .navbar.active {
    all: unset;
    margin-inline-start: auto;
  }

  .navbar-list {
    margin-block: 0;
    opacity: 1;
    display: flex;
  }

  .navbar-link {
    padding-inline: 20px;
  }

  .header .btn {
    margin-inline-start: 0;
  }

  /**
   * HERO
   */

  .hero-content {
    padding-inline: calc(50% - 450px);
  }

  .hero-form {
    grid-template-columns: repeat(4, 1fr);
  }

  /**
   * ABOUT
   */

  .about .container {
    grid-template-columns: 1fr 0.8fr;
    align-items: start;
  }

  .about-content {
    padding-block-end: var(--section-padding);
  }

  .about-banner {
    margin-inline-end: -80px;
  }

  /**
   * CHAPTER, PRICING
   */

  :is(.chapters, .pricing) .grid-list li:last-child {
    all: unset;
  }

  /**
   * NEWSLETTER
   */

  .newsletter {
    width: calc(100% - 220px);
  }

  /**
   * CONTACT
   */

  .contact-wrapper {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 80px;
    align-items: center;
  }

  .contact-form {
    margin-bottom: 0;
  }

  /**
   * FOOTER
   */

  .footer-brand {
    grid-column: auto;
  }

  .footer-top .container {
    grid-template-columns: 1fr 0.5fr 0.6fr 0.7fr;
  }
}

/**
 * responsive for larger than 1200px screen
 */

@media (min-width: 1200px) {
  /**
   * REUSED STYLE
   */

  .container,
  .hero-form-wrapper {
    max-width: 1120px;
  }

  /**
   * HERO
   */

  .hero-content {
    padding-inline: calc(50% - 560px);
  }

  /**
   * ABOUT
   */

  .about .section-text {
    max-width: unset;
  }

  /**
   * 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;
  }

  /**
   * FOOTER
   */
}
