/*
 * Medvolution theme for the landing pages (/es/ and /en/).
 * Written for this project. Covers only the selectors used by the landing
 * markup. Loaded after bootstrap.min.css and slick.css, before site.css.
 */

/* Base */

html,
body,
.page-container {
    height: 100%;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 19px;
    font-weight: 300;
    color: white;
    line-height: 1.5;
}

a {
    color: #9F6;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #3CF;
}

p {
    line-height: 1.7;
}

h2 {
    font-size: 1.8rem;
}

.page-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-left: 30px;
    padding-right: 30px;
}

.container-fluid {
    max-width: 1860px;
}

.content-pad {
    padding: 40px 30px;
}

.tm-bg-dark {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Navigation */

#tm-nav {
    z-index: 1000;
}

.navbar a {
    color: white;
}

.navbar-brand {
    font-size: 2.4rem;
}

.navbar {
    margin-top: 15px;
}

.navbar .navbar-nav .nav-item {
    margin-left: 15px;
    margin-right: 15px;
}

.navbar .navbar-nav .nav-item:last-child {
    margin-right: 0;
}

.navbar .navbar-nav .nav-item .nav-link {
    font-size: 1.5rem;
    padding: 15px 65px;
    border-bottom: 1px solid white;
}

.nav-item {
    position: relative;
}

.navbar .navbar-nav .nav-item.selected .nav-link,
.navbar .navbar-nav .nav-item .nav-link:hover {
    color: #99FF66;
    border-bottom: 1px solid #99FF66;
}

.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 1);
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 255, 255, 0.8)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

@media (min-width: 992px) {
    .navbar-expand-lg .navbar-collapse {
        justify-content: flex-end;
    }
}

@media (max-width: 1200px) {
    .navbar .navbar-nav .nav-item .nav-link {
        padding: 15px 45px;
    }
}

@media (max-width: 1024px) {
    .navbar .navbar-nav .nav-item .nav-link {
        font-size: 1.2rem;
    }
}

/* Desktop widths: narrower link padding so the language link and HYDRA both
   fit in the navbar. Below 993px the menu is collapsed and is not affected. */
@media (min-width: 993px) and (max-width: 1440px) {
    .navbar .navbar-nav .nav-item .nav-link {
        padding: 15px 30px;
    }
}

@media (max-width: 992px) {
    .navbar {
        margin-top: 0;
        position: relative;
    }

    .navbar-collapse {
        position: absolute;
        top: 63px;
        right: 0;
        background: rgba(0, 0, 0, 0.9);
        padding: 15px;
        border-radius: 8px;
    }

    .navbar .navbar-nav .nav-item {
        margin-bottom: 20px;
    }

    .page-right {
        margin-left: auto;
        margin-right: auto;
    }

    .cd-hero-slider {
        padding: 10px 0;
    }
}

/* Hero slider (sections) */

.cd-hero-slider {
    padding: 10px 0;
}

.cd-hero-slider li {
    list-style: none;
}

.page-width-1 {
    max-width: 810px;
}

.page-width-2 {
    max-width: 912px;
}

.page-right {
    margin-right: 100px;
    margin-left: auto;
}

/* Home intro */

.intro-left {
    margin-right: 20px;
    padding: 30px 40px;
    max-width: 505px;
}

/* The content block keeps its full height, so a short window scrolls it
   instead of letting the footer overlap the last section. */
.tm-content-container {
    flex-shrink: 0;
}

.tm-footer {
    margin-top: 4rem;
    padding-top: 25px;
    padding-bottom: 25px;
    width: 100%;
    display: flex;
    justify-content: space-between;
}

@media (max-width: 834px) {
    .intro-left {
        width: 65%;
    }
}

@media (max-width: 600px) {
    .intro-left {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
        max-width: none;
    }

    .intro-container {
        flex-direction: column;
    }
}

/* Projects gallery (Slick) */

.gallery-container {
    max-width: 1300px;
}

.slick-dots {
    bottom: -80px;
}

