@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css");
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #0d9488;
  --bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
}

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

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e5e7eb;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.header-inner {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.logo-box {
  height: 56px;
  width: 56px;
  border-radius: 14px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  color: #4b5563;
  letter-spacing: 0.01em;
}

.logo-text-main {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.logo-text-sub {
  font-size: 13px;
  color: #6b7280;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 30;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  color: #4b5563;
}

.icon-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 27px;
  height: 27px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fff;
}

.profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.profile-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.profile-btn svg {
  width: 20px;
  height: 20px;
  color: #4b5563;
}

.profile-name {
  font-size: 15px;
  color: #111827;
  font-weight: 600;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
  padding: 8px 0;
  z-index: 20;
  display: none;
}

.profile-menu.hidden {
  display: none;
}

.profile-menu.open {
  display: block !important;
}

.profile-menu-item {
  width: 100%;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #1f2937;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.profile-menu-item:hover {
  background: #f3f4f6;
}

.profile-menu-item svg {
  width: 18px;
  height: 18px;
  color: #475569;
}

.profile-menu-item:last-child {
  border-bottom: none;
}

.hidden {
  display: none;
}

body {
  font-family: "Pretendard", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

main {
  padding: 48px 0 96px;
  background: #ffffff;
  min-height: calc(100vh - 96px - 200px);
}

.page-title {
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

.filter-bar {
  margin-bottom: 20px;
  display: grid;
  gap: 10px;
}

.filter-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px auto 170px;
  gap: 10px;
  align-items: center;
}

.toolbar-bottom {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.filter-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.search-wrap {
  position: relative;
  width: 100%;
}

.filter-input {
  width: 100%;
  height: 48px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 0 14px 0 44px;
  font-size: 15px;
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.input-icon-left {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #9ca3af;
}

.filter-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 640px) {
  .filter-row {
    flex-direction: row;
    align-items: center;
  }
}

.date-range {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.date-input {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 0 12px;
  font-size: 14px;
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.date-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.view-toggle {
  display: inline-flex;
  background: #e5e7eb;
  border-radius: 12px;
  padding: 4px;
  gap: 6px;
  align-items: center;
  width: fit-content;
  justify-self: end;
}

.view-btn {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.view-btn svg {
  width: 16px;
  height: 16px;
}

.view-btn.active {
  background: #fff;
  border-color: #d1d5db;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  color: #111827;
}

.view-btn:not(.active) {
  color: #4b5563;
}

.date-sep {
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}

.toolbar-options {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.toolbar-select-wrap {
  position: relative;
  display: inline-flex;
}

.toolbar-select {
  height: 40px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 0 28px 0 12px;
  font-size: 14px;
  background: #fff;
  color: #111827;
  outline: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%), linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position: calc(100% - 14px) 17px, calc(100% - 9px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.toolbar-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.date-wrap {
  position: relative;
  width: 100%;
}

.date-input {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 0 12px 0 38px;
  font-size: 14px;
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.date-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.date-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #6b7280;
}

@media (max-width: 900px) {
  .filter-top {
    grid-template-columns: 1fr;
  }

  .date-sep {
    display: none;
  }

  .toolbar-bottom {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

.sidebar {
  display: grid;
  gap: 16px;
}

.filter-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px 20px;
}

.filter-card h3 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
}

.filter-list {
  display: grid;
  gap: 10px;
  color: #111827;
  font-size: 14px;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.card-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.03em;
}

.card-sub {
  color: #4b5563;
  margin-bottom: 20px;
  font-size: 16px;
}

.event-list {
  display: grid;
  gap: 16px;
}

.event-item {
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.event-item strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

.event-meta {
  color: #6b7280;
  font-size: 14px;
}

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0ea5e9;
  font-weight: 600;
  font-size: 14px;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  justify-items: stretch;
}

@media (max-width: 1180px) {
  .event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 740px) {
  .event-grid {
    grid-template-columns: 1fr;
  }
}

.event-grid.list-view {
  grid-template-columns: 1fr;
  justify-items: stretch;
}

.event-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
  justify-content: flex-start;
  max-width: 660px;
  gap: 0px;
}

.event-grid:not(.list-view) .event-card {
  aspect-ratio: 4 / 5;
  min-height: 0;
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
}

.event-grid.list-view .event-card {
  width: 100%;
  max-width: none;
  min-height: 202px;
  padding: 18px 16px;
}

.event-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 15px;
  display: grid;
  gap: 12px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  position: relative;
  overflow: hidden;
}

.event-card-list {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: stretch;
  min-height: 202px;
}

.event-card-list-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
}

.event-card-list-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-card-list .event-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}

.event-card-list .status-badge {
  position: static;
  margin-left: 0;
  padding: 2px 7px;
}

.event-card-list-main {
  display: grid;
  gap: 4px;
}

.event-card-list-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: end;
}

.event-grid.list-view .event-org {
  font-size: 14px;
  margin-bottom: 0;
}

.event-grid.list-view .event-title {
  font-size: 22px;
  line-height: 1.35;
}

.event-grid.list-view .event-meta-item {
  font-size: 14px;
}

.event-grid.list-view .event-card {
  transition: border-color 0.34s ease-in, box-shadow 0.34s ease-in, transform 0.34s ease-in;
}

.event-grid.list-view .event-card:hover,
.event-grid.list-view .event-card:focus-within {
  border-color: rgba(79, 111, 215, 0.55);
  box-shadow: 0 16px 30px rgba(79, 111, 215, 0.18);
  transform: translateY(-1px);
}

.event-link-btn,
.event-apply-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 13px;
  font-weight: 600;
  background: #fff;
  color: #374151;
  cursor: pointer;
}

.event-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.event-link-btn svg {
  width: 13px;
  height: 13px;
}

.event-apply-btn {
  border-color: #4f6fd7;
  background: #5d79d8;
  color: #fff;
}

.event-link-btn:hover {
  background: #f9fafb;
}

.event-link-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.event-apply-btn:hover {
  background: #4f6fd7;
}

.event-card > * {
  position: relative;
  z-index: 1;
}

.event-card--with-poster {
  background: #ffffff;
  border-color: #e5e7eb;
  transition: transform 0.42s ease-in-out, box-shadow 0.42s ease-in-out, border-color 0.32s ease-in-out;
}

.event-card--with-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--poster-url);
  background-size: cover;
  background-position: center;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.42s ease-in-out;
}

