/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

/* General Layout */
.content {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.events-grid.row {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: flex-start;
  margin-bottom: 40px;
}

/* Title Section */
.title-container {
  width: 100%;
  margin-bottom: 60px;
}

.title-image {
  position: relative;
  width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.title-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  filter: blur(8px) brightness(50%);
  z-index: 0;
}

.title-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.archive-page-title {
  position: relative;
  color: #ffffff;
  font-family: "Playfair Display", Sans-serif;
  font-size: 55px;
  font-weight: 900;
  text-transform: capitalize;
  line-height: 1.2;
  z-index: 2;
  margin: 0;
  padding: 0 20px;
  text-align: center;
}

h1.archive-title {
  font-family: "Playfair Display", Sans-serif;
  font-size: 36px;
  font-weight: 900;
  text-transform: capitalize;
  margin: 0 0 30px 0;
  color: #333;
}

/* Event Item Styles */
.upcoming-event-item {
  width: calc(33.333% - 20px);
  background: #fff;
  border: 1px solid #ffa02694;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 480px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  justify-content: space-between;
}

/* Event Section Styles */
.event-top-section {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
}

.event-bottom-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 10px;
}

.upcoming-event-item:hover {
  border-color: #ffa026;
  box-shadow: 0 4px 16px rgba(255, 160, 38, 0.3);
  transform: translateY(-5px);
}

.upcoming-event-item > *:last-child {
  margin-top: auto;
}

/* Ensure consistent content area */
.upcoming-event-item .upcoming-title-container,
.upcoming-event-item .upcoming-event-detail {
  flex-shrink: 0;
}

/* Event Thumbnail */
.upcoming-event-thumbnail {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

.upcoming-event-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.upcoming-event-item:hover .upcoming-event-thumbnail img {
  transform: scale(1.05);
}

.upcoming-event-thumbnail::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  z-index: 1;
}

/* Event Content */
.upcoming-title-container {
  padding: 20px 20px 0 20px;
  height: 115px; /* Fixed height to accommodate proper 3 lines of title */
  display: flex;
  align-items: flex-start;
  overflow: hidden;
}

