:root{
    /* #040d24 | rgb(4, 13, 36) */
    --color-primary: #ff7b02;
    --color-primary-variant: #e5a55d;
    --color-bg-1: #010714;
    --color-bg-2: #040d24;
    --color-bg-3: #081433;
    --color-bg-4: #0d1f4a;
    --color-light: #c3d4f7;
    --color-white: #ebf0fa;

    --container-width-lg: 88%;
    --container-width-md: 92%;

    --transition: all 400ms ease;
}

* {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    list-style: none;
    text-decoration: none;
    box-sizing: border-box;
}

::-webkit-scrollbar {
    width: 0.5rem;
    background: rgba(229, 165, 93, 0.2);
}

::-webkit-scrollbar-thumb {
    width: 100%;
    background: var(--color-primary-variant);
    border-radius: 0.25rem;
}

html {
    scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  background: var(--color-bg-3);
  color: var(--color-light);
  line-height: 1.7;
  font-size: large;
}

h1, h2 {
    line-height: 1.1;
    font-weight: 400;
}

h1 {
    font-size: 4rem;
    color: var(--color-white);
}

h2 {
    font-size: 3rem;
    color: var(--color-white);
}

h3 {
    font-size: 1.5rem;
    color: var(--color-white);
}

a {
    color: var(--color-light);
    transition: var(--transition);
}

a:hover {
    color: var(--color-primary);
}

.container {
    width: var(--container-width-lg);
    margin: 0 auto;
    max-width: 2160px;
}

img {
    display: block;
    object-fit: cover;
    width: 100%;
}

/* ===================== NAV ================ */
nav {
    /* height: calc(16px * 5); */
    height: 5rem;
    width: 100vw;
    place-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99;
}

/* nav class on scroll using javascript*/
.window-scrolled {
    background: var(--color-bg-2);
    border-bottom: 0.2rem solid var(--color-bg-3);
    box-shadow: 0 1rem 1rem rgba(0, 0, 0, 0.3);
}

.nav__container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* only on mobile devices*/
.nav__toggle-btn {
    display: none;
}

.nav__logo {
    width: 7.5rem;
}

.nav__links {
    display: flex;
    gap: 4rem;
}

.nav__socials {
    display: flex;
    gap: 1rem;
}

.nav__socials a {
    width: 2rem;
    height: 2rem;
    aspect-ratio: 1/1;
    background: linear-gradient(var(--color-primary-variant), var(--color-primary));
    border-radius: 0.5rem;
    color: var(--color-bg-4);
    display: grid;
    place-items: center;
}

.nav__socials a:hover {
    box-shadow: 0 1rem rgba(0, 0, 0, 0.4);
}

/* ===================== HEADER ================ */
header {
    max-width: 100vw;
    height: 65vw;
    position: relative;
    top: 0;
    background: linear-gradient(var(--color-bg-3), var(--color-bg-1));
    overflow: hidden;
}

.header__container {
    display: grid;
    grid-template-columns: 43% 53%;
    gap: 4%;
    margin-top: 10rem;
    position: relative;
}

.header__image-bg {
    background: var(--color-bg-4);
    height: 22rem;
    width: 16rem;
    position: absolute;
}

.header__image-lg {
    width: 29rem;
    position: relative;
    top: 1rem;
    left: 1rem;
    filter: saturate(0) brightness(0.3);
    transition: var(--transition);
}

.header__image-sm {
    width: 28rem;
    height: 28rem;
    overflow: hidden;
    position: absolute;
    left: 6rem;
    top: 6rem;
    transition: var(--transition);
}

.header__left:hover .header__image-sm {
    opacity: 0;
}

.header__left:hover .header__image-lg {
    filter: saturate(1) brightness(1);
    border: 1rem solid var(--color-bg-4);
    top: 0;
    left: 0;
}

.header__head {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding-bottom: 1.5rem;
}

.header__tag {
    font-size: xx-large;
    color: var(--color-primary-variant);
}

.header__right p {
    margin-top: 2rem;
    width: 80%;
    font-size: larger;
}

.header__frames {
    position: absolute;
    top: 64vh;
    right: 33rem;
    transition: var(--transition);
}

.header__frame {
    width: 12rem;
    border: 0.4rem solid var(--color-bg-3);
    box-shadow: 0 0 4rem rgba(0, 0, 0, 0.5);
    position: absolute;
    transform: rotate(-10deg);
    transform-origin: bottom left;
    transition: var(--transition);
}

.header__frame:nth-child(2) {
    transform: rotate(20deg);
    top: -2rem;
    left: 2rem;
}

.header__frames:hover .header__frame {
    transform: rotate(0);
}

