@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

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

html {
    /* --green: #59c45a; */
    --green: #168018;
    --white: #ffffff;
    --grey: #474747;
    --darkgrey: #3c3c3c;
    --lightgrey: #959595;
    --sectionTitleWidth: 150px;
    --sectionTitleBarWidth: 20px;
    --wrapperWidth: 1920px; /* Mājaslapas maksimālais platums tiek ierobežots uz 1920px. */
    --containerWidth: 1200px;/* Uzreiz jau jāierēķina sānu atstarpes 15 + 1170 + 15, jo uz mobilo vajag nelielas sānu atstarpes konteinerim. Reāli, uz datora ekrāna konteineris ir 1170px. */
    scroll-behavior: smooth;
}
body {
    background: var(--white);
    font-family: 'Roboto', sans-serif;
}
.wrapper {
    max-width: var(--wrapperWidth);
    margin: 0 auto;
    overflow: hidden; /* Lai nekad neparādītos horizontālais scroll, piemēram pie kādiem slide right, slide left efektiem. */
}
.container {
    max-width: var(--containerWidth);
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
}
header .container {
    align-items: center;
}
.msg-success {
    color: var(--green);
    text-align: center;
}
.msg-error {
    color: red;
    text-align: center;
}
.logo {
    text-decoration: none;
    text-transform: uppercase;
    color: var(--green);
    font-size: 28px;
    font-weight: 700;
    display: block;
    padding: 15px 20px;
    border: 2px solid var(--lightgrey);
    position: relative;
}
.logo::after {
    content: "code";
    font-size: 18px;
    font-weight: 400;
    padding: 0px 5px;
    background: var(--white);
    position: absolute;
    top: 51px;
    left: 38px;
    animation: 2s ease-in infinite codeAnimation;
    animation-play-state: paused;
}

.logo:hover::after{
    animation-play-state: running; /* Animācija notiek tikai, kad atkal uzbrauc ar peli */
}
.logo span {
    display: inline-block;
    text-shadow: 0 3px  greenyellow;
    animation: 10s linear infinite flip;
    animation-delay: calc(.5s * var(--i));
}
nav ul {
    list-style: none;
    display: flex;
}
nav a {
    text-decoration: none;
    text-transform: uppercase;
    color: var(--grey);
    display: block; /* Vajadzīgs padding top un bottom */
    padding: 56px 23px;
    font-size: 18px;
    font-weight: 700;
    transition: .3s;
}
nav a:hover {
    color: var(--white);
    background: var(--green);
}

/***** MOBILE NAV *****/
.menu-btn {
    position: relative;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    cursor: pointer;
    transition: all .5s ease-in-out;
    display: none;
}
.menu-btn__burger {
    width: 50px;
    height: 4px;
    background: var(--green);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(255, 101, 47, .2);
    transition: all .5s ease-in-out;
}
.menu-btn__burger::before,
.menu-btn__burger::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 4px;
    background: var(--green);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(255, 101, 47, .2);
    transition: all .5s ease-in-out;
}
.menu-btn__burger::before {
    transform: translateY(-16px);
}
.menu-btn__burger::after {
    transform: translateY(16px);
}
/* ANIMATION */
.menu-btn.open .menu-btn__burger {
    transform: translateX(-50px);
    background: transparent;
    box-shadow: none;
}
.menu-btn.open .menu-btn__burger::before {
    transform: rotate(45deg) translate(35px, -35px);
}
.menu-btn.open .menu-btn__burger::after {
    transform: rotate(-45deg) translate(35px, 35px);
}
/***** END MOBILE NAV *****/

.lang-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding-left: 23px;
}
.lang-icons img {
    cursor: pointer;
    height: 36px;
}
#home {
    min-height: 800px;
    /*rgba(89, 196, 90, 0.73)
    linear-gradient(to bottom, rgba(12, 218, 233, 0.73), rgba(89, 196, 90, 0.73)),

    linear-gradient(to bottom, rgba(255, 137, 98, 0.5), rgba(89, 196, 90, 0.5)),
    */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url(../img/hero-min.jpg) center/cover fixed;
}
.home-container {
    flex-direction: column;
    justify-content: center;
    align-items: center;/* Ar šo vien vertikāli neiecentrējas */
    min-height: inherit; /* Automātiski piešķiras augstums no vecāka */
}

