/* ---------- Services Card (Programmer Portfolio) ---------- */
.cards div.service {
  /* Background: clean gradient with a tech vibe */
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25), 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 100%; /* will be constrained by parent's flex */
  max-width: 600px; /* keeps it from becoming too wide on large screens */
  min-height: 280px;
  padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1rem, 3vw, 2.5rem);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, #60a5fa, #a78bfa) 1;
  border-radius: 20px; /* overrides border-image for modern browsers */
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 0 auto; /* centers within the flex container */
}

/* Hover effect – lifts the card and adds glow */
.cards div.service:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(96, 165, 250, 0.3);
}

/* Decorative glow ring (pseudo‑element) */
.cards div.service::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 20px;
  background: conic-gradient(from 0deg, #60a5fa, #a78bfa, #60a5fa);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
  pointer-events: none;
}
.cards div.service:hover::before {
  opacity: 0.6;
}

/* Subtle icon via pseudo‑element (💻) – positioned above the text */
.cards div.service::after {
  content: "💻";
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  display: block;
  margin-bottom: clamp(0.5rem, 1.5vw, 1.2rem);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
  animation: float 3s ease-in-out infinite;
}

/* Floating animation for the icon */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* The link – fills the card and centres the content */
.cards div.service a {
  color: #f8fafc;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(1.6rem, 6vw, 3.2rem);
  letter-spacing: -0.02em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
  transition: color 0.3s ease, transform 0.3s ease;
}

/* Underline animation on hover */
.cards div.service a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  transition: width 0.3s ease, left 0.3s ease;
}
.cards div.service a:hover::after {
  width: 70%;
  left: 15%;
}

.cards div.service a:hover {
  color: #ffffff;
  transform: scale(1.02);
}

/* Responsive fine‑tuning for very small screens (like 480px) */
@media (max-width: 500px) {
  .cards div.service {
    min-height: 200px;
    padding: 1.2rem 0.8rem;
    border-radius: 16px;
  }
  .cards div.service a {
    font-size: clamp(1.4rem, 7vw, 2rem);
  }
  .cards div.service::after {
    font-size: clamp(2rem, 10vw, 3rem);
    margin-bottom: 0.3rem;
  }
}

/* ---------- Services Card (Programmer Portfolio) ---------- */
.cards div.service2 {
  /* Background: clean gradient with a tech vibe */
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25), 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 100%; /* will be constrained by parent's flex */
  max-width: 600px; /* keeps it from becoming too wide on large screens */
  min-height: 280px;
  padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1rem, 3vw, 2.5rem);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, #60a5fa, #a78bfa) 1;
  border-radius: 20px; /* overrides border-image for modern browsers */
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 0 auto; /* centers within the flex container */
}

/* Hover effect – lifts the card and adds glow */
.cards div.service2:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(96, 165, 250, 0.3);
}

/* Decorative glow ring (pseudo‑element) */
.cards div.service2::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 20px;
  background: conic-gradient(from 0deg, #60a5fa, #a78bfa, #60a5fa);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
  pointer-events: none;
}
.cards div.service2:hover::before {
  opacity: 0.6;
}

/* Subtle icon via pseudo‑element (💻) – positioned above the text */
.cards div.service2::after {
  content: "🏗";
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  display: block;
  margin-bottom: clamp(0.5rem, 1.5vw, 1.2rem);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
  animation: float 3s ease-in-out infinite;
}

/* Floating animation for the icon */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* The link – fills the card and centres the content */
.cards div.service2 a {
  color: #f8fafc;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(1.6rem, 6vw, 3.2rem);
  letter-spacing: -0.02em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
  transition: color 0.3s ease, transform 0.3s ease;
}

/* Underline animation on hover */
.cards div.service2 a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  transition: width 0.3s ease, left 0.3s ease;
}
.cards div.service2 a:hover::after {
  width: 70%;
  left: 15%;
}

.cards div.service2 a:hover {
  color: #ffffff;
  transform: scale(1.02);
}

/* Responsive fine‑tuning for very small screens (like 480px) */
@media (max-width: 500px) {
  .cards div.service2 {
    min-height: 200px;
    padding: 1.2rem 0.8rem;
    border-radius: 16px;
  }
  .cards div.service2 a {
    font-size: clamp(1.4rem, 7vw, 2rem);
  }
  .cards div.service2::after {
    font-size: clamp(2rem, 10vw, 3rem);
    margin-bottom: 0.3rem;
  }
}