/* ROOT & THEME */
:root {
  /* Brand */
  --primary: #2563eb;
  --secondary: #7c3aed;
  --gradient: linear-gradient(135deg, #2563eb, #7c3aed, #9333ea);
  /* Radius */
  --radius-pill: 1000px;
  --radius-md: 16px;
  --radius-sm: 10px;
  /* Spacing */
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  /* Transition */
  --transition: all 0.25s ease;
}
/* DARK MODE */
:root.dark {
  --bg: #0b0f19;
  --surface: #111827;
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(124, 58, 237, 0.5);
}
/* LIGHT MODE */
:root.light {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: #7c3aed4d;
}
/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", sans-serif;
}
a{
  text-decoration: none;
}
/* CONTAINER (Responsive) */
.container, .nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (max-width: 1024px) {
  .container {
    padding: 0 16px;
  }
}
@media (max-width: 640px) {
  .container {
    padding: 0 12px;
  }
}
/* nevbar */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
.preload {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg);
  z-index: 10;
  display: grid;
  place-content: center;
  justify-items: center;
  transition: var(--transition);
}
.preload > * {
  transition: var(--transition);
}
.preload.loaded > * {
  opacity: 0;
}
.preload.loaded {
  transition-delay: 350ms;
  transform: translateY(100%);
}
.circle {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 3px solid var(--text);
  border-block-start-color: var(--primary);
  clear: var(--text);
  margin-block-end: 45px;
  animation: rotate360 1s linear infinite;
}
@keyframes rotate360 {
  0% {
    transform: rotate(0);
  }
  100% {
    transform: rotate(1turn);
  }
}
.preload .text {
  background-image: var(--primary);
  background-size: 500%;
  font-size: calc(2rem + 3vw);
  font-weight: 800;
  line-height: 1em;
  text-transform: uppercase;
  letter-spacing: 16px;
  padding-inline-start: 16px;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-stroke: 0.5px var(--secondary);
  animation: loadingText linear 2s infinite;
}
@keyframes loadingText {
  0% {
    background-position: 100%;
  }
  100% {
    background-position: 0%;
  }
}
/*    navbar         */
#mainHeader {
  position: fixed;
  top: 0;
  width: 100%;
  transition: var(--transition);
  z-index: 1000;
  /* backdrop-filter: blur(60px); */
  background: var(--surface);
}
#mainHeader.hide {
  transform: translateY(-100%);
}
.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-container{
  background: var(--surface);
}
.logo {
  font-size: var(--space-md);
  font-weight: var(--space-lg);
}
.logo img {
  font-size: var(--space-md);
  padding: 12px;
  transition: var(--transition);
}
.logo img:hover {
  transform: translateY(-3px);
}
.navbar {
  text-align: center;
  justify-content: center;
}
.nav-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: 30px;
}
.nav-menu li {
  text-transform: capitalize;
  list-style: none;
  transition: var(--transition);
  text-decoration: none;
}
.nav-item a {
  color: var(--text-primary);
  font-size: var(--space-md);
  text-decoration: none;
}
.nav-link {
  font-weight: 600;
  transition: var(--transition);
}
.nav-link:hover {
  color: var(--text-muted);
  border-bottom: 2px dashed var(--primary);
}
.nav-link.active {
  color: var(--text-muted);
  border-bottom: 2px dashed var(--primary);
  transition: var(--transition);
  scroll-behavior: smooth;
}
.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  padding-inline-end: 0;
}
.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  border: 2px solid var(--primary);
  background-color: var(--text-muted);
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  animation: menuBtn 400ms ease-in-out alternate infinite;
}
@keyframes menuBtn {
  0% {
    transform: scaleX(1);
  }
  100% {
    transform: scaleX(0.3);
  }
}
.hamburger .bar-2 {
  animation-delay: 150ms;
}

