@import url("./portal-header-auth.css");

:root {
  --page-max: 1520px;
  --page-pad: 24px;
  --navy: #1f4e8c;
  --navy-deep: #17375f;
  --navy-soft: #2d6fbc;
  --orange: #f0a12f;
  --orange-deep: #de6f1c;
  --green: #5aa73a;
  --green-deep: #3e8b2d;
  --text: #1d3659;
  --muted: #60758f;
  --line: #dbe5f3;
  --card: #ffffff;
  --shadow: 0 18px 34px rgba(27, 53, 93, 0.12);
  --shadow-sm: 0 10px 24px rgba(24, 52, 95, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 112vh;
  padding-bottom: 88px;
  font-family: "Trebuchet MS", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #ecf2fb 0, #f7f9fd 260px, #f8faff 100%);
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

.container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.portal-header {
  background: linear-gradient(90deg, #1f467d, #315f9a 58%, #3768a6);
  color: #fff;
  box-shadow: 0 8px 18px rgba(18, 38, 68, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-header .container {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  gap: 18px;
  min-height: 84px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px 8px 0;
  text-decoration: none;
  color: #fff;
  flex: 0 0 auto;
}

.brand-mark {
  display: block;
  width: 70px;
  height: 70px;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 12px 26px rgba(16, 36, 68, 0.22);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-text strong {
  font-size: 20px;
  line-height: 1;
}

.brand-text em {
  font-style: normal;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex: 1 1 auto;
  flex-wrap: wrap;
  min-width: 0;
}

.top-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  font-weight: 700;
    transition: none;
}

.top-nav a:hover,
.top-nav a.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-btn.light {
  background: #fff;
  color: var(--navy);
}

.top-btn.accent {
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: #fff;
  box-shadow: 0 10px 18px rgba(224, 111, 28, 0.28);
}

.top-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(19, 41, 75, 0.12);
}

.notice-strip {
  padding: 18px 0 8px;
}

.notice-frame {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-sm);
}

.notice-label {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: #edf3fc;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.notice-marquee {
  flex: 1 1 auto;
  overflow: hidden;
}

.notice-list {
  display: inline-flex;
  align-items: center;
  gap: 42px;
  width: max-content;
  margin: 0;
  padding: 0 0 0 100%;
  list-style: none;
  animation: notice-scroll 16s linear infinite;
}

.notice-marquee:hover .notice-list {
  animation-play-state: paused;
}

.notice-list li a {
  color: #47607e;
  text-decoration: none;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}

.notice-list li a:hover {
  color: var(--navy);
}

.preview-hero {
  padding: 10px 0 30px;
}

.hero-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding: 24px;
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(14, 34, 63, 0.86) 0, rgba(14, 34, 63, 0.58) 38%, rgba(14, 34, 63, 0.18) 72%, rgba(14, 34, 63, 0.18) 100%),
    url("../zp/zq.webp") center center / cover no-repeat;
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 272px;
  max-width: 760px;
}

.hero-eyebrow {
  margin: 0 0 12px;
  color: #ffc56f;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.hero-copy h1 {
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-shadow: 0 8px 24px rgba(15, 27, 52, 0.28);
}

.hero-sub {
  max-width: 56ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.hero-btn,
.toolbar-btn,
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.hero-btn.primary,
.toolbar-btn.primary,
.action-btn.primary {
  background: linear-gradient(135deg, var(--navy), var(--navy-soft));
  color: #fff;
  box-shadow: 0 10px 20px rgba(18, 40, 75, 0.22);
}

.hero-btn.secondary,
.action-btn.secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.toolbar-btn.ghost {
  background: #f4f7fc;
  color: #35537c;
  border: 1px solid var(--line);
}

.hero-btn:hover,
.toolbar-btn:hover,
.action-btn:hover {
  transform: translateY(-1px);
}

.filter-section {
  position: relative;
  z-index: 5;
  margin-top: -28px;
}

.filter-card {
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(212, 224, 240, 0.88);
  box-shadow: var(--shadow);
}

.filter-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.filter-copy h2 {
  margin: 0;
  color: #1f4274;
  font-size: 28px;
}

.filter-copy p {
  margin: 8px 0 0;
  color: #667d98;
  line-height: 1.7;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: #edf4ff;
  color: #275b9c;
  font-weight: 800;
  white-space: nowrap;
}

.keyword-search {
  margin-bottom: 20px;
}

.keyword-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  align-items: center;
}

.keyword-history-box {
  position: relative;
  min-width: 0;
}

.keyword-input-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid #d6e0ef;
  border-radius: 14px;
  background: #f7fafd;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.keyword-input-wrap:focus-within {
  border-color: #a6c0e5;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(43, 95, 170, 0.08);
}

