/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Poppins, "Noto Sans KR", Verdana, Dotum, AppleGothic, sans-serif;
  background-color: #ffffff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Main Layout Wrapper */
.announcement-wrapper {
  width: 100%;
  max-width: 580px; /* Centered compact layout */
  margin: 0 auto;
}

/* Announcement Card */
.announcement-card {
  background-color: #ffffff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Logo Styling */
.logo-container {
  display: flex;
  justify-content: flex-start;
}

.logo-image {
  max-height: 64px;
  width: auto;
  object-fit: contain;
}

/* Title Container with Vertical Roll */
.title-container {
  font-size: 30px; /* Base title size. Change here to scale em-based dimensions. */
  height: 1.3em; /* Slightly shorter than title-item (1.5em) to create a safety buffer */
  box-sizing: content-box;
  overflow: hidden;
  border-bottom: 2px solid #0f172a; /* Clean divider under the title */
  padding-bottom: 8px;
  margin: 0; /* Reset default h1 margins */
  font-weight: normal; /* Let title-item handle font-weight */
}

.title-wrapper {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 1em; /* Force font-size to match container (30px) */
  animation: slide-up-titles 12s cubic-bezier(0.76, 0, 0.24, 1) infinite;
}

.title-item {
  font-size: 1em; /* Inherits container font-size */
  font-weight: 700;
  color: #0f172a;
  line-height: 1.5;
  height: 1.5em;
  letter-spacing: -0.03em;
  white-space: nowrap;
  display: block;
}

/* Looping Vertical Slide Animation using direct em distances to bypass wrapper-height rounding errors */
@keyframes slide-up-titles {
  0%, 20% {
    transform: translateY(0);
  }
  25%, 45% {
    transform: translateY(-1.5em);
  }
  50%, 70% {
    transform: translateY(-3.0em);
  }
  75%, 95% {
    transform: translateY(-4.5em);
  }
  100% {
    transform: translateY(-6.0em);
  }
}

/* Content Body */
.content-body {
  font-size: 16px;
  line-height: 1.85;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.content-body p {
  word-break: keep-all;
}

.signature {
  margin-top: 12px;
  font-weight: 600;
  color: #0f172a;
}

/* Links / Buttons */
.links-container {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

.btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease-in-out;
  text-align: center;
  cursor: pointer;
}

.btn-primary {
  background-color: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
}

.btn-primary:hover {
  background-color: #1e293b;
  border-color: #1e293b;
}

.btn-secondary {
  background-color: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.btn-secondary:hover {
  background-color: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 580px) {
  body {
    padding: 16px;
  }
  
  .announcement-card {
    padding: 32px 24px;
    gap: 24px;
  }
  
  .title-container {
    font-size: 24px; /* Automatically scales text and container height down */
    padding-bottom: 8px;
  }
  
  .content-body {
    font-size: 15px;
    gap: 16px;
  }
  
  .links-container {
    flex-direction: column;
    gap: 12px;
  }
  
  .btn {
    padding: 14px 20px;
  }
}
