/* 个人品牌中枢站 - 自定义样式 */

/* 文本截断样式 */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 平滑过渡效果 */
.transition {
  transition: all 0.3s ease;
}

/* 卡片悬停效果 */
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 51, 102, 0.15);
}

/* 响应式导航栏 */
@media (max-width: 768px) {
  .md\\:flex {
    display: none;
  }
  
  /* 移动端导航菜单 */
  .mobile-menu {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 51, 102, 0.95);
    z-index: 1000;
    padding-top: 80px;
  }
  
  .mobile-menu a {
    display: block;
    color: white;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
  }
}

/* 加载动画 */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 51, 102, 0.3);
  border-radius: 50%;
  border-top-color: #003366;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 日历样式增强 */
.calendar-event {
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-left: 4px solid;
  background: rgba(0, 51, 102, 0.05);
  transition: background-color 0.2s ease;
}

.calendar-event:hover {
  background: rgba(0, 51, 102, 0.1);
}

/* 博客文章样式 */
.blog-article {
  border-left: 4px solid #003366;
  padding-left: 16px;
  margin-bottom: 24px;
}

.blog-tag {
  background: rgba(0, 51, 102, 0.1);
  color: #003366;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

/* 课程卡片样式 */
.course-card {
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.course-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

/* 媒体画廊样式 */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.media-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.media-item:hover {
  transform: scale(1.05);
}

.media-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.media-item:hover .media-overlay {
  opacity: 1;
}

/* 个人资料样式 */
.profile-section {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 16px;
  padding: 32px;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 按钮样式 */
.btn-primary {
  background: linear-gradient(135deg, #003366 0%, #004080 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #002244 0%, #003366 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
}

.btn-secondary {
  background: transparent;
  color: #003366;
  border: 2px solid #003366;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #003366;
  color: white;
}

/* 响应式图片 */
.responsive-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* 文字排版 */
.prose {
  line-height: 1.6;
}

.prose h1, .prose h2, .prose h3 {
  color: #003366;
  margin-bottom: 16px;
}

.prose p {
  margin-bottom: 16px;
}

/* 状态指示器 */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.status-active {
  background-color: #10b981;
}

.status-inactive {
  background-color: #f59e0b;
}

.status-draft {
  background-color: #6b7280;
}

/* 工具提示 */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  font-size: 12px;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
}

/* 打印样式 */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
  }
  
  .card {
    border: 1px solid #ddd;
    margin-bottom: 20px;
    page-break-inside: avoid;
  }
}

/* 暗色模式支持（预留） */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --text-primary: #f7fafc;
    --text-secondary: #e2e8f0;
    --border-color: #4a5568;
  }
}

/* 可访问性增强 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 焦点样式 */
button:focus,
a:focus,
input:focus,
textarea:focus {
  outline: 2px solid #003366;
  outline-offset: 2px;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #003366;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #002244;
}