/*
Theme Name: YCircle
Theme URI: https://example.com/ycircle
Author: YCircle Team
Author URI: https://example.com
Description: A modern three-column WordPress community theme with modular homepage sections, Codestar Framework options, and Lucide icons.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ycircle
Tags: community, three-columns, custom-logo, custom-menu, theme-options
*/

:root {
  --yc-primary: #2f6fed;
  --yc-bg: #f4f7fb;
  --yc-surface: #ffffff;
  --yc-surface-soft: #f9fbff;
  --yc-text: #172033;
  --yc-muted: #75809a;
  --yc-border: #e7edf6;
  --yc-shadow: 0 18px 48px rgba(28, 45, 78, 0.08);
  --yc-radius: 18px;
  --yc-container: 1200px;
  --yc-transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--yc-bg);
  color: var(--yc-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.ycircle-container {
  width: min(100% - 32px, var(--yc-container));
  margin: 0 auto;
}

.yc-card,
.yc-hero__main,
.yc-hero__side,
.yc-event-banner,
.yc-interest-card,
.yc-post-card {
  background: var(--yc-surface);
  border: 1px solid var(--yc-border);
  border-radius: var(--yc-radius);
  box-shadow: var(--yc-shadow);
}

.yc-site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 247, 251, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(231, 237, 246, 0.9);
}

.yc-site-header__inner {
  min-height: 76px;
  gap: 20px;
}

.yc-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.yc-logo__mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, #7fb3ff, var(--yc-primary));
  box-shadow: 0 10px 24px rgba(47, 111, 237, 0.28);
}

.yc-logo__text {
  font-size: 1.05rem;
}

.yc-primary-nav__menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0;
  margin: 0;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.yc-primary-nav__menu a {
  color: var(--yc-muted);
  font-weight: 500;
  position: relative;
  padding: 8px 0;
}

.yc-primary-nav__menu a:hover,
.yc-primary-nav__menu .current-menu-item a {
  color: var(--yc-primary);
}

.yc-primary-nav__menu .current-menu-item a::after,
.yc-primary-nav__menu a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
  background: var(--yc-primary);
}

.yc-header-search {
  min-width: 280px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--yc-border);
  border-radius: 999px;
}

.yc-header-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--yc-text);
}

.yc-header-search input::placeholder {
  color: #a1abc2;
}

.yc-header-search button,
.yc-icon-btn,
.yc-avatar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
}

.yc-header-search button,
.yc-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--yc-muted);
  transition: background var(--yc-transition), color var(--yc-transition);
}

.yc-header-search button:hover,
.yc-icon-btn:hover {
  background: rgba(47, 111, 237, 0.08);
  color: var(--yc-primary);
}

.yc-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yc-icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  background: #fff;
  border: 1px solid var(--yc-border);
}

.yc-icon-btn span {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5d5d;
  box-shadow: 0 0 0 4px rgba(255, 93, 93, 0.15);
}

.yc-avatar-link img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 6px 18px rgba(28, 45, 78, 0.14);
}

.yc-home {
  padding: 24px 0 40px;
}

.yc-hero {
  margin-bottom: 22px;
}

.yc-hero__main {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  background: linear-gradient(135deg, #f4f8ff 0%, #edf4ff 100%);
}

.yc-hero__main::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(244, 248, 255, 0.92), rgba(244, 248, 255, 0.6));
}

.yc-hero__content {
  position: relative;
  z-index: 1;
  max-width: 520px;
  padding: 56px 54px;
}

.yc-hero__content h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.yc-hero__content p {
  margin: 0;
  color: var(--yc-muted);
  font-size: 1.02rem;
}

.yc-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.yc-btn,
.yc-small-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform var(--yc-transition), background var(--yc-transition), color var(--yc-transition), border-color var(--yc-transition);
}

.yc-btn:hover,
.yc-small-pill:hover,
.yc-interest-card:hover {
  transform: translateY(-1px);
}

.yc-btn {
  padding: 12px 20px;
}

.yc-btn--primary {
  background: var(--yc-primary);
  color: #fff;
  box-shadow: 0 14px 28px rgba(47, 111, 237, 0.24);
}

.yc-btn--ghost {
  background: #fff;
  color: var(--yc-text);
  border: 1px solid var(--yc-border);
}

.yc-hero__dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 6px;
  z-index: 1;
}

.yc-hero__dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(47, 111, 237, 0.25);
}

