/* ==========================================================================
   PREMIUM SERVICES SECTION STYLING (GLASSMORPHISM & GRID TEXTURE)
   ========================================================================== */

.serv_section {
  position: relative;
  padding: 130px 8%;
  background-color: var(--bg-skills, #f4f6fb);
  /* Light tech layout grid repeating texture */
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
  color: var(--text-light, #222);
  overflow: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
  z-index: 1;
}

body.dark .serv_section {
  background-color: var(--bg-dark, #0e0e1a);
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
  color: var(--text-dark, #eaeaf0);
}

/* Background Soft Glows */
.serv_blur_circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.serv_blur_1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, rgba(99, 102, 241, 0.03) 70%);
  top: 15%;
  left: -120px;
}

.serv_blur_2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(37, 99, 235, 0.03) 70%);
  bottom: 15%;
  right: -100px;
}

body.dark .serv_blur_1 {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(37, 99, 235, 0.04) 70%);
}

body.dark .serv_blur_2 {
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18) 0%, rgba(99, 102, 241, 0.04) 70%);
}

.serv_container {
  max-width: 1250px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ==========================================================================
   SECTION HEADER
   ========================================================================== */
.serv_header {
  text-align: center;
  max-width: 750px;
  margin-bottom: 60px;
}

.serv_subtitle {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--primary, #081f62);
  margin-bottom: 12px;
  display: block;
}

body.dark .serv_subtitle {
  color: #3b82f6;
}

.serv_main_title {
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary, #081f62) 0%, #2563eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.dark .serv_main_title {
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.serv_desc {
  font-size: 16.5px;
  line-height: 1.6;
  color: rgba(34, 34, 34, 0.7);
}

body.dark .serv_desc {
  color: rgba(234, 234, 240, 0.7);
}

/* ==========================================================================
   CARDS GRID LAYOUT
   ========================================================================== */
.serv_grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  width: 100%;
}

/* ==========================================================================
   SERVICE CARD DESIGN (GLASSMORPHISM & EQUAL HEIGHT)
   ========================================================================== */
.serv_card {
  position: relative;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 24px;
  padding: 35px 25px;
  display: flex;
  flex-direction: column;
  height: 100%; /* Force equal heights inside grid rows */
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
              box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 1;
}

body.dark .serv_card {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
}

/* Hover Lift (8px) & Glow */
.serv_card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.06);
}

body.dark .serv_card:hover {
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

/* Border animation on hover using pseudo-element xor mask */
.serv_card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1.2px;
  background: linear-gradient(135deg, #2563eb 0%, #818cf8 50%, #6366f1 100%);
  -webkit-mask: 
     linear-gradient(#fff 0 0) content-box, 
     linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 2;
}

.serv_card:hover::after {
  opacity: 1;
}

/* Icon block wrap */
.serv_icon_wrap {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
              background-color 0.4s ease;
}

body.dark .serv_icon_wrap {
  background: rgba(59, 130, 246, 0.08);
}

.serv_icon_wrap i {
  font-size: 22px;
  color: #2563eb;
  transition: transform 0.4s ease, color 0.4s ease;
}

body.dark .serv_icon_wrap i {
  color: #3b82f6;
}

.serv_card:hover .serv_icon_wrap {
  background: #2563eb;
  transform: scale(1.12); /* Icon scales slightly on hover */
}

body.dark .serv_card:hover .serv_icon_wrap {
  background: #3b82f6;
}

.serv_card:hover .serv_icon_wrap i {
  color: #ffffff;
}

body.dark .serv_card:hover .serv_icon_wrap i {
  color: #0e0e1a;
}

/* Title & Description */
.serv_card_title {
  font-size: 19px;
  font-weight: 700;
  color: var(--primary, #081f62);
  margin-bottom: 12px;
}

body.dark .serv_card_title {
  color: #ffffff;
}

.serv_card_desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(34, 34, 34, 0.65);
  margin-bottom: 24px;
  flex-grow: 1; /* Pushes Learn More link to bottom */
}

body.dark .serv_card_desc {
  color: rgba(234, 234, 240, 0.65);
}

/* Learn More arrow slide links */
.serv_learn_more {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
  margin-top: auto;
  transition: color 0.3s ease;
}

body.dark .serv_learn_more {
  color: #3b82f6;
}

.serv_learn_more i {
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.serv_card:hover .serv_learn_more {
  color: #1d4ed8;
}

body.dark .serv_card:hover .serv_learn_more {
  color: #60a5fa;
}

.serv_card:hover .serv_learn_more i {
  transform: translateX(5px); /* Arrow slides right */
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1199px) {
  .serv_grid {
    grid-template-columns: repeat(2, 1fr); /* 2 x 2 on Laptop */
    gap: 25px;
  }
}

@media (max-width: 991px) {
  .serv_section {
    padding: 100px 6%;
  }
  .serv_grid {
    grid-template-columns: repeat(2, 1fr); /* 2 x 2 on Tablet */
    gap: 20px;
  }
}

@media (max-width: 767px) {
  .serv_section {
    padding: 80px 6%;
  }
  .serv_header {
    margin-bottom: 40px;
  }
  .serv_grid {
    grid-template-columns: 1fr; /* 1 card per row on Mobile */
    gap: 20px;
  }
  .serv_card {
    padding: 30px 24px;
  }
}

@media (max-width: 375px) {
  .serv_section {
    padding: 60px 4%;
  }
}