.header__frames:hover .header__frame:nth-child(2) {
    top: 0;
    left: 15rem;
}

/* ===================== SERVICII ================ */
#servicii {
    padding: 4rem;
    background: linear-gradient(var(--color-bg-3), var(--color-bg-1));
}

.servicii {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-flow: dense;
    gap: 3rem;
}

.servicii__card {
    width: 100%;
    margin-bottom: 2rem;
    display: grid;
    grid-template-rows: 1fr auto;
    break-inside: avoid;
    text-align: center;
}

.servicii__card img {
    border-radius: 50%;
}

.servicii__card h3 {
    margin: 1rem 0 1rem 0;
}

/* ===================== VIDEO =============== */
#video {
    margin-top: 4rem;
    padding-bottom: 4rem;
    background: linear-gradient(var(--color-bg-3), var(--color-bg-1));
}

.video__container {
    position: relative;
}

.video__title {
    margin-bottom: 4rem;
    width: 100%;
    text-align: center;
}

.video__title a {
    color: var(--color-primary-variant);
}

.video__title a:hover {
    color: var(--color-primary);
}

.video__gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-flow: dense;
    gap: 3rem;
}

.video__gallery article {
    height: 450px;
}

/* ===================== GALLERY =============== */
#gallery {
    margin-top: 5rem;
    padding-bottom: 4rem;
    background: linear-gradient(var(--color-bg-3), var(--color-bg-1));
}

.gallery__container p {
    width: 45rem;
}

.gallery__head {
    display: flex;
    justify-content: space-between;
}

.gallery__title {
    width: 100%;
    text-align: center;
}

.gallery__title a {
    color: var(--color-primary-variant);
}

.gallery__title a:hover {
    color: var(--color-primary);
}

.gallery-wrapper {
    margin-top: 4rem;
    gap: 3rem;
    column-count: 4;
}

.gallery-wrapper article {
    margin-bottom: 2rem;
    border: 0.5rem solid var(--color-bg-4);
    transition: var(--transition);
    display: grid;
    grid-template-rows: 1fr auto;
    break-inside: avoid;
}

.gallery-wrapper article a img{
    height: fit-content;
    max-height: 26rem;
    overflow: hidden;
    filter: saturate(0);
    transition: var(--transition);
    grid-row: 1 / -1;
    grid-column: 1;
}

.gallery-wrapper article a:hover {
    box-shadow: 0 3rem 3rem rgba(0, 0, 0, 0.4);
}

.gallery-wrapper article a:hover img {
    filter: saturate(1);
}

/* ===================== FOOTER =============== */
footer {
    margin-top: 5rem;
}

.footer__container {
    border-top: 0.5rem solid var(--color-bg-4);
    padding-top: 4rem;
    position: relative;
}

.footer__head {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-bottom: 5rem;
}

.footer__links {
    width: 100%;
    margin: 0 0 5rem;
    display: flex;
    align-items: center;
    gap: 5rem;
}

