@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');

/* Navigeerimisriba ja taust */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 150px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins';
}

header {
    background: url(assets/homepage.png);
    background-repeat: no-repeat;
    background-size: cover;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
 
.container {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #062A60;
    z-index: 10;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5em;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1em clamp(1.25rem, 4vw, 3rem);
}

.logo-link {
    display: inline-flex;
    flex-shrink: 0;
    border-radius: 15px;
}

.logo {
    display: block;
}

nav {
    display: flex;
    align-items: center;
}

.nav-list {
    list-style-type: none;
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 2.4vw, 2.75rem);
}

.type {
    position: relative;
    list-style-type: none;
}

a {
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: .9rem;

}

a:focus-visible,
button:focus-visible {
    outline: 2px solid #2CD1C7;
    outline-offset: 4px;
    border-radius: 2px;
}

.my-type {
    border-bottom: 2px solid #2CD1C7;
    padding-bottom: .7em;
}
.no-border {
    display: inline-flex;
    align-items: center;
    gap: .45em;
    border-bottom: none;
}

.border:hover,
.border:focus-visible {
    border-bottom: 2px solid #2CD1C7;
    padding-bottom: .7em;
}

.my-border:hover,
.my-border:focus-visible {
    border-bottom: 2px solid #2CD1C7;
    padding-bottom: .7em;
}

/* Teenuste alammenüü */

.chevron {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .25s ease;
}

.submenu-toggle {
    display: none;
}

.has-submenu {
    padding-top: .6em;
    margin-top: -.6em;
}

.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    padding-top: .8em;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.has-submenu:hover .sub-menu,
.has-submenu:focus-within .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.has-submenu:hover .chevron,
.has-submenu:focus-within .chevron {
    transform: rotate(225deg);
}

.sub-menu ul {
    list-style: none;
    background: #12377A;
    border-radius: 10px;
    padding: .5em;
    box-shadow: 0 16px 32px rgba(3, 13, 33, 0.35);
}

.sub-menu ul li a {
    display: block;
    padding: .85em 1.1em;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
}

.sub-menu ul li a:hover,
.sub-menu ul li a:focus-visible {
    background-color: #2f5cc9;
    border-bottom: none;
    outline: none;
}


/* Tekst avalehel */


.home-page-text {
    display: flex;
    margin-top: 9em;
    margin-left: clamp(1.5em, 7vw, 9em);
    padding-top: 8em;
    padding-right: clamp(1em, 4vw, 3em);
    color: white;
}


h1 {
    padding-bottom: .5em;
    position: relative;
    font-size: 4.4rem;
}

.home-page-bigger-parapraph {
    padding-bottom: .7em;
    margin-right: 10em;
    font-size: 1.2rem;

}

.home-page-smaller-paragraph {
    font-size: 1.6rem;
    margin-top: 1em;
}


.home-page-button {
    margin-top: 7em;
    padding: 1.3em 1.5em;
    border: none;
    border-radius: 50px;
    background-color: #CA396D;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    font-family: 'Poppins';
    cursor: pointer;
}



/* Ettevõttest */


:root {
    --bg-color: #A9DEEF;
}


section {
    background-color: var(--bg-color);
}

.heading {
    text-align: center;
    padding-top: 4em;
    padding-bottom: 3em;
    font-weight: bold;
    font-size: 1.8rem;
}

.content {
    margin-top: 0;
    padding-top: 0;
}

.info {
    font-size: 1.2rem;
    color: black;
    padding-bottom: 2em;
    margin-right: 10em;
    line-height: 35px;    
}

.computer {
    height: 580px;
    margin-right: 3em;
}

/* Teenused */

.text {
    margin-top: 0;
    padding-top: 0;
    justify-content: space-evenly;
    flex-direction: row-reverse;
}

.services {
    margin-left: 5em;
}

.example {
    margin-top: 2.5em;
    margin-right: 10em;
}

.para {
    padding-top: 1em;
}


/* Põhiteenuste hinnakiri */


.first-table {
    width: 40%;
    border-collapse: collapse;
    margin: 5em 0 0 15em;
}

th, td {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: left;
    padding-left: 5em;
    padding-bottom: .5em;
    color: white;
    background: #03809B;
}

th {
    padding-top: 2em;
    padding-bottom: 1em;
}

/* top-left border-radius */
table tr:first-child th:first-child {
    border-top-left-radius: 10px;
}
  
/* top-right border-radius */
table tr:first-child th:last-child {
    border-top-right-radius: 10px;
}
  
