:root {
    --main-color: 0, 120, 255;
    --transition-anchor: 0.3s;
    --transition-icon: 0.6s;
    --bg-color: #f7f7f7;
}

body {
    font-family: "Cairo", serif;
    overflow-x: hidden !important;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    cursor: pointer;
}

.fab-container {
    position: fixed;
    bottom: 20px;
    right: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.fab-button {
    background-color: #007bff;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s, transform 0.3s ease-in-out;
}

.fab-button:hover {
    background-color: #0056b3;
}

.fab-menu {
    display: none;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 10px;
    align-items: center;
    transition: all 0.3s ease;
}

.fab-item {
    background-color: #fff;
    color: var(--bs-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, background-color 0.3s;
}

.fab-item:hover {
    background-color: #e9ecef;
    transform: scale(1.1);
}

.fab-container.active .fab-menu {
    display: flex;
}

.fab-container.active .fab-button {
    transform: rotate(45deg);
}

.fab-container.active {
    flex-direction: column;
    gap: 15px;
}

.fab-container:not(.active) .fab-item {
    transform: translateY(100px);
    opacity: 0;
    visibility: hidden;
}

.fab-container.active .fab-item {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.navbar {
    box-shadow: 0px 30px 50px rgb(0 0 0 / 20%);
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar button[aria-expanded] {
    border: none;
    transition: var(--transition-anchor);
}

.navbar button[aria-expanded="true"] {
    border: 0.2rem solid #fff;
}

.navbar button svg {
    font-size: 25px;
}

.navbar-nav .nav-link {
    color: #fff;
}

.navbar-nav .nav-link:is(.active, .show),
.navbar-nav .nav-link:hover {
    color: rgb(var(--main-color));
    transition: var(--transition-anchor);
}

.navbar-nav .nav-link.nav-link:is(.active, .show):before,
.navbar-nav .nav-link::before {
    content: "";
    width: 100%;
    margin-inline: auto;
    height: 0.1rem;
    background-color: rgb(var(--main-color));
    display: block;
    transform: translateY(1.8rem);
    transition: var(--transition-anchor);
}

.navbar-nav .nav-link::before {
    width: 0;
}

.navbar-nav .nav-link:hover:before {
    width: 100%;
}

.navbar #btn-english,
.navbar #btn-arabic {
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 2rem !important;
    }
    .navbar-nav .nav-link.nav-link:is(.active, .show):before,
    .navbar-nav .nav-link::before {
        transform: translateY(2.5rem);
    }
    .navbar-nav .nav-link {
        font-size: 1.5rem;
    }
}

#home.bg-style {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

#home.bg-style::before {
    content: "";
    background-image: url("../img/bg1.webp");
    position: absolute;
    top: 0;
    z-index: -1;
    left: 0;
    width: 100%;
    height: 100%;
    animation: slide 15s infinite;
    background-size: cover;
    background-position: center;
}

@keyframes slide {
    0% {
        background-image: url("../img/bg1.webp");
    }
    50% {
        background-image: url("../img/bg2.webp");
    }
    100% {
        background-image: url("../img/bg1.webp");
    }
}

#home .content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

#home .content h1 {
    font-size: 2rem;
    color: var(--bs-gray-200);
    width: 70%;
    text-align: center;
}

#home .content .typed.translate-ar,
#home .content .typed.translate-en {
    font-size: 3.8rem;
    color: #ececec;
}

#home .content .typed.translate-en::after,
#home .content .typed.translate-ar::after {
    content: "";
    color: #fff;
    font-weight: 400;
    padding-left: 1rem;
    padding-right: 0.4rem;
}

#home .content .typed.translate-en::after {
    border-right: 0.1rem solid #ececec;
}

#home .content .typed.translate-ar::after {
    border-left: 0.1rem solid #ececec;
    animation: typed-ar 20s linear infinite;
}

#home .content .typed.translate-en::after {
    animation: typed-en 20s linear infinite;
}

.social a {
    width: 35px;
    height: 35px;
    background-color: rgba(0, 0, 0, 0.5);
}

.social.developer a {
    width: 25px;
    height: 25px;
    font-size: 0.75rem;
}

.social a:hover {
    background-color: var(--bs-primary);
}

#about .img-profile::after {
    content: "";
    width: 80%;
    height: 80%;
    position: absolute;
    left: -30px;
    bottom: -30px;
    background-image: url("../img/dots.png");
    background-repeat: repeat;
    z-index: -1;
}

#about .skills-rate .progress-bar {
    background-color: var(--bg-color);
    box-shadow: 0px 2px 7px rgb(0 0 0 / 15%) inset;
    margin-bottom: 2.25rem;
}

#about .skills-rate .progress-bar span {
    font-size: 0.8rem;
    padding-block: 0.25rem;
    width: attr(data-rate);
}

#about .skills-rate .progress-bar span p {
    font-size: inherit;
}

#about .skills-rate .progress-bar span::after {
    content: attr(data-rate);
}

.fade-image {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 2s ease;
}

.fade-image.show {
    opacity: 1;
    position: relative;
}

#about button,
#contact button {
    transition: var(--transition-icon);
    color: var(--bs-secondary);
    background-color: #fff;
    font-size: 0.9rem;
    padding: 10px 25px;
}

#about button:first-of-type,
#about button:hover,
#contact button {
    background-color: var(--bs-secondary);
    color: #fff;
}