/* general style for circular buttons */ 
.circular__btn {
    color: var(--color-bg-1);
    width: 10rem;
    height: 10rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.circular__btn i {
    font-size: 4rem;
    position: absolute;
}

.circular__btn p {
    font-size: 0.75rem;
    font-weight: 600;
    width: 10rem;
    height: 10rem;
    display: flex;
    justify-content: center;
    animation: spinText 30s linear infinite;
}

@keyframes spinText {
    to {
        transform: rotate(360deg);
    }
}

.circular__btn p span {
    position: absolute;
    transform-origin: 0.3rem 5rem;
}

.footer__btn {
    background: linear-gradient(-30deg, var(--color-primary-variant), var(--color-primary), var(--color-primary-variant));
    position: absolute;
    bottom: 75;
    right: 10;
}

.footer__btn:hover {
    box-shadow: 0 2rem 2rem rgba(0, 0, 0, 0.3);
    transform:translateY(-1rem);
    color: var(--color-bg-1);
}

/* ======================================================================= */
/* =================== MEDIA QUERIES (medium screens) ==================== */
/* ======================================================================= */
@media screen and (max-width:1200px ) {
    .container {
        width: var(--container-width-md);
        position: relative;
    }

    h1 {
        font-size: 2.5rem;
        line-height: 1.3;
    }

    h2 {
        font-size: 2.5rem;
    }

    /* ===================== NAV ================ */
/*     .nav__socials {
        display: none;
    } */

    .nav__links {
        position: absolute;
        top: 100%;
        right: 0;
        flex-direction: column;
        gap: 0;
        display: none;
    }

    .nav__links li {
        height: 5rem;
        box-shadow: -3rem 3rem 3rem rgba(0, 0, 0, 0.7);
        animation: navAnimation 600ms ease forwards;
        transform: rotateX(90deg);
        opacity: 0;
        transform-origin: top;
    }
    
    .nav__links li:nth-child(2) {
        animation-delay: 100ms;
    }

    .nav__links li:nth-child(3) {
        animation-delay: 200ms;
    }

    .nav__links li:nth-child(4) {
        animation-delay: 300ms;
    }

    @keyframes navAnimation {
        to {
            transform: rotateX(0);
            opacity: 1;
        }
    }

    .nav__links li a {
        background: var(--color-bg-4);
        height: 100%;
        width: 100%;
        display: flex;
        align-items: center;
        padding: 1rem 5rem 1rem 3rem;
        border-top: 1px solid var(--color-bg-2);
    }

    .nav__toggle-btn {
        display: inline-block;
        font-size: 2rem;
        background: transparent;
        cursor: pointer;
        color: var(--color-white);
    }

    #nav__toggle-close {
        display: none;
    }

    /* ===================== HEADER ================ */
    header {
        height: fit-content;
        padding: 12rem 0 10rem;
        display: grid;
        place-items: center;
    }

    .header__container {
        grid-template-columns: 40% 54%;
        gap: 6%;
        margin: 0;
    }

    .header__image-bg, .header__image-sm {
        display: none;
    }

    .header__image-lg {
        filter: saturate(1) brightness(1);
        border: 1rem solid var(--color-bg-2);
        border-radius: 15rem 15rem 0 0;
        overflow: hidden;
        width: 100%;
        top: 0;
        left: 0;
    }

    .empty {
        display: none;
    }

    .header__tag {
        margin-bottom: 1rem;
    }

    .header__right p {
        width: 100%;
        margin-top: 1.5rem;
    }

    .header__frames, .contact__btn {
        display: none;
    }

    /* ===================== SERVICII ================ */
    #servicii {
        margin-top: 4rem;
    }

    .servicii {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* ===================== VIDEO ================ */
    .video__head > p {
        width: 100%;
        margin-top: 2rem;
    }

    .video__gallery {
        margin-top: 4rem;
        gap: 2rem;
    }

    .video__gallery article {
        width: 100fr;
        height: 200px;
    }

    /* ===================== GALLERY ================ */
    #gallery {
        margin-top: 4rem;
    }

    .gallery__container p {
        width: 100%;
        margin-top: 2rem;
    }

    .gallery-wrapper {
        margin-top: 4rem;
        gap: 2rem;
        column-count: 2;
        height: fit-content;
    }

    .gallery-wrapper article a img{
        filter: saturate(1);
    }
}

/* ======================================================================= */
/* =================== MEDIA QUERIES (small screens) ===================== */
/* ======================================================================= */
@media screen and (max-width: 600px){
    h1, h2 {
        font-size: 2rem;
        line-height: 1.3;
        color: var(--color-white);
    }

/* ===================== HEADER ================ */
    header {
        padding: 0;
        padding-bottom: 6rem;
    }

    .header__container {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }

    .header__image-lg {
        width: 80%;
        height: 20rem;
        margin: 0 auto;
        margin-top: 7rem;
        overflow: hidden;
        border-radius: 15rem 15rem 0 0;
    }

    .header__head {
        justify-content: center;
    }

    .header__right p {
        margin-top: 1rem;
    }

    .header__title {
        margin-top: 1rem;
    }

    /* ===================== SERVICII ================ */
    #servicii {
        margin-top: 2rem;
    }

    .servicii {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* ===================== VIDEO ================ */
    #video {
        margin-top: 6rem;
    }

    .video__head {
        grid-template-columns: 1fr;
    }

    .video__head p {
        margin-top: 1rem;
    }

    .video__gallery {
        display: block;
    }

    .video__gallery article {
        border: none;
        width: 100%;
        /* height: 200px; */
        height: 200px;
        margin-bottom: 1rem;
    }
    
    /* ===================== GALLERY ================ */
    #gallery {
        margin-top: 6rem;
    }

    .gallery__container p {
        margin-top: 1rem;
    }

    .gallery-wrapper {
        margin-top: 3rem;
        column-count: 1;
        height: fit-content;
    }

    /* ===================== FOOTER =============== */
    footer {
        padding-bottom: 15rem;
    }

    .footer__links, .footer__head {
        display: none;
    }

    .circular__container {
        position: relative;
        top: 50%;
        width: 100%;
        text-align: center;
    }
    
    .footer__btn {
        right: 25%;
        top: 1rem;
    }
}