/* ===================================
   Bulletin Section Enhanced Styling
   =================================== */

/* Remove underlines from all links in bulletin section */
#bulletinSection a,
#bulletinSection .bulletin-card,
#bulletinSection .text-button {
  text-decoration: none !important;
}

#bulletinSection a:hover,
#bulletinSection .bulletin-card:hover,
#bulletinSection .text-button:hover {
  text-decoration: none !important;
}

/* Main Bulletin Grid Layout */
.bulletin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

/* Featured Article (Left Side) */
.bulletin-featured {
  grid-row: span 2;
}

.bulletin-card.is-featured {
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: none;
}

.bulletin-card.is-featured:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Regular Articles Grid (Right Side) */
.bulletin-regular-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.bulletin-item {
  display: flex;
  flex-direction: column;
}

.bulletin-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.bulletin-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border-color: rgba(46, 47, 144, 0.1);
}

/* Image Wrapper and Overlay */
.bulletin-image-wrapper {
  position: relative;
  overflow: hidden;
}

.bulletin-overlay {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
}

.bulletin-overlay .tag.is-featured {
 background: #00559E;
background: linear-gradient(139deg, rgba(0, 85, 158, 1) 22%, rgba(1, 125, 195, 1) 71%, rgba(2, 174, 240, 1) 100%, rgba(0, 212, 255, 1) 100%, rgba(4, 119, 219, 1) 98%);
  color: white;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  border:0;
  /* box-shadow: 0 2px 8px rgba(46, 47, 144, 0.3); */
}

/* Card Body Styling */
.bulletin-card .card_body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.bulletin-card .card_body_small {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}

