/* 文物保护网站 - 主样式文件 */

/* 导入字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Georgia:wght@400;700&display=swap');

/* 基础重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-brown: #7a4a1e;
  --primary-color: #7a4a1e;
  --secondary-color: #996633;
  --accent-gold: #c59b5a;
  --accent-gold-hover: #b48545;
  --deep-gold: #a97834;
  --light-cream: #faf8f5;
  --warm-bg: #f3ede2;
  --shadow-color: rgba(122, 74, 30, 0.16);
  --glass-bg: rgba(255, 255, 255, 0.75);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 基础样式 */
body {
  font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: var(--primary-brown);
  background: linear-gradient(135deg, var(--light-cream) 0%, var(--warm-bg) 100%);
  min-height: 100vh;
  overflow-x: hidden; /* 防止横向溢出 */
  padding-top: env(safe-area-inset-top, 0px);
}

html {
  scroll-padding-top: 120px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部样式 */
.header {
  background: linear-gradient(135deg, #d4af8c 0%, #c9a96e 50%, #b8860b 100%);
  color: #8b4513;
  padding: 80px 0;
  text-align: left;
  position: relative;
  box-shadow: 0 10px 40px rgba(139, 69, 19, 0.12);
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: 1;
}

.header h1 {
  font-size: 3.8rem;
  font-weight: 700;
  margin-bottom: 24px;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.4);
  letter-spacing: 3px;
  font-family: 'Georgia', serif;
  color: #8b4513;
  position: relative;
}

.header p {
  font-size: 1.4rem;
  opacity: 0.9;
  font-weight: 400;
  letter-spacing: 1.5px;
  color: #a0522d;
  font-style: italic;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.3);
  position: relative;
}

/* 导航栏样式 */
.navbar {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(139, 69, 19, 0.05);
  border-bottom: 1px solid rgba(212, 175, 140, 0.3);
  padding: 15px 0;
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 1000;
  transition: var(--transition);
}

.navbar .container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 10px;
}

.nav-item {
  position: relative;
}

