/*
=============== 
font
===============
*/

@font-face {
    font-family: "vazir";
    src: url("../fonts/vazir/Vazir-Medium-FD-WOL.woff") format("woff2"),
        url("../fonts/vazir/Vazir-Medium-FD-WOL.woff") format("woff"),
        url("../fonts/vazir/Vazir-Medium-FD-WOL.ttf") format("truetype");
}

@font-face {
    font-family: "tanha";
    src: url("../fonts/tanha/Tanha.woff2") format("woff2"),
        url("../fonts/tanha/Tanha.woff") format("woff"),
        url("../fonts/tanha/Tanha.ttf") format("truetype"),
        url("../fonts/tanha/Tanha.eot") format(".eot");
}

/*
===============
variable 
===============
*/

:root {
    --clr-primary-1: #2f3e46;
    --clr-primary-2: #354f52;
    --clr-primary-3: #52796f;
    --clr-primary-4: #84a98c;
    --clr-primary-5: #cad2c5;
    --clr-grey-1: #102a42;
    --clr-grey-2: #617d98;
    --clr-grey-3: rgb(241, 245, 248);
    --clr-white: #fff;
    --ff-primary: "vazir", sans-serif;
    --ff-tanha:"tanha",sans-serif;
    --transition: all 0.3s linear;
    --radius: 0.5rem;
    --light-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --dark-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    --max-width: 1170px;
}

/*
===============
Global Styles 
===============
*/

*,
::after,
::before {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--ff-primary);
    background: var(--clr-white);
    color: var(--clr-grey-1);
}


ul {
    list-style-type: none;
}

a {
    text-decoration: none;
}

img {
    width: 100%;
    display: block;
}

h1,
h2,
h3,
h4 {
    line-height: 1.25;
    margin-bottom: 0.75rem;
    font-family: var(--ff-primary);
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1rem;
}

p {
    margin-bottom: 1.25rem;
    color: var(--clr-grey-2);
}

/*
===============
global classes
===============
*/

.underline {
    width: 5rem;
    height: 0.25rem;
    background: var(--clr-primary-2);
    margin-bottom: 1.25rem;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    background: var(--clr-primary-2);
    color: var(--clr-white);
    padding: 0.375rem 0.75rem;
    display: inline-block;
    transition: var(--transition);
    font-size: 0.875rem;
    font-family: var(--ff-primary);
    border: 2px solid transparent;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
}

.btn:hover {
    color: var(--clr-primary-1);
    background: var(--clr-primary-3);
}

.section {
    padding: 5rem 0;
}

.section-title {
    margin-bottom: 4rem;
    text-align: center;
}

.section-center {
    width: 90vw;
    margin: 0 auto;
    max-width: var(--max-width);
}

@media screen and (min-width: 992px) {
    .section-center {
        width: 95vw;
    }
}


/*
=============== 
navbar
===============
*/

.navbar {
    background-color: var(--clr-primary-5) !important;
    transition: var(--transition);
}

.navbar-toggler {
    border: none;
    opacity: 0.75;
}

.navbar-toggler:hover {
    opacity: 1;
}

.navbar-toggler:focus {
    box-shadow: none !important;
}

.navbar-light .navbar-toggler:focus {
    color: transparent !important;
}

.navbar-light .bi-list-nested {
    color: var(--clr-primary-2);
    font-size: 35px;
}

.nav-link {
    color: var(--clr-grey-1) !important;
    font-family: var(--ff-primary);
}

.nav-link:hover {
    color: var(--clr-primary-4) !important;
}

/*
=============== 
offcanvas
===============
*/

.offcanvas {
    background: var(--clr-primary-5) !important;
}

.offcanvas #btnClose:focus {
    box-shadow: none !important;
}

/*
=============== 
header
===============
*/

.hero h4 {
    color: var(--clr-grey-2);
    margin-top: 2rem;
}

.hero .col {
    text-align: center;
}

.social-icon {
    font-size: 1.5rem;
    color: var(--clr-grey-1);
    transition: var(--transition);
}

.social-icon:hover {
    color: var(--clr-primary-4);
}

.hero-btn {
    margin-top: 20px;
}

.hero-icons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin-top: 30px;
    padding-right: 0;
    gap: 30px;
}

.hero-photo {
    max-width: 25rem;
    max-height: 30rem;
    object-fit: cover;
    border-radius: var(--radius);
    position: relative;
}

.hero-img {
    display: block;
    position: relative;
    width: 20rem;
    height: 30rem;
}

.hero-img::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border: 0.25rem solid var(--clr-primary-2);
    border-radius: var(--radius);
    top: 2rem;
    right: -2rem;
}

/*
=============== 
about
===============
*/

.about-photo {
    max-width: 25rem;
    max-height: 30rem;
    object-fit: cover;
    border-radius: var(--radius);
    position: relative;
}

.about-img {
    display: block;
    position: relative;
    width: 20rem;
    height: 30rem;
}

.about-img::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border: 0.25rem solid var(--clr-primary-2);
    border-radius: var(--radius);
    top: 2rem;
    right: -2rem;
}

