/* Additional theme styles
 *
 * This file houses the bulk of the theme’s layout rules.  Because WordPress
 * themes are highly customisable, this sheet contains only essential layout
 * classes and helper utilities.  Colour variables are defined in style.css.
 */

/* Grid & layout */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -1rem;
  margin-right: -1rem;
}
.row > .col {
  padding-left: 1rem;
  padding-right: 1rem;
  flex: 1 1 0;
}

/* Hero section */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 90vh;
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  color: var(--text-colour);
}
.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

/* Cards */
.card {
  background: var(--panel-base);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.5);
}

/* Utility spacing classes */
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.pt-4 { padding-top: 2rem; }
.pb-4 { padding-bottom: 2rem; }

/* Table styles for leaderboards */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-colour);
}
.leaderboard-table thead {
  background: var(--bg-dark2);
}
.leaderboard-table th,
.leaderboard-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-colour);
}
.leaderboard-table tbody tr:nth-child(even) {
  background: var(--bg-dark2);
}

/* Form styles */
.wpcf7-form input,
.wpcf7-form select,
.wpcf7-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-colour);
  border-radius: 0.5rem;
  background: var(--panel-base-2);
  color: var(--text-colour);
}
.wpcf7-form input[type="submit"] {
  margin-top: 1rem;
  background: linear-gradient(90deg, var(--primary-blue), var(--primary-purple));
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
}
.wpcf7-form .wpcf7-response-output {
  margin-top: 1rem;
  padding: 0.5rem;
  border: 2px solid var(--primary-blue);
  border-radius: 0.5rem;
  background: var(--panel-base);
}

/* Animations */
.fade-in {
  animation: fadeIn 1s ease both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive hero text */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.25rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
}

/* -------------------------------------------------- */
/* Utility classes inspired by Tailwind
 *
 * These utility classes are defined to match the naming used in the
 * theme’s templates. They provide a simplified responsive grid system,
 * spacing utilities, typography scales, rounding and shadows without
 * requiring a full CSS framework. Feel free to extend this list as
 * necessary when adding new templates.
 */

/* Grid and Flex */
.grid { display: grid; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.md\:flex { }
.md\:flex { }

/* Grid columns */
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.md\:grid-cols-2 { }
.md\:grid-cols-3 { }
.md\:grid-cols-4 { }

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .md\:flex { display: flex; }
  .md\:w-1\/2 { width: 50%; }
  .md\:pl-8 { padding-left: 2rem; }
  .md\:mb-0 { margin-bottom: 0; }
}

/* Gap utilities */
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

/* Spacing utilities */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }

/* ------------------------------------------------------------------ */
/* Custom sections for enhanced front page design */

/* Dark section background variant */
.dark-bg {
  background: var(--bg-dark2);
  color: var(--text-colour);
}

/* Stats section */
.stats-section {
  background: var(--bg-dark1);
  padding-top: 3rem;
  padding-bottom: 3rem;
}
.stat-item h3 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary-blue);
}
.stat-item p {
  font-size: 1rem;
  color: var(--muted-text);
}

/* Icon boxes used in the approach section */
.icon-box {
  background: var(--panel-base);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.icon-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.5);
}
.icon-box h3 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  color: var(--text-colour);
}
.icon-box p {
  color: var(--muted-text);
  font-size: 0.95rem;
}

/* Testimonials */
.testimonial-card {
  background: var(--panel-base);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  color: var(--text-colour);
  transition: transform 0.2s ease;
}
.testimonial-card:hover {
  transform: translateY(-4px);
}
.testimonial-card p {
  font-style: italic;
  color: var(--muted-text);
}
.testimonial-card strong {
  display: block;
  margin-top: 1rem;
  color: var(--primary-blue);
}
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }

/* Width utilities */
.w-full { width: 100%; }
.w-1\/2 { width: 50%; }

/* Text sizes */
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }

/* Font weight */
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* Alignment */
.text-center { text-align: center; }

/* Colours */
.text-primary { color: var(--primary-blue); }
.text-muted { color: var(--muted-text); }
.bg-card { background: var(--panel-base); }
.bg-gradient-to-r { background-image: linear-gradient(90deg, var(--primary-blue), var(--primary-purple)); color: #fff; }
.bg-gradient-to-b { background-image: linear-gradient(180deg, var(--primary-purple), var(--primary-blue)); color: #fff; }
.bg-card, .bg-gradient-to-r, .bg-gradient-to-b { border-radius: 0.75rem; }

/* Borders and rounding */
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }
.border { border: 1px solid var(--border-colour); }
.border-2 { border-width: 2px; }
.border-primary { border-color: var(--primary-blue); }

/* Shadow utilities */
.shadow { box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); }
.shadow-lg { box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); }
.shadow-inner { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2); }

/* Positioning */
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.bottom-8 { bottom: 2rem; }
.left-1\/2 { left: 50%; }
.transform { transform: translate(-50%, 0); }
.animate-bounce {
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
