﻿/* Tianyue Culture — cultural tech theme, mobile-first (light UI) */

:root {
  --ty-bg: #eef2f5;
  --ty-surface: #ffffff;
  --ty-surface-2: #e4e9ee;
  --ty-text: #1a2d3d;
  --ty-muted: #5a6f80;
  --ty-accent: #2a7a7e;
  --ty-accent-2: #3a9499;
  --ty-gold: #b8860b;
  --ty-gold-soft: rgba(184, 134, 11, 0.28);
  --ty-radius: 10px;
  --ty-header-h: 64px;
  --ty-nav-text: #1a2d3d;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html { font-size: 16px; }
}

body.ty-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ty-bg);
  color: var(--ty-text);
  font-family: "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

a {
  color: var(--ty-gold);
  transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover {
  color: #8b6914;
  text-decoration: none;
}

.ty-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #ffffff;
  border-bottom: 1px solid rgba(26, 45, 61, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 20px rgba(26, 45, 61, 0.06);
}

.ty-nav {
  padding: 0.35rem 0;
  min-height: var(--ty-header-h);
}

.ty-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ty-nav-text) !important;
}

.ty-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--ty-gold), #8a6a1a);
  color: #0a0f14;
  font-size: 1rem;
  font-weight: 700;
}

.ty-brand-text {
  font-size: 1.05rem;
}

.ty-menu .nav-link.ty-link {
  color: var(--ty-nav-text) !important;
  padding: 0.5rem 0.85rem !important;
  border-radius: 6px;
  font-weight: 500;
}

.ty-menu .nav-link.ty-link:hover {
  color: var(--ty-accent) !important;
  background: rgba(42, 122, 126, 0.08);
}

.ty-lang-item {
  display: flex;
  align-items: center;
}

.ty-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(26, 45, 61, 0.05);
  border: 1px solid rgba(26, 45, 61, 0.12);
}

.ty-lang-btn {
  color: var(--ty-muted) !important;
  font-size: 0.85rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.ty-lang-btn:hover {
  color: var(--ty-nav-text) !important;
}

.ty-lang-btn.active {
  color: #fff !important;
  background: var(--ty-gold);
}

.ty-lang-dot {
  color: rgba(26, 45, 61, 0.25);
  user-select: none;
}

.ty-toggler {
  border: 2px solid rgba(26, 45, 61, 0.35) !important;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(26, 45, 61, 0.12);
}

.ty-toggler .navbar-toggler-icon {
  width: 1.35em;
  height: 1.35em;
  background-size: 100% 100%;
}

/* Mobile: dropdown panel so links are not lost on pale hero/content */
@media (max-width: 767.98px) {
  .ty-nav .navbar-collapse {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem 1rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(26, 45, 61, 0.12);
    box-shadow: 0 12px 40px rgba(26, 45, 61, 0.14);
  }

  .ty-menu .nav-item {
    border-bottom: 1px solid rgba(26, 45, 61, 0.06);
  }

  .ty-menu .nav-item:last-child {
    border-bottom: none;
    padding-top: 0.35rem;
  }

  .ty-menu .nav-link.ty-link {
    padding: 0.75rem 0.5rem !important;
    font-size: 1.05rem;
  }

  .ty-lang-item {
    justify-content: flex-start;
  }

  .ty-lang {
    width: 100%;
    justify-content: center;
    padding: 0.45rem 0.75rem;
  }
}

main[role="main"] {
  flex: 1 0 auto;
}

/* Hero carousel */
.ty-hero {
  position: relative;
  min-height: min(72vh, 640px);
  overflow: hidden;
}

.ty-hero-slides {
  position: relative;
  min-height: inherit;
}

.ty-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.85s ease, visibility 0.85s ease;
}

.ty-hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.ty-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: transform 8s ease-out;
}

.ty-hero-slide.is-active .ty-hero-bg {
  transform: scale(1);
}

.ty-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(22, 38, 52, 0.78) 0%, rgba(22, 38, 52, 0.45) 50%, rgba(22, 38, 52, 0.28) 100%);
  z-index: 1;
}

.ty-hero-content {
  position: relative;
  z-index: 2;
  min-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.ty-hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  color: var(--ty-gold);
  margin-bottom: 0.75rem;
}

.ty-hero-title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  max-width: 16ch;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.ty-hero-lead {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.94);
  max-width: 36ch;
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ty-btn-primary {
  align-self: flex-start;
  background: linear-gradient(135deg, var(--ty-accent), var(--ty-accent-2));
  border: none;
  color: #fff !important;
  padding: 0.55rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(45, 106, 110, 0.35);
}

.ty-btn-primary:hover {
  filter: brightness(1.08);
  color: #fff !important;
}

.ty-hero-dots {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.5rem;
}

.ty-hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.ty-hero-dot.is-active {
  background: var(--ty-gold);
  transform: scale(1.15);
}

/* Sections */
.ty-section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.ty-section-tight {
  padding-top: 1rem;
}

.ty-section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.ty-section-title-sm {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  color: var(--ty-gold);
}

.ty-lead {
  font-size: 1.05rem;
  color: var(--ty-muted);
  margin-bottom: 0;
}

.ty-intro {
  padding: 1rem 0 0;
}

.ty-pill-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ty-pill-list li {
  padding: 0.65rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--ty-surface);
  border-radius: var(--ty-radius);
  border-left: 3px solid var(--ty-gold);
  color: var(--ty-text);
  box-shadow: 0 2px 8px rgba(26, 45, 61, 0.06);
}