@media screen and (max-width:768px) {
    .about-img {
        margin-top: 200px;
    }
}

.about-info .underline {
    margin-right: 0;
}

/*
=============== 
Services
===============
*/
.section-title {
    text-align: center;
}

.service {
    background: var(--clr-white);
    padding: 3rem 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.service .underline {
    width: 3rem;
    height: 0.12rem;
    transition: var(--transition);
}

.service:hover {
    background: var(--clr-primary-2);
    color: var(--clr-white);
}

.service p {
    transition: var(--transition);
}

.service:hover p {
    color: var(--clr-white);
}

.service:hover .underline {
    background: var(--clr-white);
}

/*
=============== 
Projects
===============
*/

.projects-text {
    width: 85vw;
    max-width: 30rem;
    margin: 0 auto;
}

.project {
    background: var(--clr-primary-2);
    position: relative;
    margin-bottom: 2rem;
    border-radius: var(--radius);
}

.project-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--clr-white);
    opacity: 0;
    transition: var(--transition);
}

.project-info p {
    color: var(--clr-white);
}

.project:hover .project-info {
    opacity: 1;
}

.project-img {
    transition: var(--transition);
    border-radius: var(--radius);
    height: 15rem;
    -o-object-fit: cover;
    object-fit: cover;
}

.project:hover .project-img {
    opacity: 0.1;
}

.project::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0.25rem solid var(--clr-white);
    border-radius: var(--radius);
    transition: var(--transition);
    opacity: 0;
}

.project:hover::after {
    opacity: 1;
    transform: scale(0.8);
}

@media screen and (min-width: 676px) {
    .projects-center {
        display: grid;
        grid-template-columns: 1fr 1fr;
        -moz-column-gap: 2rem;
        column-gap: 2rem;
    }
}

@media screen and (min-width: 992px) {
    .projects-center {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (min-width: 1170px) {
    .projects-center {
        grid-template-rows: 200px 200px;
        gap: 1rem;
        grid-template-areas:
            "a b b"
            "a c d";
    }

    .project {
        height: 100%;
    }

    .project-img {
        height: 100%;
    }

    .project-1 {
        grid-area: a;
    }

    .project-2 {
        grid-area: b;
    }

    .project-3 {
        grid-area: c;
    }

    .project-4 {
        grid-area: d;
    }
}

/*
=============== 
Connect
===============
*/

.connect {
    min-height: 40rem;
    position: relative;
    display: grid;
    place-items: center;
    padding: 10rem 0 5rem 0;
    margin: 5rem 0;

    -webkit-clip-path: polygon(50% 0%,
            100% 10%,
            100% 90%,
            50% 100%,
            0 90%,
            0 10%);
    clip-path: polygon(50% 0%, 100% 10%, 100% 90%, 50% 100%, 0 90%, 0 10%);
}

.connect::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--clr-white);
    opacity: 0.7;
    z-index: -1;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    z-index: -2;
}

.video-banner {
    background: var(--clr-primary-5);
    text-align: center;
    padding: 3rem 5rem 12rem 5rem;
    -webkit-clip-path: polygon(0% 0%,
            100% 0%,
            100% 75%,
            75% 75%,
            75% 100%,
            50% 75%,
            0% 75%);
    clip-path: polygon(0% 0%,
            100% 0%,
            100% 75%,
            75% 75%,
            75% 100%,
            50% 75%,
            0% 75%);
}

.video-text {
    max-width: 30rem;
}

/*
=============== 
Skills
===============
*/

.skills {
    background: var(--clr-primary-4);
}

.skills h3 {
    color: var(--clr-primary-1);
    margin: 1.5rem 0;
}

.skill {
    margin-bottom: 1.5rem;
}

.skill p {
    color: var(--clr-primary-1);
    margin-bottom: 0.5rem 0;
}

.skill-container {
    background: var(--clr-white);
    height: 1rem;
    width: 100%;
    border-radius: var(--radius);
    position: relative;
}

.skill-value {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--clr-primary-2);
    height: 100%;
    border-radius: var(--radius);
}

.value-50 {
    width: 50%;
}

.value-70 {
    width: 70%;
}

.value-80 {
    width: 80%;
}

.skill-text {
    position: absolute;
    top: -2rem;
    transform: translateX(-50%);
}

.skill-text-50 {
    left: 50%;
}

.skill-text-70 {
    left: 70%;
}

.skill-text-80 {
    left: 80%;
}

/*
=============== 
Timeline
===============
*/

.timeline-center {
    width: 80vw;
    max-width: 40rem;
}

.timeline p {
    margin-bottom: 0;
}

.timeline-item {
    border-top: 2px dashed var(--clr-primary-2);
    padding: 4rem 2rem;
    margin: 0;
    position: relative;
}

.timeline-item:nth-child(even) {
    border-left: 2px dashed var(--clr-primary-2);
    border-top-left-radius: 2rem;
    border-bottom-left-radius: 2rem;
    margin-right: 2rem;
    padding-right: 0;
}