.yc-hero__dots .is-active {
  width: 22px;
  background: var(--yc-primary);
}

.yc-hero__side {
  overflow: hidden;
  min-height: 320px;
}

.yc-hero__side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yc-home-layout {
  align-items: start;
}

.yc-home-sidebar,
.yc-home-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.yc-module,
.yc-event-banner,
.yc-interest-section {
  padding: 18px;
}

.yc-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.yc-section-head h2,
.yc-module h2,
.yc-interest-section h2,
.yc-event-banner h2 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.25;
}

.yc-section-head a,
.yc-module-link,
.yc-event-banner__content p,
.yc-checkin > p,
.yc-footer-brand p,
.yc-footer-menu a {
  color: var(--yc-muted);
}

.yc-section-head a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.92rem;
}

.yc-circle-list,
.yc-topic-list,
.yc-announcement-list,
.yc-user-list,
.yc-stats__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.yc-mini-circle,
.yc-topic,
.yc-announcement-list a,
.yc-user-row,
.yc-stats__list div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yc-mini-circle {
  padding: 10px 0;
}

.yc-mini-circle__icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
}

.yc-mini-circle h3,
.yc-feed-card__header h3,
.yc-user-row h3 {
  margin: 0;
  font-size: 0.98rem;
}

.yc-mini-circle p,
.yc-feed-card__header p,
.yc-user-row p {
  margin: 4px 0 0;
  color: var(--yc-muted);
  font-size: 0.88rem;
}

.yc-small-pill {
  margin-left: auto;
  padding: 8px 14px;
  border: 1px solid var(--yc-border);
  background: var(--yc-surface-soft);
  color: var(--yc-text);
  font-size: 0.88rem;
}

.yc-topic {
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--yc-border);
}

.yc-topic:last-child {
  border-bottom: 0;
}

.yc-topic span {
  color: var(--yc-text);
  font-weight: 500;
}

.yc-topic em {
  color: var(--yc-muted);
  font-style: normal;
  font-size: 0.9rem;
}

.yc-feed-tabs {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.yc-feed-tabs a,
.yc-feed-tabs button {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--yc-muted);
  font-weight: 600;
}

.yc-feed-tabs .is-active {
  color: var(--yc-primary);
}

.yc-feed-tabs button {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.yc-feed-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.yc-feed-card {
  padding: 18px;
  border: 1px solid var(--yc-border);
  border-radius: calc(var(--yc-radius) - 4px);
  background: #fff;
}

.yc-feed-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yc-feed-card__header img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}

.yc-feed-card__header h3 span {
  color: var(--yc-primary);
  font-size: 0.78rem;
  font-weight: 600;
  margin-left: 6px;
}

.yc-feed-card__header button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--yc-muted);
}

.yc-feed-card__text {
  margin: 14px 0 0;
  color: var(--yc-text);
}

.yc-feed-card__images {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.yc-feed-card__images img {
  width: 100%;
  height: 160px;
  border-radius: 14px;
  object-fit: cover;
}

.yc-feed-card__images--1 {
  grid-template-columns: 1fr;
}

.yc-feed-card__images--2,
.yc-feed-card__images--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.yc-feed-card__actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
  color: var(--yc-muted);
  font-size: 0.92rem;
}

.yc-feed-card__actions span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.yc-event-banner {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, rgba(48, 109, 233, 0.13), rgba(94, 163, 255, 0.08));
}

.yc-event-banner::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -30px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 111, 237, 0.2), transparent 68%);
}

.yc-event-banner__content {
  position: relative;
  z-index: 1;
}

.yc-event-banner__content span {
  color: var(--yc-primary);
  font-weight: 700;
  font-size: 0.92rem;
}

.yc-event-banner__content p {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
}

.yc-event-banner__people {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.yc-event-banner__people img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #fff;
}

.yc-event-banner__people strong {
  color: var(--yc-text);
  font-size: 0.92rem;
}

.yc-event-banner .yc-btn {
  position: relative;
  z-index: 1;
}

.yc-event-banner__ribbon {
  position: absolute;
  right: 0;
  top: 0;
  padding: 8px 14px;
  border-bottom-left-radius: 14px;
  background: var(--yc-primary);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  z-index: 2;
}

.yc-announcement-list a {
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--yc-border);
  color: var(--yc-text);
}

.yc-announcement-list a:last-child {
  border-bottom: 0;
}

.yc-announcement-list a span {
  flex: 1;
}

