/* ── Alert Bar ── */
.alert-row {
  display: flex;
  align-items: center;
  background: linear-gradient(to top, #1a1a5e 0%, #2e3192 60%, #3d5a99 100%);
  color: white;
  height: 45px;
  font-family: sans-serif;
  width: 100%;
  transition: height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
  overflow: hidden;
}

.alert-row.hidden {
  height: 0;
  opacity: 0;
  padding: 0;
}

.alert-row .alert-label {
  background-color: #ff0000;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  font-weight: bold;
}

.alert-content-area {
  flex-grow: 1;
  padding-left: 20px;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.alert-msg {
  position: absolute;
  left: 0;
  color: white;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  white-space: nowrap;
  pointer-events: none;
}

.alert-msg.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.alert-controls {
  margin-left: auto;
  display: flex;
  height: 100%;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.alert-controls button {
  background: transparent;
  border: none;
  color: white;
  padding: 0 15px;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.3s;
}

.alert-controls button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.alert-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 3px;
  margin-left: 10px;
  font-weight: bold;
  display: inline-block;
}

.alert-badge.update {
  background-color: #4caf50;
}
    .alert-badge.new {
      background-color: #ff9800;
      animation: alertBlink 1s infinite alternate;
    }
    @keyframes alertBlink {
      from { opacity: 1; }
      to { opacity: 0.3; }
    }


/* ── Alert Popup Modal ── */
.alert-popup-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
}

.alert-popup-modal.active {
  display: block;
}

.alert-popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
}

.alert-popup-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 12px;
  max-width: 450px;
  width: 85%;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

.alert-popup-header {
  background: #3f51b5;
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.alert-popup-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.alert-popup-close {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

.alert-popup-body {
  padding: 0;
}

.alert-popup-body img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Tender Card ── */
.tender-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--white);
  border: 1px solid rgba(36, 56, 140, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  animation: slideUp 0.6s ease both;
}

.tender-card:nth-child(1) { animation-delay: 0.1s; }
.tender-card:nth-child(2) { animation-delay: 0.2s; }
.tender-card:nth-child(3) { animation-delay: 0.3s; }
.tender-card:nth-child(4) { animation-delay: 0.4s; }

.tender-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(36, 56, 140, 0.12);
  border-color: var(--primary-soft);
}

.tender-card__content {
  padding: 1.4rem 1.5rem 1.5rem;
}

.tender-header-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.tender-header-row h3 {
  margin: 0;
  color: #1f2f76;
  font-size: 1.4rem;
  line-height: 1.25;
  font-weight: 800;
}

/* ── Blinking NEW Tag ── */
.tender-new-tag {
  display: inline-block;
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  text-transform: uppercase;
  animation: tenderBlink 1.2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(255, 65, 108, 0.5);
  flex-shrink: 0;
}

@keyframes tenderBlink {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 8px rgba(255, 65, 108, 0.5);
  }
  50% {
    opacity: 0.35;
    box-shadow: 0 0 18px rgba(255, 65, 108, 0.9);
  }
}

.tender-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
  line-height: 1.6;
  color: var(--muted);
  font-size: 0.84rem;
}

.tender-meta span strong {
  color: var(--primary);
}

.tender-card p {
  margin: 0 0 1.5rem;
  line-height: 1.7;
  font-size: 1rem;
  color: #4a5568;
}

.tender-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: var(--white);
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.tender-download-btn:hover {
  background: var(--primary-soft);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(36, 56, 140, 0.25);
}

@media (max-width: 768px) {
  .tender-header-row h3 {
    font-size: 1.2rem;
  }
  .tender-meta {
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
  }
  .tender-card p {
    font-size: 0.95rem;
  }
}

/* ── Resolve Gaping & Overlap ── */
.events-section {
    min-height: 400px;
    padding-top: 2rem;
}

/* Specific fix for detail overlapping title */
.event-detail__body h1 {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}