.home-title {
    color: var(--white);
    text-shadow: 0 3px var(--green);
    text-transform: uppercase;
    font-size: 68px;
    margin: 0;
    text-align: center;
}
.home-text {
    color: var(--white);
    max-width: 1000px;
    margin: 50px auto 90px;
    font-size: 22px;
    line-height: 38px;
    text-align: center;
}
.home-link {
    text-decoration: none;
    text-transform: uppercase;
    background: var(--green);
    color: var(--white);
    font-size: 26px;
    padding: 25px 40px;
    border-radius: 5px;
    box-shadow: 0 0 35px rgba(89, 196, 90, 0.65);
    transition: .3s;
}
.home-link:hover {
    box-shadow: none;
}

/***** SECTION TITLE *****/
.section-title {
    text-align: center;
    text-transform: uppercase;
    color: var(--green);
    font-size: 28px;
    font-weight: 400;
    position: relative;
}
#projects:hover .section-title::after,
#test:hover .section-title::after,
#offers:hover .section-title::after,
#prices:hover .section-title::after,
#contacts:hover .section-title::after {
    animation-play-state: running; /* Ja kursors atrodas <section class="projects">... Tad notiek virsraksta animācija */
}
.section-title::before {
    content: "";
    display: block;
    width: var(--sectionTitleWidth);
    height: 1px;
    background: var(--lightgrey);
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
}
.section-title::after {
    content: "";
    display: block;
    width: var(--sectionTitleBarWidth);
    height: 3px;
    background: var(--green);
    position: absolute;
    top: 39px;
    left: 50%;
    transform: translateX(-50%);
    animation: 2s linear infinite titleAnimation;
    animation-play-state: paused;
}

/***** PROJECTS SECTION *****/
#projects {
    padding: 100px 0 70px;
}
.project-container {
    margin-top: 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px 30px;
}
.project-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.project-title {
    text-decoration: none;
    transition: .3s;
}
.project-title h6:hover {
    color: var(--green) !important;
}
.project-text h6{
    margin: 15px 0 25px;
    font-size: 15px;
    color: var(--darkgrey);
}
.project-text p {
    font-size: 14px;
    color: var(--lightgrey);
    line-height: 22px;
}
.project-image {
    width: 100%;
}

/***** OFFERS SECTION *****/
#offers {
    padding: 100px 0 70px;
}
.offers-container {
    margin-top: 60px;
    display: flex;
    justify-content: space-around;
    gap: 40px;
}
.offer-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex: 1;
}
.offer-item h2 {
    color: var(--darkgrey);
    transition: .3s;
    cursor: pointer;
}
.offer-item h2:hover {
    color: var(--green);
}
.offer-item i {
    font-size: 60px;
    color: var(--green);
}
.offer-item p {
    text-align: center;
    color: var(--lightgrey);
}

/***** PRICES SECTION *****/
#prices {
    padding: 100px 0 70px;
}
.prices-container {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}
#price-calculator {
    display: flex;
    flex-direction: column;
    width: 800px;
    border: 1px solid var(--lightgrey);
    border-bottom: none;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}