.keyword-search-icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.keyword-search-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid #6f86a7;
  border-radius: 50%;
}

.keyword-search-icon::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: 1px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: #6f86a7;
  transform: rotate(45deg);
}

.keyword-input-wrap input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 50px;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: #27405f;
  font-size: 15px;
  font-weight: 600;
}

.keyword-input-wrap input::placeholder {
  color: #7b8da6;
  font-size: 15px;
  font-weight: 600;
}

.keyword-search-btn {
  min-height: 52px;
  padding: 0 24px;
  border-radius: 14px;
}

.keyword-history {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 16;
  padding: 14px;
  border: 1px solid #d7e2f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(21, 49, 92, 0.14);
}

.keyword-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.keyword-history-head span {
  color: #35537c;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.keyword-history-clear {
  border: 0;
  padding: 0;
  background: transparent;
  color: #6d84a2;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.keyword-history-clear:hover {
  color: #1f4e8c;
}

.keyword-history-list {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.keyword-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: #f5f8fd;
  color: #2a4468;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.keyword-history-item:hover {
  transform: translateY(-1px);
  background: #edf4ff;
}

.keyword-history-item-icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 2px solid #7387a2;
  border-radius: 50%;
}

.keyword-history-item-icon::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 7px;
  width: 2px;
  height: 5px;
  border-radius: 999px;
  background: #7387a2;
}

.keyword-history-item-icon::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 7px;
  width: 5px;
  height: 2px;
  border-radius: 999px;
  background: #7387a2;
}

.keyword-history-empty {
  padding: 18px 12px;
  border-radius: 12px;
  background: #f7fafd;
  color: #8093ac;
  font-size: 14px;
  text-align: center;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) max-content;
  gap: 14px;
  align-items: end;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-field span {
  color: #43617f;
  font-size: 13px;
  font-weight: 800;
}

.filter-field input,
.filter-field select {
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid #d6e0ef;
  border-radius: 14px;
  background: #f7fafd;
  color: #27405f;
  outline: 0;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-field input:focus,
.filter-field select:focus {
  border-color: #a6c0e5;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(43, 95, 170, 0.08);
}

.filter-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 18px;
}

.quick-pill {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #dde7f4;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #294566;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.quick-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(31, 63, 109, 0.08);
}

.quick-pill.active {
  background: linear-gradient(135deg, var(--navy), var(--navy-soft));
  border-color: transparent;
  color: #fff;
}

.quick-pill.sports:not(.active) {
  color: #99650f;
}

.quick-pill.academic:not(.active) {
  color: #36538a;
}

.quick-pill.arts:not(.active) {
  color: #7e4f92;
}

.results-section {
  padding: 28px 0 42px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  color: #1f4274;
  font-size: 30px;
}

.section-head p {
  margin: 8px 0 0;
  color: #667d98;
  line-height: 1.8;
}

.section-link {
  color: #2a69b7;
  text-decoration: none;
  font-weight: 800;
}

.section-link:hover {
  color: #1f4e8c;
}

.club-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.club-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid #dbe4f0;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.club-cover {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #dce6f6;
}

.club-cover-empty {
  background:
    linear-gradient(180deg, rgba(245, 249, 255, 0.98), rgba(231, 239, 251, 0.98));
}

.club-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.25s ease;
}