.nav-item a {
  text-decoration: none;
  color: var(--primary-brown);
  font-size: 1.05rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 8px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item a:hover {
  background: rgba(212, 175, 140, 0.15);
  color: #6b3410;
  transform: translateY(-2px);
}

.nav-item a.active {
  background: linear-gradient(135deg, #d4af8c 0%, #c9a96e 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(184, 134, 11, 0.25);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-item:not(:last-child)::after {
  display: none; /* 移除旧的圆点分割符，改用间距和背景 */
}

/* 副导航（二级小导航）- 仅首页 */
.sub-nav {
  background: rgba(250, 248, 245, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(232, 213, 196, 0.5);
  padding: 8px 0;
  z-index: 99;
  position: relative;
}

.sub-nav .container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.sub-nav-list {
  display: flex;
  list-style: none;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.sub-nav-item {
  position: relative;
}

.sub-nav-item > a {
  display: inline-block;
  padding: 6px 16px;
  color: var(--primary-brown);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 20px;
  transition: var(--transition);
}

.sub-nav-item > a:hover {
  background: rgba(212, 175, 140, 0.2);
  color: #6b3410;
  transform: translateY(-1px);
}

.sub-nav-item:hover .sub-nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-nav-has-dropdown > a::after {
  content: '';
  display: inline-block;
  margin-left: 6px;
  border: 4px solid transparent;
  border-top-color: currentColor;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

.sub-nav-item:hover > a::after {
  transform: rotate(180deg);
}

.sub-nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  margin-top: 8px;
  padding: 10px;
  list-style: none;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(232, 213, 196, 0.6);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(139, 69, 19, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 100;
}

.sub-nav-dropdown li {
  margin-bottom: 4px;
}

.sub-nav-dropdown li:last-child {
  margin-bottom: 0;
}

.sub-nav-dropdown a {
  display: block;
  padding: 8px 12px;
  color: var(--primary-brown);
  font-size: 0.88rem;
  text-decoration: none;
  border-radius: 6px;
  transition: var(--transition);
}

.sub-nav-dropdown a:hover {
  background: rgba(212, 175, 140, 0.25);
  padding-left: 16px;
}

/* 登录/退出按钮样式 */
.auth-buttons {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 12px;
  z-index: 10;
}

.auth-btn {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-btn {
  background: rgba(255, 255, 255, 0.2);
  color: var(--primary-brown);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(5px);
}

.login-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(139, 69, 19, 0.1);
}

.profile-btn {
  background: rgba(201, 169, 110, 0.18);
  color: #7a4f21;
  border: 1.5px solid rgba(201, 169, 110, 0.45);
  backdrop-filter: blur(5px);
}

.profile-btn:hover {
  background: rgba(201, 169, 110, 0.32);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(201, 169, 110, 0.25);
}

.logout-btn {
  background: rgba(231, 76, 60, 0.15);
  color: #c0392b;
  border: 1.5px solid rgba(231, 76, 60, 0.3);
  backdrop-filter: blur(5px);
}

.logout-btn:hover {
  background: rgba(231, 76, 60, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(231, 76, 60, 0.15);
}

/* 主要内容区域 */
.main-content {
  padding: 60px 0;
}

/* 混合内容区域 */
.mixed-content-section {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  padding: 50px;
  box-shadow: 0 20px 50px rgba(139, 69, 19, 0.08);
  border: 1px solid rgba(232, 213, 196, 0.5);
  position: relative;
  overflow: hidden;
}

.mixed-content-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #d4af8c, #c9a96e, #b8860b);
}

.section-title {
  font-size: 2.4rem;
  color: var(--primary-brown);
  margin-bottom: 40px;
  text-align: left;
  position: relative;
  font-weight: 700;
  letter-spacing: 1.5px;
  font-family: 'Georgia', serif;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--accent-gold);
  border-radius: 2px;
}

.sub-nav-example-section {
  margin-top: 28px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 26px;
  padding: 36px;
  border: 1px solid rgba(232, 213, 196, 0.55);
  box-shadow: 0 14px 38px rgba(139, 69, 19, 0.07);
}

.sub-nav-example-img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 20px;
  border: 1px solid rgba(232, 213, 196, 0.7);
  box-shadow: 0 8px 22px rgba(139, 69, 19, 0.08);
}

.sub-nav-example-p {
  color: var(--secondary-color);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

/* 内容卡片 */
.content-item {
  display: flex;
  align-items: center;
  padding: 24px;
  background: #fff;
  border-radius: 24px;
  border: 1px solid rgba(232, 213, 196, 0.4);
  transition: var(--transition);
  position: relative;
  box-shadow: 0 10px 30px rgba(139, 69, 19, 0.04);
  transform: translateZ(0);
}

.content-item:hover {
  transform: translateY(-5px) scale(1.008);
  box-shadow: 0 16px 36px rgba(139, 69, 19, 0.11);
  border-color: var(--accent-gold);
}

.content-item.image-news .item-image {
  width: 220px;
  height: 140px;
  object-fit: cover;
  border-radius: 18px;
  margin-right: 30px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  background: #efe6da;
}

.item-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-brown);
  margin-bottom: 12px;
  transition: var(--transition);
}

.item-content {
  flex: 1;
  min-width: 0;
}

.content-item:hover .item-title {
  color: #6b3410;
}

.item-description {
  color: #a0522d;
  font-size: 1.05rem;
  line-height: 1.6;
  opacity: 0.85;
}

.item-date {
  margin-top: 10px;
  color: #8a5a31;
  font-size: 0.9rem;
  font-weight: 500;
}

.content-item.text-only {
  padding: 22px 24px;
}

.loading-news,
.empty-news {
  text-align: center;
  color: var(--secondary-color);
  padding: 24px 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed rgba(197, 155, 90, 0.45);
  border-radius: 14px;
}

/* AI助手气泡 */
.ai-bubble {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #d4af8c 0%, #c9a96e 100%);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 15px 35px rgba(184, 134, 11, 0.3);
  transition: var(--transition);
  z-index: 1000;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.ai-bubble:hover {
  transform: translateY(-5px) rotate(8deg);
  box-shadow: 0 20px 45px rgba(184, 134, 11, 0.4);
}

.ai-bubble.dragging {
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.bubble-text {
  color: #8b4513;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* 侧边栏对话框 */
.chat-sidebar {
  position: fixed;
  top: 20px;
  right: -350px;
  width: 350px;
  height: calc(100vh - 40px);
  background: linear-gradient(135deg, #fefefe 0%, #f5f1eb 100%);
  box-shadow: -5px 0 20px rgba(139, 69, 19, 0.15);
  border: 2px solid #e8d5c4;
  border-radius: 25px;
  transition: right 0.3s ease;
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 300px;
  min-height: 400px;
  max-width: 80vw;
  max-height: calc(100vh - 40px);
  contain: layout paint;
}

/* 调整大小手柄 */
.resize-handle {
  position: absolute;
  background: transparent;
  z-index: 1000;
}

.resize-handle.nw {
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  cursor: nw-resize;
}

.resize-handle.ne {
  top: 0;
  right: 0;
  width: 20px;
  height: 20px;
  cursor: ne-resize;
}

.resize-handle.sw {
  bottom: 0;
  left: 0;
  width: 20px;
  height: 20px;
  cursor: sw-resize;
}

.resize-handle.se {
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  cursor: se-resize;
}

/* 拖动状态样式 */
.chat-sidebar.dragging {
  transition: none;
}

.chat-sidebar.open {
  right: 20px;
}

/* 侧边栏头部 */
.chat-header {
  padding: 20px;
  border-bottom: 3px solid #d4af8c;
  background: linear-gradient(135deg, #d4af8c 0%, #c9a96e 50%, #b8860b 100%);
  color: #8b4513;
  border-radius: 25px 25px 0 0;
  cursor: move;
}

.chat-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 5px;
  font-family: 'Georgia', serif;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.chat-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
  font-style: italic;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.2);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: #8b4513;
  font-size: 1.5rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 聊天消息区域 */
.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-height: 200px;
}

.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.4;
  word-wrap: break-word;
}

.message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #d4af8c 0%, #c9a96e 100%);
  color: #8b4513;
  border-bottom-right-radius: 8px;
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.message.ai {
  align-self: flex-start;
  background: linear-gradient(135deg, #fefefe 0%, #f5f1eb 100%);
  color: #8b4513;
  border: 2px solid #e8d5c4;
  border-bottom-left-radius: 8px;
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.08);
}

.message-time {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-top: 5px;
}

/* 输入区域 */
.chat-input-area {
  padding: 20px;
  border-top: 3px solid #d4af8c;
  background: linear-gradient(135deg, #fefefe 0%, #f5f1eb 100%);
  border-radius: 0 0 25px 25px;
}

.input-container {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e8d5c4;
  border-radius: 25px;
  font-size: 0.9rem;
  resize: none;
  outline: none;
  transition: all 0.3s ease;
  font-family: 'Georgia', serif;
  max-height: 100px;
  min-height: 40px;
  color: #8b4513;
  background: #fefefe;
}

.chat-input:focus {
  border-color: #d4af8c;
  box-shadow: 0 0 0 3px rgba(212, 175, 140, 0.15);
}

.send-btn {
  padding: 12px 20px;
  background: linear-gradient(135deg, #d4af8c 0%, #c9a96e 100%);
  color: #8b4513;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.15);
}

.send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 69, 19, 0.25);
  background: linear-gradient(135deg, #c9a96e 0%, #b8860b 100%);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 遮罩层 */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 998;
}

.overlay.show {
  opacity: 1;
  visibility: visible;
}

.mixed-content-section,
.sub-nav-example-section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 680px;
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header {
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.navbar {
  animation: fadeIn 0.5s ease-out;
}

.main-content {
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s backwards;
}

.ai-bubble.pulse {
  animation: bounce 2s infinite;
}

/* 阅读更多样式 */
.read-more {
  font-size: 0.9rem;
  color: #d4af8c;
  font-weight: 600;
  margin-top: 8px;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.content-item:hover .read-more {
  opacity: 1;
  color: #b8860b;
  transform: translateX(5px);
}

/* 点击效果 */
.content-item {
  cursor: pointer;
}

.content-item:active {
  transform: translateY(-2px);
  transition: transform 0.1s ease;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (hover: none) {
  .content-item:hover,
  .ai-bubble:hover,
  .send-btn:hover,
  .login-btn:hover,
  .profile-btn:hover,
  .logout-btn:hover {
    transform: none;
    box-shadow: inherit;
  }
}

/* 文档模态框样式 */
.document-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: linear-gradient(135deg, #fefefe 0%, #f5f1eb 100%);
  border-radius: 20px;
  max-width: 800px;
  max-height: 80vh;
  width: 100%;
  box-shadow: 0 20px 60px rgba(139, 69, 19, 0.3);
  border: 2px solid #e8d5c4;
  overflow: hidden;
  animation: slideIn 0.3s ease;
}

.modal-header {
  background: linear-gradient(135deg, #d4af8c 0%, #c9a96e 100%);
  color: #8b4513;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid #d4af8c;
}

.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  font-family: 'Georgia', serif;
}

.close-modal {
  background: none;
  border: none;
  color: #8b4513;
  font-size: 2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.close-modal:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-body {
  padding: 30px;
  max-height: 60vh;
  overflow-y: auto;
  color: #8b4513;
  line-height: 1.6;
}

.modal-body h2 {
  color: #8b4513;
  font-size: 1.8rem;
  margin-bottom: 20px;
  font-family: 'Georgia', serif;
  border-bottom: 2px solid #d4af8c;
  padding-bottom: 10px;
}

.modal-body h3 {
  color: #8b4513;
  font-size: 1.3rem;
  margin: 25px 0 15px 0;
  font-family: 'Georgia', serif;
}

.modal-body p {
  margin-bottom: 15px;
  font-size: 1rem;
}

.modal-body ul {
  margin: 15px 0;
  padding-left: 20px;
}

.modal-body li {
  margin-bottom: 8px;
  font-size: 1rem;
}

.modal-body strong {
  color: #b8860b;
  font-weight: 600;
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { 
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .content-grid {
    gap: 15px;
  }
  
  .navbar .container {
    flex-direction: row;
    align-items: center;
    gap: 0;
  }
  
  .navbar {
    padding: 10px 0;
  }
  
  .nav-list {
    flex-direction: row;
    gap: 8px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 2px 2px 8px;
    scrollbar-width: none;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
  }

  .nav-item a {
    font-size: 0.92rem;
    padding: 8px 14px;
  }
  
  .nav-item:not(:last-child)::after {
    display: none;
  }

  .sub-nav {
    padding: 8px 0;
  }

  .sub-nav-list {
    flex-wrap: wrap;
    gap: 6px;
  }

  .sub-nav-item > a {
    padding: 8px 14px;
    font-size: 0.9rem;
  }

  .sub-nav-dropdown {
    position: static;
    min-width: 100%;
    margin: 4px 0 0 0;
    opacity: 1;
    visibility: visible;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    border: none;
    box-shadow: none;
    background: rgba(245, 241, 235, 0.95);
    border-radius: 8px;
    transition: max-height 0.25s ease, padding 0.25s ease;
  }

  .sub-nav-item.sub-nav-open .sub-nav-dropdown {
    max-height: 200px;
    padding: 8px 0;
    margin-top: 6px;
    border: 1px solid #e8d5c4;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.1);
  }

  .sub-nav-has-dropdown > a::after {
    transition: transform 0.2s ease;
  }

  .sub-nav-item.sub-nav-open > a::after {
    transform: rotate(180deg);
  }
  
  .auth-buttons {
    position: static;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
  }
  
  .header h1 {
    font-size: 2.5rem;
  }
  
  .header p {
    font-size: 1.1rem;
  }
  
  .main-content {
    padding: 40px 0;
  }
  
  .mixed-content-section {
    padding: 25px;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .content-item {
    flex-direction: column;
    align-items: flex-start;
    min-height: auto;
  }
  
  .content-item.image-news .item-image {
    width: 100%;
    height: 150px;
    margin-right: 0;
    margin-bottom: 15px;
  }
  
  .content-item.image-news .item-content {
    width: 100%;
  }
  
  .item-title {
    font-size: 1.2rem;
  }
  
  .item-description {
    -webkit-line-clamp: 3;
  }
  
  .ai-bubble {
    width: 70px;
    height: 70px;
    bottom: 20px;
    right: 20px;
  }
  
  .bubble-text {
    font-size: 0.8rem;
  }
  
  .chat-sidebar {
    width: calc(100% - 40px);
    right: -100%;
    top: 20px;
    height: calc(100vh - 40px);
    min-width: calc(100% - 40px);
    max-width: calc(100% - 40px);
  }
  
  .chat-sidebar.open {
    right: 20px;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 150px;
  }
}

.header {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #cfa76b 45%, var(--deep-gold) 100%);
  color: var(--primary-brown);
}

.header h1,
.header p {
  color: var(--primary-brown);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.25);
}

.navbar {
  background: rgba(250, 246, 238, 0.88);
  border-bottom: 1px solid rgba(197, 155, 90, 0.35);
}

.nav-item a {
  color: var(--primary-brown);
}

.nav-item a:hover {
  background: rgba(197, 155, 90, 0.18);
  color: #6a3f1a;
}

.nav-item a.active {
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-hover) 100%);
  color: #fff;
}
