/* ================= CARDS ================= */

.cards-section {
  width: 95%;
  max-width: 1120px; /* 1400px → 20% smaller */
  margin: auto;
  padding: 30px 0;   /* 60px → 20% smaller */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 19px;          /* 24px → 20% smaller */
  justify-content: center;
  width: 100%;
  align-items: start;
}

/* ================= INFO CARD ================= */

.info-card {
  position: relative;

  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);

  border-radius: 12.8px;  /* 16px → 20% smaller */
  padding: 17.6px 16px 19.2px; /* 22/20/24px → 20% smaller */
  height: 220px;           /* 240px → 20% smaller */
  width: 85%;              /* fill grid column */

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;

  color: #000;

  animation: floatRotate 9s ease-in-out infinite;

  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.15),  /* 10/20 → 8/16 */
    inset 0 0 0 0.8px rgba(0, 0, 0, 0.05); /* 1px → 0.8px */

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Dark mode glass effect */
body.dark .info-card {
  background: transparent;
  color: #d0d0d0;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.35),
    inset 0 0 0 0.8px rgba(255, 255, 255, 0.1);
}

/* Hover lift */
.info-card:hover {
  transform: translateY(-4.8px);  /* 6px → 20% smaller */
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.25),  /* 15/30 → 12/24 */
    inset 0 0 0 0.8px rgba(255, 255, 255, 0.08);
}

/* ================= GRADIENT BORDER ================= */

.info-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 0.8px; /* 1px → 20% smaller */
  border-radius: inherit;

  background: linear-gradient(
    135deg,
    var(--brand-1),
    var(--brand-2)
  );

  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* ================= CARD CONTENT ================= */

.info-card img {
  width: 24px;   /* smaller */
  height: 24px;
  margin-bottom: 5px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 174, 169, 0.07); /* brighter background */
  filter: drop-shadow(0 3.2px 8px rgba(18, 208, 221, 0.25));
  transition: transform 0.6s ease-in-out;
}

body.dark .info-card img {
  background: rgba(11, 148, 167, 0.4); /* darker teal, more visible */
  filter: drop-shadow(0 3.2px 8px rgba(0, 0, 0, 0.4)); /* stronger shadow for contrast */
}

/* Icon spin on hover 10 times */
.info-card:hover img {
  animation: spin-icon 4s linear 1;
}

@keyframes spin-icon {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(3600deg); }
}

.info-card h3 {
  font-size: 1.2rem;  /* 1.3rem → 20% smaller */
  margin-bottom: 0px; /* 8px → 20% smaller */
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.info-card p {
  font-size: 1rem;  /* 1.05rem → 20% smaller */
  line-height: 1.6;   /* 1.4 → 20% smaller */
  color: var(--muted);
  overflow-wrap: break-word;
  text-align: justify;
}

body.dark .info-card h3 {
  -webkit-text-fill-color: #ffffff;
}

body.dark .info-card p {
  color: #d0d0d0;
}

/* ================= ACCESSIBILITY ================= */

@media (prefers-reduced-motion: reduce) {
  .info-card {
    animation: none;
    transition: none;
  }
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {
  .info-card::before {
    display: none;
  }

  .info-card {
    backdrop-filter: none;
    animation: none;

    background: rgba(255, 255, 255, 0.12);
    height: auto;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
  }

  body.dark .info-card {
    background: rgba(0, 0, 0, 0.35);
  }

  .cards-section {
    width: 92%;
    max-width: 92%;
    padding: 20px 0;
    margin: 0 auto;
    box-sizing: border-box;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
  }

  .info-card p {
    text-align: justify;
  }
}
