html {
  scroll-behavior: smooth;
}

/* KEYFRAMES */

@keyframes fade-down {
  0% {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fade-up {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.reveal {
  position: relative;
  opacity: 0;
  display: none;
}

.reveal.active {
  opacity: 1;
  display: block;
}

.fade-down {
  animation: fade-down 0.5s;
}

.fade-down-sub {
  animation: fade-down 1s;
}

body {
  font-family: "Cairo", sans-serif;
  background-color: #171717 !important;
  background-image: linear-gradient(
      to right,
      rgba(128, 128, 128, 0.07) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(128, 128, 128, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  background-color: transparent; /* Or a dark color if needed */
  background-repeat: repeat;
}

a {
  text-decoration: none;
}

ul {
  list-style: none;
}

/* Navbar */

.logo {
  color: white;
  font-size: 30px;
  font-weight: 500;
  animation: fade-down 0.5s;
}

.logo:hover {
  color: white;
}
.navbar-nav li a {
  color: white;
  font-size: 25px;
  animation: fade-down 0.5s;
}

.navbar-elements {
  padding: 30px 70px;
}

.navbar-elements li {
  padding-left: 15px;
}

.navbar-elements li a:hover {
  color: antiquewhite;
}

.navbar-elements li a:active {
  color: antiquewhite;
}

.nav-link:focus {
  color: antiquewhite;
}

.header-scrolled {
  background-color: #171717;
}

/* Main section */

.main-section {
  overflow: hidden;
  /* background-color: #171717; */
  /* background-image: url(/assets/bg.png); */
  height: 880px;
  color: white;
}

.main-section h1 {
  font-size: 70px;
  animation: fade-up 0.5s;
}

.main-section .main-content {
  margin-top: 230px;
}

.main-section img {
  margin-top: 150px;
  padding-right: 150px;
  animation: fade-up 0.5s;
  transition: 1s;
}

.img-en {
  padding-left: 150px;
}

.main-section img:hover {
  -webkit-transform: scale(1.1);
  -moz-transform: scale(1.1);
  -ms-transform: scale(1.1);
  -o-transform: scale(1.1);
  transform: scale(1.1);
}

.btn {
  -webkit-border-radius: 28;
  -moz-border-radius: 28;
  border-radius: 28px;
  color: #171717;
  font-size: 23px;
  background: #a38866;
  margin-top: 20px;
  padding: 13px 30px 10px 30px;
  text-decoration: none;
  cursor: pointer;
  animation: fade-up 0.5s;
}

.btn:hover {
  background: antiquewhite;
  color: #171717;
  text-decoration: none;
}

.navbar-toggler:focus {
  color: #fcfcfc;
}

.fa-bars {
  color: white;
}

.section-title h2::before {
  content: "";
  position: absolute;
  display: block;
  width: 120px;
  height: 1px;
  background: #ddd;
  bottom: 1px;
  left: calc(50% - 60px);
}

/* About me */

.about-me-section {
  background-color: #fff !important;
  background-image: linear-gradient(
      to right,
      rgba(128, 128, 128, 0.07) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(128, 128, 128, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  background-color: transparent; /* Or a dark color if needed */
  padding: 40px 0px 50px 0px;
  height: auto;
  min-height: 328px;
}


.about-me-title {
  padding: 30px 0;
}

.about-me-title h2 {
  font-size: 40px;
  font-weight: 700;
}

.about-me-title span::after {
  content: "";
  position: absolute;
  display: block;
  width: 120px;
  height: 3px;
  background: #9f9f9f;
  /* bottom: 0; */
  left: calc(50% - 59px);
}

.about-me-paragraph {
  display: flex;
  text-align: center;
  font-size: 19px;
  line-height: 20px;
  word-wrap: break-word;
}

.about-me-paragraph p {
  line-height: 29px;
}

/* projects */

.projects-section {
  padding: 40px 0px 50px 0px;
  height: 100%;
  margin-bottom: 40px;
}

.cards-selector:nth-of-type(5) {
  display: flex;
  justify-content: center !important;
  margin: 0 auto;
  margin-top: 20px;
}

.projects-title {
  padding: 20px 0px 40px 0px;
}

.projects-title h2 {
  font-size: 35px;
  font-weight: 700;
  color: white;
  padding-bottom: 6px;
}

.projects-title span::after {
  content: "";
  position: absolute;
  display: block;
  width: 120px;
  height: 3px;
  background: #9f9f9f;
  /* bottom: 0; */
  left: calc(50% - 59px);
}

.card {
  width: 18rem;
  /* margin-right: 40px; */
  border: white solid 5px;
  border-radius: 20px;
  transition: 1s;
}

.card img {
  border-radius: 30px;
}

.card:hover {
  -webkit-transform: scale(1.1);
  -moz-transform: scale(1.1);
  -ms-transform: scale(1.1);
  -o-transform: scale(1.1);
  transform: scale(1.1);
}

.card-title {
  font-weight: 700;
}

.card-text {
  font-size: 14px;
  line-height: 20px;
}

#myImg:hover {
  opacity: 0.7;
}
#myImg2:hover {
  opacity: 0.7;
}
#myImg3:hover {
  opacity: 0.7;
}

.readmore-projects {
  text-decoration: none;
  color: #0b0b0b;
  font-weight: 700;
  padding: 9px 20px 9px 20px;
  border-radius: 30px;
  font-size: 14px;
}

.readmore-projects:hover {
  color: rgb(163, 136, 102);
}

/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  padding-top: 100px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0, 0, 0); /* Fallback color */
  background-color: rgba(0, 0, 0, 0.9); /* Black w/ opacity */
}

/* Modal Content (Image) */
.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
}

/* Caption of Modal Image (Image Text) - Same Width as the Image */
.caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 150px;
}