.ty-card {
  background: var(--ty-surface);
  border-radius: var(--ty-radius);
  padding: 1.35rem 1.5rem;
  border: 1px solid rgba(26, 45, 61, 0.08);
  height: 100%;
}

.ty-card-elevated {
  box-shadow: 0 8px 28px rgba(26, 45, 61, 0.1);
}

.ty-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
  color: var(--ty-text);
}

.ty-card-text {
  color: var(--ty-muted);
  font-size: 0.95rem;
}

/* Page heads */
.ty-page-head {
  padding-top: 2.5rem;
  padding-bottom: 1rem;
}

.ty-page-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
}

.ty-page-sub {
  color: var(--ty-muted);
  max-width: 52ch;
  margin-bottom: 0;
}

/* Products — large imagery */
.ty-product-list {
  padding-bottom: 3rem;
}

.ty-product-row {
  margin-bottom: 2.5rem;
}

.ty-product-visual {
  display: block;
  overflow: hidden;
  background: var(--ty-surface-2);
  max-height:200px;
}

.ty-product-visual img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.ty-product-visual:hover img {
  transform: scale(1.02);
}

.ty-product-caption {
  position: relative;
}

.ty-product-inner {
  margin-top: -2.5rem;
  position: relative;
  z-index: 2;
  background: var(--ty-surface);
  border-radius: var(--ty-radius);
  padding: 1.5rem 1.75rem;
  border: 1px solid rgba(26, 45, 61, 0.1);
  box-shadow: 0 12px 40px rgba(26, 45, 61, 0.12);
  max-width: min(720px, 100%);
}

@media (max-width: 767px) {
  .ty-product-inner {
    margin-top: -1.5rem;
    margin-left: 0.75rem;
    margin-right: 0.75rem;
  }
}

.ty-product-name {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.ty-product-desc {
  color: var(--ty-muted);
  margin-bottom: 0.75rem;
}

.ty-product-id {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ty-gold);
  opacity: 0.85;
}

/* Blog */
.ty-blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 2rem;
}

.ty-blog-card {
  background: var(--ty-surface);
  border-radius: var(--ty-radius);
  padding: 1.35rem 1.5rem;
  border: 1px solid rgba(26, 45, 61, 0.08);
  box-shadow: 0 2px 10px rgba(26, 45, 61, 0.05);
}

.ty-blog-date {
  font-size: 0.8rem;
  color: var(--ty-gold);
  display: block;
  margin-bottom: 0.35rem;
}

.ty-blog-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.ty-blog-title a {
  color: var(--ty-text);
}

.ty-blog-title a:hover {
  color: var(--ty-accent);
}

.ty-blog-more {
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

.ty-blog-cover-wrap {
  display: block;
  margin: -1.35rem -1.5rem 1rem;
  border-radius: var(--ty-radius) var(--ty-radius) 0 0;
  overflow: hidden;
}

.ty-blog-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  display: block;
}

.ty-blog-article {
  max-width: 760px;
}

.ty-blog-figure {
  margin: 0;
}

.ty-blog-hero-img {
  width: 100%;
  height: auto;
  border-radius: var(--ty-radius);
  display: block;
  box-shadow: 0 8px 28px rgba(26, 45, 61, 0.1);
}

.ty-blog-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ty-text);
}

.ty-blog-back a {
  font-weight: 500;
}

/* CMS admin */
.ty-admin-card {
  background: var(--ty-surface);
  border-radius: var(--ty-radius);
  padding: 1.5rem;
  border: 1px solid rgba(26, 45, 61, 0.08);
  box-shadow: 0 4px 20px rgba(26, 45, 61, 0.06);
}

/* Contact */
.ty-contact-grid {
  padding-bottom: 3rem;
}

.ty-muted {
  color: var(--ty-muted);
  font-size: 0.95rem;
}

.ty-form .form-group label {
  color: var(--ty-text);
  font-size: 0.9rem;
}

.ty-input {
  background: #fff !important;
  border: 1px solid rgba(26, 45, 61, 0.15) !important;
  color: var(--ty-text) !important;
  border-radius: 8px !important;
}

.ty-input:focus {
  border-color: var(--ty-gold) !important;
  box-shadow: 0 0 0 0.15rem var(--ty-gold-soft) !important;
}

.ty-form-hint {
  font-size: 0.8rem;
  color: var(--ty-muted);
}

/* Footer */
.ty-footer {
  flex-shrink: 0;
  padding: 1.75rem 0;
  border-top: 1px solid rgba(26, 45, 61, 0.08);
  background: var(--ty-surface);
}

.ty-footer-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

.ty-footer-tag {
  font-size: 0.85rem;
  color: var(--ty-muted);
  margin-bottom: 0;
}

.ty-copy {
  font-size: 0.85rem;
  color: var(--ty-muted);
}

.ty-admin-table {
  color: var(--ty-text);
}

.ty-admin-table thead th {
  border-top: none;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.65rem 0.75rem;
}

.ty-admin-table td {
  vertical-align: middle;
  font-size: 0.95rem;
}

.ty-code {
  font-size: 0.85rem;
  color: var(--ty-accent);
  background: rgba(42, 122, 126, 0.08);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

.ty-admin-cover-preview {
  max-width: 320px;
  border-radius: 12px;
  border: 1px solid rgba(26, 45, 61, 0.1);
}

/* Error / bootstrap overrides */
.validation-summary-errors {
  color: #c0392b;
}
