.announcement-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.announcement-modal.is-hidden {
  display: none;
}

.announcement-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.58);
}

.announcement-modal__dialog {
  position: relative;
  z-index: 1;
  width: calc(100vw - 48px);
  height: calc(100vh - 48px);
  overflow: hidden;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.announcement-modal__layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  height: 100%;
}

.announcement-modal__left {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border-right: 1px solid #e5e7eb;
  min-height: 0;
  overflow: hidden;
}

.announcement-modal__school-hero {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  position: relative;
}

.announcement-modal__school-hero-image {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.announcement-modal__school-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.announcement-modal__school-hero-content {
  position: absolute;
  inset: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.4) 100%
  );
  color: #ffffff;
}

.announcement-modal__school-hero-title {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 1.05rem + 0.5vw, 1.65rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.announcement-modal__school-hero-subtitle {
  margin: 0 0 12px;
  font-size: 0.94rem;
  color: #f3f4f6;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.announcement-modal__school-hero-description {
  margin: 0 0 16px;
  font-size: 0.94rem;
  color: #e5e7eb;
  line-height: 1.5;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.announcement-modal__school-hero-content .announcement-modal__cta {
  align-self: flex-start;
  margin-top: 16px;
}

.announcement-modal__right {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 12px;
  height: 100%;
}

.announcement-modal__flyer-wrap {
  flex: 1;
  width: 100%;
  min-height: 120px;
  margin: 0 auto;
  padding: 6px;
  border: 1px solid rgba(229, 231, 235, 0.7);
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.announcement-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  color: #111827;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.announcement-modal__close:hover {
  background: rgba(0, 0, 0, 0.15);
}

.announcement-modal__file-link {
  display: inline-flex;
  margin: 0;
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

.announcement-modal__file-link:hover {
  text-decoration: underline;
}

.announcement-modal__flyer-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: transparent;
}

.announcement-modal__text {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: #1f2937;
  line-height: 1.6;
  margin-top: 10px;
}

.announcement-modal__cta {
  display: inline-flex;
  padding: 11px 18px;
  border-radius: 10px;
  background: #487bff;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

.announcement-modal__cta:hover {
  background: #2f63ea;
  color: #ffffff;
}

body.announcement-modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .announcement-modal {
    padding: 16px;
  }

  .announcement-modal__dialog {
    width: calc(100vw - 32px);
    height: calc(100vh - 32px);
    overflow: auto;
    border-radius: 14px;
  }

  .announcement-modal__layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .announcement-modal__left {
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .announcement-modal__school-hero {
    height: auto;
    min-height: 260px;
  }

  .announcement-modal__school-hero-image {
    min-height: 180px;
  }

  .announcement-modal__right {
    padding: 10px;
  }

  .announcement-modal__flyer-wrap {
    width: 100%;
    max-height: 58vh;
    flex: 1;
  }
}
