/* ✅ General Styles */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: #ffffff; /* White background */
  color: #000; /* Black text on white */
  text-align: center;
  overflow-x: hidden; /* Prevents horizontal scrolling */
}

/* ✅ Ensures full-page expansion and enables scrolling */
html, body {
  min-height: 100vh;
  height: auto;
  overflow-y: auto; /* Allows vertical scrolling */
}

/* ✅ Header Styling */
header {
  background: linear-gradient(135deg, #2c3e50, #1a2636);
  color: #fff;
  padding: 1.5rem;
  text-align: center;
  display: flex;
  justify-content: center;
}

.header-container {
  display: flex;
  align-items: center;
  gap: 15px; /* Space between logo and title */
}

/* ✅ Logo Styling */
.site-logo {
  width: 50px; /* Adjust logo size */
  height: auto;
}

/* ✅ Navigation Bar (Now Fully Responsive) */
nav {
  background: #333;
  padding: 1rem;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* Allows wrapping on small screens */
}

nav li {
  margin: 0 15px;
  position: relative;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 15px;
  display: block;
}

nav a:hover {
  text-decoration: underline;
}

/* ✅ Dropdown Styling */
.dropdown-content {
  display: none;
  position: absolute;
  background: #444;
  min-width: 200px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1;
  border-radius: 5px;
  overflow: hidden;
}

.dropdown-content li {
  text-align: left;
}

.dropdown-content a {
  padding: 10px 15px;
  display: block;
  color: white;
}

.dropdown-content a:hover {
  background: #555;
}

/* ✅ Show dropdown on hover */
.dropdown:hover .dropdown-content {
  display: block;
}

/* ✅ Footer Styling */
footer {
  background: #333;
  color: #fff;
  padding: 1rem;
  margin-top: 2rem;
}

/* ✅ Fix for Cards Overlapping on Desktop & Mobile */
.card-sets-container, .cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem; /* Increased spacing */
  padding: 3rem;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto; /* Ensures the grid stays centered */
}

/* ✅ Fix for Card Set Styling */
.card-set {
  width: 300px;
  height: 420px;
  background: linear-gradient(135deg, #2c3e50, #1a2636); /* Teal gradient */
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  text-align: center;
  font-size: 1.2rem;
  color: #fff;
  backdrop-filter: blur(10px);
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-set:hover {
  transform: scale(1.05);
  box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.3);
}

/* ✅ Prevent Cards from Shifting on Mobile */
.card-set, .flip-card {
  max-width: 100%;
  width: 300px; /* Ensures proper size */
  margin: 0 auto; /* Centers the cards properly */
}

/* ✅ Flip Card Container */
.flip-card {
  background-color: transparent;
  width: 300px;
  height: 420px;
  perspective: 1000px;
  cursor: pointer;
  margin: 0 auto;
}

/* ✅ Flip Card Inner - Flipping Effect */
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s ease-in-out;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

/* ✅ Front & Back Card Styles */
.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  padding: 1.5rem;
  box-sizing: border-box;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2);
  font-size: 1.2rem;
}

/* ✅ Front Side - Teal Gradient */
.flip-card-front {
  background: linear-gradient(135deg, #2c3e50, #1a2636);
  color: #fff;
}

/* ✅ Back Side - White to Cream Gradient */
.flip-card-back {
  background: linear-gradient(135deg, #ffffff, #e5e3e5);
  transform: rotateY(180deg);
  color: #000;
}

/* ✅ Logo Placement on Cards */
.card-logo {
  position: absolute;
  bottom: 10px;
  width: 50px;
  height: 50px;
  opacity: 0.7;
}

/* ✅ Ensures the page allows scrolling */
main {
  min-height: 100vh;
  height: auto;
  overflow-y: auto;
}

/* ✅ Mobile-Friendly Adjustments */
@media (max-width: 768px) {
  .card-sets-container, .cards-container {
    grid-template-columns: 1fr; /* Force one column on small screens */
    padding: 1rem; /* Reduce padding */
    gap: 1.5rem;
  }

  .card-set, .flip-card {
    width: 90%; /* Ensure cards are not too large */
    margin: 0 auto; /* Center the cards */
  }

  /* ✅ Responsive Navigation */
  nav ul {
    flex-direction: column;
    align-items: center;
  }

  .dropdown-content {
    position: relative;
  }
}
