/* Announcement popup (news-style, dismissible with x) */
.ann-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 42, 67, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.ann-overlay.open {
  display: flex;
  animation: annFade 0.3s ease;
}
@keyframes annFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.ann-card {
  position: relative;
  width: 100%;
  max-width: 880px;
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  animation: annUp 0.35s ease;
}
@keyframes annUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.ann-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ann-close:hover {
  background: #dc2626;
  color: #fff;
  transform: rotate(90deg);
}
.ann-slider {
  position: relative;
  aspect-ratio: 16 / 10;
  max-height: 440px;
  background: #0b1e30;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
}
.ann-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  pointer-events: none;
}
.ann-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}
.ann-slide img.ann-slide-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0b1e30;
  display: block;
}
.ann-slide-fallback {
  display: none;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: radial-gradient(circle at center, #1e3a5f 0%, #0b1e30 100%);
  color: #fff;
}
.ann-slide-fallback.visible {
  display: flex;
}
.ann-fallback-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #60a5fa;
  background: rgba(30, 58, 138, 0.45);
  border: 1px solid rgba(96, 165, 250, 0.35);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.ann-fallback-icon {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 10px;
}
.ann-fallback-title {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  max-width: 500px;
  line-height: 1.3;
}
.ann-fallback-sub {
  font-size: 13px;
  color: #94a3b8;
}
.ann-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.ann-nav:hover {
  background: #fff;
}
.ann-prev { left: 10px; }
.ann-next { right: 10px; }
.ann-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.ann-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
}
.ann-dot.active {
  background: #fff;
  width: 22px;
  border-radius: 6px;
}
.ann-body {
  padding: 24px 28px 28px;
}
.ann-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 3px 12px;
}
.ann-title {
  font-size: 22px;
  font-weight: 800;
  color: #082032;
  margin: 10px 0 4px;
  line-height: 1.3;
}
.ann-date {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 14px;
}
.ann-body p {
  font-size: 14px;
  line-height: 1.7;
  color: #334155;
  margin: 0 0 10px;
  text-align: justify;
}
.ann-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 8px 14px;
  border-radius: 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-weight: 700;
  font-size: 13px;
}
.ann-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.ann-btn {
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.ann-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.ann-btn.primary {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}
.ann-btn.primary:hover {
  background: #1e40af;
}
.ann-btn.video-btn {
  background: #0f172a;
  border-color: #1e293b;
  color: #ffffff;
}
.ann-btn.video-btn:hover {
  background: #1e293b;
  border-color: #38bdf8;
  color: #38bdf8;
}
.ann-btn.video-btn .play-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  line-height: 1;
}

/* =========================================================
   REOPEN ANNOUNCEMENT FLOATING BUTTON (Desktop & Mobile Optimized)
   ========================================================= */
.ann-reopen {
  position: fixed;
  left: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 25px -3px rgba(29, 78, 216, 0.45), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.ann-reopen.show {
  display: inline-flex;
}
.ann-reopen:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
  box-shadow: 0 14px 28px -2px rgba(29, 78, 216, 0.55), 0 6px 10px -2px rgba(0, 0, 0, 0.15);
}
.ann-reopen:active {
  transform: translateY(0);
}
.ann-reopen-icon {
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  animation: annTada 3.5s infinite ease-in-out;
}
@keyframes annTada {
  0%, 80%, 100% { transform: rotate(0deg) scale(1); }
  85% { transform: rotate(-10deg) scale(1.15); }
  90% { transform: rotate(10deg) scale(1.15); }
  95% { transform: rotate(-5deg) scale(1.1); }
}

/* Mobile UI Optimization for Announcement Button */
@media (max-width: 640px) {
  .ann-reopen {
    left: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: 46px;
    height: 46px;
    min-width: 46px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(29, 78, 216, 0.5);
  }
  .ann-reopen .ann-reopen-text {
    display: none !important;
  }
  .ann-reopen-icon {
    font-size: 20px;
    margin: 0;
  }
  /* Pulse notification indicator badge on the circle */
  .ann-reopen::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid #fff;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: annPulse 2s infinite;
  }
}
@keyframes annPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@media (max-width: 600px) {
  .ann-slider { aspect-ratio: 4 / 3; }
  .ann-body { padding: 18px; }
  .ann-title { font-size: 18px; }
}

/* =========================================================
   TR PROCEDURE VIDEO MODAL & PLAYER STYLES
   ========================================================= */
.tr-video-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 26, 43, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tr-video-overlay.open {
  display: flex;
  animation: annFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.tr-video-card {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: #0b1e30;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.7), 0 0 40px rgba(29, 78, 216, 0.25);
  overflow: hidden;
  animation: annUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.tr-video-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.tr-video-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.tr-video-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.tr-video-title-wrap {
  min-width: 0;
}
.tr-video-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.tr-video-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tr-video-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-left: 10px;
}
.tr-video-close:hover {
  background: #dc2626;
  color: #ffffff;
  transform: rotate(90deg);
}
.tr-video-player-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tr-video-player-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
  outline: none;
}
.tr-video-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.tr-video-caption {
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tr-video-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tr-video-btn {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
}
.tr-video-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}
.tr-video-btn.primary {
  background: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
}
.tr-video-btn.primary:hover {
  background: #1d4ed8;
}

/* Small Button Styling for Hero section */
.hero-btn-video {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #0f172a !important;
  border: 1px solid #cbd5e1;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
}
.hero-btn-video:hover {
  background: #f8fafc;
  color: #1d4ed8 !important;
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.18);
}
.hero-btn-video .play-icon-pulse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  font-size: 9px;
  line-height: 1;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
  animation: playPulse 2s infinite;
}
@keyframes playPulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@media (max-width: 640px) {
  .tr-video-card {
    border-radius: 14px;
    max-height: 96vh;
  }
  .tr-video-header {
    padding: 10px 14px;
  }
  .tr-video-title {
    font-size: 13px;
  }
  .tr-video-subtitle {
    display: none;
  }
  .tr-video-footer {
    padding: 10px 14px;
  }
  .tr-video-caption {
    font-size: 11px;
  }
  .hero-btn-video {
    width: 100%;
    justify-content: center;
  }
}
