@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap");

:root {
  --primary-color: #ac2e2e;
  --secondary-color: #ac2e2e;
  --extra-light: #f3f4f6;
  --white: #ffffff;
  /* --gradient-1: linear-gradient(to bottom right, #62393c, #181e41); */
  --gradient-1: linear-gradient(to bottom right, #121212, #181e41);
  --gradient-2: linear-gradient(
    to bottom,
    var(--primary-color),
    var(--secondary-color)
  );
  --scroll-btn-size: 54px;
  --scroll-btn-bg: linear-gradient(135deg, #ac2e2e 0%, #ac2e2e 100%);
  --scroll-btn-shadow: 0 8px 20px rgba(20, 20, 30, 0.45);
  --scroll-btn-color: #fff;
  /* --scroll-btn-radius: 14px; */
  --scroll-btn-gap: 22px; 
  --max-width: 1250px;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.section__container {
  max-width: var(--max-width);
  margin: auto;
  padding: 5rem 1rem;
}

.section__header {
  margin-bottom: 1rem;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
}

.section__description {
  max-width: 600px;
  margin-inline: auto;
  color: var(--extra-light);
  text-align: center;
  line-height: 1.75rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  background-image: var(--gradient-2);
  outline: none;
  border: none;
  border-radius: 5rem;
  cursor: pointer;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
}

img {
  width: 100%;
  display: flex;
}

a {
  text-decoration: none;
}

.logo {
  font-size: 1.6rem !important;
  color: var(--text-color);
  font-weight: 800;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}
.logo:hover {
  transform: scale(1.1);
}
.logo span {
  background: linear-gradient(270deg, #798ae1 10%, #ff1d15 100%);
  background-clip: text;
  color: transparent;
}

html,
body {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  color: var(--white);
  background-image: var(--gradient-1);
}

nav {
  position: fixed;
  isolation: isolate;
  top: 0;
  width: 100%;
  max-width: var(--max-width);
  margin: auto;
  z-index: 9;
}

.nav__bar {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background-image: var(--gradient-1);
}

.nav__logo {
  padding: 9px 12px;
  font-size: 1.2rem;
}

.nav__bar a {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
}

.nav__menu__btn {
  font-size: 1.5rem;
  color: var(--white);
  cursor: pointer;
}

.nav__links {
  list-style: none;
  position: absolute;
  width: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  background-image: var(--gradient-2);
  transform: translateY(-100%);
  transition: 0.5s;
  z-index: -1;
}

.nav__links.open {
  transform: translateY(0);
}

.nav__links a {
  color: var(--white);
  transition: 0.3s;
}

.nav__links a:hover {
  color: var(--white);
}

.btn__large {
  display: none;
}

.header__container {
  padding-top: 8rem;
  display: grid;
  gap: 2rem;
  isolation: isolate;
}

.header__content {
  text-align: center;
}

.header__content h1 {
  margin-bottom: 1rem;
  font-size: 5.6rem;
  text-align: center;
}

.header__content .section__description {
  margin-bottom: 2rem;
}

.header__image {
  position: relative;
  isolation: isolate;
  z-index: -1;
}

.header__image img {
  max-width: 500px;
  margin-inline: auto;
  border-radius: 25rem;
}

.header__image::after {
  position: absolute;
  content: "RAZA DEVX";
  letter-spacing: 1.5rem;
  opacity: 0.5;
  right: 1rem;
  top: 50%;
  transform: translate(50%, -50%) rotate(90deg);
}

.about__container {
  display: grid;
  gap: 2rem;
}

.about__image {
  position: relative;
  isolation: isolate;
  max-width: 400px;
  /* margin: auto; */
}

.about__img {
  border-radius: 100%;
}

.about__bg-1,
.about__bg-2 {
  position: absolute;
  max-width: 150px;
  z-index: -1;
}

.about__bg-1 {
  top: 0;
  left: 0;
}

.about__bg-2 {
  right: 0;
  bottom: 0;
}

.about__content {
  text-align: center;
}

.about__content .section__description {
  margin-bottom: 2rem;
}
.service__container .section__header {
  text-align: left;
}
.service__container .section__description {
  text-align: left;
  margin: 0;
}
.service__grid {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}

.service__card {
  padding: 2rem 1rem;
  text-align: center;
  background-image: var(--gradient-2);
  border-radius: 1rem;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
}

.service__card span {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.service__card h4 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.service__card p {
  color: var(--extra-light);
  line-height: 2rem;
}

.portfolio__grid {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
  row-gap: 2rem;
}

.portfolio__card {
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px 15px 30px 15px;
}

.portfolio__card img {
  transition: 0.5s;
  margin-bottom: 10px;
}

.portfolio__card:hover img {
  transform: scale(1.1);
}

.portfolio__banner {
  margin-top: 2rem;
  padding: 2rem;
  display: grid;
  gap: 2rem;
  text-align: center;
  background-image: var(--gradient-2);
  border-radius: 1rem;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
}

.portfolio__banner__card span {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.portfolio__banner__card h4 {
  font-size: 1.2rem;
  font-weight: 600;
}

.portfolio__banner__card p {
  font-weight: 500;
}

.contact__container {
  text-align: center;
}

.contact__container .logo {
  margin-bottom: 1rem;
}

.contact__socials {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact__socials a {
  padding: 7px 10px;
  font-size: 1.5rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 100%;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.1);
  transition: 0.3s;
}

.contact__socials a:hover {
  background: var(--gradient-2);
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
}
.contact__socials .whatsapp:hover {
  background: #47a22f;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
}
.contact__socials .linkedin:hover {
  background: #0a66c2;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
}
.contact__socials .instagram:hover {
  background: #db00ec;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
}
.footer {
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--extra-light);
  text-align: center;
}
.scroll-top {
  position: fixed;
  right: var(--scroll-btn-gap);
  bottom: var(--scroll-btn-gap);
  width: var(--scroll-btn-size);
  height: var(--scroll-btn-size);
  display: inline-grid;
  place-items: center;
  border: none;
  /* border-radius: var(--scroll-btn-radius); */
  border-radius: 100%;
  background: var(--scroll-btn-bg);
  color: var(--scroll-btn-color);
  box-shadow: var(--scroll-btn-shadow);
  cursor: pointer;
  z-index: 9999;
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 300ms cubic-bezier(0.2, 0.9, 0.2, 1),
    opacity 300ms cubic-bezier(0.2, 0.9, 0.2, 1), box-shadow 200ms ease;
  backdrop-filter: blur(4px);
  -webkit-tap-highlight-color: transparent;
}
.scroll-top.visible {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.scroll-top:hover,
.scroll-top:focus {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 30px rgba(20, 20, 30, 0.55);
  outline: none;
}
.scroll-top.focus-visible {
  box-shadow: 0 0 0 4px rgba(201, 59, 136, 0.12), var(--scroll-btn-shadow);
}
.scroll-top svg {
  display: block;
  width: 52%;
  height: 52%;
  color: inherit;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.05));
}
@media (max-width: 480px) {
  :root {
    --scroll-btn-size: 46px;
    --scroll-btn-gap: 16px;
    --scroll-btn-radius: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-top {
    transition: none;
  }
}
@media (width > 576px) {
  .service__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio__banner {
    grid-template-columns: repeat(2, 1fr);
    text-align: left;
  }
}

@media (width > 768px) {
  nav {
    padding: 2rem 1rem;
    position: static;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .nav__bar {
    padding: 0;
    background-image: none;
  }

  .nav__menu__btn {
    display: none;
  }

  .nav__links {
    padding: 0;
    width: unset;
    position: static;
    transform: none;
    flex-direction: row;
    background-image: none;
  }

  .nav__links a:hover {
    color: var(--secondary-color);
  }

  .nav__links li:last-child {
    display: none;
  }

  .btn__large {
    display: flex;
  }

  .header__container {
    padding-top: 5rem;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
  }

  .header__image {
    grid-area: 1/3/2/5;
  }

  .header__image img {
    margin-inline-start: unset;
  }

  .header__content {
    grid-area: 1/1/2/4;
    text-align: left;
  }

  .header__content h1 {
    font-size: 5.6rem;
    line-height: 6rem;
    text-align: left;
  }

  .header__content .section__description {
    text-align: left;
    margin-inline-start: unset;
  }

  .about__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }

  .about__content,
  .about__content :is(.section__header, .section__description) {
    text-align: left;
  }

  .service__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .portfolio__container :is(.section__header, .section__description) {
    text-align: left;
    margin-inline-start: unset;
  }

  .portfolio__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .portfolio__banner {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* 🌐 Responsive Fixes */
@media (max-width: 768px) {
  .header__container {
    grid-template-columns: 1fr;
    padding-top: 5rem;
  }

  .header__content h1 {
    font-size: 2.6rem;
  }

  .header__content .section__description {
    font-size: 1rem;
  }

  .header__image img {
    max-width: 250px;
  }

  .header__image::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .header__content h1 {
    font-size: 2.2rem;
  }

  .header__content .section__description {
    font-size: 0.95rem;
  }
}