@import url('https://fonts.googleapis.com/css2?family=Karla:wght@400;700&family=Poppins:wght@400;700');

:root {
  --primary: #0dab49;
  --secondary: #c2b613;
  --card-bg: #fff;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
  --border-radius: 14px;
  --meta-bg: #f7f7f7;
  --meta-color: #333;
  --button-bg: #0dab49;
  --button-color: #fff;
  --button-radius: 6px;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #f4f4f4;
  margin: 0;
  padding: 0;
}

.spektrix-events {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 16px;
}

.regular-events-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.event-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  overflow: hidden;
  min-height: 480px;
  max-width: 100%;
  transition: transform 0.18s, box-shadow 0.18s;
  position: relative;
  border: 1px solid #000 !important;
  border-left-color: #666 !important;
}

.event-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 6px 24px rgba(0,0,0,0.13);
}

.event-image-container {
  margin: 0 0 15px 0;
  overflow: hidden;
  height: 200px;
  position: relative;
  background-color: #f0f0f0;
  border-bottom: 1px solid #000;
}

.event-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-event-badge {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--secondary);
  color: #222;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 18px;
  border-bottom-right-radius: var(--border-radius);
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.event-card-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.event-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-meta {
  background: var(--meta-bg);
  color: var(--meta-color);
  border-radius: 8px;
  padding: 0;
  font-size: 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.event-description-container {
  flex: 1 1 auto;
  margin-bottom: 18px;
}

.event-description {
  color: #444;
  font-size: 15px;
  line-height: 1.5;
  max-height: 3.2em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  box-orient: vertical;
  margin-bottom: 0;
  transition: max-height 0.3s;
}

.event-description.expanded {
  max-height: 100vh;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

.show-more-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-top: 4px;
  text-align: left;
}

.book-now-container {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding: 0 0 18px 0;
}

.book-now-button, .show-more-btn {
  flex: 1 1 0;
  background: var(--button-bg); /* Use default button background */
  color: var(--button-color);
  border: none;
  border-radius: var(--button-radius);
  padding: 12px 0;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.2s;
  margin: 0;
}

.book-now-button:hover {
  background: #1d4ed8 !important; /* Darker blue on hover */
}

/* Book Now Button - Blue */
.book-now-button {
    background-color: #2563eb !important; /* Blue */
}

.book-now-button:hover {
    background-color: #1d4ed8 !important; /* Darker blue on hover */
}

/* Read More Button - Purple */
.show-more-btn {
    background-color: rgb(67, 117, 67) !important; /* Pale green */
}

.show-more-btn:hover {
    background-color: #558d55 !important; /* Lighter pale green on hover */
}

@media (max-width: 900px) {
  .regular-events-container {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
  .event-card {
    min-height: 420px;
  }
}

@media (max-width: 600px) {
  .regular-events-container {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .event-card {
    min-height: 340px;
  }
}

/* Unified Spektrix Events Styles */

:root {
  --custom-nav-background: #0dab49;
  --custom-page-background: #fff;
  --custom-header-font-name: 'Karla', sans-serif;
  --custom-body-font-name: 'Poppins', sans-serif;
  --custom-header-font-size: 34px;
  --custom-body-font-size: 14px;
  --custom-body-text-color: #000;
}

body {
  font-family: var(--custom-body-font-name);
  color: var(--custom-body-text-color);
  background: var(--custom-page-background);
  margin: 0;
  padding: 0;
}

.featured-events {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  color: #000;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 20px;
  columns: unset;
}

.featured-events .event-card {
  break-inside: avoid;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.event-card {
  break-inside: avoid;
  background: rgb(219, 218, 218);
  border: 1px solid #000 !important;
  border-left-color: #666 !important;
  border-radius: 8px;
  margin-bottom: 20px;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  color: #000;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card[data-event-type],
.event-card[data-event-type="Barn Cinema"],
.event-card[data-event-type="Family"],
.event-card[data-event-type="Live Arts"],
.event-card[data-event-type="Talk/Lecture/Debate"],
.event-card[data-event-type="Festivals"],
.event-card[data-event-type="Food and drink"],
.event-card[data-event-type="Course / Workshop"],
.event-card[data-event-type="Workshop"],
.event-card[data-event-type="Talks and exhibitions"],
.event-card[data-event-type="Members Event"],
.event-card[data-event-type="Philanthrophy"],
.event-card[data-event-type="Dartington 100"],
.event-card[data-event-type="Heritage Centre"] {
  border: 1px solid #000 !important;
  border-left-color: #666 !important;
}

.event-card h2 {
  margin: 0 0 15px 0;
  color: #000;
  font-size: 18px;
  line-height: 1.2;
  word-wrap: break-word;
  font-family: var(--custom-header-font-name);
  font-weight: 700;
}

.event-card h3 {
  font-size: 14px;
  margin: 15px 0;
  color: #000;
}

.event-meta {
  background: rgb(231, 229, 229);
  padding: 15px;
  margin-bottom: 15px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ddd;
  color: #000;
}

.event-meta p {
  margin: 5px 0;
  line-height: 1.4;
  word-wrap: break-word;
  color: #000;
}

.event-description {
  margin: 15px 0;
  line-height: 1.5;
  font-size: 14px;
  word-wrap: break-word;
  color: #000;
}

.book-now-container {
  margin-top: 20px;
  text-align: center;
  padding: 5px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.book-now-button, .show-more-btn {
  display: inline-block;
  width: 100%;
  padding: 10px 20px;
  background-color: var(--button-bg); /* Use default button background */
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-sizing: border-box;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-top: 10px;
  text-align: center;
}

.book-now-button:hover, .show-more-btn:hover {
  background-color: var(--button-bg); /* Use default hover background */
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.book-now-button.unticketed {
  background-color: #6c757d;
}

.book-now-button.unticketed:hover {
  background-color: #5a6268;
}

.featured-event-badge {
  display: block;
  background-color: #cfc74d;
  color: #000;
  font-weight: bold;
  padding: 16px 0;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 1px;
  margin: 0 0 15px 0;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  position: relative;
  line-height: 1.5;
  border-bottom: 2px solid #000;
}

.event-image-container {
  margin: 0 0 15px 0;
  overflow: hidden;
  height: 200px;
  position: relative;
  background-color: #f0f0f0;
  border-bottom: 1px solid #000;
}

.event-image {
  width: 100% !important;
  height: 200px !important;
  object-fit: cover !important;
  display: block;
  margin: 0 !important;
  padding: 0 !important;
}

.event-image-placeholder {
  width: 100%;
  height: 100%;
  position: relative;
}

.event-name-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 20px;
  box-sizing: border-box;
}

.event-name-overlay span {
  color: white;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  line-height: 1.4;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  box-orient: vertical;
}

/* Filter/Search Styles from spektrix-events.css */
.event-search {
  width: 100%;
  padding: 15px 20px;
  margin-bottom: 25px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background-color: #f8f9fa;
}

.event-search:focus {
  outline: none;
  border-color: #2196F3;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.event-type-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.event-type-filter {
  padding: 10px 20px;
  background: #ffffff;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

.event-type-filter:hover {
  background: #f5f5f5;
  border-color: #2196F3;
  color: #2196F3;
}

.event-type-filter.active {
  background: #2196F3;
  color: #ffffff;
  border-color: #2196F3;
  box-shadow: 0 2px 4px rgba(33, 150, 243, 0.2);
}

@media (max-width: 1024px) {
  .spektrix-events {
    columns: 2;
    padding: 15px;
  }
  .featured-events {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .spektrix-events {
    columns: 1;
    padding: 10px;
    column-gap: 0;
  }
  .featured-events {
    grid-template-columns: 1fr;
  }
  .event-card {
    margin-bottom: 15px;
  }
}

/* Base styles */
/* * {
    box-sizing: border-box;
} */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-family: 'Karla', sans-serif;
    font-size: 34px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

/* Error and no events messages */
.error, .no-events {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    border: 1px solid #f5c6cb;
}

.no-events {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* Featured and Regular Events Sections */
.featured-events-section, .regular-events-section {
    break-inside: avoid;
    margin-bottom: 40px;
}

.featured-events-section h2, .regular-events-section h2 {
    font-family: 'Karla', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin-bottom: 20px;
    text-align: center;
}

/* Use grid for event containers */
.featured-events-container,
.regular-events-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    justify-items: start;
    justify-content: start;
    grid-auto-flow: row;
}

/* Event Cards */
.event-card {
    break-inside: avoid;
    background: rgb(219, 218, 218);
    border: 1px solid #000 !important;
    border-left-color: #666 !important;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    color: #000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 400px;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.event-card h2 {
    margin: 0 0 15px 0;
    color: #000;
    font-size: 18px;
    line-height: 1.2;
    word-wrap: break-word;
    font-family: 'Karla', sans-serif;
    font-weight: 700;
}

.event-card h3 {
    font-size: 14px;
    margin: 15px 0;
    color: #000;
}

/* Featured Event Badge - full width yellow heading */
.featured-event-badge {
    background: #e7d955;
    color: #222;
    padding: 10px 0;
    border-radius: 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
    display: block;
    width: 100%;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    /* box-shadow: 0 1px 0 #ccc; */
}

/* Ensure event card content is positioned relative for badge overlay */
.event-card-content {
    position: relative;
    padding: 0;
}

/* Add margin below the badge to the image if needed */
.event-image-container {
    margin-top: 10px;
}

/* Event Image */
.event-image-container {
    margin-bottom: 15px;
}

.event-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

.event-image-placeholder {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.event-name-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.event-name-overlay span {
    color: white;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    box-orient: vertical;
}

/* Event Meta Information */
.event-meta {
    background: rgb(231, 229, 229);
    padding: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ddd;
    color: #000;
}

.event-meta p {
    margin: 5px 0;
    line-height: 1.4;
    word-wrap: break-word;
    color: #000;
}

/* Event Description */
.event-description-container {
    margin: 15px 0;
}

.event-description {
    line-height: 1.5;
    font-size: 14px;
    word-wrap: break-word;
    color: #000;
}

.event-description.truncated {
    max-height: 60px;
    overflow: hidden;
    position: relative;
}

.event-description.truncated::after {
    content: "...";
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgb(219, 218, 218);
    padding-left: 5px;
}

/* Book Now Container */
.book-now-container {
    margin-top: 20px;
    text-align: center;
    padding: 5px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.book-now-button, .show-more-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--button-bg); /* Use default button background */
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
    min-width: 120px;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.book-now-button:hover, .show-more-btn:hover {
    background-color: var(--button-bg); /* Use default hover background */
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.book-now-button.unticketed {
    background-color: #6c757d;
}

.book-now-button.unticketed:hover {
    background-color: #5a6268;
}

/* Filter Container */
.event-filter-container {
    margin: 2rem auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    max-width: 90%;
    padding: 0 1rem;
}

.filter-section, .search-section, .clear-section {
    position: relative;
    display: inline-block;
    width: auto;
    min-width: 150px;
    flex: 1;
}

.filter-toggle-btn, .search-toggle-btn, .clear-all-btn {
    background-color: #0dab49;
    color: #E2EAF4;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    white-space: nowrap;
    transition: all 0.3s ease;
    position: relative;
    gap: 0.5rem;
    height: 48px; /* Ensure consistent height */
    line-height: 1; /* Ensure consistent line height */
    box-sizing: border-box; /* Include padding in height calculation */
}

/* Active state for filter button */
.filter-toggle-btn.active-filter {
    background-color: #007bff;
    color: #ffffff;
    border-color: #0056b3;
}

/* Active state for search button */
.search-toggle-btn.active-search {
    background-color: #28a745;
    color: #ffffff;
    border-color: #1e7e34;
}

/* Icon container for right-aligned icons */
.icon-right {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 0.25rem;
}

/* Shared icon button style */
.icon-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.2s;
    padding: 0;
}

.icon-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* Chevron icon style */
.icon-btn.chevron {
    font-size: 18px;
    pointer-events: none;
    background: none;
}

/* Cancel icon style */
.icon-btn.cancel {
    font-size: 18px;
    margin-left: 2px;
}

/* Hide cancel icon unless active */
.icon-btn.cancel { display: none; }
.filter-toggle-btn.active-filter .icon-btn.cancel,
.search-toggle-btn.active-search .icon-btn.cancel {
    display: flex;
}
.filter-toggle-btn.active-filter .icon-btn.chevron,
.search-toggle-btn.active-search .icon-btn.chevron {
    display: none;
}

.clear-all-btn {
    justify-content: center;
    height: 48px; /* Match the height of other filter buttons */
    line-height: 1; /* Ensure consistent line height */
}

.clear-all-btn:hover {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.10);
}

.clear-all-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.filter-toggle-btn:hover, .search-toggle-btn:hover {
    background-color: #0a8a3a;
    color: #fff;
    border-color: #0a8a3a;
    box-shadow: 0 2px 8px rgba(13, 171, 73, 0.10);
}

.toggle-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.filter-toggle-btn.active .toggle-arrow, .search-toggle-btn.active .toggle-arrow {
    transform: rotate(180deg);
}

.filter-buttons-container, .search-container {
    max-height: 0;
    overflow: hidden;
    background-color: #ffffff;
    border-radius: 8px;
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: absolute;
    z-index: 100;
    width: 100%;
    border: 1px solid #e0e0e0;
    transition: max-height 0.3s ease;
}

.filter-buttons-container.show, .search-container.show {
    max-height: 500px;
    padding: 1rem;
}

.event-filter-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}

.event-filter-item {
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    background-color: #0dab49;
    color: #fff;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid #157347;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.event-filter-item:hover {
    background-color: #0a8a3a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-color: #0a8a3a;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.event-filter-item:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.event-filter-item.active {
    background-color: #007bff;
    border-color: #0056b3;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
    font-weight: 600;
}

.event-filter-item.active:hover {
    background-color: #0056b3;
    border-color: #004085;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

.event-search {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #333;
    border-radius: 8px;
    margin-bottom: 20px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.event-search:focus {
    outline: none;
    border-color: #0dab49;
    box-shadow: 0 0 0 3px rgba(13, 171, 73, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .featured-events-container,
    .regular-events-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .featured-events-container,
    .regular-events-container {
        grid-template-columns: 1fr;
    }
    
    .event-card {
        padding: 15px;
        margin-bottom: 15px;
        max-width: 100%;
    }
    
    .event-filter-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-section, .search-section, .clear-section {
        width: 100%;
    }
    
    .book-now-container {
        flex-direction: column;
    }
    
    .book-now-button, .show-more-btn {
        width: 100%;
    }
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    border-top: 1px solid #ddd;
    color: #666;
}

/* Color coding for event types - Dynamic approach */
.event-card[data-event-type] {
    border: 1px solid #000 !important;
    border-left-color: #666 !important;
}

/* Specific event type colors - these will still work for known types */
.event-card[data-event-type="Barn Cinema"] {
    border-left-color: #4CAF50;
}

.event-card[data-event-type="Family"] {
    border-left-color: #9C27B0;
}

.event-card[data-event-type="Live Arts"] {
    border-left-color: #FF9800;
}

.event-card[data-event-type="Talk/Lecture/Debate"] {
    border-left-color: #2196F3;
}

.event-card[data-event-type="Festivals"] {
    border-left-color: #E91E63;
}

.event-card[data-event-type="Food and drink"] {
    border-left-color: #795548;
}

.event-card[data-event-type="Course / Workshop"] {
    border-left-color: #607D8B;
}

.event-card[data-event-type="Workshop"] {
    border-left-color: #607D8B;
}

.event-card[data-event-type="Talks and exhibitions"] {
    border-left-color: #2196F3;
}

.event-card[data-event-type="Members Event"] {
    border-left-color: #FF5722;
}

.event-card[data-event-type="Philanthrophy"] {
    border-left-color: #8BC34A;
}

.event-card[data-event-type="Dartington 100"] {
    border-left-color: #9C27B0;
}

.event-card[data-event-type="Heritage Centre"] {
    border-left-color: #795548;
}

/* Default color for any other event types not specifically defined above */
.event-card[data-event-type]:not([data-event-type="Barn Cinema"]):not([data-event-type="Family"]):not([data-event-type="Live Arts"]):not([data-event-type="Talk/Lecture/Debate"]):not([data-event-type="Festivals"]):not([data-event-type="Food and drink"]):not([data-event-type="Course / Workshop"]):not([data-event-type="Workshop"]):not([data-event-type="Talks and exhibitions"]):not([data-event-type="Members Event"]):not([data-event-type="Philanthrophy"]):not([data-event-type="Dartington 100"]):not([data-event-type="Heritage Centre"]) {
    border-left-color: #607D8B; /* Default gray color for unknown types */
}

/* Center single card when only one is visible */
.regular-events-container.single-card {
    display: grid !important;
    justify-content: center !important;
    grid-template-columns: minmax(300px, 400px) !important;
}
.regular-events-container.single-card .event-card {
    max-width: 400px !important;
    width: 100% !important;
}

/* Center and space out two cards when exactly 2 are visible */
.regular-events-container.two-cards {
    display: grid !important;
    justify-content: center !important;
    align-items: start !important;
    grid-template-columns: repeat(2, minmax(300px, 400px)) !important;
    gap: 40px !important;
    max-width: 900px !important;
    margin: 0 auto !important;
    width: 100% !important;
}
.regular-events-container.two-cards .event-card {
    max-width: 400px !important;
    width: 100% !important;
    margin: 0 !important;
    justify-self: center !important;
}

/* Always use 3 columns for regular and featured events on desktop */
.featured-events-container,
.regular-events-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    justify-items: start;
    align-items: start;
}

/* Ensure event cards don't have conflicting margins */
.regular-events-container .event-card,
.featured-events-container .event-card {
    margin: 0 !important;
    width: 100% !important;
}

@media (max-width: 1024px) {
    .featured-events-container,
    .regular-events-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Adjust two-cards layout for tablet */
    .regular-events-container.two-cards {
        grid-template-columns: repeat(2, minmax(280px, 350px)) !important;
        gap: 30px !important;
        max-width: 750px !important;
    }
}
@media (max-width: 768px) {
    .featured-events-container,
    .regular-events-container {
        grid-template-columns: 1fr;
    }
    
    /* Stack two cards vertically on mobile */
    .regular-events-container.two-cards {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        max-width: 100% !important;
    }
}

/* Center single card in featured events */
.featured-events-container.single-card {
    display: grid !important;
    justify-content: center !important;
    grid-template-columns: minmax(300px, 400px) !important;
}
.featured-events-container.single-card .event-card {
    max-width: 400px !important;
    width: 100% !important;
}

/* Center and space out two featured cards when exactly 2 are visible */
.featured-events-container.two-cards {
    display: grid !important;
    justify-content: center !important;
    align-items: start !important;
    grid-template-columns: repeat(2, minmax(300px, 400px)) !important;
    gap: 40px !important;
    max-width: 900px !important;
    margin: 0 auto !important;
    width: 100% !important;
}
.featured-events-container.two-cards .event-card {
    max-width: 400px !important;
    width: 100% !important;
    margin: 0 !important;
    justify-self: center !important;
}

@media (max-width: 1024px) {
    /* Adjust two-cards layout for featured events on tablet */
    .featured-events-container.two-cards {
        grid-template-columns: repeat(2, minmax(280px, 350px)) !important;
        gap: 30px !important;
        max-width: 750px !important;
    }
}

@media (max-width: 768px) {
    /* Stack two featured cards vertically on mobile */
    .featured-events-container.two-cards {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        max-width: 100% !important;
    }
}

/* Dartington Trust Top Bar Styles */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #4CAF50;
    color: #222;
    padding: 25px 0;
    /* border: 2px solid #222; */
    border-bottom: none;
    position: relative;
    border-radius: 0 !important;
    margin-bottom: 20px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.top-bar-left .dt-logo {
    font-size: 2.2em;
    font-weight: 700;
    line-height: 0.95;
    color: #222;
    text-align: left;
    flex: 1;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.top-bar-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex: 1;
    position: relative;
    padding-right: 20px;
}

.contact-info {
    text-align: right;
    font-size: 1.1em;
    margin-bottom: 8px;
    line-height: 1.2;
    color: #222;
}

.contact-info .back-link {
    color: #222;
    text-decoration: underline;
    font-size: 0.85em;
    margin-top: 3px;
    display: block;
    position: static;
}

.whats-on {
    font-size: 3em;
    font-weight: bold;
    color: #111;
    margin-top: 0;
}

/* Top Bar Responsive Styles */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 15px 0;
    }
    
    .top-bar-left .dt-logo {
        font-size: 2em;
        margin-bottom: 10px;
        text-align: center;
    }
    
    .top-bar-right {
        align-items: center;
        width: 100%;
    }
    
    .contact-info {
        text-align: center;
        font-size: 1em;
        margin-bottom: 10px;
        line-height: 1.3;
    }
    
    .contact-info .back-link {
        position: static;
        margin-top: 5px;
        display: inline-block;
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .top-bar {
        padding: 10px 0;
    }
    
    .top-bar-left .dt-logo {
        font-size: 1.8em;
        margin-bottom: 8px;
    }
    
    .contact-info {
        font-size: 0.9em;
        margin-bottom: 8px;
    }
    
    .contact-info .back-link {
        font-size: 0.75em;
        margin-top: 3px;
    }
}

@media (max-width: 360px) {
    .top-bar {
        padding: 8px 0;
    }
    
    .top-bar-left .dt-logo {
        font-size: 1.6em;
        margin-bottom: 6px;
    }
    
    .contact-info {
        font-size: 0.8em;
        margin-bottom: 6px;
    }
}

/* Calendar Styles */
body { 
    font-family: Arial, sans-serif; 
    margin: 20px; 
    background-color: #f5f5f5; 
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    background: white; 
    padding: 20px; 
    /* border-radius: 8px;  */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
}

.calendar { 
    border-collapse: collapse; 
    width: 100%; 
    margin-top: 20px; 
    table-layout: fixed; 
}

.calendar th, .calendar td { 
    border: 1px solid #ddd; 
    padding: 8px; 
    text-align: left; 
    vertical-align: top;
    height: auto;
    width: 14.28%; /* Equal width for 7 columns */
    word-wrap: break-word;
    overflow: hidden;
}

.calendar th { 
    background-color: #4CAF50; 
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 6px 4px;
    font-size: 13px;
    height: auto;
}

.other-month { 
    background-color: #f9f9f9; 
    color: #999; 
}

.today { 
    background-color: #e8f5e8; 
    border: 2px solid #4CAF50; 
}

.past-date { 
    background-color: #f5f5f5; 
    color: #ccc; 
}

.event { 
    background-color: #4CAF50; 
    color: white; 
    padding: 3px 6px; 
    margin: 2px 0; 
    border-radius: 4px; 
    font-size: 11px;
    display: block;
    text-decoration: none;
    transition: background-color 0.2s;
    word-wrap: break-word;
    overflow: hidden;
}

/* Event type color coding - pastel colors */
.event-barn-cinema, .mobile-event.event-barn-cinema { 
    background-color: rgb(155, 200, 243); 
    color: #333; 
}

.event-live-arts, .mobile-event.event-live-arts { 
    background-color: #D5E8E8; 
    color: #333; 
}

.event-family, .mobile-event.event-family { 
    background-color: #D5E8D5; 
    color: #333; 
}

.event-festivals, .mobile-event.event-festivals { 
    background-color: #E8E8D5; 
    color: #333; 
}

.event-course-workshop, .mobile-event.event-course-workshop { 
    background-color: #E8D5E8; 
    color: #333; 
}

.event-default, .mobile-event.event-default { 
    background-color: #F0F0F0; 
    color: #333; 
}

.event-weddings-events, .mobile-event.event-weddings-events { 
    background-color: #FFF9CC; 
    color: #333; 
}

.event-food-drink, .mobile-event.event-food-drink { 
    background-color: #FFE5CC; 
    color: #333; 
}

.event-dartington-gardens-tour, .mobile-event.event-dartington-gardens-tour { 
    background-color: #E6D6F7; 
    color: #333; 
}

.event-performance, .mobile-event.event-performance { 
    background-color: #FFF9CC; 
    color: #333; 
}

.event-time { 
    font-weight: bold; 
    font-size: 12px; 
}

.event-title { 
    font-size: 12px; 
    line-height: 1.2; 
}

.event-venue { 
    font-size: 9px; 
    opacity: 0.8; 
}

.navigation { 
    margin-bottom: 20px; 
    text-align: center; 
}

.navigation a { 
    padding: 12px 20px; 
    text-decoration: none; 
    background-color: #4CAF50; 
    color: white; 
    border-radius: 5px; 
    margin: 0 10px;
    display: inline-block;
    transition: background-color 0.2s;
}

.navigation a:hover { 
    background-color: #45a049; 
}

.filters { 
    margin-bottom: 20px; 
    text-align: center; 
}

.filters select, .filters input { 
    padding: 8px; 
    margin: 0 5px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
}

.filters input[type="submit"] { 
    background-color: #4CAF50; 
    color: white; 
    border: none; 
    cursor: pointer; 
}

.filters input[type="submit"]:hover { 
    background-color: #45a049; 
}

.no-events { 
    color: #999; 
    font-style: italic; 
    text-align: center; 
    padding: 20px; 
}

.mobile-day {
    background: white;
    margin-bottom: 8px;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid #e9ecef;
}

.mobile-day-header {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin: 0;
    padding: 8px 12px 4px 12px;
    border-bottom: none;
    background: #f8f9fa;
}

.mobile-day.today .mobile-day-header {
    background-color: #e8f5e8;
    color: #2E7D32;
    font-weight: bold;
}

.mobile-event {
    background: white;
    border-left: none;
    padding: 16px 20px;
    margin: 0;
    border-radius: 0;
    text-decoration: none;
    display: block;
    color: #333;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s;
}

.mobile-event:last-child {
    border-bottom: none;
}

.mobile-event-time {
    font-weight: 600;
    font-size: 14px;
    color: #000;
    margin-bottom: 4px;
}

.mobile-event-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #212529;
}

.mobile-event-venue {
    font-size: 13px;
    color: #6c757d;
}

.mobile-no-events {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 20px;
    background: white;
}

/* Show mobile list by default, hide on desktop */
.mobile-list { 
    display: block; 
}

.calendar { 
    display: none; 
}

@media (min-width: 1025px) {
    .mobile-list { 
        display: none; 
    }
    .calendar { 
        display: table; 
    }
    .container { 
        max-width: 1200px; 
    }
}

@media (max-width: 1024px) {
    .container { 
        max-width: 100%; 
    }
}

@media (max-width: 768px) {
    .mobile-day-header {
        font-size: 15px;
        padding: 14px 16px 6px 16px;
    }
    .mobile-event {
        padding: 14px 16px;
    }
    .mobile-event-time {
        font-size: 13px;
    }
    .mobile-event-title {
        font-size: 15px;
    }
    .mobile-event-venue {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .navigation {
        padding: 10px 8px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .navigation a {
        padding: 12px 0;
        margin: 0;
        font-size: 15px;
        border-radius: 8px;
        width: 100%;
        box-sizing: border-box;
        display: block;
    }
    .filters {
        padding: 8px 8px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .filters label {
        font-size: 13px;
        margin-bottom: 2px;
        text-align: left;
    }
    .filters select, .filters input[type="submit"] {
        width: 100%;
        font-size: 14px;
        padding: 10px 8px;
        margin: 0;
        border-radius: 6px;
        box-sizing: border-box;
    }
    h1 {
        font-size: 16px;
        padding: 10px 8px;
    }
} 

/* View Calendar Button */
.view-calendar-btn {
    display: inline-block;
    background: #87CEEB !important; /* Pale blue */
    color: #333 !important;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1em;
    box-shadow: 0 2px 8px rgba(135, 206, 235, 0.2);
    transition: background 0.2s;
    margin-top: 10px;
}

.view-calendar-btn:hover {
    background: #B0E0E6 !important; /* Lighter pale blue on hover */
    color: #333 !important;
} 