@media screen and (max-width: 768px) {
    #about h2 {
        font-size: 3rem;
    }
    #about .about-desc {
        font-size: 1.5rem;
    }
    #about .skills-rate .progress-bar span {
        font-size: 1rem;
    }
}

#services {
    background-color: var(--bg-color);
}

.head h2 {
    font-size: 3rem;
    font-weight: 900;
    width: fit-content;
    position: relative;
    z-index: 1;
}

.head h2::after {
    content: "";
    width: 100%;
    height: 30px;
    background-image: url("../img/dots.png");
    background-repeat: repeat;
    position: absolute;
    bottom: -10px;
    left: 0;
    z-index: -1;
}

#services .service,
#contact .contact {
    box-shadow: 0px 10px 30px -8px rgb(0 0 0 / 10%);
}

.icon-container {
    width: 4.5rem;
    height: 4.5rem;
    background-color: var(--bg-color);
    transition: var(--transition-icon);
}

.icon-container svg {
    color: var(--bs-secondary);
    font-size: 1.7rem;
    transition: var(--transition-icon);
}

#services .service p,
#contact .contact p {
    font-size: 0.9rem;
}

div:hover>.icon-container {
    background-color: var(--bs-secondary);
}

div:hover>.icon-container svg {
    color: #fff;
}

@media screen and (max-width: 768px) {
    #services .service h3,
    #contact .contact h6 {
        font-size: 1.8rem !important;
    }
    #services .service p,
    #contact .contact .text-address {
        font-size: 1.5rem;
    }
}

.nav-tabs .nav-item .nav-link::after,
.nav-tabs .nav-link.active::after {
    content: "";
    width: 0%;
    height: 2px;
    position: absolute;
    bottom: -5px;
    left: 0;
    transition: var(--transition-anchor);
    background-color: var(--bs-secondary);
}

.nav-tabs .nav-item .nav-link:hover::after,
.nav-tabs .nav-item .nav-link.active::after {
    width: 100%;
}

#portfolio .tab-content .port .content {
    width: 98.5%;
    height: 97%;
    background-color: #fffffff1;
    gap: 10px;
    opacity: 0;
    transition: 0.5s;
}

#portfolio .tab-content .port.active .content {
    opacity: 1;
    gap: 0;
}

#portfolio .holder {
    width: 30px;
    height: 30px;
    background-color: var(--bs-secondary);
    transition: var(--transition-anchor);
}

#portfolio .holder svg {
    color: #fff;
    font-size: 12px;
}

#portfolio .holder:hover {
    background-color: #fff;
}

#portfolio .holder:hover svg {
    color: var(--bs-secondary);
}

#portfolio .port {
    height: 300px;
    overflow: hidden;
    position: relative;
}

#portfolio .port img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#portfolio .content {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
}

#portfolio .carousel-control-next,
#portfolio .carousel-control-prev {
    width: 7%;
}

@media screen and (max-width: 768px) {
    .nav-tabs .nav-item .nav-link {
        font-size: 1.5rem;
    }
}

#testimonials {
    background-color: var(--bg-color);
}

.author-img {
    width: 5rem;
    height: 5rem;
    overflow: hidden;
}

.author-img img {
    object-fit: cover;
}

.desc-text {
    font-size: 0.9rem;
    max-width: 80%;
    margin-inline: auto;
}

#testimonials h3+p {
    font-size: 0.7rem;
    font-weight: 700;
}

.carousel-indicators [data-bs-target] {
    width: 0.7rem;
    height: 0.7rem;
    background-color: #869791;
}

@media screen and (max-width: 768px) {
    #testimonials .desc-text {
        font-size: 1.5rem;
    }
    #testimonials h3 {
        font-size: 2rem;
    }
    #testimonials h3+p {
        font-size: 1rem;
        font-weight: 700;
    }
}

@media screen and (max-width: 350px) {
    .desc-text {
        max-width: 100%;
    }
}

.author-img img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
}

#fun-facts h3 {
    letter-spacing: -2px;
    font-weight: 900;
}

#contact {
    background-color: var(--bg-color);
}

#contact .icon-container {
    width: 3.5rem;
    height: 3.5rem;
}

#contact .icon-container svg {
    font-size: 1.5rem;
}

#contact form .row div input,
#contact textarea {
    width: 49%;
    background-color: #f4f4f4;
    border: none;
    outline: none;
    color: #869791;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

#contact textarea {
    width: 100%;
}

#contact form .row div input:focus {
    border: none;
}

#contact .map-container {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
}

#contact .map-container iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1rem solid var(--bs-white);
    width: 90%;
    height: 90%;
}

#contact button {
    width: fit-content;
    padding-inline: 50px;
}

#contact button:hover {
    background-color: #fff;
    color: var(--bs-secondary);
}

footer {
    margin: 0;
    padding: 0;
    background-color: var(--bs-secondary);
}

footer p {
    color: #748182;
    word-spacing: 2px;
}

@media (min-width: 0px) and (max-width: 359px) {
    html {
        font-size: 9px;
    }
}

@media (min-width: 360px) {
    html {
        font-size: 11px;
    }
}

@media (min-width: 576px) {
    html {
        font-size: 14px;
    }
}

@media (min-width: 768px) {
    html {
        font-size: 15px;
    }
}

@media (min-width: 992px) {
    html {
        font-size: 16px;
    }
}