.upcoming-title {
  color: #333333;
  font-family: "Playfair Display", Sans-serif;
  font-size: 24px;
  font-weight: 700;
  text-transform: capitalize;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limit to 3 lines */
  line-clamp: 3; /* Standard property for compatibility */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upcoming-event-detail {
  padding: 10px 20px 0px 20px;
  margin-bottom: 20px;
  border-left: 15px solid #ffa026;
  margin-left: 20px;
  flex-grow: 1;
  position: relative;
  min-height: 60px;
}

.event-info {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

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

.event-icon {
  margin-right: 12px;
  color: #ffa026;
  font-size: 16px;
  min-width: 16px;
}

.event-date,
.event-location {
  font-family: "Poppins", Sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #666;
  margin: 0;
  text-transform: capitalize;
}

/* Button Containers */
.archive-button-container {
  padding: 0 20px 20px 20px;
  display: flex;
  gap: 10px;
  margin-top: auto;
  flex-shrink: 0;
}

.past-archive-button-container {
  padding: 0 20px 20px 20px;
  display: flex;
  width: 100%;
  margin-top: auto;
  flex-shrink: 0;
}

/* Button Styles */
.event-register-now,
.event-view-detail,
.past-event-view-detail {
  padding: 12px 24px;
  border-radius: 25px;
  font-family: "Poppins", Sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: capitalize;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.event-register-now {
  background-color: #ffa026;
  color: #fff;
  border: 2px solid #ffa026;
}

.event-register-now:hover {
  background-color: #ff8f00;
  border-color: #ff8f00;
  transform: translateY(-2px);
}

.event-view-detail {
  background-color: transparent;
  color: #ffa026;
  border: 2px solid #ffa026;
}

.event-view-detail:hover {
  background-color: #ffa026;
  color: #fff;
  transform: translateY(-2px);
}

.past-event-view-detail {
  background-color: #ff8f00;
  color: #fff;
  border: 2px solid #ff8f00;
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.past-event-view-detail:hover {
  background-color: #ffa026;
  border-color: #ffa026;
  transform: translateY(-2px);
}

/* Gallery Slider Styles */
.event-gallery-slider {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

.event-gallery-list {
  display: flex;
  transition: transform 0.3s ease;
  padding: 0;
  margin: 0;
  list-style: none;
  height: 100%;
}

.event-gallery-list li {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-gallery-list img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

/* Instagram-like carousel enhancements */
.event-gallery-slider {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.event-gallery-list {
  cursor: grab;
}

.event-gallery-list:active {
  cursor: grabbing;
}

.event-gallery-list img {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Hide dots for single images */
.event-gallery-slider[data-single="true"] .dots-container,
.event-gallery-slider[data-single="true"] .prev-slide,
.event-gallery-slider[data-single="true"] .next-slide {
  display: none !important;
}

/* Mobile touch improvements */
@media (max-width: 768px) {
  .event-gallery-slider .prev-slide,
  .event-gallery-slider .next-slide {
    opacity: 0.7;
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .event-gallery-slider:hover .prev-slide,
  .event-gallery-slider:hover .next-slide {
    opacity: 0.9;
  }

  .dots-container {
    padding: 6px 10px;
  }

  .dot {
    width: 6px;
    height: 6px;
  }
}

/* Gallery Navigation */
.dots-container {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

/* Adjust dots positioning for past events with gallery */
.event-gallery-slider .dots-container {
  bottom: 20px;
}

/* Ensure dots are always visible after AJAX loads */
.event-gallery-slider .dots-container {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 10 !important;
}

.dot {
  width: 8px;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.4);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background-color: #ffffff;
  transform: scale(1.2);
}

.dot:hover {
  background-color: rgba(255, 255, 255, 0.7);
  transform: scale(1.1);
}

.prev-slide,
.next-slide {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.8);
  color: #333;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 3;
  opacity: 0;
  backdrop-filter: blur(4px);
}

.event-gallery-slider:hover .prev-slide,
.event-gallery-slider:hover .next-slide {
  opacity: 1;
}

.prev-slide {
  left: 10px;
}

.next-slide {
  right: 10px;
}

.prev-slide:hover,
.next-slide:hover {
  background-color: rgba(255, 255, 255, 0.95);
  transform: translateY(-50%) scale(1.1);
}

/* Share Button Styles */
.share-button-container {
  position: absolute;
  bottom: 15px;
  right: 15px;
  z-index: 10;
}

.share-button {
  background-color: #ffffff;
  color: #ffa026;
  border: 1px solid #ffa026;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.share-button:hover {
  background-color: #ffa026;
  color: #fff;
}

.social-icons {
  display: none;
  position: absolute;
  bottom: 50px;
  right: 0;
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  flex-direction: column;
  gap: 10px;
  min-width: 60px;
}

.social-icons.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #fff;
  color: #666;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.social-icons a:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.social-icons a.whatsapp {
  color: #25d366;
}

.social-icons a.whatsapp:hover {
  background-color: #25d366;
  color: #fff;
}

.copy-link-btn {
  color: #ffa026;
}

.copy-link-btn:hover {
  color: #fff;
  background-color: #ffa026;
}

/* Divider Styles */
.fancy-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0px 0 40px 0;
  width: 100%;
}

.divider-text {
  font-family: "Playfair Display", Sans-serif;
  font-size: 28px;
  font-weight: 700;
  text-transform: capitalize;
  color: #ff8f00;
  padding: 0 30px;
  background: linear-gradient(
    135deg,
    rgba(255, 160, 38, 0.1),
    rgba(255, 143, 0, 0.1)
  );
  border-radius: 25px;
  position: relative;
  white-space: nowrap;
}

.fancy-line {
  flex-grow: 1;
  height: 3px;
  background: linear-gradient(to right, #ffa026, #ff8f00);
  border-radius: 2px;
  position: relative;
}

.left-line::after,
.right-line::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: #ff8f00;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
}

.left-line::after {
  right: -5px;
}

.right-line::after {
  left: -5px;
}

/* Pagination Styles */
.pagination-container {
  margin-top: 40px;
  text-align: center;
}

.pagination-container a,
.pagination-container span {
  display: inline-block;
  padding: 10px 15px;
  margin: 0 5px;
  background-color: #fff;
  color: #666;
  text-decoration: none;
  border: 1px solid #ddd;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.pagination-container a:hover,
.pagination-container .current {
  background-color: #ffa026;
  color: #fff;
  border-color: #ffa026;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .content {
    padding: 30px 20px;
  }

  .events-grid.row {
    gap: 25px;
  }

  .upcoming-event-item {
    width: calc(50% - 12.5px);
    min-height: 450px;
  }

  .archive-page-title {
    font-size: 48px;
  }

  h1.archive-title {
    font-size: 32px;
  }

  .upcoming-title-container {
    height: 105px; /* Adjusted height for tablet screens - proper 3 lines */
  }

  .event-top-section {
    flex: 0 0 auto;
  }

  .event-bottom-section {
    flex: 1;
    padding-top: 8px;
  }
}

@media (max-width: 768px) {
  .content {
    padding: 20px 15px;
  }

  .events-grid.row {
    gap: 20px;
    justify-content: center;
  }

  .upcoming-event-item {
    width: calc(50% - 10px);
    min-height: 420px;
  }

  .event-top-section {
    flex: 0 0 auto;
  }

  .event-bottom-section {
    flex: 1;
    padding-top: 5px;
  }

  .title-image {
    height: 250px;
  }

  .archive-page-title {
    font-size: 40px;
    padding: 0 15px;
  }

  h1.archive-title {
    font-size: 28px;
    margin-bottom: 25px;
  }

  .upcoming-title {
    font-size: 20px;
  }

  .upcoming-title-container {
    height: 95px; /* Reduced height for smaller screens - proper 3 lines */
  }

  .event-icon {
    font-size: 14px;
  }

  .event-date,
  .event-location {
    font-size: 13px;
  }

  .archive-button-container {
    flex-direction: column;
    gap: 8px;
    padding: 0 15px 15px 15px;
  }

  .past-archive-button-container {
    padding: 0 15px 15px 15px;
  }

  .event-register-now,
  .event-view-detail {
    width: 100%;
    margin: 0;
  }

  .upcoming-event-detail {
    margin-left: 15px;
    padding: 15px 15px 0 25px;
    margin-bottom: 15px;
  }

  .upcoming-title-container {
    padding: 15px 15px 0 15px;
  }

  .event-bottom-section {
    padding-top: 5px;
  }

  /* Instagram-like carousel enhancements */
  .event-gallery-slider {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
  }

  .event-gallery-list {
    cursor: grab;
  }

  .event-gallery-list:active {
    cursor: grabbing;
  }

  .event-gallery-list img {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
  }

  /* Hide dots for single images */
  .event-gallery-slider[data-single="true"] .dots-container,
  .event-gallery-slider[data-single="true"] .prev-slide,
  .event-gallery-slider[data-single="true"] .next-slide {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 15px 10px;
  }

  .events-grid.row {
    gap: 15px;
  }

  .upcoming-event-item {
    width: 100%;
    margin: 0 auto;
    max-width: 400px;
    min-height: 400px;
  }

  .title-image {
    height: 200px;
  }

  .archive-page-title {
    font-size: 32px;
    padding: 0 10px;
  }

  h1.archive-title {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .upcoming-event-thumbnail,
  .event-gallery-slider {
    height: 200px;
  }

  .event-gallery-list img {
    height: 200px;
  }

  .upcoming-title {
    font-size: 18px;
  }

  .upcoming-title-container {
    padding: 15px 15px 0 15px;
    height: 85px; /* Smaller height for mobile - proper 3 lines */
  }

  .upcoming-event-detail {
    padding: 15px 15px 0 25px;
    margin-left: 15px;
    margin-bottom: 15px;
  }

  .event-bottom-section {
    padding-top: 5px;
  }

  .archive-button-container,
  .past-archive-button-container {
    padding: 0 15px 15px 15px;
  }

  .event-register-now,
  .event-view-detail,
  .past-event-view-detail {
    padding: 10px 20px;
    font-size: 13px;
  }

  .dots-container {
    bottom: 70px;
  }

  .event-gallery-slider .dots-container {
    bottom: 75px;
  }

  .prev-slide,
  .next-slide {
    top: 40%;
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

  .prev-slide {
    left: 10px;
  }

  .next-slide {
    right: 10px;
  }

  .share-button-container {
    bottom: 10px;
    right: 10px;
  }

  .share-button {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

  .social-icons {
    bottom: 45px;
    right: -5px;
    padding: 10px;
  }

  .social-icons a {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

  .fancy-divider {
    margin: 40px 0 25px 0;
  }

  .divider-text {
    font-size: 20px;
    padding: 0 15px;
  }

  .pagination-container a,
  .pagination-container span {
    padding: 8px 12px;
    font-size: 14px;
  }
}

@media (max-width: 320px) {
  .content {
    padding: 10px 5px;
  }

  .archive-page-title {
    font-size: 28px;
  }

  .upcoming-event-item {
    max-width: 310px;
  }

  .upcoming-title {
    font-size: 16px;
  }

  .upcoming-title-container {
    height: 80px; /* Even smaller height for very small screens - proper 3 lines */
  }

  .event-date,
  .event-location {
    font-size: 12px;
  }

  .event-register-now,
  .event-view-detail,
  .past-event-view-detail {
    padding: 8px 16px;
    font-size: 12px;
  }

  .divider-text {
    font-size: 18px;
    padding: 0 12px;
  }

  .pagination-container a,
  .pagination-container span {
    padding: 6px 10px;
    font-size: 12px;
    margin: 0 2px;
  }
}

/* Additional responsive styles for event sections */
@media (max-width: 1024px) {
  .event-top-section {
    flex: 0 0 auto;
  }

  .event-bottom-section {
    flex: 1;
    padding-top: 8px;
  }
}

@media (max-width: 480px) {
  .event-top-section {
    flex: 0 0 auto;
  }

  .event-bottom-section {
    flex: 1;
    padding-top: 5px;
  }
}

@media (max-width: 320px) {
  .event-top-section {
    flex: 0 0 auto;
  }

  .event-bottom-section {
    flex: 1;
    padding-top: 5px;
  }
}

/* Ensure consistent alignment */
.event-bottom-section .upcoming-event-detail {
  margin-bottom: 15px;
}

.event-bottom-section .archive-button-container,
.event-bottom-section .past-archive-button-container {
  margin-top: auto;
}

/* Accessibility and Focus States */
.event-register-now:focus,
.event-view-detail:focus,
.past-event-view-detail:focus {
  outline: 2px solid #ffa026;
  outline-offset: 2px;
}

.share-button:focus {
  outline: 2px solid #ffa026;
  outline-offset: 2px;
}

.social-icons a:focus {
  outline: 2px solid #ffa026;
  outline-offset: 2px;
}

.prev-slide:focus,
.next-slide:focus {
  outline: 2px solid #ffa026;
  outline-offset: 2px;
}

/* Loading States */
.upcoming-event-thumbnail img {
  background-color: #f5f5f5;
  min-height: 200px;
}

.upcoming-event-thumbnail img:not([src]) {
  background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"%3E%3Cpath fill="%23ddd" d="M0 0h100v100H0z"/%3E%3C/svg%3E');
  background-size: cover;
  background-position: center;
}

/* Print Styles */
@media print {
  .share-button-container,
  .prev-slide,
  .next-slide,
  .dots-container {
    display: none !important;
  }

  .upcoming-event-item {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .title-image::before,
  .title-image::after {
    display: none;
  }

  .archive-page-title {
    color: #000 !important;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .upcoming-event-item {
    border-width: 2px;
    border-color: #000;
  }

  .event-register-now,
  .event-view-detail,
  .past-event-view-detail {
    border-width: 2px;
  }

  .share-button {
    border-width: 2px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .upcoming-event-item:hover {
    transform: none;
  }

  .upcoming-event-item:hover .upcoming-event-thumbnail img {
    transform: none;
  }
}

/* Light Design Theme */
@media (prefers-color-scheme: dark) {
  .upcoming-event-item {
    background-color: #ffffff;
    border-color: #ffa02694;
  }

  .upcoming-title {
    color: #333333;
  }

  .event-date,
  .event-location {
    color: #666666;
  }

  .social-icons {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: #ffa02694;
  }

  .social-icons a {
    background-color: #f8f8f8;
    color: #666666;
  }
}

/* Error State for Missing Images */
.upcoming-event-thumbnail img[src=""],
.upcoming-event-thumbnail img:not([src]) {
  background-color: #f8f9fa;
  background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"%3E%3Cpath fill="%23ddd" d="M0 0h100v100H0z"/%3E%3Ctext x="50" y="50" font-family="Arial, sans-serif" font-size="12" text-anchor="middle" fill="%23999"%3ENo Image%3C/text%3E%3C/svg%3E');
  background-size: cover;
  background-position: center;
  display: block;
  width: 100%;
  height: 100%;
}

/* Sticky Navigation Enhancement */
.title-container {
  position: relative;
  z-index: 1;
}

/* Enhanced left border styling for better visibility */
.upcoming-event-detail::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, #ffa026, #ff8f00);
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(255, 160, 38, 0.3);
}

.upcoming-event-detail {
  border-left: 4px solid transparent !important;
}

/* Improved Button Spacing */
.archive-button-container {
  gap: 12px;
}

.archive-button-container .event-register-now + .event-view-detail {
  margin-left: 0;
}

/* Widget Styles for Sidebar Use */
.widget-register-now,
.widget-view-detail {
  padding: 8px 16px;
  border-radius: 20px;
  font-family: "Poppins", Sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: capitalize;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  margin: 0 5px 8px 0;
}

.widget-register-now {
  background-color: #ffa026;
  color: #fff;
  border: 1px solid #ffa026;
}

.widget-register-now:hover {
  background-color: #ff8f00;
  border-color: #ff8f00;
}

.widget-view-detail {
  background-color: transparent;
  color: #ffa026;
  border: 1px solid #ffa026;
}

.widget-view-detail:hover {
  background-color: #ffa026;
  color: #fff;
}

/* Ensure consistent spacing for all elements */
.events-grid.row > * {
  margin-bottom: 0;
}

.content > .events-grid.row:last-child {
  margin-bottom: 0;
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* IE11 and older browser fallbacks */
@supports not (display: flex) {
  .events-grid.row {
    display: block;
  }

  .upcoming-event-item {
    display: block;
    width: 100%;
    margin-bottom: 20px;
  }

  .archive-button-container {
    display: block;
  }

  .event-register-now,
  .event-view-detail {
    display: block;
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Additional spacing fixes for consistent layout */
.upcoming-event-item {
  justify-content: space-between;
}

.upcoming-event-item > *:last-child {
  margin-top: auto;
}

/* Ensure consistent content area */
.upcoming-event-item .upcoming-title-container,
.upcoming-event-item .upcoming-event-detail {
  flex-shrink: 0;
}

/* Fix gallery spacing in past events */
.event-gallery-slider + .share-button-container {
  z-index: 5;
}

/* Ensure past events have consistent height */
.past-archive-button-container .past-event-view-detail {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

/* Mobile spacing adjustments */

/* Additional border fixes for all scenarios */
.upcoming-event-detail {
  position: relative;
}

/* Ensure border is visible even in edge cases */
.upcoming-event-item .upcoming-event-detail::before {
  background: linear-gradient(to bottom, #ffa026, #ff8f00) !important;
  box-shadow: 0 0 4px rgba(255, 160, 38, 0.3) !important;
}

/* Past events should also have consistent borders */