.event-card--with-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.9) 10%, rgba(15, 23, 42, 0.58) 55%, rgba(15, 23, 42, 0.88) 100%);
  z-index: 0;
  opacity: 0;
  transition: opacity 0.42s ease-in-out;
}

.event-grid:not(.list-view) .event-card--with-poster:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.24);
}

.event-grid:not(.list-view) .event-card--with-poster:hover::before,
.event-grid:not(.list-view) .event-card--with-poster:hover::after {
  opacity: 1;
}

.event-grid:not(.list-view) .event-card--with-poster:hover .event-title,
.event-grid:not(.list-view) .event-card--with-poster:hover .event-desc,
.event-grid:not(.list-view) .event-card--with-poster:hover .event-meta-list,
.event-grid:not(.list-view) .event-card--with-poster:hover .status-row,
.event-grid:not(.list-view) .event-card--with-poster:hover .event-org {
  color: #f8fafc;
}

.event-grid:not(.list-view) .event-card--with-poster:hover .event-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  opacity: 0;
  transform: scale(0.92);
}

.event-grid:not(.list-view) .event-card--with-poster:hover .status-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #f8fafc;
}

.empty-message {
  display: none;
  margin: 24px auto;
  color: #9ca3af;
  font-weight: 600;
  text-align: center;
  justify-content: center;
  align-items: center;
}

.event-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.event-grid:not(.list-view) .event-card .event-card-head {
  min-height: 176px;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.event-grid:not(.list-view) .event-card .event-card-main {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
}

.event-icon {
  width: 63px;
  height: 63px;
  border-radius: 12px;
  background: #f3f4f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4338ca;
  transition: opacity 0.36s ease-in-out, transform 0.36s ease-in-out, background 0.3s ease-in-out, color 0.3s ease-in-out;
}

.event-grid:not(.list-view) .event-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
}

.event-grid:not(.list-view) .event-icon img {
  border-radius: 50%;
}

.event-icon img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.event-icon--with-img {
  background: #f5f5f5;
}

.status-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-weight: 700;
  color: #374151;
  font-size: 13px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 5px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #0b3b6f;
  background: #e0f2fe;
  position: absolute;
  top: 12px;
  right: 12px;
}

.status-badge.blue { background: #e0f2fe; color: #0b3b6f; }
.status-badge.green { background: #dcfce7; color: #166534; }
.status-badge.gray { background: #e5e7eb; color: #374151; }

.event-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
  color: #111827;
  margin-top: 0;
}

.event-org {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 6px;
}

.event-desc {
  font-size: 12px;
  color: #4b5563;
  font-weight: 600;
  font-family: "Noto Serif KR", "Nanum Myeongjo", serif;
  line-height: 1.6;
  margin-top: 18px;
}

.event-card-list .event-desc {
  margin-top: 2px;
}

.event-meta-list {
  display: grid;
  gap: 0;
  color: #4b5563;
  font-weight: 600;
}

.event-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.meta-icon {
  width: 16px;
  height: 16px;
  color: #9ca3af;
}

.ad-card .meta-icon {
  color: #e5e7eb;
}

.ad-card {
  background: linear-gradient(140deg, #0ea5e9, #2563eb);
  border: none;
  color: #e5e7eb;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.24);
}

.ad-card .status-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.event-grid.list-view .ad-card {
  grid-template-columns: 1fr;
  min-height: auto;
}

.event-grid.list-view .ad-card .status-badge {
  position: static;
}

.pagination {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.page-btn {
  min-width: 28px;
  height: 28px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #fff;
  color: #6b7280;
  font-size: 13px;
  cursor: pointer;
}

.page-btn.active {
  background: #304189;
  border-color: #304189;
  color: #fff;
  font-weight: 700;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ad-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 4px;
}

.ad-desc {
  font-size: 13px;
  font-weight: 600;
  color: #e5e7eb;
  margin-top: 8px;
}

footer {
  background: #0f172a;
  color: #e5e7eb;
}

.footer-banner {
  background: linear-gradient(to right, #3b82f6, #14b8a6);
  padding: 1.1rem 0;
  text-align: center;
  font-weight: 500;
}

.footer-main {
  padding: 3rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-logo-box {
  width: 64px;
  height: 64px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-text {
  font-size: 0.95rem;
  color: #d1d5db;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-links-row {
  display: flex;
  gap: 0.75rem;
}

.footer-icon-link {
  color: #9ca3af;
  transition: color 0.15s ease;
}

.footer-icon-link:hover {
  color: #60a5fa;
}

.footer-contact-title {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  font-family: "Noto Serif KR", system-ui, sans-serif;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: #e5e7eb;
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding: 1.5rem 0;
  font-size: 0.8rem;
  color: #9ca3af;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  color: #9ca3af;
  font-size: 0.8rem;
}

.footer-bottom-links a:hover {
  color: #60a5fa;
}
