/* === MAIN === */
body {
   font-family: 'Lato', sans-serif;
   font-weight: 300;
   line-height: 1.5;
   font-size: 18px;
}
h1,
h2,
h3,
h4 {
   font-weight: 700;
}
h3 {
   color: #539da7;
   font-size: 40px;
   margin-bottom: 20px;
}
H4 {
   font-size: 24px;
}
section {
   padding: 60px 0;
}
.bold {
   font-weight: 400;
}
.container {
   max-width: 1100px;
   margin: 0 auto;
   text-align: center;
   position: relative;
   z-index: 1;
}
.container p,
.modal p,
.modal ul,
#locations ul {
   color: rgba(0,0,0,.8);
   margin-bottom: 20px;
}
.skew_top,
.skew_bottom {
   width: 100%;
   height: 100px;
   background: white;
   transform: skewY(3deg) translateY(50%);
   position: absolute;
   z-index: 1;
}
.skew_top {
   top: -100px;
}
.skew_bottom {
   bottom: 0;
}

/* === NAVIGATION === */
nav {
   position: fixed;
   width: 100%;
   z-index: 3;
   display: flex;
   justify-content: space-between;
   transition: background-color .4s ease-in-out;
}
nav ul {
   display: flex;
}
nav li {
   padding: 20px 10px;
   transition: padding .4s ease-in-out;
}
nav a {
   color: white;
   text-decoration: none;
   font-style: italic;
   padding: 10px;
   display: inline-block;
   position: relative;
}
nav a:after {
   content: '';
   height: 1px;
   width: 0;
   position: absolute;
   bottom: 10px;
   left: 50%;
   transform: translateX(-50%);
   background: white;
   box-sizing: border-box;
   transition: width .2s ease-in-out;
}
nav a:hover:after {
   width: calc(100% - 20px);
}
nav li:last-child {
   margin-right: 10px;
}
nav li:last-child a {
   color: #539da7;
   background: rgba(255,255,255,.7);
   border-radius: 4px;
   transition: background-color .3s ease-in-out;
}
nav li:last-child a:after {
   display: none;
}
nav li:last-child a:hover {
   background-color: rgba(255,255,255,1);
}
nav.scrolled {
   background-color: #539da7;
}
nav.no_background {
   background-color: transparent;
}
nav.scrolled li {
   padding: 10px;
}
.nav_logo {
   display: flex;
   opacity: 0;
   transition: opacity .4s ease-in-out;
}
.nav_logo.scrolled {
   opacity: 1;
}
.nav_logo h1 {
   color: white;
   font-size: 30px;
   line-height: 87px;
   transition: line-height .4s ease-in-out;
}
.nav_logo.scrolled h1 {
   line-height: 67px;
}
.nav_logo figure {
   padding: 10px 0 10px 20px;
   width: 70px;
   transition: width .4s ease-in-out;
}
.nav_logo.scrolled figure {
   width: 55px;
}
.nav_logo img {
   height: 100%;
}

/* === HEADER === */
header {
   width: 100vw;
   height: 100vh;
   overflow: hidden;
   position: relative;
}
.header_background {
   position: absolute;
   top: -10%;
   left: -10%;
   width: 120%;
   height: 120%;
   background: url('../images/header_background.jpg') center center no-repeat;
   background-size: cover;
   transform: scale(.95);
   transition: transform 10s ease-in-out;
}
.header_background.zoom {
   transform: scale(1);
}
.gradient {
   content: '';
   position: absolute;
   top: 0;
   right: 0;
   bottom: 0;
   left: 0;
   background: linear-gradient(45deg, #13547a 0%,#80d0c7 100%);
   opacity: .7;
}
.intro {
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   text-align: center;
   color: white;
}
.intro .logo {
   transform: scale(2.5);
   opacity: 0;
   margin-bottom: 25px;
   transition: opacity .4s ease-in-out, transform .4s ease-in-out;
}
.intro .logo.active {
   transform: scale(3);
   opacity: 1;
}
.intro_title {
   font-size: 40px;
   transform: translateY(-20%);
   opacity: 0;
   transition: opacity .4s ease-in-out, transform .4s ease-in-out;
   white-space: nowrap;
}
.intro_subtitle {
   font-style: italic;
   font-weight: 300;
   font-size: 22px;
   transform: translateY(-20%);
   opacity: 0;
   transition: opacity .4s ease-in-out, transform .4s ease-in-out;
}
.intro h1.active, .intro h2.active, .intro p.active {
   opacity: 1;
   transform: translateY(0);
}
.skew_top,
.skew_bottom {
   width: 100%;
   height: 100px;
   background: white;
   transform: skewY(3deg) translateY(50%);
   position: absolute;
}

/* === CALL TO ACTION === */
.call_to_action {
   padding: 100px 0;
   position: relative;
   background: linear-gradient(45deg, #13547a 0%,#80d0c7 100%);
}
.call_to_action h3,
.call_to_action p {
   color: white;
}

/* === TEACHER === */
#teacher {
   padding: 150px 0;
   position: relative;
   background: url('../images/kovandiemen.jpg') center center no-repeat;
   background-size: cover;
}
#teacher .container>div {
   width: 50%;
   margin: 0;
}
#teacher h3,
#teacher p {
   color: white;
}
#teacher .container {
   text-align: left;
   display: flex;
   justify-content: space-between;
}

