/* ==========================================================================
   1. Container & Global Section Styling
   ========================================================================== */
.skills-section {
  background: transparent;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  padding: 0 40px;
}

@media (max-width: 768px) {
  .skills-section {
    padding: 0 25px;
  }
}

@media (max-width: 480px) {
  .skills-section {
    padding: 0 15px;
  }
}

main {
  background-image: linear-gradient(rgba(255,255, 255, 0.7), rgba(255, 255, 255, 0.7)), url('img/HAND-29.png');
  background-size: cover;
  background-position: center;
  opacity: 95%;
  min-height: 400px;
  padding: 0 40px;
}

@media (max-width: 768px) {
  main {
    min-height: auto;
    padding: 0 25px;
  }
}

@media (max-width: 480px) {
  main {
    padding: 0 15px;
  }
}

.section-title {
  text-align: center;
  color: #1a365d;
}


/* ==========================================================================
   2. Page Header Styling
   ========================================================================== */
.page-header {
  padding-top: 40px;
  text-align: center;
  margin-bottom: 40px;
}

/* Mobile: Tablets and smaller */
@media (max-width: 768px) {
  .page-header {
    padding-top: 30px;
    margin-bottom: 30px;
  }
}

/* Mobile: Small phones */
@media (max-width: 480px) {
  .page-header {
    padding-top: 20px;
    margin-bottom: 25px;
  }
}

/* Define the animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply to your text element */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.page-header h1 {
  margin-bottom: 15px;
  color: #1a365d;
  letter-spacing: -0.02em;
  font-weight: 800;
  font-size: 2.5rem;
}

@media (max-width: 768px) {
  .page-header h1 {
    font-size: 2rem;
    margin-bottom: 12px;
  }
}

@media (max-width: 480px) {
  .page-header h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }
}

.page-header p {
  font-size: 1.1rem;
  color: #1a365d;
  max-width: 700px;
  margin: 0 auto;
  letter-spacing: 0.01em;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .page-header p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .page-header p {
    font-size: 0.9rem;
  }
}


/* ==========================================================================
   3. Main Skills Section (Flexbox Grid Layout)
   ========================================================================== */
.cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* Centers the 2nd row */
  gap: 20px;
}

@media (max-width: 768px) {
  .cards-container {
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .cards-container {
    gap: 12px;
  }
}

/* Card Sizing & Design */
.skill-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); 
  /* Forces uniform size, but allows growth if text overflows */
  width: 370px; 
  min-height: 230px;  /* Changed from height to min-height */
  display: flex;
  align-items: flex-start;
  transition: transform 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Icon Position: Upper Left */
.card-icon {
  font-size: 2rem;
  margin-right: 20px;
  min-width: 50px;
}

/* Content Position: Right */
.card-content h3 {
  font-size: 1rem;
  color: #2d3748;
}

.card-content p {
  margin: 0;
  font-size: 0.95rem;
  color: #718096;
  line-height: 1.5;
}

/* Mobile: Tablet and smaller screens */
@media (max-width: 768px) {
  .skill-card {
    width: 100%;
    max-width: 350px;
    height: auto;
    padding: 20px;
  }
  
  .card-icon {
    font-size: 1.8rem;
    margin-right: 15px;
  }
  
  .card-content h3 {
    font-size: 0.95rem;
  }
  
  .card-content p {
    font-size: 0.9rem;
  }
}

/* Mobile: Small phones */
@media (max-width: 480px) {
  .skill-card {
    max-width: 100%;
    padding: 18px;
  }
  
  .card-icon {
    font-size: 1.6rem;
    margin-right: 12px;
    min-width: 40px;
  }
  
  .card-content h3 {
    font-size: 0.9rem;
  }
  
  .card-content p {
    font-size: 0.85rem;
  }
}


/* ==========================================================================
   4. Other Services Section (Grid Layout - Updated Center-Aligned)
   ========================================================================== */
.other-services {
  padding: 60px 40px;
  background: transparent;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  text-align: center; /* Center-aligns structural elements and heading */
}

.other-services h2 {
  text-align: center;
  margin-bottom: 40px;
  color: #1a365d;
}

@media (max-width: 768px) {
  .other-services {
    padding: 40px 25px;
  }
}

@media (max-width: 480px) {
  .other-services {
    padding: 30px 15px;
  }
}

/* Grid setup for exactly 4 columns */
.extra-svcs-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr); 
  gap: 20px;
  padding: 0;
  justify-content: center; /* Ensures structural layout track alignment */
}

/* Individual Card Styling */
.svcs-item {
  background: #ffffff;
  border: 1px solid #e1e8ed;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column; /* Stack details vertically */
  align-items: center;     /* Horizontal axis centration */
  text-align: center;      /* Alignment logic for paragraph strings */
  
  /* Ensuring minimum uniform height, expanding safely for longer text */
  min-height: 200px; 
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.svcs-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  border-color: #cbd5e0;
}

/* Icon Styling */
.svcs-icon {
  font-size: 1.8rem;
  margin-right: 0;         /* Clear initial offset margins */
  margin-bottom: 16px;     /* Set balanced vertical separation gap */
  flex-shrink: 0;          /* Prevents icon compression */
}

/* Content Area */
.svcs-text h3 {
  margin: 0 0 12px 0;
  font-size: 1.15rem;
  color: #1a202c;
  font-weight: 700;
}

.svcs-text p {
  margin: 0;
  font-size: 0.9rem;
  color: #4a5568;
  line-height: 1.6;
}

/* Desktop: 4 columns */
@media (max-width: 1400px) {
  .extra-svcs-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Tablet: 2 columns */
@media (max-width: 1024px) {
  .extra-svcs-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .svcs-item {
    height: auto;
    padding: 20px;
  }
  
  .svcs-text h3 {
    font-size: 1.05rem;
  }
  
  .svcs-text p {
    font-size: 0.85rem;
  }
}

/* Mobile: 1 column */
@media (max-width: 650px) {
  .extra-svcs-container {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .svcs-item {
    height: auto;
    padding: 18px;
  }
  
  .svcs-icon {
    font-size: 1.6rem;
    margin-right: 0;
    margin-bottom: 12px;
  }
  
  .svcs-text h3 {
    font-size: 1rem;
  }
  
  .svcs-text p {
    font-size: 0.8rem;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .extra-svcs-container {
    gap: 10px;
  }
  
  .svcs-item {
    padding: 15px;
    border-radius: 10px;
  }
  
  .svcs-icon {
    font-size: 1.5rem;
    margin-right: 0;
    margin-bottom: 10px;
  }
  
  .svcs-text h3 {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }
  
  .svcs-text p {
    font-size: 0.75rem;
  }
}


/* ==========================================================================
   5. Global Typography & Animation Effects
   ========================================================================== */
.page-header h1 {
  letter-spacing: -0.02em; /* Tighter for large headings */
  font-weight: 800;
}

.page-header p {
  letter-spacing: 0.01em; /* Slightly open for readability */
  line-height: 1.6;
}

.section-title, .other-services h2 {
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 1.5rem;
  color: #1a365d;
}

@media (max-width: 768px) {
  .section-title, .other-services h2 {
    font-size: 1.3rem;
    letter-spacing: 0.5px;
  }
}

@media (max-width: 480px) {
  .section-title, .other-services h2 {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
  }
}

.card-content h3, .svcs-text h3 {
  letter-spacing: 0.02em;
}

.card-content p, .svcs-text p {
  letter-spacing: 0.01em;
  line-height: 1.6;
}

/* Smooth Transition for Hover Effects */
.skill-card, .svcs-item {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}