/* bottom-left border-radius */
table tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}
  
/* bottom-right border-radius */
table tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

.final-cell {
    padding-bottom: 2em;
}

.small-heading {
    margin-left: -.7em;
}


/* Lisateenuste hinnakiri */

.second-table {
    width: 100%;
    border-collapse: collapse;
}

.excep {
    padding-bottom: 2.8em;
}

/* Kliendid meist */

.last {
    margin-bottom: 10em;
 }


/* Kontakt */

.contact-bg {
    background: linear-gradient(#0E6F8D, #1C8FD0, #00B2FE);
    text-align: center;
    height: 100%;
    width: 100%;
}

.grid-for-contact {
    background: #062A60;
    max-height: 100vh;
    max-width: 570px;
    margin: 0 auto;
    padding: 4em;
    border-radius: 50px;
}

.contact-title {
    padding-bottom: 3em;
    padding-top: 3em;
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
}

input[type=text], [type=email] {
    width: 100%;
    outline: none;
    padding: 1.5em 1.5em;
    margin-bottom: 2em;
    border-radius: 10px;
}

textarea {
    min-height: 150px;
    width: 100%;
    outline: none;
    padding: 1.5em 1.5em;
    margin-bottom: 2em;
    border-radius: 10px;
}

input[type=submit] {
    width: 100%;
    outline: none;
    border-radius: 10px;
    font-weight: bold;
    font-family: 'Poppins';
    color: white;
    border: none;
    background: #0BABDE;
    padding: 1em 0 1em 0;
}

input[type=submit]:hover {
    background-color: #0188b1;
    transition: 1s ease;
}

.placeholder {
    font-family: 'Poppins';
}

#status {
    width: 90%;
    max-width: 500px;
    text-align: center;
    padding: 10px;
    margin: 0 auto;
    border-radius: 8px;
}

#status.success {
    background: rgb(211, 250, 153);
    animation: status 4s ease forwards;
}

#status.error{
    background: rgb(259, 129, 92);
    color: white;
    animation: status 4s ease forwards;
}

@keyframes status {
    0% {
        opacity: 1;
        pointer-events: all;
    }
    90% {
        opacity: 1;
        pointer-events: all;
    }
    100% {
        opacity: 0;
        pointer-events: none;
    }   
}


/* Telefoni versioon */

.burger div {
    width: 26px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
    transform-origin: center;
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    background: none;
    border: none;
    padding: .5em;
    margin-right: -.5em;
    cursor: pointer;
}

/* Table pricing lists scroll horizontally instead of losing content */

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 1635px){
    html, body {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }
    .calculator {
        width: 50%;
        height: 50%;
        margin-right: 10%;
    }

    .services {
        margin-right: 5em;
    }
    .text {
        width: 100%;
    }
}

@media (max-width: 1440px){
    html, body {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }
    h1 {
        font-size: 3.5rem;
        margin-bottom: 0.8em;
    }
    .home-page-bigger-parapraph, .home-page-smaller-paragraph{
        width: 100%;
    }
    .home-page-bigger-parapraph {
        font-size: 1.3rem;
    }
    .home-page-smaller-paragraph{
        font-size: 1.5rem;
        margin-top: 2em;
    }
    .calculator {
        display: none;
    }
    .computer {
        display: none;
    }
    .services{
        max-width: 50%;
        max-height: 50%;
    }
    .text {
        margin: 0;
    }
    .new_info {
        width: 100%;
        margin-left: 15%;
    }
    .first-table {
        width: 60%;
    }

}
@media (max-width: 1300px) {
    .services {
        max-width: 40%;
        max-height: 40%;
        margin-top: 2em;
        margin-bottom: 2em;
    }

}


/* Navigatsioon telefonis/tahvelarvutis: menüü ei tohi kunagi ekraanilt üle minna */

