 .dark-mode {
      background-color: #121212;
      color: #fff;
    }

    .container {
	  width: calc(100% - 40px);  /* 20px left + 20px right margins */
	  margin: 20px;              /* All sides */
	  padding: 1rem 20px;
	  background-color: #141414;
	}

    .toggle-btn {
      margin-bottom: 2rem;
      padding: 10px 20px;
      background: #0077b6;
      color: white;
      border: none;
      cursor: pointer;
      border-radius: 8px;
    }

    .grid {
	  display: grid;
	  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
	  gap: 30px;
	  justify-items: center;
}

    .card {
	  max-width: 320px;
	  width: 100%;
	  height: 340px;
	  perspective: 1000px;
	  cursor: pointer;
	}

    .card-inner {
      position: relative;
      width: 100%;
      height: 100%;
      transition: transform 0.6s;
      transform-style: preserve-3d;
    }

    .card:hover .card-inner {
      transform: rotateY(180deg);
    }

   .card-front, .card-back {
	  position: absolute;
	  width: 100%;
	  height: 100%;
	  padding: 1.5rem;
	  box-sizing: border-box;
	  border-radius: 15px;
	  backface-visibility: hidden;
	  display: flex;
	  flex-direction: column;
	  justify-content: center;
	  align-items: center; /* Align content horizontally */
	}

	.card-back {
	  transform: rotateY(180deg);
	  background: #0077b6;
	  color: white;
	}


    .dark-mode .card-front, .dark-mode .card-back {
      background: #1e1e1e;
      color: #fff;
    }

    .icon {
      font-size: 2.5rem;
      margin-bottom: 1rem;
      color: #0077b6;
    }

    .dark-mode .icon {
      color: #90e0ef;
    }

    h3 {
      margin: 0.3rem 0;
	  color:#B2BEB5;
	  text-align:center;
    }

    p {
      font-size: 1rem;
	  color:#B2BEB5;
	  text-align:center;
    }
	
	@media (max-width: 728px) {
  .grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .card {
    width: 100%;
    max-width: none; /* ✅ override fixed 250px */
  }
  .container {
  padding: 1rem 20px;
}
}