:root {
  --main-color: #fff;
  --second-color: #0078ff;
  --third-color: #ddd;
  --P-color: #555;
  --black-transparent: rgba(0, 0, 0, 0.548);
  --balck-color: #000;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    sans-serif;
}

/* Navbar */

.navbar {
  padding: 10px 0;
  background: var(--black-transparent);
}

.logo {
  color: var(--main-color) !important;
  font-size: 30px;
  font-weight: 600;
}

.nav-link {
  color: var(--main-color) !important;
  font-weight: 600;
  margin-left: 10px;
  font-size: 17px;
}

.dropdown-menu .dropdown-item {
  font-size: 17px;
}

.dropdown-menu .dropdown-item:hover {
  color: var(--second-color) !important;
}

.nav-link:hover {
  color: var(--second-color) !important;
}

/* Hero */

.hero {
  height: 100vh;
  background-image: url("../img/intro-bg.jpg");
  background-size: cover;
  background-position: center;
  position: relative;

  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--main-color);
}

.hero-content h1 {
  font-size: 70px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 40px;
  font-weight: 600;
}

.cursor {
  animation: blink 0.8s infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Responsive */

/* Tablet */

@media screen and (max-width: 992px) {
  .navbar-nav {
    padding: 15px;
    margin-top: 15px;
    border-radius: 10px;
    width: 100%;
  }

  .nav-link {
    margin: 10px 0;
    font-size: 15px;
  }

  .hero-content h1 {
    font-size: 50px;
  }

  .hero-content p {
    font-size: 28px;
  }
}

/* Mobile */

@media screen and (max-width: 768px) {
  .navbar {
    padding: 10px 0;
  }

  .logo {
    font-size: 28px;
  }

  .hero {
    padding: 0 20px;
  }

  .hero-content h1 {
    font-size: 38px;
    line-height: 1.3;
  }

  .hero-content p {
    font-size: 22px;
  }
}

/* Small Mobile */

@media screen and (max-width: 576px) {
  .hero-content h1 {
    font-size: 30px;
  }

  .hero-content p {
    font-size: 18px;
  }
}

/*   about    */
.about-section {
  background: var(--main-color);
  width: 85%;
  min-height: 80vh;
  margin: 100px auto;
  display: flex;
  gap: 50px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  justify-content: center;
  align-items: flex-start;
  padding: 40px;

  /* Animation */
  opacity: 0;
  transform: translateY(80px);
  animation: showSection 2s ease forwards;
}

@keyframes showSection {
  from {
    opacity: 0;
    transform: translateY(80px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.left-side {
  width: 50%;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
}

.left-side img {
  width: 160px;
  height: 170px;
  object-fit: cover;
}

.info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 15px;
  font-weight: 400;
  margin-left: 60px;
}

.info strong {
  font-weight: 700;
  font-size: 17px;
}

.skills {
  grid-column: 1/3;
}

.skills h3 {
  margin-bottom: 15px;
  font-size: 20px;
}

.skills p {
  margin: 10px 0 10px;
  font-size: 17px;
}

.progress {
  width: 100%;
  height: 15px;
  background: var(--third-color);
  border-radius: 20px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--second-color);
  width: 0;
}

/* Skill animation */
.html {
  animation: html 2s ease forwards;
  animation-delay: 1s;
}

.css {
  animation: css 2s ease forwards;
  animation-delay: 1.2s;
}

.php {
  animation: php 2s ease forwards;
  animation-delay: 1.4s;
}

.js {
  animation: js 2s ease forwards;
  animation-delay: 1.6s;
}

@keyframes html {
  to {
    width: 85%;
  }
}

@keyframes css {
  to {
    width: 75%;
  }
}

@keyframes php {
  to {
    width: 50%;
  }
}

@keyframes js {
  to {
    width: 90%;
  }
}

.right-side {
  width: 50%;
}

.right-side h1 {
  font-size: 30px;
  margin-bottom: 15px;
}

.right-side h1::after {
  content: "";
  display: block;
  width: 100px;
  height: 4px;
  background: var(--second-color);
  margin-top: 10px;
}

.right-side p {
  margin-top: 5px;
  font-size: 20px;
  color: var(--P-color);
}

/*    About responsive  */
@media (max-width: 992px) {
  .about-section {
    flex-direction: column;
    width: 95%;
    min-height: auto;
    gap: 30px;
    padding: 30px;
  }

  .left-side,
  .right-side {
    width: 100%;
  }

  .left-side {
    grid-template-columns: 180px 1fr;
  }

  .right-side h1 {
    font-size: 32px;
  }

  .right-side p {
    font-size: 18px;
    line-height: 1.8;
  }

  .info {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .about-section {
    width: 95%;
    padding: 25px 20px;
    gap: 25px;
  }

  .left-side {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .left-side img {
    width: 170px;
    height: 170px;
    margin: auto;
  }

  .skills {
    grid-column: auto;
  }

  .info {
    margin: 0;
    font-size: 16px;
  }

  .skills h3 {
    font-size: 22px;
  }

  .skills p {
    font-size: 15px;
  }

  .right-side h1 {
    font-size: 28px;
  }

  .right-side p {
    font-size: 16px;
    line-height: 1.8;
  }
}

@media (max-width: 480px) {
  .about-section {
    width: 100%;
    padding: 15px;
  }

  .left-side img {
    width: 140px;
    height: 140px;
  }

  .info p {
    font-size: 14px;
  }

  .right-side h1 {
    font-size: 24px;
  }

  .right-side p {
    font-size: 14px;
  }

  .skills h3 {
    font-size: 20px;
  }
}

/* -----------services----------------- */
/* -------------------------------------- */

#services .section-title {
  font-size: 40px;
  letter-spacing: 1px;
  color: #1e1e1e;
}

#services .section-title-line {
  width: 40px;
  height: 5px;
  background-color: #0078ff;
  margin: 10px auto 0;
}

#services .service-card {
  border-radius: 15px;
  box-shadow: 0 10px 29px 0 rgba(68, 88, 144, 0.1);
  transition: all 0.3s ease-in-out;
}

#services .service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px 0 rgba(68, 88, 144, 0.15);
}