.club-cover-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #7e93b0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.club-card:hover .club-cover img {
  transform: scale(1.03);
}

.club-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}

.club-name {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 72px;
  margin: 0;
  color: #1f4274;
  font-size: 23px;
  line-height: 1.35;
}

.club-name span:first-child {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.club-mode {
  flex: 0 0 auto;
  margin-top: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f3f7fd;
  border: 1px solid #d8e4f2;
  color: #537090;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.club-desc {
  min-height: 78px;
  margin: 0;
  color: #5b708b;
  line-height: 1.8;
}

.club-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
  margin-top: 0;
}

.club-tag-pill {
  padding: 6px 10px;
  border: 1px solid #dbe5f3;
  border-radius: 999px;
  background: #f6f9fe;
  color: #36537b;
  font-size: 12px;
  font-weight: 700;
}

.club-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  min-height: 238px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbff;
  color: #60758f;
  font-size: 13px;
  line-height: 1.6;
}

.club-meta-row {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
}

.club-meta-label {
  color: #60758f;
  font-weight: 700;
}

.club-meta-value {
  color: #25446e;
  font-weight: 700;
  min-width: 0;
}

.meta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}

.meta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #cfe0ff;
  background: #edf4ff;
  color: #2a69b7;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.meta-link:hover {
  background: #e5efff;
}

.club-actions {
  display: flex;
  gap: 12px;
  padding: 0 20px 20px;
}

.club-actions .action-btn {
  flex: 1 1 0;
}

.action-btn.secondary {
  background: #f5f8fd;
  color: #284c7b;
  border: 1px solid #d8e4f2;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 24px;
  border: 1px solid rgba(212, 224, 240, 0.88);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.empty-state h3 {
  margin: 0;
  color: #1f4274;
  font-size: 26px;
}

.empty-state p {
  max-width: 40ch;
  margin: 0;
  color: #667d98;
  line-height: 1.8;
}

.footer {
  background: linear-gradient(180deg, #234a83, #1f406f);
  color: #fff;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: #dce7f7;
  text-decoration: none;
  font-size: 14px;
}

.footer p {
  margin: 0;
  font-size: 13px;
}

@keyframes notice-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

@media (max-width: 1320px) {
  .club-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .portal-header .container {
    grid-template-columns: 1fr auto;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .top-nav {
    order: 3;
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }

  .hero-shell {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: 240px;
  }

  .filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 920px) {
  .preview-hero {
    padding-bottom: 28px;
  }

  .hero-shell {
    padding: 22px;
  }

  .hero-copy h1 {
    font-size: clamp(30px, 5vw, 42px);
  }

  .filter-section {
    margin-top: -20px;
  }

  .filter-head,
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .club-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .club-name {
    font-size: 21px;
    min-height: 0;
  }
}

@media (max-width: 680px) {
  :root {
    --page-pad: 18px;
  }

  .portal-header .container {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .brand {
    width: 100%;
  }

  .top-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .top-nav a {
    text-align: center;
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .notice-frame {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-shell {
    padding: 22px;
    border-radius: 24px;
  }

  .hero-copy {
    min-height: 0;
  }

  .hero-sub {
    font-size: 15px;
  }

  .filter-card {
    padding: 20px;
    border-radius: 20px;
  }

  .keyword-search-row {
    grid-template-columns: minmax(0, 1fr) 160px;
  }

  .filters-grid,
  .club-grid {
    grid-template-columns: 1fr;
  }

  .filter-actions,
  .club-actions {
    flex-direction: column;
  }

  .club-meta-row {
    grid-template-columns: 1fr;
    row-gap: 2px;
  }

  .club-meta {
    min-height: 0;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .brand-text strong {
    font-size: 16px;
  }

  .top-nav {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 30px;
  }

  .keyword-search-row {
    grid-template-columns: 1fr;
  }

  .keyword-search-btn {
    width: 100%;
  }

  .quick-pills {
    gap: 10px;
  }

  .quick-pill {
    width: 100%;
  }

  .club-cover {
    height: 200px;
  }
}
