/* WOWSight Theme - Modern Sports Media */
:root {
  --ws-primary: #C31023;
  --ws-primary-hover: #A00D1C;
  --ws-bg: #FAFAFA;
  --ws-surface: #FFFFFF;
  --ws-text: #18181B;
  --ws-text-secondary: #71717A;
  --ws-border: #E4E4E7;
  --ws-radius: 8px;
  --ws-transition: 0.2s ease;
  --ws-font-body: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  --ws-font-heading: 'Inter', 'Noto Sans TC', sans-serif;
  --ws-content-width: 720px;
  --ws-wide-width: 1280px;
}

[data-theme="dark"] {
  --ws-bg: #0A0A0A;
  --ws-surface: #141414;
  --ws-text: #FAFAFA;
  --ws-text-secondary: #A1A1AA;
  --ws-border: #27272A;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ws-bg: #0A0A0A;
    --ws-surface: #141414;
    --ws-text: #FAFAFA;
    --ws-text-secondary: #A1A1AA;
    --ws-border: #27272A;
  }
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }

body {
  background: var(--ws-bg);
  color: var(--ws-text);
  font-family: var(--ws-font-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background var(--ws-transition), color var(--ws-transition);
}

img { border-radius: var(--ws-radius); }

/* Header */
.ws-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--ws-surface);
  border-bottom: 1px solid var(--ws-border);
  padding: 0.75rem 2rem;
  transition: background var(--ws-transition), border-color var(--ws-transition);
}

.ws-header__inner {
  max-width: var(--ws-wide-width);
  margin: 0 auto;
  align-items: center;
  gap: 2rem;
}

.ws-header__nav .wp-block-navigation__container {
  gap: 1.5rem;
}

.ws-header__nav a {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ws-text);
  transition: color var(--ws-transition);
}

.ws-header__nav a:hover {
  color: var(--ws-primary);
}

.ws-header__search .wp-block-search__inside-wrapper {
  background: var(--ws-bg);
  border: 1px solid var(--ws-border);
  border-radius: 100px;
  padding: 0.25rem 0.75rem;
}

.ws-theme-toggle {
  background: none;
  border: 1px solid var(--ws-border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ws-text);
  transition: all var(--ws-transition);
}

.ws-theme-toggle:hover {
  border-color: var(--ws-primary);
  color: var(--ws-primary);
}

[data-theme="dark"] .ws-icon-sun,
:root:not([data-theme]) .ws-icon-sun { display: none; }
[data-theme="dark"] .ws-icon-moon { display: block; }
[data-theme="light"] .ws-icon-moon { display: none; }
[data-theme="light"] .ws-icon-sun { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ws-icon-sun { display: none; }
  :root:not([data-theme="light"]) .ws-icon-moon { display: block; }
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .ws-icon-moon { display: none; }
  :root:not([data-theme="dark"]) .ws-icon-sun { display: block; }
}

/* Hero Section */
.ws-hero__item {
  position: relative;
  overflow: hidden;
  border-radius: var(--ws-radius);
  margin-bottom: 2rem;
}

.ws-hero__image img {
  width: 100%;
  height: auto;
  aspect-ratio: 21/9;
  object-fit: cover;
  border-radius: var(--ws-radius);
}

.ws-hero__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 2rem 2rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  border-radius: 0 0 var(--ws-radius) var(--ws-radius);
}

.ws-hero__cat a {
  background: var(--ws-primary);
  color: #fff !important;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ws-hero__title {
  color: #fff !important;
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  font-weight: 900;
  margin-top: 0.75rem !important;
  line-height: 1.2;
}

.ws-hero__title a { color: inherit !important; }

.ws-hero__date {
  color: rgba(255,255,255,0.7) !important;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* Cards */
.ws-card {
  background: var(--ws-surface);
  border-radius: var(--ws-radius);
  overflow: hidden;
  border: 1px solid var(--ws-border);
  transition: transform var(--ws-transition), box-shadow var(--ws-transition), border-color var(--ws-transition), background var(--ws-transition);
}

.ws-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  border-color: var(--ws-primary);
}

.ws-card__image img {
  width: 100%;
  object-fit: cover;
  border-radius: var(--ws-radius) var(--ws-radius) 0 0;
}

.ws-card__content {
  padding: 1rem 1.25rem 1.25rem;
}

.ws-card__cat a {
  color: var(--ws-primary) !important;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ws-card__title {
  font-family: var(--ws-font-heading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 0.5rem !important;
}

.ws-card__title a {
  color: var(--ws-text) !important;
  transition: color var(--ws-transition);
}

.ws-card__title a:hover { color: var(--ws-primary) !important; }

.ws-card__date {
  color: var(--ws-text-secondary);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* Featured Grid */
.ws-featured__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* Latest List */
.ws-latest__item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--ws-border);
  align-items: flex-start;
}

.ws-latest__image {
  flex-shrink: 0;
  width: 300px;
}

.ws-latest__image img {
  border-radius: var(--ws-radius);
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
}

.ws-latest__title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
}