/* Add Animation - Zoom in the Modal */
.modal-content,
.caption {
  animation-name: zoom;
  animation-duration: 0.6s;
}

@keyframes zoom {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* The Close Button */
.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px) {
  .modal-content {
    width: 100%;
  }
}

/* Youtube */

.youtube-section {
  padding: 40px 0px 50px 0px;
  background-image: linear-gradient(
      to right,
      rgba(128, 128, 128, 0.07) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(128, 128, 128, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  background-color: #fff; /* Or a dark color if needed */
}

.youtube-section h2 {
  color: #0b0b0b;
}

.icon-video {
  position: absolute;
  z-index: 9999;
  height: 30px;
}

.icon-video:nth-child(1) {
  top: 100px;
  bottom: auto;
  right: 0px;
}

.icon-video:nth-child(2) {
  top: 100px;
  left: 0px;
}

.icon-video:nth-child(3) {
  bottom: -13px;
  left: 230px;
}

/* Contact */

.contact-me-section {
  /* background: white; */
  padding: 40px 0px 50px 0px;
  height: 870px;
  background-color: #171717 !important;
  background-image: linear-gradient(
      to right,
      rgba(128, 128, 128, 0.07) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(128, 128, 128, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  background-color: transparent; /* Or a dark color if needed */
}

.contact-me-title {
  padding: 30px 0;
  color: #fff;
}

.contact-me-title h2 {
  font-size: 40px;
  font-weight: 700;
}

.contact-me-title span::after {
  content: "";
  position: absolute;
  display: block;
  width: 200px;
  height: 3px;
  background: #9f9f9f;
  /* bottom: 0; */
  left: calc(50% - 95px);
  margin-top: 10px;
}

/* form */

form {
  max-width: 420px;
  margin: 50px auto;
}

.contact-input {
  font-family: "Cairo", sans-serif;
  color: #b8b8b8;
  font-weight: 500;
  font-size: 18px;
  border-radius: 5px;
  line-height: 22px;
  background-color: transparent;
  border: 2px solid #adadad;
  transition: all 0.3s;
  padding: 13px;
  margin-bottom: 15px;
  width: 100%;
  box-sizing: border-box;
  outline: 0;
}

.contact-input:focus {
  border: 2px solid #f5f5f5;
}

textarea {
  height: 150px;
  line-height: 150%;
  resize: vertical;
}

[type="submit"] {
  width: 100%;
  background: #ffffff;
  border-radius: 5px;
  border: 0;
  cursor: pointer;
  color: rgb(39, 39, 39);
  font-size: 24px;
  padding-top: 10px;
  padding-bottom: 10px;
  transition: all 0.3s;
  margin-top: -4px;
  font-weight: 700;
  margin-top: 5px;
}

[type="submit"]:hover {
  background: antiquewhite;
  color: #171717;
}

.g-recaptcha {
  padding-bottom: 20px;
}

#g-recaptcha-response {
  display: block !important;
  position: absolute;
  margin: -78px 0 0 0 !important;
  width: 302px !important;
  height: 76px !important;
  z-index: -999999;
  opacity: 0;
}

.footer {
  height: 100px;
  text-align: center;
  color: #171717;
  padding-top: 40px;
  background-color: #fff !important;
  background-image: linear-gradient(
      to right,
      rgba(128, 128, 128, 0.07) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(128, 128, 128, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  background-color: transparent; /* Or a dark color if needed */
}

#footer {
  padding-top: 80px;
}

.linkedin {
  font-size: 70px;
}

.faisalUrl {
  text-decoration: none;
  color: #121212;
  font-weight: 800;
}

/* phone */
@media screen and (max-width: 767px) {
  .main-section {
    height: 572px;
  }
  .main-section .main-content {
    margin-top: 0px;
  }

  .main-section h1 {
    font-size: 30px;
  }

  .btn {
    font-size: 20px;
  }

  .main-section img {
    width: 80%;
    display: block;
    margin-top: 0px;
    padding-right: 0px;
    margin-bottom: 10px;
  }

  .img-en {
    padding-left: 0px;
  }

  .img-col {
    display: flex;
    justify-content: center;
  }

  .main-container {
    display: flex;
    flex-direction: column-reverse;
  }

  .navbar-elements {
    width: 100% !important;
  }

  .cards-selector {
    justify-content: center !important;
    padding-top: 40px;
  }

  .about-me-paragraph p {
    line-height: 29px;
    font-size: 20px;
  }

  .projects-section {
    height: 100%;
  }


  .about-me-section-en {
    height: auto !important;
    min-height: 328px;
  }

  .about-me-section {
    height: 460px;
  }



  .icon-video {
    position: absolute;
    z-index: 9999;
    height: 20px;
  }

  .icon-video:nth-of-type(1) {
    top: 110px;
    bottom: auto;
    right: 5px;
  }

  .icon-video:nth-of-type(2) {
    top: 120px;
    left: 5px;
  }

  .icon-video:nth-of-type(3) {
    bottom: -8px;
    left: 139px;
  }
}

/* Blog page */

.blog-heading {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
}

.blog-heading span {
  color: antiquewhite;
}

.blog-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0px;
  flex-wrap: wrap;
}

.blog-box {
  width: 350px;
  background-color: #ffffff;
  border: 1px solid #ececec;
  margin: 20px 20px;
  border-radius: 20px;
}
.blog-img {
  width: 100%;
  height: auto;
}
.blog-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 20px;
}

.blog-img-inside {
  width: 100%;
  height: auto;
  margin-bottom: 20px;
}
.blog-img-inside img {
  width: 50%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 20px;
}

.blog-text {
  padding: 30px;
  display: flex;
  flex-direction: column;
}
.blog-text span {
  color: rgb(163, 136, 102);
  font-size: 0.9rem;
}
.blog-text .blog-title {
  font-size: 1.3rem;
  font-weight: 500;
  color: #272727;
}
.blog-text p {
  color: #9b9b9b;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 20px 0px;
}
.blog-text a {
  color: #0f0f0f;
}
.blog-text a:hover {
  color: rgb(163, 136, 102);
  transition: all ease 0.3s;
}

@media (max-width: 1250px) {
  .blog-box {
    width: 300px;
  }
}
@media (max-width: 1100px) {
  .blog-box {
    width: 70%;
  }
}

@media (max-width: 550px) {
  .blog-box {
    margin: 20px 10px;
    width: 100%;
  }
  #blog {
    padding: 20px;
  }
}

/* Blog post */

.post-header {
  width: 100%;
  height: 600px;
}

.post-container {
  max-width: 800px;
  margin: auto;
  width: 100%;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 4rem !important;
}

.back-home {
  color: rgb(163, 136, 102);
  font-size: 0.9rem;
}

.header-title {
  width: 90%;
  font-size: 2.6rem;
  color: RGB(211, 211, 211);
  text-align: center;
  margin-bottom: 1rem;
  margin-top: 0.9rem;
  line-height: 3.6rem;
}

.header-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center;
}

