/* News & Events Page Styles */

/* Hero Section */
.main.main_news-events {
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
    url("../images/Home/Tonia and Chris 2 18.09.2024.webp") center top / cover no-repeat !important;
}

.main.main_news-events .main__title,
.main.main_news-events .main__text {
  color: #ffffff !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7) !important;
}

/* News & Events Section */
.news-events {
  padding: 5rem 0;
  background-color: var(--rfc-cream);
}

.news-events__container {
  max-width: 72.624rem;
  margin: 0 auto;
  padding: 0 0.938rem;
}

/* Filter Buttons */
.news-events__filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  justify-content: center;
  flex-wrap: wrap;
}

.news-events__filter-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--rfc-burgundy);
  background: white;
  color: var(--rfc-burgundy);
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1rem;
}

.news-events__filter-btn:hover {
  background: var(--rfc-burgundy);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(132, 26, 58, 0.3);
}

.news-events__filter-btn.active {
  background: var(--rfc-burgundy);
  color: white;
}

/* Loading and Error States */
.news-events__loading,
.news-events__error,
.news-events__empty {
  text-align: center;
  padding: 3rem;
  color: #666;
  font-size: 1.125rem;
}

.news-events__error {
  color: #c33;
}

/* Stories Grid */
.news-events__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Story Card */
.news-events__card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Ensure reveal class doesn't hide content */
.news-events__card.reveal {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

.news-events__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.news-events__card-image {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  background: #f0f0f0;
}

.news-events__card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-events__card-category {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-events__card-category--news {
  background: var(--rfc-burgundy);
  color: white;
}

.news-events__card-category--events {
  background: var(--rfc-dark-blue);
  color: white;
}

.news-events__card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-events__card-date {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.news-events__card-title {
  font-family: "Montserrat", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--rfc-dark-blue);
  margin: 0 0 1rem 0;
  line-height: 1.3;
}

.news-events__card-description {
  color: #555;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

.news-events__card-full-content {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  color: #555;
  line-height: 1.8;
}

.news-events__card-full-content p {
  margin-bottom: 1rem;
}

.news-events__card-full-content p:last-child {
  margin-bottom: 0;
}

.news-events__card-toggle {
  margin-top: auto;
  width: 100%;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--rfc-burgundy);
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.news-events__card-toggle:hover {
  background: #6a1530;
}

.news-events__card-toggle .toggle-icon {
  transition: transform 0.3s;
}

.news-events__card.expanded .news-events__card-toggle .toggle-icon {
  transform: rotate(180deg);
}

/* Responsive Design */
@media (max-width: 768px) {
  .news-events__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .news-events__filters {
    flex-direction: column;
    align-items: stretch;
  }

  .news-events__filter-btn {
    width: 100%;
  }

  .news-events__card-title {
    font-size: 1.25rem;
  }
}

/* Admin Panel Styles (additional) */
.admin-dashboard__story-item {
  transition: background-color 0.2s;
}

.admin-dashboard__story-item:hover {
  background-color: #f9f9f9;
}

.admin-dashboard__modal-content {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.admin-dashboard__input[type="file"] {
  padding: 0.5rem;
}

.admin-dashboard__image-preview {
  border: 2px solid #ddd;
  padding: 0.25rem;
}

/* Story Modal Overlay */
.story-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.story-modal--active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 1;
}

.story-modal__backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 10001;
}

.story-modal__container {
  position: relative;
  z-index: 10002;
  width: 100%;
  max-width: 900px;
  margin: 2rem auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.story-modal--active .story-modal__container {
  transform: scale(1);
}

.story-modal__content {
  position: relative;
}

.story-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10003;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rfc-dark-blue);
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.story-modal__close:hover {
  background: white;
  transform: rotate(90deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.story-modal__close svg {
  width: 20px;
  height: 20px;
}

.story-modal__image {
  position: relative;
  width: 100%;
  max-height: 400px;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-modal__image img {
  width: 100%;
  height: 100%;
  max-height: 400px;
  object-fit: contain;
  display: block;
}

.story-modal__category {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.story-modal__category--news {
  background: var(--rfc-burgundy);
  color: white;
}

.story-modal__category--events {
  background: var(--rfc-dark-blue);
  color: white;
}

.story-modal__body {
  padding: 2.5rem;
}

.story-modal__date {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 1rem;
}

.story-modal__title {
  font-family: "Montserrat", sans-serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--rfc-dark-blue);
  margin: 0 0 1rem 0;
  line-height: 1.3;
}

.story-modal__description {
  font-size: 1.125rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 2rem;
  font-weight: 500;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #eee;
}

.story-modal__content {
  color: #555;
  line-height: 1.8;
  font-size: 1.0625rem;
}

.story-modal__content p {
  margin-bottom: 1.5rem;
}

.story-modal__content p:last-child {
  margin-bottom: 0;
}

/* Share Section */
.story-modal__share {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 2px solid #eee;
}

.story-modal__share-title {
  font-family: "Montserrat", sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--rfc-dark-blue);
  margin: 0 0 1rem 0;
}

.story-modal__share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.story-modal__share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.story-modal__share-button--email {
  background-color: #ffffff;
  color: var(--rfc-dark-blue);
  border-color: #d1d5db;
}

.story-modal__share-button--email:hover {
  background-color: #f3f4f6;
}

.story-modal__share-button--whatsapp {
  background-color: #25D366;
  color: #ffffff;
}

.story-modal__share-button--whatsapp:hover {
  background-color: #1da851;
}

.story-modal__share-button--facebook {
  background-color: #1877F2;
  color: #ffffff;
}

.story-modal__share-button--facebook:hover {
  background-color: #145ecc;
}

@media (max-width: 768px) {
  .story-modal__share-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .story-modal__share-button {
    width: 100%;
    justify-content: center;
  }
}

/* Responsive Modal */
@media (max-width: 768px) {
  .story-modal__container {
    margin: 0;
    border-radius: 0;
    max-width: 100%;
    min-height: 100vh;
  }

  .story-modal__body {
    padding: 1.5rem;
  }

  .story-modal__title {
    font-size: 1.5rem;
  }

  .story-modal__description {
    font-size: 1rem;
  }

  .story-modal__content {
    font-size: 1rem;
  }

  .story-modal__close {
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
  }

  .story-modal__category {
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }

  .story-modal__image {
    max-height: 250px;
  }

  .story-modal__image img {
    max-height: 250px;
  }
}