#services .service-icon-box {
  width: 100px;
  height: 100px;
  border: 10px solid #0078ff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.4s ease-in-out;
}

#services .service-icon-box i {
  font-size: 32px;
  color: #1e1e1e;
  transition: all 0.4s ease-in-out;
}

#services .service-card:hover .service-icon-box {
  background-color: #0078ff;
  border-color: #cde1f8;
}

#services .service-card:hover .service-icon-box i {
  color: #ffffff;
  transform: scale(1.1);
}

#counters .overlay-blue {
  background-color: var(--second-color);
  height: 100%;
}

#counters .counter-icon {
  width: 80px;
  height: 80px;
  border: 8px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#counters .counter-icon i {
  font-size: 26px;
  color: #ffffff;
}

/* تباعد الحروف للنصوص الصغيرة */
#counters .tracking-wide {
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 32px;
  }
  .service-card {
    padding: 30px 20px !important; /* تقليل البادينج على الشاشات الصغيرة */
  }
}

/* start portfolio section */

.line {
  width: 50px;
  height: 3px;
  background-color: var(--second-color);
  margin: 0 auto;
}

.item .img img {
  transition: all 1s;
}

.item:hover .img img {
  transform: scale(1.3);
}

/*click + */
.box {
  background-color: rgba(0, 0, 0, 0.466);
  inset: 0;
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.box-img {
  width: 500px;
  height: 500px;
  background-image: url(../img/work-1.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 24px;
  position: relative;
}

i.fa-circle-xmark {
  position: absolute;
  top: 10px;
  right: 10px;
}

/*end  */

/* end portfolio section */

/*start slider   */
#slider .bgImage {
  /* stretch bgImage to fill it's parent */
  inset: 0;
}

#slider .bgImage img {
  /* strips photo colors leave only dark/light  & brightness to darken it slightly*/
  filter: grayscale(100%) brightness(75%);
}

