/*
 * Stylesheet for the Legacy Family Foundation website.
 *
 * This file defines the core colours, typography and layout used across
 * all pages. The design draws from best practices for nonprofit and
 * family foundation sites: a clean, professional look with generous
 * whitespace, accessible contrast and simple navigation. The warm
 * palette evokes compassion and legacy while retaining a modern feel.
 */

/* Colour palette */
:root {
  /* Primary accent used for headings, buttons and highlights */
  /* We derive a warm orange tone from the user‑provided photograph.  */
  --primary-color: #af5934;
  /* Secondary accent used for hover states and subtle highlights.
     A slightly darker shade of the primary colour gives nice contrast for hovers. */
  --accent-color: #8c4729;
  /* Text colour */
  --text-color: #333333;
  /* Page background in a soft off‑white to complement the warm palette */
  --secondary-color: #f7f5f2;
  /* Dark text */
  --dark-color: #333333;
  /* Light surfaces */
  --light-color: #ffffff;
}
}

.upcoming-event-item {
  background-color: var(--light-color);
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.upcoming-event-item h4 {
  margin: 0 0 0.75rem 0;
  color: var(--primary-color);
}

.event-details {
  list-style: none;
  padding: 0;
  margin: 0;
}

.event-details li {
  margin: 0.25rem 0;
  color: var(--text-color);
}

.event-details .event-description {
  margin-top: 0.75rem;
  font-style: italic;
  color: var(--text-color);
}

/* Simple one-line list for upcoming events */
.upcoming-events-simple-list {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.upcoming-events-simple-list li {
  margin: 0.5rem 0;
  color: var(--text-color);
  font-size: 1rem;
  line-height: 1.4;
}

/* Home event card styling to match events.html */
.home-events-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.home-event-card {
  background: var(--light-color);
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.home-event-card .event-content {
  padding: 1.5rem;
}

.home-event-card h3 {
  margin: 0 0 1rem 0;
  color: var(--primary-color);
  font-size: 1.25rem;
  font-weight: 600;
}

.home-event-card .event-meta {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  margin-bottom: 0;
  font-size: 0.9rem;
  color: #666;
}

.home-event-card .event-meta-with-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.home-event-card .event-date,
.home-event-card .event-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.home-event-card p {
  margin: 0 0 1.5rem 0;
  color: var(--text-color);
  line-height: 1.6;
}

.home-event-card .event-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex-shrink: 0;
  justify-content: center;
}

/* Apply the same styling to events.html event cards */
.event-card .event-meta-with-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.event-card .event-meta {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  margin-bottom: 0;
  font-size: 0.9rem;
  color: #666;
}

.event-card .event-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Global resets */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: var(--secondary-color);
  color: var(--dark-color);
}

/* Header and navigation */
header {
  background-color: var(--light-color);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  border-bottom: 1px solid #eee;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding: 0;
  position: relative; /* This ensures the mobile nav positions correctly */
}

/* Left column containing the logo */
.logo-column {
  flex: 0 0 auto;
  margin-right: 1.5rem;
  margin-top: 10px;
  padding-left: 1.5rem; /* Add left padding to prevent logo from hugging the edge */
  position: relative;
}

/* Right column containing the search/CTA row and the navigation menu */
.right-column {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  position: relative; /* Needed for mobile nav positioning */
}

/* Top row inside the right column: search icon and CTA buttons */
.top-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-bottom: 0.25rem;
  padding: 0.25rem 2rem 0 2rem;
  /* Full width of the right column */
  width: 100%;
}

/* Navigation menu container inside the right column */
.nav-menu-container {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0.25rem 2rem 0.15rem;
  position: relative; /* Ensure mobile nav positions correctly */
}

/* Reset the margin on the nav-menu list; spacing handled via gap */
.nav-menu-container .nav-menu {
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}

/* Desktop navigation links */
.nav-menu li + li {
  margin-left: 1.5rem;
}

.nav-menu a {
  text-decoration: none;
  color: var(--dark-color);
  font-weight: 600;
  transition: color 0.3s;
}

.nav-menu a:hover {
  color: var(--primary-color);
}

/* Mobile navigation toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 6px;
  transition: background-color 0.3s;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.hamburger-line {
  width: 24px;
  height: 3px;
  background-color: var(--dark-color);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.nav-toggle:hover {
  background-color: var(--secondary-color);
}

/* X animation when menu is active */
.nav-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.nav-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Desktop navigation styles - show the nav menu and hide the toggle button */
@media (min-width: 769px) {
  .nav-menu {
    display: flex !important;
  }
  .nav-toggle {
    display: none;
  }
  .mobile-nav {
    display: none !important;
  }
}