/* === RATES === */
#rates {
   padding: 80px 0;
}
#rates table {
   width: 100%;
   color: rgba(0,0,0,.8);
   margin-bottom: 20px;
}
#rates th,
#rates td {
   width: 25%;
   text-align: left;
   padding: 12px;
}
#rates th {
   background: #539da7;
   color: white;
}
#rates tr:nth-child(odd) {
   background: rgba(0,0,0,.05);
}
#rates span {
   display: block;
   font-size: 12px;
   text-align: left;
}

/* === LOCATIONS === */
#locations {
   padding-bottom: 80px;
}
#locations .locations-wrapper {
   display: flex;
}
#locations .location {
   width: 50%;
}
#locations .location:first-child {
   margin-right: 20px;
}
#locations .location:last-child {
   margin-left: 20px;
}
#locations .location a {
   display: block;
   position: relative;
}
#locations .location a .gradient {
   opacity: 0;
   transition: opacity .2s ease-in-out;
}
#locations .location a:hover .gradient {
   opacity: 0.5;
}
#locations .location img {
   width: 100%;
}
#locations ul span {
   color: rgba(0,0,0,.6);
}

/* === CONTACT/FOOTER === */
#contact {
   background: linear-gradient(45deg, rgb(19,84,122) 0%,rgb(128,208,199) 100%);
   color: white;
   position: relative;
   padding-top: 100px;
}
#contact h3,
#contact p {
   color: white;
}
footer {
   margin-top: 80px;
   font-size: 14px;
   border-top: 1px solid rgba(255,255,255,.2);
   padding-top: 20px;
}
#contact footer p {
   margin: 0;
   opacity: .8;
}
#contact footer a {
   color: white;
   text-decoration: none;
   display: inline-block;
   position: relative;
}
#contact footer a:after {
   content: '';
   height: 1px;
   width: 0;
   position: absolute;
   bottom: 0;
   left: 50%;
   transform: translateX(-50%);
   background: white;
   box-sizing: border-box;
   transition: width .2s ease-in-out;
}
#contact footer a:hover:after {
   width: 100%;
}

/* === BUTTONS === */
.btn {
   color: #539da7;
   background: white;
   border-radius: 4px;
   transition: opacity .3s ease-in-out;
   padding: 10px;
   text-decoration: none;
   opacity: .7;
   display: inline-block;
   position: relative;
}
.btn:hover {
   opacity: 1;
}
.btn_email,
.btn_phone {
   position: relative;
   text-decoration: none;
   color: white;
   padding-top: 5px;
   padding-bottom: 5px;
   transition: opacity .4s ease-in-out;
   display: inline-block;
}
.btn_email {
   padding-left: 23px;
}
.btn_phone {
   margin-right: 20px;
   padding-left: 19px;
   font-size: 17px;
   line-height: 27px;
}
.btn_email:before,
.btn_phone:before {
   content: '';
   width: 18px;
   height: 100%;
   position: absolute;
   top: 0;
   left: 0;
}
.btn_email:before {
   background: url('../images/email.svg') center center no-repeat;
   background-size: 16px;
   top: 1px;
}
.btn_phone:before {
   background: url('../images/phone.svg') center center no-repeat;
   background-size: 18px;
   left: -2px;
}
.btn_email:after,
.btn_phone:after {
   content: '';
   position: absolute;
   bottom: 0;
   left: 50%;
   transform: translateX(-50%);
   width: 0;
   height: 1px;
   background: white;
   transition: width .4s ease-in-out;
}
.btn_email:hover:after,
.btn_phone:hover:after {
   width: 100%;
}

.modal .btn_email,
.modal .btn_phone {
   color: #539da7;
}
.modal .btn_email:after,
.modal .btn_phone:after {
   background: #539da7;
}
.modal .btn_email:before {
   background: url('../images/email_green.svg') center center no-repeat;
   background-size: 16px;
}
.modal .btn_phone:before {
   background: url('../images/phone_green.svg') center center no-repeat;
   background-size: 18px;
}

