@font-face {
  font-family: 'Garamond Bold';
  font-style: normal;
  font-weight: 700;
  src: url('/public/fonts/garmond.ttf') format('truetype');
}
@font-face {
  font-family: 'Garamond Regular';
  font-style: normal;
  font-weight: 400;
  src: url('/public/fonts/Garamond-Regular.ttf') format('truetype');
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  font-family: 'Inter', Helvetica, Arial, sans-serif;
  font-weight: 400;
  color: #313665;
  background: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header */
.header {
  background: #fff;
  border-bottom: 1px solid rgba(49, 54, 101, 0.1);
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.header-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo img {
  height: 50px;
  width: auto;
}

/* Main Content */
.main {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

/* Section titles */
.section-title {
  font-family: 'Garamond Regular', Georgia, serif;
  font-size: 28px;
  color: #313665;
  margin: 30px 0 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-subtitle {
  font-size: 14px;
  color: #BA0D54;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

/* Announcement Card */
.announcement-card {
  background: #fff;
  border: 1px solid rgba(49, 54, 101, 0.08);
  border-left: 4px solid #BA0D54;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s;
}

.announcement-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.announcement-card.current {
  border-left-width: 5px;
  background: #fdf2f6;
  box-shadow: 0 4px 20px rgba(186, 13, 84, 0.08);
}

.announcement-card.upcoming {
  border-left-color: #313665;
  opacity: 0.85;
}

.announcement-card.past {
  border-left-color: #ccc;
  opacity: 0.55;
}

.announcement-time {
  font-size: 13px;
  font-weight: 600;
  color: #BA0D54;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.announcement-time .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #BA0D54;
  display: inline-block;
  animation: pulse 2s infinite;
}

.announcement-card.upcoming .announcement-time {
  color: #313665;
}

.announcement-card.upcoming .announcement-time .dot {
  background: #313665;
  animation: none;
}

.announcement-title {
  font-family: 'Garamond Bold', Georgia, serif;
  font-size: 22px;
  color: #313665;
  margin-bottom: 8px;
  line-height: 1.3;
}

.announcement-body {
  font-size: 15px;
  color: #4a4e7a;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* Pulse animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #9a9cc0;
  font-size: 16px;
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

/* Collapsible history */
.history-toggle {
  background: none;
  border: 1px solid rgba(49, 54, 101, 0.15);
  color: #313665;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  margin-top: 20px;
  transition: all 0.2s;
}

.history-toggle:hover {
  border-color: #BA0D54;
  color: #BA0D54;
}

.history-content {
  display: none;
  margin-top: 16px;
}

.history-content.open {
  display: block;
}

.history-card {
  opacity: 0.6;
  border-left-color: #ccc;
}

/* Footer */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #313665;
  color: rgba(255, 255, 255, 0.7);
  padding: 8px 16px;
  font-size: 12px;
  z-index: 100;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-credit a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.footer-credit a:hover {
  color: #BA0D54;
}

/* ========== Admin Styles ========== */

/* Login */
.login-container {
  max-width: 400px;
  margin: 80px auto;
  padding: 0 16px;
}

.login-card {
  background: #fff;
  border: 1px solid rgba(49, 54, 101, 0.1);
  border-radius: 12px;
  padding: 40px 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.login-card .header-logo {
  margin-bottom: 24px;
}

.login-card h2 {
  font-family: 'Garamond Regular', Georgia, serif;
  font-size: 24px;
  color: #313665;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #313665;
  margin-bottom: 4px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(49, 54, 101, 0.2);
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #313665;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #BA0D54;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  text-align: center;
}

.btn-primary {
  background: #BA0D54;
  color: #fff;
}

.btn-primary:hover {
  background: #9b0a46;
}

.btn-secondary {
  background: #313665;
  color: #fff;
}

.btn-secondary:hover {
  background: #252955;
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(49, 54, 101, 0.2);
  color: #313665;
}

.btn-outline:hover {
  border-color: #BA0D54;
  color: #BA0D54;
}

.btn-danger {
  background: #e53e3e;
  color: #fff;
}

.btn-danger:hover {
  background: #c53030;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-block {
  display: block;
  width: 100%;
}

.error-msg {
  background: #fff5f5;
  color: #c53030;
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 13px;
  border: 1px solid #feb2b2;
}

/* Admin Dashboard */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.admin-header h1 {
  font-family: 'Garamond Regular', Georgia, serif;
  font-size: 28px;
  color: #313665;
}

.admin-section {
  margin-bottom: 32px;
}

.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.admin-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #313665;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.badge-active {
  background: #c6f6d5;
  color: #22543d;
}

.badge-upcoming {
  background: #e9d8fd;
  color: #44337a;
}

.badge-hidden {
  background: #fed7d7;
  color: #822727;
}

.admin-card {
  background: #fff;
  border: 1px solid rgba(49, 54, 101, 0.08);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.admin-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-card-title {
  font-weight: 700;
  font-size: 16px;
  color: #313665;
}

.admin-card-time {
  font-size: 12px;
  color: #BA0D54;
  font-weight: 600;
  white-space: nowrap;
}

.admin-card-body {
  font-size: 14px;
  color: #4a4e7a;
  margin-top: 6px;
  white-space: pre-wrap;
}

.admin-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Create form */
.create-form {
  background: #faf5f7;
  border: 1px solid rgba(186, 13, 84, 0.1);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.create-form h3 {
  font-size: 16px;
  font-weight: 700;
  color: #BA0D54;
  margin-bottom: 16px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

/* Edit modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h3 {
  font-family: 'Garamond Regular', Georgia, serif;
  font-size: 22px;
  color: #313665;
  margin-bottom: 20px;
}

/* Visibility toggle */
.visibility-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

.visibility-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #BA0D54;
}

/* Responsive */
@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .admin-card-header {
    flex-direction: column;
  }

  .header-logo img {
    height: 40px;
  }

  .section-title {
    font-size: 22px;
  }

  .announcement-title {
    font-size: 18px;
  }
}
