/* Default for services page - smaller cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
    padding-bottom: 40px ;
  }

/* For homepage - larger cards */
[data-page="home"] .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    padding: 20px min(6vw, 80px);
  }




  .service-card {
    background: #0a2a74;
    color: white;
    border-radius: 18px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }
  
  .service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 35px rgba(0,0,0,0.18);
    background-color:#587EFF;
  }
  
  .service-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 14px;
  }
  
  /* TOP IMAGE LAYOUT → image comes first */
  .service-card.top-image img {
    order: -1;
  }
  
  /* MIDDLE IMAGE LAYOUT → image comes last */
  .service-card.middle-image img {
    order: 3;
    margin-top: 10px;
  }
  
  .service-card h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
  }
  
  .service-card p {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.45;
    padding: 0 !important;
    margin: 0;        /* Optional: remove margin also */
  }
  
  .service-card .read-more {
    color:var(--color-accent);
    font-weight: 600;
    margin-top: auto;
    text-decoration: none;
  }
  
  .service-card .read-more:hover {
    text-decoration: underline;
  }

/* =============================== */
/*   RESPONSIVE – TABLET (max 960) */
/* =============================== */
@media (max-width: 960px) {

  /* SERVICES GRID — Tablet: Two columns */
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    padding: 20px 40px;
  }

  /* HOME PAGE – Tablet */
  [data-page="home"] .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }

  .service-card {
    padding: 18px;
    border-radius: 16px;
  }

  .service-card img {
    height: 160px;  /* Slightly smaller for tablet */
  }

  .service-card h3 {
    font-size: 1.05rem;
  }

  .service-card p {
    font-size: 0.9rem;
  }
}


/* =============================== */
/*    RESPONSIVE – MOBILE (max 640)*/
/* =============================== */
@media (max-width: 640px) {

  /* SERVICES GRID — Mobile: Single column */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 10px 20px;
  }

  /* HOME PAGE – Mobile */
  [data-page="home"] .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    padding: 16px;
    border-radius: 14px;
  }

  .service-card img {
    height: 150px; /* Mobile-friendly size */
    border-radius: 12px;
  }

  .service-card h3 {
    font-size: 1rem;
  }

  .service-card p {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .service-card .read-more {
    font-size: 0.9rem;
    margin-top: 10px;
  }
}