.ws-latest__title a { color: var(--ws-text) !important; }
.ws-latest__title a:hover { color: var(--ws-primary) !important; }

.ws-latest__excerpt {
  color: var(--ws-text-secondary);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Section Title */
.ws-section-title {
  font-family: var(--ws-font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--ws-primary);
  margin-bottom: 1.5rem !important;
  display: inline-block;
}

/* Single Post */
.ws-single__hero img {
  width: 100%;
  max-height: 60vh;
  object-fit: cover;
  border-radius: 0;
}

.ws-single__container {
  padding-top: 2.5rem;
}

.ws-single__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  line-height: 1.25;
}

.ws-single__meta {
  color: var(--ws-text-secondary);
  font-size: 0.875rem;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--ws-border);
  margin-bottom: 2rem !important;
}

.ws-single__content {
  font-size: 1.0625rem;
  line-height: 1.9;
}

.ws-single__content img { margin: 2rem 0; }

.ws-single__tags a {
  display: inline-block;
  background: var(--ws-bg);
  border: 1px solid var(--ws-border);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.8rem;
  margin: 0.25rem;
  transition: all var(--ws-transition);
}

.ws-single__tags a:hover {
  border-color: var(--ws-primary);
  color: var(--ws-primary);
}

/* Share */
.ws-share {
  padding: 2rem 0;
  margin-top: 2rem !important;
  border-top: 1px solid var(--ws-border);
  gap: 1rem;
}

.ws-share__label { font-weight: 600; font-size: 0.875rem; }

/* Related */
.ws-related {
  padding: 3rem 0;
  margin-top: 3rem !important;
  border-top: 1px solid var(--ws-border);
}

/* Archive */
.ws-archive__title {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 2rem !important;
}

/* 404 */
.ws-404 {
  text-align: center;
  padding: 6rem 2rem;
}

.ws-404__title {
  color: var(--ws-primary) !important;
  font-weight: 900;
}

/* Footer */
.ws-footer {
  background: var(--ws-surface);
  border-top: 1px solid var(--ws-border);
  padding: 3rem 2rem 2rem;
  margin-top: 4rem;
  transition: background var(--ws-transition), border-color var(--ws-transition);
}

.ws-footer__inner { gap: 2rem; }

.ws-footer__desc { color: var(--ws-text-secondary); margin-top: 0.5rem; }

.ws-footer__nav a {
  font-size: 0.875rem;
  color: var(--ws-text-secondary);
}
.ws-footer__nav a:hover { color: var(--ws-primary); }

.ws-footer__social-links .wp-social-link {
  background: transparent !important;
  border: 1px solid var(--ws-border);
}

.ws-footer__social-links .wp-social-link:hover {
  border-color: var(--ws-primary);
  background: var(--ws-primary) !important;
}

.ws-footer__divider {
  border-color: var(--ws-border) !important;
  margin: 2rem 0 !important;
}

.ws-footer__copyright { color: var(--ws-text-secondary); }

/* Pagination */
.wp-block-query-pagination {
  margin-top: 2rem;
  gap: 0.5rem;
}

.wp-block-query-pagination-numbers .page-numbers,
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
  padding: 0.5rem 1rem;
  border: 1px solid var(--ws-border);
  border-radius: var(--ws-radius);
  font-size: 0.875rem;
  transition: all var(--ws-transition);
}

.wp-block-query-pagination-numbers .page-numbers.current,
.wp-block-query-pagination-numbers .page-numbers:hover {
  background: var(--ws-primary);
  color: #fff;
  border-color: var(--ws-primary);
}

/* Grid */
.ws-post-grid { gap: 1.5rem; }

/* Main spacing */
.ws-main { padding: 2rem; }

/* Responsive */
@media (max-width: 768px) {
  .ws-header { padding: 0.5rem 1rem; }
  .ws-main { padding: 1rem; }

  .ws-hero__image img { aspect-ratio: 4/3; }
  .ws-hero__title { font-size: 1.25rem; }
  .ws-hero__overlay { padding: 2rem 1rem 1.5rem; }

  .ws-featured__grid,
  .ws-post-grid { grid-template-columns: 1fr !important; }

  .ws-latest__item {
    flex-direction: column;
    gap: 0.75rem;
  }
  .ws-latest__image { width: 100%; }

  .ws-footer__inner { flex-direction: column; gap: 1.5rem; }
}

@media (max-width: 480px) {
  .ws-card__title { font-size: 0.9rem; }
  .ws-single__title { font-size: 1.5rem; }
}