.hamburger .bar-3 {
  animation-delay: 300ms;
}
/* this section for the theme */
.dropbtn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--gradient);
  font-size: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.dropbtn svg{
  fill: var(--bg);
}
.dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  right: 0;
  top: 60px;
  width: 200px;
  /* backdrop-filter: blur(30px); */
  background: var(--bg);
  border-radius: 15px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  pointer-events: none;
  transition: var(--transition);
}
.dropdown.active .dropdown-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  border:2px solid var(--border);
  background:rgba(5, 5, 5, 0.08);
  color: var(--text);
  cursor: pointer;
}
.dropdown-menu button i {
  font-size: 18px;
}
.dropdown-menu button:hover{
  background: var(--gradient);
}
/* small screen  */
@media (max-width: 480px) {
  .header__container {
    padding: 0 12px;
   
  }
  
  .logo img {
    height: 60px;
  }
  .nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 20vh;
    flex-direction: column;
    justify-content: flex-start;
    padding: 80px 20px;
    transition: 0.4s ease;
    z-index: 999;
    
  }
  .nav-menu.active {
    left: 0;
  }
  .nav-menu li {
    width: 100%;
    text-align: left;
  }
  .nav-link {
    font-size: 16px;
  }
  .hamburger {
    display: block;
  }
  .hamburger span {
    margin: 4px 0;
    width: 22px;
  }
  .dropdown-menu {
    right: 10px;
    top: 60px;
    width: 160px;
  }
}
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: 80vh;
    flex-direction: column;
    background: var( --gradient);
    padding: 40px;
    gap: 25px;
  }
  .nav-link:hover {
    color: var(--surface);
    border-bottom: 2px dashed var(--surface);
  }
  .nav-menu.active {
    left: 0;
  }
  .nav-link{
    color: var(--bg);
  }
  .nav-link.active{
    color: var(--surface);
    border-bottom: 2px dashed var(--surface);
  }
  .hamburger {
    display: block;
  }
  .hamburger span {
    margin: 5px 0;
  }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .nav-menu {
    gap: 15px;
    padding: 20px;
  }
  .nav-link {
    font-size: 14px;
  }
}
@media (max-width: 768px) {
  .hamburger span {
    margin: 5px 0 !important;
  }
}
/*BUTTON*/
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  background: var(--gradient);
  color: white;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
}
/* Responsive Button */
@media (max-width: 640px) {
  .btn {
    padding: 12px 22px;
    font-size: 14px;
  }
}
/*INPUT*/
.input {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: var(--transition);
}
/* Hover */
.input:hover {
  border-color: var(--border-hover);
  box-shadow: 0 5px 20px rgba(124, 58, 237, 0.15);
}
/* Focus */
.input:focus {
  border-color: var(--border-hover);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

/*CARD*/
.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: var(--space-lg);
  transition: var(--transition);
}
/* Hover */
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 15px 40px rgba(124, 58, 237, 0.15);
}
/* Responsive Card */
@media (max-width: 640px) {
  .card {
    padding: var(--space-md);
  }
}
/*TEXT*/
h1 {
  font-size: 3rem;
  font-weight: 700;
}
p {
  color: var(--text-muted);
  line-height: 1.7;
}
/* Responsive Typography */
@media (max-width: 640px) {
  h1 {
    font-size: 2.2rem;
  }
}

/*UTILITIES*/
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.center {
  display: flex;
  align-items: center;
  justify-content: center;
}
/*Cards Grid System*/
.cards-grid {
  display: grid;
  gap: 24px;
  /* Mobile First → 1 column */
  grid-template-columns: 1fr;
}

/*Tablet (≥768px) → 2 cards*/
@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/*Laptop (≥1024px) → 3 cards*/
@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}
/*Desktop (≥1280px) → 4 cards*/
@media (min-width: 1280px) {
  .cards-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}
/* footer section */
.footer {
  background: var(--bg-secondary);
  padding: 60px 0 30px;
  border-top: 1px solid var(--border);
  z-index: 1;
}
.footer_grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 40px;
}
.logo_footer {
  display: flex;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 16px;
}
.footer_brand p {
  font-size: 14px;
  margin-bottom: 20px;
}
.footer_brand img {
  width: 250px;
  height: auto;
  transition: var(--transition);
}
.footer_brand img:hover {
  transform: scale(1.1);
}
.footer__links h4 {
  position: relative;
  display: inline-block;
  margin-bottom: 25px;
  font-size: 18px;
}
.footer__links h4::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 0;
  width: 80px;
  height: 3px;
  background: var(--gradient);
}
.footer__links h4::before {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 0;
  width: 8px;
  height: 3px;
  background: black;
  z-index: 1;
  animation: after 2s linear infinite;
}
@keyframes after {
  0% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(30px);
  }
  100% {
    transform: translateX(70px);
  }
}
.footer__links ul {
  list-style: none;
}
.footer__links li {
  margin-bottom: 12px;
}
.footer__links a {
  color: var(--texy);
  transition: var(--transition);
  font-size: 14px;
  text-decoration: none;
}
.footer__links a:hover {
  color: var(--text-muted);
  border-bottom: 2px dashed var(--primary);
}
.footer__contact {
  margin-right: 50px;
}
.footer__contact p {
  margin-bottom: 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer__contact i {
  color: var(--primary);
  width: 20px;
}
.socials {
  display: flex;
  gap: 16px;
}
.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: var(--bg);
  border-radius: 50%;
  transition: var(--transition);
  text-decoration: none;
}
.socials a:hover {
  color: var(--text);
  transform: translateY(-2px);
}
.socials img {
  width: 30px;
  height: 30px;
  background: transparent;
}
.socials a:hover img {
  color: var(--text);
}
.footer__bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--primary);
}
.footer__bottom p {
  font-size: 13px;
}

/* To Top */
.to-top{
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all .3s ease;
  z-index: 999;
}
.to-top svg{
  fill: var(--bg);
}
.to-top:hover{
  transform: translateY(-5px);
}
.to-top.active{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* small scren  */
@media (max-width: 480px) {
  .footer {
    padding: 40px 15px;
  }

  .footer_grid {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: left;
}

  .footer_brand img {
    width: 100%;
    max-width: 220px;
    margin: auto;
}

  .footer__contact {
    margin-right: 0;
  }
  .footer__contact p {
    justify-content: left;
    flex-wrap: wrap;
    text-align: center;
  }
  .footer__links h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  .footer__links h4::before {
    left: 0;
  }
}
@media (max-width: 768px) {
  .footer_grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: left;
  }
  .footer_brand img {
    width: 100%;
    max-width: 250px;
}
  .socials {
    justify-content: left;
  }
  .footer__contact {
    margin-right: 0;
  }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .footer_grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  .footer__contact {
    margin-right: 0;
  }
}
@media (min-width: 1025px) {
  .footer_grid {
    grid-template-columns: repeat(4, 1fr);
}
}