/* Hero section */
.hero {
  position: relative;
  min-height: 70vh;
  background-image: url('images/hero.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #ffffff;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 1rem;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.cta-buttons a {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s, color 0.3s;
}

.cta-buttons a:not(.secondary) {
  background: var(--primary-color);
  color: #ffffff;
}

.cta-buttons a.secondary {
  background: transparent;
  border: 2px solid #ffffff;
  color: #ffffff;
}

.cta-buttons a:hover {
  background: var(--accent-color);
  color: #ffffff;
}

/* Generic sections */
section {
  padding: 4rem 2rem;
}

section.light {
  background-color: var(--light-color);
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--primary-color);
}

.section-content {
  max-width: 1100px;
  margin: 0 auto;
}

/* Card grid */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.card {
  flex: 1 1 calc(33.333% - 2rem);
  background-color: var(--light-color);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.card h3 {
  margin-top: 0;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.card p {
  margin: 0;
}

/* Button component */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  background-color: var(--primary-color);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: var(--accent-color);
}

.center {
  text-align: center;
  margin-top: 2rem;
}

/* Page banner for inner pages */
.page-banner {
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-align: center;
}

.page-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
}

.page-banner h1,
.page-banner h2 {
  position: relative;
  z-index: 1;
  margin: 0;
}

/* Content formatting on inner pages */
.content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.content h2 {
  color: var(--primary-color);
  margin-top: 2rem;
}

.content p {
  margin-bottom: 1.5rem;
}

.content ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.content li {
  margin-bottom: 0.5rem;
}

/* Form styling */
form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

textarea {
  resize: vertical;
  min-height: 150px;
}

input[type="submit"] {
  align-self: flex-start;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  background-color: var(--primary-color);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

input[type="submit"]:hover {
  background-color: var(--accent-color);
}

/* Footer styling */
footer {
  background-color: var(--dark-color);
  color: #ffffff;
  text-align: center;
  padding: 1.5rem 1rem;
}

footer a {
  color: var(--accent-color);
  text-decoration: none;
}

/*
 * Custom styles for the redesigned foundation website.
 * These additions support a landing page focused on our late father,
 * a logo image, and clean lists for events and classes.
 */

/* Logo image styling
   Increase the size of the logo so it can hang (droop) below the navigation.
   We allow it to extend below the header by using a larger height. */
.logo-img {
  height: 150px;
  width: auto;
  display: block;
  /* Offset the bottom of the logo downward so it droops below the navigation */
  margin-bottom: -80px;
  /* Give the logo a dramatic drop shadow to lift it off the page */
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.4));
  /* Make the logo a rounded rectangle */
  border-radius: 20px;
}

/* Landing section on the home page */
.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  text-align: center;
  background-color: var(--secondary-color);
}

/* Portrait of the foundation's namesake */
.father-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 2rem;
  border: 4px solid var(--primary-color);
}

.landing h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.landing p {
  font-size: 1.2rem;
  max-width: 800px;
  margin-bottom: 2rem;
}

/* Tweak CTA buttons within the landing section to match the maroon/navy palette */
.landing .cta-buttons a:not(.secondary) {
  background-color: var(--primary-color);
  color: #ffffff;
}

