/* ==============================
   HOME PAGE
   ============================== */

/* Base font and background for the whole page */
body {
  margin: auto;
  color: #000;
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  background-color: white; /* #fdf0de Light honey background */
}

/* Main content area placement */
.main {
  grid-area: main;
}

/* ============================
   GRID LAYOUT (laptop screen size)
   ============================ */

/* Full-width hero image container */
.home-image {
  width: 100%;
  height: 80vh;
  overflow: hidden;
}

/* Ensures that the hero image covers its container */
.home-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Homepage title, centered text */
.home-title {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  color: black;
}

/* Container for the set of cards, arranged in three columns */
.cards-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin: 60px;
  padding-bottom: 5%;
  justify-content: center; /* Center the grid */
  justify-items: center;
}

/* Individual card styling */
.card {
  background-color: #E69D00;
  border-radius: 10px; /* rounded corners */
  padding: 15px;
  max-width: 250px;
  width: 100%;
}

.card-image {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
}

/* Makes card images to scale correctly */
.card-image img {
  width: 100%;
  height: auto;
  display: block;
}

.cards-container a {
  color: inherit;
  text-decoration: none;
}

/* Tooltip text styling, hidden by default */
.tooltip-text {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #f5c922;
  color: white;
  padding: 6px 12px;
  font-size: 0.9rem;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* Arrow pointing up from tooltip */
.tooltip-text::after {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #f5c922 transparent;
}

/* Show tooltip when hovered over the card area */
.tooltip-area:hover .tooltip-text {
  opacity: 1;
}

/* Card title styling, centered text */
.card-title {
  margin: 10px 0 6px;
  display: flex;
  text-align: center;
  justify-content: center;
}

/* Footer placement in the overall grid */
.footer {
  grid-area: footer;
}

/* ============================
   GENERAL LAYOUT 
   ============================ */

.box {
  padding: 0;
}

.info-text {
  display: flex;
  flex-direction: column;
}

ul.text {
  margin-left: 20px;
}

a {
  font-weight: bold;
}

/* ===========================
   CARD DISCOUNT RIBBON
   =========================== */

/* red diagonal ribbon */
.card-image .ribbon {
  position: absolute;
  top: 12px;             /* adjust vertical position */
  right: -45px;          /* pull it into the corner */
  transform: rotate(45deg);
  background: #e60000;
  color: #fff;
  font-weight: 900;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  padding: 6px 56px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  pointer-events: none;  /* prevent hover issues */
  z-index: 5;
}


/* ============================
   RESPONSIVE GRID LAYOUT (Mobile screen size)
   ============================ */

@media (max-width: 767px) {

  /* Smaller home-title font and centered text on mobile */
  .home-title {
    font-size: 1rem;
    text-align: center;
  }

  /* Cards reorganized into two columns with smaller gaps */
  .cards-container {
    gap: 30px;
    padding: 20px 10px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin: 0;
  }

  /* Reduce card padding and size for mobile */
  .card {
    padding: 10px;
    max-width: fit-content;
  }

  /* Smaller heading inside card titles */
  .card-title h3 {
    font-size: 1rem;
  }
	
.card-image .ribbon {
    right: -55px;
    font-size: 0.7rem;
    padding: 4px 46px;
  }

}
