/* Responsive Improvements for KKSA Website */

/* Hero Section Responsiveness */
.hero-section {
  min-height: 500px;
  height: auto;
}

.hero-content {
  padding: 40px 24px;
  max-width: 100%;
}

/* Featured Cards Responsiveness and Button Alignment */
.feature-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.feature-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.feature-card-text {
  flex: 1;
}

/* Card Label Alignment */
.card-label {
  top: 0;
  right: 0;
  padding: 5px 12px;
  border-radius: 0 4px 0 4px;
}

/* Event Cards - Consistent Vertical Alignment */
.event-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.event-card-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 24px; /* Ensure consistent padding */
}

.event-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  min-height: 2.4em; /* Ensure consistent height for titles */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-info {
  margin-bottom: 16px;
  color: var(--samsung-medium-gray);
  display: flex;
  align-items: flex-start; /* Better alignment for icon with text */
  gap: 8px;
  font-size: 13px;
  min-height: 1.5em; /* Consistent height for info section */
}

.event-info i {
  margin-top: 3px; /* Align icon with first line of text */
  min-width: 16px;
  color: var(--primary-color);
}

.event-description {
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1; /* Allow description to take up remaining space */
  min-height: 4.5em; /* Consistent minimum height for description (3 lines) */
}

.event-category {
  display: inline-block;
  margin-top: 5px;
  margin-bottom: 8px;
}

.event-actions {
  margin-top: auto; /* Push actions to bottom */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.event-btn {
  background-color: var(--samsung-light-gray);
  color: var(--samsung-black);
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s;
}

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

/* Improved Media Queries */
@media (max-width: 768px) {
  .hero-section {
    min-height: 400px;
    height: auto;
    margin-top: 60px;
  }
  
  .hero-title {
    font-size: 30px;
  }
  
  .hero-subtitle {
    font-size: 16px;
    margin-bottom: 20px;
  }
  
  .hero-subtitle-affiliate {
    font-size: 13px;
    margin-bottom: 20px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .feature-card {
    margin-bottom: 20px;
  }
  
  .samsung-button {
    width: 100%;
    text-align: center;
  }
  
  /* Adjust event card alignments for mobile */
  .event-title {
    min-height: auto; /* Let title take natural height on mobile */
  }
  
  .event-description {
    min-height: auto; /* Let description take natural height on mobile */
  }
}

@media (max-width: 480px) {
  .hero-section {
    min-height: 350px;
  }
  
  .hero-title {
    font-size: 24px;
  }
  
  .hero-content {
    padding: 30px 16px;
  }
  
  .section-title {
    font-size: 24px;
  }
  
  .section-subtitle {
    font-size: 14px;
  }
  
  .feature-card-title {
    font-size: 20px;
  }
}

/* Fix for truncated content on mobile */
@media (max-width: 360px) {
  .feature-card-text, 
  .event-description {
    -webkit-line-clamp: 5;
  }
}

/* Ensures all cards in a row are aligned at equal height */
.features-grid, .events-grid, .upcoming-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  align-items: stretch;
}

/* Fix alignment of date elements in event cards */
.event-card-date {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 12px 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 48px; /* Consistent height for date headers */
}

/* Ensure consistent spacing between event info items */
.event-contact {
  color: var(--samsung-medium-gray);
  font-size: 14px;
}

.disabled-link {
  color: #999;         /* Grayed-out color */
  cursor: not-allowed; /* Show a "not allowed" cursor */
  pointer-events: none; /*  VERY IMPORTANT:  This prevents clicks */
  position: relative;   /* Needed for the tooltip positioning */
}