* {
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
}

.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.carousel-container {
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
    flex-wrap: nowrap;    
}

.card {
    flex: 0 0 100%;
    /*padding: 16px;
    border-radius: 8px;*/
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.card img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    /*border-radius: 6px;*/
}

.card-text {
    padding: 8px;
}

.card h3 {
    margin: 12px 0 8px;
    font-size: 1.2rem;
}

.card p {
    font-size: 0.95rem;
    color: #555;
}

.carousel-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

@media (min-width: 600px) {
    .card {
        flex: 0 0 50%;  /* 2 cards per view */
    }
}

@media (min-width: 900px) {
    .card {
        flex: 0 0 calc((100% - (2 * var(--card-gap, 20px))) / 3); /* 3 cards + 2 gaps */
    }
}

/* Arrow part */
.arrow {
    background: none;       /* remove default button bg */
    border: none;           /* remove border */
    padding: 0;             /* remove padding */
    cursor: pointer;        /* make it clickable */
    display: flex;          /* center the icon */
    align-items: center;
    justify-content: center;
  }

  .arrow:hover {
    background-color: rgba(0, 0, 0, 0.6);
  }

  .arrow-left {
    left: 10px;
    margin-left: auto;
  }

  .arrow-right {
    right: 10px;
    margin-right: auto;
  }

  .arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
  }

/* Dots part */
.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 15px;
  }

  .dot {
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: #ccc;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .dot.active {
    background-color: #007bff;
  }