#slider .bgImage::after {
  content: "";
  background-color: #4495ec;
  position: absolute;
  inset: 0;
  mix-blend-mode: color; /* mixing colors with blue*/
}

.carousel-item img.photo {
  /* white color ring around the photo */
  border: 4px solid #fff;
}

/*end slider  */

/* -------------------------- */
/* -------------------------- */
/*---------------- Blog ----------------*/
#blog {
  background: #f5f5f5;
}

#blog .section-title {
  font-size: 40px;
  font-weight: 700;
  color: #1e1e1e;
}

#blog .section-title-line {
  width: 40px;
  height: 5px;
  background: #0078ff;
  margin: 10px auto 20px;
}

#blog .blog-card {
  border: none;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: 0.3s;
}

#blog .blog-card:hover {
  transform: translateY(-8px);
}

#blog .card-img-top {
  width: 100%;
  display: block;
}

#blog .card-body {
  position: relative;
  padding: 25px;
}

#blog .blog-category {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: #0078ff;
  color: #fff;
  padding: 6px 18px;
  font-size: 12px;
  border-radius: 4px;
}

#blog .card-title {
  font-size: 21px;
  transition: 0.3s;
  cursor: pointer;
}

#blog .card-title:hover {
  color: #0078ff;
}

#blog .card-text {
  color: #6c757d;
  line-height: 1.7;
}

#blog .card-footer {
  background: #f8f8f8;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#blog .author {
  display: flex;
  align-items: center;
}

#blog .author img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  margin-right: 10px;
  object-fit: cover;
}

#blog .author span {
  font-size: 15px;
  color: #1e1e1e;
}

#blog small {
  color: #6c757d;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* contact section */

.contact-section {
  background-color: #4a9af0;
  background-image:
    linear-gradient(
      to right,
      rgba(74, 154, 240, 0.75) 100%,
      rgba(74, 154, 240, 0.75) 100%
    ),
    url("img/imgi_14_overlay-bg.png");
  background-size: cover;
  background-position: center;
  background-blend-mode: multiply;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.contact-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(0, 0, 0, 0.5);
}

.section-title {
  font-weight: 700;
  color: #212529;
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 1.5rem;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 55px;
  height: 3px;
  background: #4a9af0;
}

.contact-section .form-control {
  border-radius: 6px;
  border: 1px solid #dee2e6;
  padding: 0.75rem 1rem;
}

.contact-section .form-control:focus {
  border-color: #4a9af0;
  box-shadow: 0 0 0 0.2rem rgba(0, 120, 255, 0.15);
}

.btn-send {
  background-color: #4a9af0;
  color: #fff;
  border: none;
  padding: 0.65rem 2rem;
  font-weight: 500;
}

.btn-send:hover {
  background-color: #4a9af0;
  color: #fff;
}

.info-text {
  color: #6c757d;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.info-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #212529;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.info-list i {
  color: #4a9af0;
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.social-icons {
  display: flex;
  gap: 12px;
  margin-top: 1.5rem;
}

.social-icons a {
  width: 38px;
  height: 38px;
  border: 1.5px solid #4a9af0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4a9af0;
  text-decoration: none;
  transition: 0.2s;
}

.social-icons a:hover {
  background: #4a9af0;
  color: #fff;
}
/*---------------------------------------------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------------------------------------------*/
/*-------------------------------------------------- Footer -----------------------------------------------------*/
.footer {
  background-color: #06377e;
  color: white;
  text-align: center;
  padding: 20px 0;
  position: relative;
}

.footer p {
  margin: 5px 0;
}

.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #0d6efd;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.3s;
}

.back-to-top:hover {
  background-color: #0d6efd;
}
