/* Event Calendar Popup */
.event-details.popup-content {
  align-items: flex-start;
  background-color: #e9d9be;
  padding: 8px 24px;
  margin: 24px 0;
}

/* Event Calendar Header */
.event-calendar-header {
  color: white;
  position: relative;
  overflow: hidden;
  padding-bottom: var(--clb-grid-gutter-5x);
}

.event-calendar-header-content {
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.year-selector {
  display: flex;
  align-items: center;
}

#year-dropdown {
  background: white;
  border: 1px solid #e1e1d7;
  border-radius: 30px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #4e4e43;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
  min-width: 120px;
}

#year-dropdown:hover {
  border-color: #c4c4b8;
  transform: translateY(-1px);
}

#year-dropdown:focus {
  outline: none;
  border-color: #2c5530;
  box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.event-calendar-layout {
  display: block;
}

/* Events Content */
.events-content {
  background: transparent;
  padding: 0;
}

/* Month Section */
.month-section {
  margin-bottom: 40px;
  display: flex;
  justify-content: flex-start;
}

.month-section:last-child {
  margin-bottom: 0;
}

/* Month Header */
.month-header {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  width: 30%;
}

.month-title {
  color: #010101;
  margin: 0;
}

.month-header.active .month-title {
  color: #5b7c44;
  margin: 0;
}

.month-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  transition: all 0.3s ease;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  margin-block-start: unset !important;
}

.month-toggle:hover {
  background: rgba(91, 124, 68, 0.1);
}

.month-toggle svg {
  transition: transform 0.3s ease;
}

.month-toggle.expanded svg {
  transform: rotate(180deg);
}

/* Month Events */
.month-events {
  width: 70%;
  flex-direction: column;
  gap: 24px;
}

/* Event Cards */
.event-card {
  display: flex;
  width: 100%;
  background: #f8f3ed;
  border: 2px solid #e9d9be;
  border-radius: 0 0 40px 0;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 240px;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.event-image {
  flex-shrink: 0;
  width: 320px;
  height: 240px;
  overflow: hidden;
  background: #e9ecef;
}

.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  max-width: 320px;
}

.event-card:hover .event-image img {
  transform: scale(1.05);
}

.event-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e9ecef;
  color: #6c757d;
  font-size: 14px;
  font-weight: 500;
}

.event-details {
  flex: 1;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  overflow-y: auto;
  max-height: 100%;
}

.event-title {
  color: #010101;
  line-height: 32px;
}

.event-description {
  color: #7d7e78;
  line-height: 22px;
  font-size: 14px;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  margin-top: unset !important;
  margin-block-start: unset !important;
  overflow-y: auto;
  max-height: 120px;
}

.text-event-description {
  text-align: justify;
}

.show-more-btn {
  background: none;
  border: none;
  color: #4e4e43;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 10px 0;
  transition: color 0.3s ease;
}

.show-more-btn:hover {
  color: #2c5530;
}

.full-description {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #dee2e6;
}

.event-date-time {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4e4e43;
  font-size: 14px;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
}

.date-text {
  font-weight: 400;
}

.register-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f7eeed;
  color: #a9594a;
  border: 1px solid #a9594a;
  padding: 12px 24px;
  border-radius: 0;
  text-decoration: none;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
  height: 48px;
  min-width: 120px;
}

.register-btn:hover {
  background: #a9594a;
  color: white;
  transform: translateY(-1px);
}

.register-btn.disabled {
  background: #6c757d;
  border-color: #6c757d;
  color: white;
  cursor: not-allowed;
  opacity: 0.6;
}

.register-btn.disabled:hover {
  transform: none;
  background: #6c757d;
  color: white;
}

/* No Events State */
.no-events {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
}

.no-events p {
  font-size: 18px;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .event-calendar-title {
    font-size: 2rem;
  }

  .month-header {
    padding: 0 10px;
  }

  .month-title {
    font-size: 24px;
    line-height: 32px;
  }

  .event-card {
    flex-direction: column;
    height: auto;
  }

  .event-image {
    width: 100%;
    height: 200px;
  }

  .event-details {
    padding: 16px;
  }

  .event-title {
    font-size: 20px;
    line-height: 28px;
  }
}

@media (max-width: 480px) {
  .event-calendar-header {
    padding: 40px 0 30px;
  }

  .event-calendar-title {
    font-size: 1.75rem;
  }

  .header-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .event-card {
    padding: 20px;
  }

  .register-btn {
    width: 100%;
    text-align: center;
  }
}

/* Animation for month toggle */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.month-events {
  animation: slideDown 0.3s ease-out;
}

/* Loading state */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
}

.loading::after {
  content: "";
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #2c5530;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