.sub-heading {
  font-size: 2rem;
  color: RGB(211, 211, 211);
  line-height: 2.9rem;
  font-weight: 800;
}

.sub-sub-heading {
  font-size: 1.5rem;
  color: RGB(211, 211, 211);
  line-height: 2.9rem;
  font-weight: 700;
}

.post-text {
  font-size: 1.2rem;
  line-height: 1.9rem;
  margin: 1rem 0;
  color: RGB(211, 211, 211);
}

/* responsive blog */

@media (max-width: 768px) {
  section {
    padding: 2rem;
  }

  .footer {
    padding: 2rem 0;
  }

  .header-content {
    margin-top: 3rem !important;
  }

  .header-title {
    font-size: 2rem;
  }

  .header-img {
    height: 370px;
  }

  .post-header {
    height: 550px;
  }

  .post-content {
    margin-top: 3rem !important;
  }
}

@media (max-width: 800px) {
  .post-container {
    margin: 0 auto;
    width: 95%;
  }
}

.rs-post {
  color: rgb(163, 136, 102);
  text-decoration: none;
}

/* Image Slider Styles */
.gallery-carousel-container {
  margin-top: 40px;
  margin-bottom: 40px;
}

.image-slider {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 20px;
  border: white solid 5px;
}

.slider-container {
  position: relative;
  width: 100%;
  height: 400px;
}

