/* ==========================================================================
   Announcements Section & Detailed Event Modal Styles
   IIT Madras - Be Happy Website
   ========================================================================== */

/* Main Announcement Container */
.announcement-section {
  padding: 60px 0 90px;
  background-color: #fafafa;
}

.announcement-section .title {
  text-align: center;
  margin-bottom: 28px;
}

.announcement-section .content-subtitle h5 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ff3c00;
  margin-bottom: 8px;
}

.announcement-section .title h2 {
  font-size: 38px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 15px;
}

.announcement-wrapper {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.announcement-box {
  background: #ffffff;
  border: 2px solid #ff3c00;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  padding: 0;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 580px;
}

/* Toolbar */
.announcement-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #fff5f2;
  border-bottom: 1px solid #ffd4c7;
}

.anno-counter {
  font-size: 13.5px;
  font-weight: 700;
  color: #ff3c00;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.anno-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.anno-ctrl-btn {
  background: #ffffff;
  border: 1px solid #ffc2b0;
  color: #ff3c00;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.anno-ctrl-btn:hover,
.anno-ctrl-btn:focus-visible {
  background: #ff3c00;
  color: #ffffff;
  border-color: #ff3c00;
  outline: none;
}

/* Scroll Viewport */
.announcement-scroll-viewport {
  position: relative;
  flex: 1;
  overflow: hidden;
  padding: 10px 18px;
  outline: none;
  cursor: grab;
  /* Subtle fade gradient at top and bottom */
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 16px, black calc(100% - 16px), transparent);
  mask-image: linear-gradient(to bottom, transparent, black 16px, black calc(100% - 16px), transparent);
}

.announcement-scroll-viewport:active {
  cursor: grabbing;
}

/* Track holding the scrolling items */
.announcement-track {
  display: flex;
  flex-direction: column;
  gap: 16px;
  will-change: transform;
}

/* Announcement Card Item */
.announcement-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #ff3c00;
  border-radius: 10px;
  padding: 16px 20px;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  cursor: pointer;
}

.announcement-item:hover,
.announcement-item:focus-within {
  border-color: #ff3c00;
  box-shadow: 0 6px 18px rgba(255, 60, 0, 0.12);
  transform: translateY(-2px);
  background: #fffdfc;
}

/* Card Header */
.announcement-item-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.anno-badge-date {
  background: #ff3c00;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.3px;
}