/* === MODAL === */
.modal {
   position: fixed;
   top: 0;
   right: 0;
   bottom: 0;
   left: 0;
   background: linear-gradient(45deg, rgba(19,84,122,.8) 0%,rgba(128,208,199,.8) 100%);
   display: flex;
   text-align: center;
   opacity: 0;
   transition: opacity .4s ease-in-out;
   z-index: 4;
   pointer-events: none;
   padding: 20px;
}
.modal.privacy {
   text-align: left;
}
.modal.privacy ul {
   list-style: disc outside none;
   padding-left: 20px;
}
.modal_content {
   background: white;
   margin: auto;
   padding: 20px;
   max-width: 800px;
   max-height: calc(100% - 40px);
   border-radius: 4px;
   transform: scale(.9);
   overflow-y: scroll;
   opacity: 0;
   transition: opacity .2s ease-in-out, transform .4s ease-in-out;
}
.modal.active {
   opacity: 1;
   pointer-events: auto;
}
.modal.active .modal_content {
   transform: scale(1);
   opacity: 1;
}
.close_modal {
   width: 20px;
   height: 20px;
   background: url('../images/close.svg') center center no-repeat;
   background-size: 20px;
   position: absolute;
   top: 20px;
   right: 20px;
   transition: transform .2s ease-in-out;
}
.close_modal:hover {
   cursor: pointer;
   transform: scale(1.2);
}

/* === MEDIA QUERIES === */
@media (max-width: 1200px) {
   nav li {
      padding: 20px 5px;
   }
   .nav_logo h1 {
      font-size: 24px;
   }
   section .container {
      padding: 0 40px;
   }
}

@media (max-width: 1100px) {
   nav ul {
      display: block;
      position: absolute;
      background: linear-gradient(45deg, rgba(19,84,122,.95) 0%,rgba(128,208,199,.95) 100%);
      height: 100vh;
      width: 100%;
      top: 0;
      right: 0;
      left: 0;
      bottom: 0;
      transition: opacity .4s ease-in-out;
      z-index: -1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
   }
   nav ul.open {
      opacity: 1;
      pointer-events: auto;
   }
   nav ul li {
      text-align: center;
   }
   nav li, nav.scrolled li {
      padding: 10px 30px;
   }
   nav li:last-child {
      margin-right: 0;
   }
   nav.no_background .mobile_menu:hover {
      transform: scale(1.2);
   }
   .mobile_menu {
      box-sizing: border-box;
      margin: 25px 20px 0 0;
      position: relative;
      width: 30px;
      height: 19px;
      transition: transform .2s ease-in-out;
   }
   .mobile_menu:hover {
      cursor: pointer;
   }
   .mobile_menu span {
      width: 30px;
      height: 2px;
      background: white;
      transition: transform .4s ease-in-out, width .4s ease-in-out;
      position: absolute;
      right: 0;
   }
   .mobile_menu span:first-child {
      top: 0;
      animation: close_menu_first_bar .4s forwards;
   }
   .mobile_menu span:nth-child(2) {
      top: 8px;
      transition: opacity .2s ease-in-out;
   }
   .mobile_menu span:last-child {
      top: 16px;
      animation: close_menu_last_bar .4s forwards;
   }
   .mobile_menu.active span:first-child {
      animation: open_menu_first_bar .4s forwards;
   }
   .mobile_menu.active span:nth-child(2) {
      opacity: 0;
   }
   .mobile_menu.active span:last-child {
      animation: open_menu_last_bar .4s forwards;
   }
}

@media (max-width: 800px) {
   section .container {
      padding: 0 20px;
   }
   #teacher .container {
      flex-direction: column;
   }
   #teacher .container>div {
      width: 100%;
      text-align: center;
   }
}

@media (max-width: 500px) {
   .intro .logo {
      transform: scale(2);
      margin-bottom: 16px;
   }
   .intro .logo.active {
      transform: scale(2.5);
   }
   .intro_title {
      font-size: 32px;
      line-height: 1.2;
      margin-bottom: 5px;
      white-space: normal;
   }
   .intro_subtitle {
      font-size: 20px;
   }
   .intro_text {
      font-size: 16px;
      margin: 20px auto 10px;
   }
   .btn_email,
   .btn_phone {
      font-size: 16px;
      padding-top: 0;
      padding-bottom: 0;
   }
   .btn_email:before,
   .btn_phone:before {
      width: 16px;
      background-size: 16px;
   }
   .btn_phone {
      margin: 0;
   }
   .nav_logo figure {
      transform: scale(.8);
      padding: 10px 0 10px 10px;
   }
   .nav_logo h1 {
      font-size: 14px;
   }
}

@media (max-height: 500px) {
   nav li,
   nav.scrolled li {
      padding: 5px;
   }
}

@media (min-width: 1921px) {
   .skew_top,
   .skew_bottom {
      display: none;
   }
}

/* === CSS ANIMATIONS === */
@keyframes open_menu_first_bar {
   50%  {top: 8px; transform: rotate(0);}
   100% {top: 8px; transform: rotate(45deg); height: 1px;}
}
@keyframes open_menu_last_bar {
   50%  {top: 8px; transform: rotate(0);}
   100% {top: 8px; transform: rotate(-45deg); height: 1px;}
}

@keyframes close_menu_first_bar {
   0%   {top: 8px; transform: rotate(45deg); height: 1px;}
   50%  {top: 8px; transform: rotate(0);}
   100% {top: 0; transform: rotate(0);}
}
@keyframes close_menu_last_bar {
   0%   {top: 8px; transform: rotate(-45deg); height: 1px;}
   50%  {top: 8px; transform: rotate(0);}
   100% {top: 16px; transform: rotate(0);}
}