.timeline-item:nth-child(odd) {
    border-right: 2px dashed var(--clr-primary-2);
    border-top-right-radius: 2rem;
    border-bottom-right-radius: 2rem;
    margin-left: 2rem;
    padding-left: 0;
}

.timeline-item:first-child {
    border-top: 0;
    border-top-right-radius: 0;
}

.timeline-item:last-child {
    border-bottom-left-radius: 0;
}

.number {
    position: absolute;
    top: 50%;
    background: var(--clr-primary-2);
    width: 2rem;
    height: 2rem;
    color: var(--clr-white);
    display: grid;
    place-items: center;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.timeline-item:nth-child(even) .number {
    left: 0;
}

.timeline-item:nth-child(odd) .number {
    right: 0;
    transform: translate(50%, -50%);
}

/*
=============== 
Blog
===============
*/

.blog {
    background: var(--clr-grey-3);
}

.cards {
    height: 27rem;
    perspective: 1500px;
    position: relative;
}

.cards-side {
    position: absolute;
    transition: all 1.5s linear;
    backface-visibility: hidden;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius);
}

.cards-front {
    background: var(--clr-white);
}

.cards-back {
    background: var(--clr-primary-5);
    transform: rotateY(180deg);
    display: grid;
    place-items: center;
}

.cards:hover .cards-front {
    transform: rotateY(-180deg);
}

.cards:hover .cards-back {
    transform: rotateY(0);
}

.cards-front img {
    height: 13rem;
    object-fit: cover;
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
}

.cards-footer img {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
}

.cards-info {
    padding: 1rem 1.5rem;
}

.cards-footer {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
}

.cards-footer p {
    margin-bottom: 0;
    justify-self: end;
    color: var(--clr-primary-2);
    font-size: 0.85rem;
}

.blog-center {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 3rem 1rem;
}

/*
=============== 
footer
===============
*/

.news_foot h3,
.address_foot h3,
.number_foot h3,
.private_foot h3 {
    width: 180px;
    height: 50px;
    margin: 0 auto;
    margin-bottom: 30px;
    padding: 20px;
    padding-bottom: 40px;
    text-align: center;
    border-bottom: 1px solid var(--clr-white);
    font-family: var(--ff-primary);
    font-size: 16px;
    color: var(--clr-white);
}

.news_foot ul {
    padding-right: 0;
}

.news_foot li {
    width: 300px;
    margin: 0 auto;
    text-align: start;
    padding-bottom: 15px;
    list-style: none;
}

.news_foot .hover-text {
    cursor: pointer;
    text-decoration: none;
    color: var(--clr-primary-4);
    transition: var(--transition);
    font-family: var(--ff-primary);
}

.news_foot .hover-text:hover {
    color: yellow;
}

.news_foot .hover-text i {
    transition: var(--transition);
}

.address_foot p,
.number_foot p,
.private_foot p {
    margin: 0 auto;
    margin-bottom: 20px;
    color: var(--clr-primary-5);
    text-align: center;
    font-family: var(--ff-primary);
}

/* Icons */

.icon_foot {
    position: absolute;
    left: 50%;
    transform: translate(-50%);
    bottom: 60px;
    cursor: default;
    display: flex;
    gap: 30px;
}

.icon_foot a {
    text-decoration: none;
    cursor: auto;
    position: relative;
    text-align: center;
    transition: all .5s;
}

.icon_foot .bi {
    font-size: 25px;
    color: var(--clr-primary-5);
    cursor: pointer;
    transition: all 0.2s;
}

.icon_foot .bi-instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.icon_foot .bi-telegram:hover {
    color: #0094ff;
}

.icon_foot .bi-github:hover {
    color: #ffcd00;
}

.icon_foot .bi-twitter:hover {
    color: #0094ff;
}

/* pop-up text */

.icon_foot a span {
    color: #444;
    position: absolute;
    font-family: sans-serif;
    bottom: 30px;
    left: -25px;
    right: -25px;
    padding: 5px 7px;
    z-index: -1;
    font-size: 14px;
    border-radius: 2px;
    background: #ffffffc3;
    visibility: hidden;
    opacity: 0;
    transition: all .5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* pop-up text arrow */

.icon_foot a span:before {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #ffffffc3;
    position: absolute;
    bottom: -5px;
    left: 32px;
}

/* text pops up when icon is in hover state */

.icon_foot a:hover span {
    bottom: 45px;
    visibility: visible;
    opacity: 1;
}

.text_foot {
    width: 400px;
    margin: auto;
    padding-top: 10px;
    border-top: 1px solid var(--clr-primary-5);
    font-size: 13px;
}

.text_foot p {
    color: var(--clr-primary-5);
}

.link_arrow {
    position: fixed;
    width: 50px;
    height: 50px;
    bottom: 35px;
    right: 35px;
    background-color: #fff;
    border-radius: 10px;
    font-size: 22px;
    text-align: center;
    line-height: 50px;
    transition: all 300ms ease-in-out;
    cursor: pointer;
}

.link_arrow i {
    color: #565656;
    cursor: pointer;
}