.price-calculator-icon {
    min-width: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.offer-box, .price-box {
    border-bottom: 1px solid var(--lightgrey);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    -webkit-tap-highlight-color: transparent;
}
.offer-box .label-title {
    display: flex;
    align-items: center;
    gap: 15px;
}
.offer-box .label-title i {
    font-size: 30px;
}
.offer-box .label-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.offer-box .label-text p {
    font-size: 16px;
    color: var(--grey);
}
.price-box {
    justify-content: flex-end;
}
#price {
    float: right;
    font-size: 22px;
}
.active-offer {
    border-color: var(--green);
}
.active-offer i {
    color: var(--green);
}
.check-container {
    width: 100%;
    display: block;
    position: relative;
    padding-right: 35px;
    cursor: pointer;
    font-size: 22px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
/* Hide the browser's default checkbox */
.check-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
/* Create a custom checkbox */
.checkmark {
    position: absolute;
    top: 50%;
    right: 0;
    height: 25px;
    width: 25px;
    background-color: #eee;
    border: 1px solid var(--lightgrey);
    transition: .2s;
    transform: translateY(-50%);
}
input[type=radio] + .checkmark {
    border-radius: 50%;
}
/* On mouse-over, add a grey background color */
.check-container:hover input ~ .checkmark {
    background-color: #ccc;
}
/* When the checkbox is checked, add a blue background */
.check-container input:checked ~ .checkmark {
    background-color: var(--green);
    border: none;
}
/* Show the checkmark when checked */
.check-container input:checked ~ .checkmark:after {
    transform: scale(1) rotate(45deg);
}
/* Style the checkmark/indicator */
.check-container .checkmark:after {
    content: "";
    position: absolute;
    left: 10px;
    top: 6px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: scale(0) rotate(45deg);
    transition: .2s;
}

/***** CONTACTS SECTION *****/
#contacts {
    padding: 100px 0 90px;
    background: #efeeee;
}
#contacts h2 {
    margin: 0;
    text-transform: uppercase;
    font-weight: 400;
    font-size: 28px;
}
.contacts-container {
    margin-top: 40px;
}
.contact-info,
.contact-form {
    width: 50%;
    border: 1px solid #c9c9c9;
}
.contact-info {
    padding: 35px 30px 60px;
}
.footer-logo {
    display: inline-block;
}
.footer-logo::after {
    background: #efeeee;
}
.contact-info p {
    margin: 40px 0 30px;
    color: var(--lightgrey);
    font-size: 14px;
    line-height: 22px;
}
.contact-item {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    transition: .3s;
}
.contact-item a:hover {
    color: var(--green);
}
.contact-item span,
.contact-item a {
    font-size: 14px;
    color: #9b9b9b;
    font-weight: bold;
    text-decoration: none;
}
.contact-item i {
    color: var(--green);
    font-size: 20px;
    margin-right: 20px;
}
.socials {
    margin-top: 35px;
    display: flex;
}
.socials a {
    text-decoration: none;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: #c9c9c9;
    color: var(--white);
    margin-right: 10px;
    font-size: 20px;
    text-align: center;
    line-height: 40px;
    transition: .3s;
}
.socials a:hover {
    transform: scale(1.2);
}
.fb:hover {
    background: #4267B2;
}
.ig:hover {
    background: radial-gradient(circle farthest-corner at 35% 90%, #fec564, transparent 50%), radial-gradient(circle farthest-corner at 0 140%, #fec564, transparent 50%), radial-gradient(ellipse farthest-corner at 0 -25%, #5258cf, transparent 50%), radial-gradient(ellipse farthest-corner at 20% -50%, #5258cf, transparent 50%), radial-gradient(ellipse farthest-corner at 100% 0, #893dc2, transparent 50%), radial-gradient(ellipse farthest-corner at 60% -20%, #893dc2, transparent 50%), radial-gradient(ellipse farthest-corner at 100% 100%, #d9317a, transparent), linear-gradient(#6559ca, #bc318f 30%, #e33f5f 50%, #f77638 70%, #fec66d 100%);
}
.tt:hover {
    background: #000;
}
.in:hover {
    background: #2867B2;
}
.tw:hover {
    background: #1DA1F2;
}
.contact-form {
    padding: 30px;
}
.contact-form form {
    display: flex;
    flex-direction: column;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    height: 40px;
    border: none;
    border-bottom: 1px solid #c9c9c9;
    background: none;
    font-size: 14px;
    margin-bottom: 30px;
    outline: none;
}
.contact-form textarea {
    height: 130px;
    resize: none;
}
.contact-form button {
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    color: var(--white);
    background: var(--green);
    font-size: 26px;
    padding: 25px 50px;
    border-radius: 5px;
    box-shadow: 0 0 35px rgba(89, 196, 90, 0.65);
    transition: .3s;
    margin-top: 60px;
    align-self: center;
}
.contact-form button i {
    margin-left: 30px;
}
.contact-form button:hover {
    box-shadow: none;
}
footer {
    padding: 25px 0;
    text-align: center;
}
.footer-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@keyframes codeAnimation {
    0% {
        left: 90px;
    }

    50% {
        left: 38px;
    }

    100% {
        left: 90px;
    }
}

@keyframes titleAnimation {
    0% {
        left: 50%;
    }

    25% {
        left: calc(50% + var(--sectionTitleWidth)/2 - var(--sectionTitleBarWidth)/2);
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }

    75% {
        left: calc(50% - var(--sectionTitleWidth)/2 + var(--sectionTitleBarWidth)/2);
        opacity: 0.3;
    }

    100% {
        left: 50%;
        opacity: 1;
    }
}

@keyframes flip {
    0% {
        transform: rotateY(0deg);
        text-shadow: 0 3px  greenyellow;
    }
    5% {
        transform: rotateY(720deg); 
        text-shadow: 0 3px rgb(54, 83, 11);
    }
    15% {
        transform: rotateY(0deg); 
        text-shadow: 0 3px  greenyellow;
    }
  
}