.slider-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  display: none;
}

.slider-slide.active {
  opacity: 1;
  display: block;
}

.slider-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
}

.slider-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.95));
  color: white;
  padding: 25px 20px;
  text-align: center;
}

.slider-caption h5 {
  margin: 0 0 12px 0;
  font-size: 1.4rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.5px;
}

.slider-caption p {
  margin: 0;
  font-size: 1rem;
  opacity: 0.95;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  line-height: 1.4;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.carousel-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  border-radius: 15px;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 20px;
  text-align: center;
}

.carousel-caption h5 {
  margin: 0 0 10px 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.carousel-caption p {
  margin: 0;
  font-size: 1rem;
  opacity: 0.9;
}

/* Navigation Arrows */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid white;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 10;
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.slider-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.prev-arrow {
  left: 20px;
}

.next-arrow {
  right: 20px;
}

/* Dots Indicator */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: white;
  transform: scale(1.2);
}

.dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

/* Responsive Slider */
@media (max-width: 768px) {
  .image-slider {
    max-width: 100%;
  }
  
  .slider-container {
    height: 300px;
  }
  
  .slider-caption {
    padding: 15px;
  }
  
  .slider-caption h5 {
    font-size: 1.1rem;
  }
  
  .slider-caption p {
    font-size: 0.9rem;
  }
  
  .slider-arrow {
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
  
  .prev-arrow {
    left: 15px;
  }
  
  .next-arrow {
    right: 15px;
  }
}

@media (max-width: 576px) {
  .about-me-section {
    min-height: 800px;
  }
  
  .about-me-section-en {
    min-height: 800px;
  }
  
  .slider-container {
    height: 200px;
  }
  
  .slider-caption {
    padding: 12px;
  }
  
  .slider-caption h5 {
    font-size: 1rem;
  }
  
  .slider-caption p {
    font-size: 0.8rem;
  }
  
  .slider-arrow {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .prev-arrow {
    left: 10px;
  }
  
  .next-arrow {
    right: 10px;
  }
  
  .dot {
    width: 10px;
    height: 10px;
  }
}