.landing .cta-buttons a.secondary {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.landing .cta-buttons a:hover {
  background-color: var(--accent-color);
  color: #ffffff;
}

/* Events and Classes list styling */
.event-list,
.class-list {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.event-item,
.class-item {
  background-color: var(--light-color);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.event-item h3,
.class-item h3 {
  margin-top: 0;
  color: var(--primary-color);
}

.event-item p,
.class-item p {
  margin: 0.25rem 0;
}

/* Modern Linux Foundation-style events section */
.events-section {
  padding: 40px 0;
  background-color: var(--secondary-color);
}

.events-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.sort-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 30px;
  margin-bottom: 1rem;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: var(--light-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sort-controls label {
  font-weight: 600;
  color: var(--dark-color);
  font-size: 1rem;
  margin: 0;
  white-space: nowrap;
}

.sort-controls select {
  padding: 0.75rem 1.25rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  font-size: 0.95rem;
  color: var(--dark-color);
  cursor: pointer;
  min-width: 180px;
  transition: all 0.2s ease;
}

.sort-controls select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(175, 89, 52, 0.15);
}

.sort-controls select:hover {
  border-color: var(--primary-color);
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

/* New horizontal layout for events.html */
.events-list {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.event-item {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 2rem;
  margin-bottom: 1rem;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: var(--light-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: opacity 0.4s ease;
  opacity: 1;
}

.event-item.fade-out {
  opacity: 0;
}

.event-item.fade-in {
  opacity: 0;
}

.events-list {
  position: relative;
}

.event-item:last-child {
  margin-bottom: 0;
}

.event-date-column {
  flex-shrink: 0;
  text-align: center;
  width: 80px;
  padding: 1rem;
}

.event-month {
  font-size: 0.75rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  text-align: center;
}

.event-day {
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--dark-color);
  line-height: 1;
  text-align: center;
}

.event-year {
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.25rem;
  font-weight: 400;
  text-align: center;
  width: 100%;
}

.event-details {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-width: 0; /* Allows flex items to shrink below content size */
}

.event-main-info {
  flex: 1;
  min-width: 0; /* Allows text to wrap */
}

.event-main-info h3 {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin: 0 0 0.5rem 0;
  font-weight: 700;
  line-height: 1.3;
}

.event-main-info .event-actions {
  margin-top: 1rem;
}

.event-location {
  font-size: 0.875rem;
  color: var(--dark-color);
  margin-bottom: 0.75rem;
}

.event-description {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

.event-meta-info {
  text-align: right;
  flex-shrink: 0;
  margin-left: 1.5rem;
  width: 100px; /* Reduced width since only event type */
}

.event-type {
  font-size: 0.75rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.event-card {
  background: var(--light-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(175, 89, 52, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(175, 89, 52, 0.15);
}

.event-content h3 {
  font-size: 1.35rem;
  color: var(--primary-color);
  margin: 0 0 0.75rem 0;
  font-weight: 600;
  line-height: 1.3;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #666;
}

.event-date,
.event-location {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  color: var(--primary-color);
}

.event-content p {
  color: #555;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--accent-color);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn-outline {
  background-color: transparent;
  color: #666;
  border: 1px solid #ddd;
}

.btn-outline:hover {
  background-color: #f5f5f5;
  color: var(--dark-color);
  border-color: #ccc;
}

@media (max-width: 768px) {
  .events-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .event-card {
    padding: 1.5rem;
  }
  
  .event-actions {
    flex-direction: column;
  }
  
  .btn {
    text-align: center;
  }
}

/* Call‑to‑action buttons in the header next to the navigation.
   These buttons echo the style of the Australia Zoo menu panel but use
   our warm orange palette throughout. */

/* Home page upcoming events preview */
.home-events-preview {
  max-width: 900px;
  margin: 3rem auto 2rem;
  padding: 0 1rem;
}

/*
 * Top panel containing the logo, search icon and call‑to‑action buttons.
 * We enlarge the panel slightly to accommodate a larger logo and allow
 * the logo to "droop" below the navigation, similar to the Australia Zoo example.
 */
.top-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* Provide extra height for the logo to extend below the navigation */
  padding: 0.75rem 2rem;
  background-color: var(--light-color);
  border-bottom: 1px solid #eee;
  /* Ensure overflowing content (the logo) is visible */
  overflow: visible;
}

/* Container for the search icon and the CTA buttons on the right */
.search-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-icon img {
  /* Adjust the size of the SVG icon inside the circle */
  height: 16px;
  width: 16px;
  display: block;
}

/* Style the search icon container like the Australia Zoo search button */
.search-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* CTA buttons in the top panel */
.top-cta-buttons {
  display: flex;
  gap: 0.75rem;
}

.top-cta-buttons a {
  display: inline-block;
  padding: 0.5rem 1rem;
  /* Slightly squared corners to mimic the reference site */
  border-radius: 6px;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s, box-shadow 0.3s;
}

/* Distinct colours for each CTA button using blended brand colors with website theme */
.top-cta-buttons .whatsapp {
  background-color: #2DB055; /* Blended WhatsApp green with warmer tones */
}
.top-cta-buttons .whatsapp:hover {
  background-color: #259644;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}
.top-cta-buttons .youtube {
  background-color: #E6432A; /* Blended YouTube red with orange warmth */
}
.top-cta-buttons .youtube:hover {
  background-color: #C73620;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}
.top-cta-buttons .spotify {
  background-color: #1DB954; /* Spotify green works well with warm palette */
}
.top-cta-buttons .spotify:hover {
  background-color: #18A04A;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

/* Icons inside the top CTA buttons */
.top-cta-buttons a img {
  height: 16px;
  width: 16px;
  margin-right: 0.4rem;
  vertical-align: middle;
  /* White icons for contrast against coloured backgrounds */
  filter: brightness(0) invert(1);
}

/* Navigation row aligned to the right beneath the top panel */
.nav-row {
  /* Arrange the nav row using flex so we can push its contents to the right */
  display: flex;
  width: 100%;
  justify-content: flex-end;
  align-items: center;
  /* Horizontal padding to align with the top panel */
  padding: 0 2rem 0.5rem;
}

/* Ensure the navigation menu inside the nav row inherits flex alignment */
.nav-row .nav-menu {
  display: inline-flex;
  align-items: center;
  /* Push the entire menu to the right by taking up remaining space */
  margin-left: auto;
}

.home-events-preview h2 {
  text-align: center;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.home-event {
  background-color: var(--light-color);
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.home-event h4 {
  margin: 0;
  color: var(--primary-color);
}

.home-event p {
  margin: 0.25rem 0;
}

.home-events-preview .more-link {
  display: block;
  text-align: center;
  margin-top: 1rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

/* Styles for dynamically loaded upcoming events list */
.upcoming-events-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.upcoming-event-item {
  background-color: var(--light-color);
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.upcoming-event-item h4 {
  margin: 0 0 0.75rem 0;
  color: var(--primary-color);
}

.event-details {
  list-style: none;
  padding: 0;
  margin: 0;
}

.event-details li {
  margin: 0.25rem 0;
  color: var(--text-color);
}

.event-details .event-description {
  margin-top: 0.75rem;
  font-style: italic;
  color: var(--text-color);
}

/* Photo grid used in the library */
.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.photo-grid img {
  width: calc(33.333% - 1rem);
  max-width: 280px;
  border-radius: 6px;
  object-fit: cover;
}

@media (max-width: 768px) {
  .photo-grid img {
    width: 100%;
  }
}

/*
 * Mobile responsive navigation
 *
 * On small screens we hide the desktop CTA and navigation rows and
 * instead display a dropdown containing both the navigation links
 * and the social call‑to‑action buttons. The dropdown appears below
 * the header and spans the full width of the page. When toggled
 * open it stacks the navigation links and CTAs vertically for easy
 * tapping. When closed it remains hidden.
 */

/* Base styling for the mobile navigation overlay – hidden by default */
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  right: 0; /* Align with right edge of container */
  width: 250px; /* Fixed width instead of left/right positioning */
  max-width: 80vw; /* Ensure it doesn't exceed 80% of viewport width */
  background-color: var(--light-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid #eee;
  z-index: 99;
}

/* When the nav is toggled open on small screens */
.mobile-nav.open {
  display: block;
}

/* Structure for navigation links and social buttons inside the mobile overlay */
.mobile-nav-links,
.mobile-nav-socials {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-links li a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--dark-color);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
}
.mobile-nav-links li a:hover {
  background-color: var(--secondary-color);
}

.mobile-nav-socials {
  padding: 0.5rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-socials a {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  gap: 0.5rem;
}
.mobile-nav-socials a img {
  height: 16px;
  width: 16px;
  filter: brightness(0) invert(1);
}

/* Colours for the mobile social buttons using blended brand colors with website theme */
.mobile-nav-socials .whatsapp {
  background-color: #2DB055; /* Blended WhatsApp green with warmer tones */
}
.mobile-nav-socials .whatsapp:hover {
  background-color: #259644;
}
.mobile-nav-socials .youtube {
  background-color: #E6432A; /* Blended YouTube red with orange warmth */
}
.mobile-nav-socials .youtube:hover {
  background-color: #C73620;
}
.mobile-nav-socials .spotify {
  background-color: #1DB954; /* Spotify green works well with warm palette */
}
.mobile-nav-socials .spotify:hover {
  background-color: #18A04A;
}

@media (max-width: 768px) {
  /* Hide the desktop CTA and navigation rows on mobile */
  .top-row,
  .nav-menu-container .nav-menu {
    display: none;
  }
  /* Show the nav toggle button on mobile */
  .nav-toggle {
    display: flex !important;
  }
  /* Position the nav toggle button properly */
  .nav-menu-container {
    justify-content: flex-end;
  }
  
  /* Mobile event layout - stack vertically */
  .event-item {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
  }
  
  .event-date-column {
    width: 100%;
    text-align: left;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    order: -4; /* Display first */
  }
  
  .event-month,
  .event-day,
  .event-year {
    margin: 0;
    text-align: left;
  }
  
  .event-day {
    font-size: 1.5rem;
  }
  
  .event-details {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }
  
  .event-meta-info {
    text-align: left;
    margin-left: 0;
    width: auto;
    order: -3; /* Display second, after date */
  }
  
  .event-main-info h3 {
    order: -2; /* Display third, after event type */
    margin-bottom: 0.5rem;
  }
  
  .event-location {
    order: -1; /* Display fourth, after title */
    margin-bottom: 0.5rem;
  }
  
  .event-description {
    order: 0; /* Display fifth */
  }
  
  .event-main-info .event-actions {
    order: 1; /* Display last, after description */
    margin-top: 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .event-main-info .event-actions .btn {
    width: 100%;
    text-align: center;
  }
  
  /* Mobile sort controls */
  .sort-controls {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    padding: 1.5rem;
    align-items: center;
  }
  
  .control-group {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    align-items: center;
  }
  
  .sort-controls label {
    font-size: 1rem;
    margin-bottom: 0.25rem;
  }
  
  .sort-controls select {
    width: 100%;
    max-width: 280px;
    text-align: center;
    min-width: auto;
  }
}

/* Classes Page Styling */
.classes-section {
  padding: 40px 0;
  background-color: var(--secondary-color);
  min-height: calc(100vh - 140px);
}

.classes-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.classes-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}

.class-item {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(175, 89, 52, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.class-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(175, 89, 52, 0.15);
}

.class-details {
  display: flex;
  padding: 1.5rem;
  gap: 30px;
  align-items: flex-start;
}

.class-main-info {
  flex: 1;
}

.class-main-info h3 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 1.5rem;
  font-weight: bold;
}

.class-location {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.class-description {
  color: #555;
  line-height: 1.6;
  margin: 12px 0 20px 0;
  font-size: 1rem;
}

.class-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.class-meta-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 140px;
  align-items: flex-end;
}

.class-difficulty,
.class-type {
  font-size: 0.75rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  white-space: nowrap;
  min-width: 100px;
}

/* Mobile responsive for classes */
@media (max-width: 768px) {
  .classes-container {
    padding: 0 15px;
  }
  
  .class-details {
    flex-direction: column;
    padding: 20px;
    gap: 20px;
  }

  .class-meta-info {
    align-items: flex-start;
    flex-direction: row;
    gap: 12px;
    width: 100%;
    justify-content: flex-start;
  }
  
  .class-difficulty,
  .class-type {
    min-width: auto;
    flex: 0 0 auto;
  }
  
  .class-main-info h3 {
    font-size: 1.3rem;
  }
  
  .class-actions {
    gap: 10px;
  }
  
  .class-actions .btn {
    font-size: 0.9rem;
    padding: 8px 16px;
  }
}

/* Classes fade animations (same as events) */
.classes-list.fade-out {
  opacity: 0;
}

.classes-list.fade-in {
  opacity: 1;
}

.classes-list {
  transition: opacity 0.3s ease;
}

/* Video embed styling */
.video-container {
  max-width: 800px;
  margin: 20px auto;
  padding: 140px 20px 0 20px;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

/* Mobile responsive for video */
@media (max-width: 768px) {
  .video-container {
    margin: 15px auto;
    padding: 100px 15px 0 15px;
  }
}

/* Upcoming Events Section on Index Page */
.upcoming-events-section {
  padding: 40px 0;
  background: var(--secondary-color);
  min-height: calc(100vh - 140px);
}

.upcoming-events-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.upcoming-events-container h1 {
  text-align: center;
  margin-bottom: 40px;
  color: #333;
  font-size: 2.5rem;
}

.upcoming-events-container h1.primary-color {
  color: var(--primary-color);
}

#latest-event-container {
  margin-bottom: 30px;
}

#latest-event-container p {
  text-align: center;
  color: #666;
  font-style: italic;
}

.view-more-events {
  display: block;
  text-align: center;
  margin: 30px auto 0 auto;
  max-width: 200px;
}