/* Meta Information */
.bulletin-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.bulletin-date {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

/* Enhanced Tag Styling */
.bulletin-meta .tag {
  background: #f3f4f6;
  color: #374151;
  padding: 0.375rem 0.75rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.bulletin-meta .tag.is-sport {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.bulletin-meta .tag.is-article {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

/* Title Styling */
.bulletin-title {
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 1rem;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bulletin-featured .bulletin-title {
  font-size: 1.5rem;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  margin-bottom: 0.75rem;
}

.bulletin-regular-grid .bulletin-title {
  font-size: 1rem;
  line-height: 1.4;
  -webkit-line-clamp: 2;
}

/* Excerpt for Featured Article */
.bulletin-excerpt {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Button Styling */
.bulletin-card .text-button {
  margin-top: auto;
  align-self: flex-start;
  font-weight: 600;
  color: #2e2f90;
  transition: all 0.2s ease;
}

.bulletin-card .text-button:hover {
  color: #3898EC;
  transform: translateX(4px);
}

.bulletin-card .text-button .button_icon {
  transition: transform 0.2s ease;
}

.bulletin-card .text-button:hover .button_icon {
  transform: translateX(2px);
}

/* Section Header Enhancement */
#bulletinSection .section_header {
  margin-bottom: 3rem;
}

#bulletinSection .section_header .flex_horizontal {
  align-items: flex-start;
}

#bulletinSection .section_header .text-button {
  white-space: nowrap;
  margin-top: 0.5rem;
}

/* Responsive Design */
@media (max-width: 991px) {
  .bulletin-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .bulletin-featured {
    grid-row: span 1;
  }
  
  .bulletin-regular-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
  
  .bulletin-featured .bulletin-title {
    font-size: 1.375rem;
  }
}

@media (max-width: 767px) {
  .bulletin-grid {
    gap: 1.5rem;
    margin-top: 2rem;
  }
  
  .bulletin-regular-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .bulletin-card .card_body,
  .bulletin-card .card_body_small {
    padding: 1rem;
  }
  
  .bulletin-featured .bulletin-title {
    font-size: 1.25rem;
  }
  
  .bulletin-regular-grid .bulletin-title {
    font-size: 0.95rem;
  }
  
  .bulletin-excerpt {
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
  }
  
  #bulletinSection .section_header .flex_horizontal {
    flex-direction: column;
    gap: 1rem;
  }
  
  #bulletinSection .section_header .text-button {
    margin-top: 0;
    align-self: flex-start;
  }
}

@media (max-width: 479px) {
  .bulletin-grid {
    margin-top: 1.5rem;
  }
  
  .bulletin-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .bulletin-overlay {
    top: 0.75rem;
    left: 0.75rem;
  }
  
  .bulletin-overlay .tag.is-featured {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* Animation for Cards - Removed to eliminate flash fade effect */

/* Focus States for Accessibility */
.bulletin-card:focus {
  outline: 2px solid #3898EC;
  outline-offset: 2px;
}

.bulletin-card:focus:not(:focus-visible) {
  outline: none;
}

/* PDF Modal Styles */
.pdf-modal {
  display: none !important;
  position: fixed !important;
  z-index: 999999 !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-color: rgba(0, 0, 0, 0.9) !important;
  backdrop-filter: blur(5px);
  align-items: center !important;
  justify-content: center !important;
}

.pdf-modal[style*="display: flex"] {
  display: flex !important;
}

.pdf-modal-content {
  background: #ffffff;
  border-radius: 8px;
  width: 90%;
  height: 90%;
  max-width: 1200px;
  max-height: 800px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.pdf-modal-header {
  background: linear-gradient(135deg, #2e2f90 0%, #3898EC 100%);
  color: white;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pdf-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: white;
}

.pdf-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pdf-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
}

.pdf-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.pdf-btn:active {
  transform: translateY(0);
}

.pdf-btn.close-btn {
  /* background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3); */
}

.pdf-btn.close-btn:hover {
  /* background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.4); */
}

.page-info {
  font-weight: 600;
  font-size: 0.95rem;
  color: white;
  min-width: 60px;
  text-align: center;
}

.zoom-level {
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
  min-width: 50px;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.control-separator {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 0.5rem;
}

.pdf-viewer-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: auto;
  background: #f8fafc;
}

.pdf-canvas-wrapper {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}

.pdf-canvas {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  background: white;
  transition: all 0.3s ease;
}

.pdf-canvas-right {
  margin-left: 0;
}

.pdf-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #6b7280;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top: 4px solid #3898EC;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Enhanced Bulletin Card Styling */
.bulletin-card {
  cursor: pointer;
  user-select: none;
}

.bulletin-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  /* transition: transform 0.3s ease; */
}

.bulletin-card.is-featured .bulletin-image {
  height: 300px;
}

.bulletin-card:hover .bulletin-image {
  /* transform: scale(1.05); */
}

/* Responsive PDF Modal */
@media (max-width: 991px) {
  .pdf-modal-content {
    width: 95%;
    height: 95%;
  }
  
  .pdf-modal-header {
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .pdf-modal-title {
    font-size: 1.25rem;
  }
  
  .pdf-controls {
    gap: 0.75rem;
    width: 100%;
    justify-content: center;
  }
  
  .pdf-btn {
    padding: 0.5rem;
    min-width: 40px;
    height: 40px;
  }
}

@media (max-width: 767px) {
  .pdf-modal-content {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  
  .pdf-modal-header {
    padding: 1rem;
  }
  
  .pdf-modal-title {
    font-size: 1.125rem;
  }
  
  .pdf-controls {
    gap: 0.5rem;
  }
  
  .pdf-btn {
    padding: 0.5rem;
    min-width: 36px;
    height: 36px;
  }
  
  .pdf-viewer-container {
    padding: 1rem;
  }
  
  .pdf-canvas-wrapper {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
  
  .pdf-canvas {
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 200px);
    width: auto !important;
    height: auto !important;
    object-fit: contain;
  }
  
  .page-info {
    font-size: 0.875rem;
    min-width: 50px;
  }
}

/* Print Styles */
@media print {
  .bulletin-grid {
    display: block;
  }
  
  .bulletin-card {
    break-inside: avoid;
    margin-bottom: 1rem;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .bulletin-card:hover {
    transform: none;
    box-shadow: none;
  }
  
  .pdf-modal {
    display: none !important;
  }
}