@media (max-width: 900px) {
    .nav-list {
        position: fixed;
        top: 0;
        right: 0;
        width: min(84vw, 340px);
        height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #062A60;
        box-shadow: -12px 0 40px rgba(3, 13, 33, 0.35);
        transform: translateX(100%);
        transition: transform 0.4s ease;
        padding: 6.5em 2.25em 2em;
        overflow-y: auto;
    }

    .nav-list > li {
        padding: 1.05em 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
        opacity: 0;
    }

    .nav-list > li:last-child {
        border-bottom: none;
    }

    .nav-list a {
        font-size: 1.05rem;
    }

    .my-type,
    .border,
    .my-border {
        border-bottom: none;
        margin: 0;
        padding-bottom: 0;
    }

    .border:hover,
    .border:focus-visible,
    .my-border:hover,
    .my-border:focus-visible {
        border-bottom: none;
        padding-bottom: 0;
        opacity: .75;
    }

    .has-submenu {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        padding-top: 1.05em;
        margin-top: 0;
    }

    .no-border .chevron {
        display: none;
    }

    .submenu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2.4em;
        height: 2.4em;
        background: none;
        border: none;
        color: white;
        cursor: pointer;
    }

    .submenu-toggle .chevron {
        transition: transform .25s ease;
    }

    .has-submenu.submenu-open .submenu-toggle .chevron {
        transform: rotate(225deg);
    }

    .sub-menu {
        position: static;
        width: 100%;
        min-width: 0;
        padding-top: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows .3s ease;
    }

    .has-submenu.submenu-open .sub-menu {
        grid-template-rows: 1fr;
    }

    .sub-menu ul {
        overflow: hidden;
        background: none;
        box-shadow: none;
        padding: 0;
        margin-top: .25em;
    }

    .sub-menu ul li a {
        padding: .7em .5em;
        font-weight: 500;
        opacity: .85;
    }

    .burger {
        display: flex;
    }
}

@media (max-width: 768px) {
    html, body {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }

     .container {
        padding-top: 1.6em;
        padding-bottom: 1.6em;
    }

    /* 1.osa*/

    .home-page-text {
        display: block;
        margin-top: -1.5em;
        margin-left: 0;
    }

    h1 {
        font-size: 2rem;
        text-align: center;
        padding-top: 3em;
        padding-bottom: 1.5em;
    }

    .home-page-bigger-parapraph {
        margin: 0;
        padding-left: 2em;
        font-size: 1.1rem;
    }

    .home-page-smaller-paragraph {
        font-size: 1.3rem;
        padding-left: 1.7em;
    }

    .calculator {
        width: 250px;
        top: 570px;
        margin-right: 2em;
        margin-left: 13em;
        margin-top: -2em;
    }

    .home-page-button {
        margin-left: 2em;
        margin-top: 3em;
        padding: 1.1em;
        font-size: 1rem;
    }

    /* 2.osa */

    .heading {
        margin-top: -1.5em;
        padding-top: 4em;
        font-size: 1.5rem;
    }

    .info {
        margin: 2em;
        padding: 0;
        font-size: 1.1rem;
    }

    .computer {
        width: 300px;
        height: 300px;
        margin-top: 2em;
        margin-left: 6em;
    }

    /* 3.osa */

    .services {
        max-width: 300px;
    }

    .example {
        margin: 2em;
    }

    .text {
        justify-content: none;
        flex-direction: none;
    }

    /* 4.osa */

    .first-table {
        margin-left: 0;
        margin-bottom: 2em;
    }

    th, td {
        padding-left: 3em;
        padding-right: 3em;
        font-size: 1rem;
    }

    .first-table,
    .second-table {
        min-width: 560px;
    }

    .table-scroll {
        margin: 0 1.5em;
    }

    /* 5.osa */

    .last {
        padding-bottom: 3em;
    }

    .contact-bg {
        margin-top: -2.2em;
    }

    .grid-for-contact {
        max-width: 470px;
        padding: 3em 2.5em;
    }

}

@media (max-width: 515px) {
    html, body {
        overflow-x: hidden;
        margin: 0;
        padding: 0;
    }
    .grid-for-contact {
        max-width: 400px;
    }
    .home-page-text {
        margin-top: -3em;
    }
    .home-page-bigger-parapraph {
        padding-left: 1em;
        padding-top: 0;
        font-size: 1rem;
    }
    .home-page-smaller-paragraph {
        padding-left: 1em;
        padding-top: 0;
        margin-top: 1em;
        font-size: 1.2rem;
    }
}


@media (max-width: 500px) {
    html, body {
        overflow-x: hidden;
        margin: 0;
        padding: 0;
    }
    .calculator {
        display: none;
    }

    h1 {
        font-size: 1.6rem;
        padding-top: 4em;
    }
}


.nav-active {
    transform: translateX(0%)
}


@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0px)
    }
}


.toggle .line-1 {
    transform: translateY(9px) rotate(45deg);
}

.toggle .line-2 {
    opacity: 0;
}

.toggle .line-3 {
    transform: translateY(-9px) rotate(-45deg);
}