.anno-badge-venue {
  background: #f3f4f6;
  color: #4b5563;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Card Title */
.announcement-item-title {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  margin: 6px 0 8px;
  line-height: 1.35;
}

/* Card Description */
.announcement-item-desc {
  font-size: 13.5px;
  color: #4b5563;
  line-height: 1.5;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Footer */
.announcement-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px dashed #f0f0f0;
}

.anno-participants-pill {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.anno-details-btn {
  background: #ff3c00;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.anno-details-btn:hover,
.anno-details-btn:focus-visible {
  background: #d93300;
  color: #ffffff;
  transform: translateX(2px);
}

/* ==========================================================================
   Detailed Event Modal
   ========================================================================== */

.event-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background-color: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.event-modal-backdrop.is-open {
  display: flex;
  opacity: 1;
}

.event-modal-dialog {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.event-modal-backdrop.is-open .event-modal-dialog {
  transform: scale(1);
}

/* Modal Header */
.event-modal-header {
  padding: 22px 28px 16px;
  border-bottom: 1px solid #f1f3f5;
  background: #ffffff;
  position: relative;
}

.event-modal-header-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.event-modal-date-badge {
  background: #ff3c00;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}

.event-modal-venue-badge {
  background: #f3f4f6;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.event-modal-title {
  font-size: 24px;
  font-weight: 800;
  color: #111827;
  line-height: 1.3;
  margin: 0;
  padding-right: 40px;
}

.event-modal-close-btn {
  position: absolute;
  top: 18px;
  right: 22px;
  background: #f3f4f6;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: #4b5563;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.event-modal-close-btn:hover,
.event-modal-close-btn:focus-visible {
  background: #ff3c00;
  color: #ffffff;
  outline: none;
}

/* Modal Body */
.event-modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f3f5;
}

.event-modal-body::-webkit-scrollbar {
  width: 8px;
}

.event-modal-body::-webkit-scrollbar-track {
  background: #f1f3f5;
  border-radius: 4px;
}

.event-modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.event-modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Info Strip (Organizers, Participants) */
.event-modal-info-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  background: #fff8f6;
  border: 1px solid #ffe2db;
  border-radius: 10px;
  padding: 14px 16px;
}

.info-pill {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.info-pill i {
  color: #ff3c00;
  font-size: 18px;
  margin-top: 3px;
}

.info-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #9ca3af;
  letter-spacing: 0.5px;
}

.info-val {
  font-size: 13.5px;
  font-weight: 600;
  color: #1f2937;
  display: block;
}

/* Sections inside Modal */
.event-modal-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-modal-sec-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid #f3f4f6;
  padding-bottom: 6px;
}

.event-modal-sec-title i {
  color: #ff3c00;
  font-size: 15px;
}

.event-modal-text {
  font-size: 14.5px;
  line-height: 1.65;
  color: #374151;
  margin: 0;
}

/* Highlights List */
.event-highlights-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-highlights-list li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
  line-height: 1.55;
  color: #374151;
}

.event-highlights-list li::before {
  content: "\f058";
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome";
  font-weight: 900;
  color: #ff3c00;
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 14px;
}

/* Outcome Box */
.event-outcome-box {
  background: #f0fdf4;
  border-left: 4px solid #16a34a;
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.6;
  color: #166534;
}

/* Gallery Grid */
.event-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 4px;
}

.gallery-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-color: #ff3c00;
}

.gallery-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
  position: relative;
}

.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
}

.gallery-card:hover .gallery-img-wrap img {
  transform: scale(1.05);
}

.gallery-zoom-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery-card:hover .gallery-zoom-badge {
  opacity: 1;
}

.gallery-caption {
  font-size: 12px;
  color: #4b5563;
  padding: 8px 12px;
  margin: 0;
  line-height: 1.4;
  background: #ffffff;
  flex: 1;
}

/* Modal Footer */
.event-modal-footer {
  padding: 14px 28px;
  border-top: 1px solid #f1f3f5;
  background: #f9fafb;
  display: flex;
  justify-content: flex-end;
}

.event-modal-done-btn {
  background: #e5e7eb;
  color: #1f2937;
  border: none;
  border-radius: 6px;
  padding: 7px 20px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.event-modal-done-btn:hover,
.event-modal-done-btn:focus-visible {
  background: #d1d5db;
  color: #111827;
}

/* ==========================================================================
   Fullscreen Lightbox Image Viewer
   ========================================================================== */

.image-lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
}

.lightbox-content {
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: #e5e7eb;
  font-size: 14px;
  text-align: center;
  max-width: 700px;
  margin: 0;
}

.lightbox-close-btn {
  position: absolute;
  top: 20px;
  right: 25px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-close-btn:hover {
  background: #ff3c00;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .announcement-scroll-viewport {
    overflow-y: auto !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
  }
  .announcement-track {
    will-change: auto !important;
  }
  .event-modal-dialog {
    transition: none !important;
  }
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 768px) {
  .announcement-box {
    height: 520px;
  }
  .announcement-item {
    padding: 14px 16px;
  }
  .announcement-item-title {
    font-size: 15.5px;
  }
  .event-modal-dialog {
    max-height: 94vh;
    border-radius: 12px;
  }
  .event-modal-header {
    padding: 16px 18px 12px;
  }
  .event-modal-title {
    font-size: 19px;
  }
  .event-modal-body {
    padding: 16px 18px;
    gap: 16px;
  }
  .event-modal-info-strip {
    grid-template-columns: 1fr;
  }
  .event-gallery-grid {
    grid-template-columns: 1fr;
  }
}