.yc-module-link {
  display: inline-flex;
  margin-top: 8px;
  font-size: 0.92rem;
}

.yc-user-row img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}

.yc-checkin {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.yc-checkin__week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.yc-checkin__week span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 14px;
  background: var(--yc-surface-soft);
  color: var(--yc-muted);
  font-size: 0.82rem;
}

.yc-checkin__week .is-done {
  background: rgba(47, 111, 237, 0.08);
  color: var(--yc-primary);
}

.yc-checkin__week .is-today {
  background: rgba(47, 111, 237, 0.14);
  color: var(--yc-primary);
}

.yc-checkin .yc-btn {
  width: 100%;
}

.yc-stats__list div {
  justify-content: space-between;
  padding: 8px 0;
}

.yc-stats__list span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--yc-muted);
}

.yc-stats__list strong {
  color: var(--yc-text);
}

.yc-interest-section {
  margin-top: 22px;
}

.yc-interest-grid {
  --bs-gutter-x: 16px;
  --bs-gutter-y: 16px;
}

.yc-interest-card {
  min-height: 170px;
  padding: 18px;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  overflow: hidden;
}

.yc-interest-card span {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(47, 111, 237, 0.12);
  color: var(--yc-primary);
}

.yc-interest-card h3,
.yc-interest-card p,
.yc-interest-card strong {
  margin: 0;
}

.yc-interest-card p {
  color: var(--yc-muted);
}

.yc-interest-card strong {
  color: var(--yc-text);
  font-size: 0.92rem;
}

.yc-site-footer {
  margin-top: 34px;
  background: #fff;
  border-top: 1px solid var(--yc-border);
}

.yc-site-footer__grid {
  padding: 30px 0;
}

.yc-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.yc-footer-socials {
  display: flex;
  gap: 10px;
}

.yc-footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--yc-surface-soft);
  color: var(--yc-muted);
}

.yc-footer-menu h3 {
  margin: 0 0 12px;
  font-size: 0.98rem;
}

.yc-footer-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.yc-footer-qrcode {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.yc-footer-qrcode__box {
  width: 120px;
  height: 120px;
  border-radius: 20px;
  background: var(--yc-surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yc-primary);
}

.yc-site-footer__bottom {
  border-top: 1px solid var(--yc-border);
  padding: 14px 0;
  color: var(--yc-muted);
  font-size: 0.92rem;
}

.yc-archive-grid {
  padding: 26px 0;
}

.yc-post-card {
  padding: 20px;
}

.yc-post-card__title {
  margin: 0 0 10px;
}

.yc-post-card__excerpt {
  color: var(--yc-muted);
}

.entry-content > :last-child {
  margin-bottom: 0;
}

.comments-area .comment-text p:last-child,
.comments-area .comment-text > :last-child {
  margin-bottom: 0;
}

.yc-empty-state {
  padding: 40px;
  text-align: center;
}

@media (min-width: 1200px) {
  .yc-main .container-xxl {
    padding-inline: 0;
  }
}

.wp-block-image img,
.entry-content img {
  height: auto;
}

.entry-content figure,
.entry-content .wp-caption {
  margin: 0 0 1.25rem;
}

.entry-content .wp-caption-text,
.comment-text .wp-caption-text {
  color: var(--yc-muted);
  font-size: 0.9rem;
}

.entry-content ul,
.entry-content ol,
.comment-text ul,
.comment-text ol {
  padding-left: 1.25rem;
}

.entry-content table,
.comment-text table {
  width: 100%;
  margin: 1.25rem 0;
}

.entry-content blockquote,
.comment-text blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--yc-primary);
  background: var(--yc-surface-soft);
  border-radius: 0 var(--yc-radius) var(--yc-radius) 0;
}

.yc-post-card .card-title a,
.yc-post-card .card-title {
  color: var(--yc-text);
}

.yc-post-card .card-title a:hover {
  color: var(--yc-primary);
}

@media (max-width: 1180px) {
  .yc-primary-nav {
    display: none;
  }
}

@media (max-width: 720px) {
  .ycircle-container {
    width: min(100% - 20px, var(--yc-container));
  }

  .yc-header-search {
    order: 3;
    min-width: 0;
  }

  .yc-header-actions {
    gap: 8px;
  }

  .yc-hero__content {
    padding: 34px 24px 48px;
  }

  .yc-feed-card__images--2,
  .yc-feed-card__images--3 {
    grid-template-columns: 1fr;
  }

  .yc-checkin__week {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}