.gallery-slider figure {
    position: relative;
    float: left;
    overflow: hidden;
    margin: 0 10px;
    max-width: 240px;
    height: auto;
    background: #3085a3;
    text-align: center;
    cursor: pointer;
}

.gallery-slider figure img {
    position: relative;
    display: block;
    min-height: 100%;
    max-width: 100%;
}

.gallery-slider figure figcaption {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1em;
    color: #fff;
    text-transform: uppercase;
    font-size: 1.25em;
    backface-visibility: hidden;
}

.gallery-slider figure figcaption::before,
.gallery-slider figure figcaption::after {
    pointer-events: none;
}

.gallery-slider figure p {
    margin: 0;
    letter-spacing: 1px;
    font-size: 68.5%;
}

.gallery-slider .slick-dots li {
    background-color: #ffffff;
    width: 20px;
    height: 20px;
    border-radius: 100%;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.gallery-slider .slick-dots li.slick-active,
.gallery-slider .slick-dots li:hover {
    background-color: #3CCDFF;
}

/* Project card hover effect ("julia") */

figure.effect-julia {
    background: #2f3238;
}

figure.effect-julia img {
    transition: opacity 1s, transform 1s;
    backface-visibility: hidden;
}

figure.effect-julia figcaption {
    display: flex;
    align-items: center;
}

figure.effect-julia p {
    display: inline-block;
    margin: 0 0 0.25em;
    padding: 0.4em 1em;
    background: rgba(255, 255, 255, 0.9);
    color: #2f3238;
    text-transform: none;
    font-weight: 500;
    font-size: 75%;
    transition: opacity 0.35s, transform 0.35s;
    transform: translate3d(-360px, 0, 0);
}

figure.effect-julia p:first-child {
    transition-delay: 0.15s;
}

figure.effect-julia p:nth-of-type(2) {
    transition-delay: 0.1s;
}

figure.effect-julia p:nth-of-type(3) {
    transition-delay: 0.05s;
}

figure.effect-julia:hover p:first-child {
    transition-delay: 0s;
}

figure.effect-julia:hover p:nth-of-type(2) {
    transition-delay: 0.05s;
}

figure.effect-julia:hover p:nth-of-type(3) {
    transition-delay: 0.1s;
}

figure.effect-julia:hover img {
    opacity: 0.4;
    transform: scale3d(1.1, 1.1, 1);
}

figure.effect-julia:hover p {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Page loader: covers the page until load, then both halves slide away */

#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
}

#loader {
    display: block;
    position: relative;
    left: 50%;
    top: 50%;
    width: 150px;
    height: 150px;
    margin: -75px 0 0 -75px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #3498db;
    animation: spin 2s linear infinite;
    z-index: 2001;
}

#loader:before,
#loader:after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 3px solid transparent;
}

#loader:before {
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-top-color: #e74c3c;
    animation: spin 3s linear infinite;
}

#loader:after {
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border-top-color: #f9c922;
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#loader-wrapper .loader-section {
    position: fixed;
    top: 0;
    width: 51%;
    height: 100%;
    background: #222222;
    z-index: 2000;
    transform: translateX(0);
}

#loader-wrapper .loader-section.section-left {
    left: 0;
}

#loader-wrapper .loader-section.section-right {
    right: 0;
}

.loaded #loader-wrapper .loader-section.section-left {
    transform: translateX(-100%);
    transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}

.loaded #loader-wrapper .loader-section.section-right {
    transform: translateX(100%);
    transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}

.loaded #loader {
    opacity: 0;
    transition: all 0.3s ease-out;
}

.loaded #loader-wrapper {
    visibility: hidden;
    transform: translateY(-100%);
    transition: all 0.3s 1s ease-out;
}

.no-js #loader-wrapper {
    display: none;
}

/* Layout safeguards for small screens */

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.page-container {
    overflow-y: auto;
}

@media (max-width: 768px) {
    .gallery-slider figure {
        max-width: 180px;
    }
}
