/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-color: #2FBFA0;
  --primary-dark: #259a82;
  --bg-light: #F7F9FB;
  --text-dark: #333333;
  --text-gray: #666666;
  --text-light: #999999;
  --white: #ffffff;
  --border-color: #EAEAEA;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

body {
  background-color: var(--bg-light);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Wrapper */
.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background-color: var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  position: relative;
}

.site-title {
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-dark);
  text-decoration: none;
  z-index: 1001;
}

.logo-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-right: 10px;
  font-size: 14px;
  font-weight: bold;
  flex-shrink: 0;
}

.site-title-text {
  font-family: 'Brush Script MT', 'Lucida Handwriting', cursive;
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 500;
  display: none; /* 默认隐藏，移动端显示 */
}

/* Header Actions (Mobile Only) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Desktop Navigation */
.site-nav.desktop-nav {
  display: flex;
  gap: 30px;
  align-items: center;
}

.site-nav.desktop-nav a {
  color: var(--text-gray);
  font-size: 0.95rem;
  transition: color 0.2s;
  white-space: nowrap;
}

.site-nav.desktop-nav a:hover {
  color: var(--primary-color);
}

/* Search button in desktop nav */
.site-nav.desktop-nav .search-btn {
  margin-left: 10px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.mobile-menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--text-dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* Mobile Navigation */
.site-nav.mobile-nav {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--white);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.site-nav.mobile-nav.active {
  display: flex;
  max-height: 500px;
  padding: 20px;
}

.site-nav.mobile-nav a {
  color: var(--text-gray);
  font-size: 1rem;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  transition: color 0.2s;
}

.site-nav.mobile-nav a:hover {
  color: var(--primary-color);
}

.site-nav.mobile-nav a:last-child {
  border-bottom: none;
}

/* Mobile Dropdown */
.mobile-dropdown {
  width: 100%;
  position: relative;
}

.mobile-dropdown-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-gray);
  font-size: 1rem;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  transition: color 0.2s;
  text-align: left;
}

.mobile-dropdown-toggle:hover {
  color: var(--primary-color);
}

.mobile-dropdown-toggle svg {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 10px;
}

.mobile-dropdown.active .mobile-dropdown-toggle svg {
  transform: rotate(180deg);
}

.mobile-dropdown-menu {
  display: none;
  flex-direction: column;
  padding-left: 20px;
  padding-top: 10px;
  padding-bottom: 5px;
  background-color: rgba(247, 249, 251, 0.5);
  border-radius: 4px;
  margin-top: 5px;
}

.mobile-dropdown.active .mobile-dropdown-menu {
  display: flex;
}

.mobile-dropdown-menu a {
  padding: 10px 0;
  font-size: 0.9rem;
  color: var(--text-gray);
  border-bottom: 1px solid rgba(234, 234, 234, 0.5);
  transition: color 0.2s;
}

.mobile-dropdown-menu a:hover {
  color: var(--primary-color);
}

.mobile-dropdown-menu a:last-child {
  border-bottom: none;
}

/* Desktop Dropdown - only for desktop nav */
.desktop-nav .nav-dropdown {
  position: relative;
}

.desktop-nav .nav-dropdown-toggle {
  border: none;
  background: none;
  font: inherit;
  color: var(--text-gray);
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
}

.desktop-nav .nav-dropdown-toggle::after {
  content: "▼";
  font-size: 0.7rem;
  color: currentColor;
  margin-left: 4px;
}

.desktop-nav .nav-dropdown:hover .nav-dropdown-toggle,
.desktop-nav .nav-dropdown:focus-within .nav-dropdown-toggle {
  color: var(--primary-color);
}

.desktop-nav .nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translate(-50%, 10px);
  background: var(--white);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  padding: 12px 0;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 10;
}

.desktop-nav .nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--white);
  box-shadow: -1px -1px 1px rgba(0,0,0,0.03);
}

.desktop-nav .nav-dropdown:hover .nav-dropdown-menu,
.desktop-nav .nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.desktop-nav .nav-dropdown-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 0.9rem;
  color: var(--text-gray);
}

.desktop-nav .nav-dropdown-menu a:hover {
  background: #f5f7fa;
  color: var(--primary-color);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #6DD5FA 0%, #2FBFA0 100%);
  padding: 80px 20px;
  text-align: center;
  color: white;
  margin-bottom: 40px;
}

.hero-section h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.hero-section p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.hero-search {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.hero-search input {
  width: 100%;
  padding: 15px 25px 15px 45px;
  border-radius: 30px;
  border: none;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.hero-search input:focus {
  outline: none;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.hero-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #ccc;
  font-style: normal;
}

/* Main Content */
.main-container {
  display: flex;
  gap: 40px;
  padding-bottom: 60px;
}

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

.sidebar-column {
  width: 320px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .main-container {
    flex-direction: column;
  }
  .sidebar-column {
    width: 100%;
  }
}

.section-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--text-dark);
}

/* Post Cards */
.post-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.post-meta-tags {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.category-tag {
  font-size: 0.8rem;
  color: var(--primary-color);
  background: rgba(47, 191, 160, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.date-meta {
  font-size: 0.8rem;
  color: var(--text-light);
}

.post-card h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  line-height: 1.3;
}

.post-card h3 a:hover {
  color: var(--primary-color);
}

.post-excerpt {
  color: var(--text-gray);
  margin-bottom: 15px;
  line-height: 1.6;
  font-size: 0.95rem;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.post-tags-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-pill {
  background: #f0f2f5;
  color: var(--text-gray);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 12px;
}

.read-more {
  color: var(--primary-color);
  font-weight: 500;
  font-size: 0.9rem;
}

.read-more:hover {
  text-decoration: underline;
}

/* Featured Post specific */
.post-card.featured {
  flex-direction: row;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(to right, #e6f7ff, #ffffff);
}

.featured-image {
  flex: 0 0 280px;
  background: linear-gradient(45deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%);
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.featured-image img,
.featured-image .img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* Image placeholder for demo */
.img-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
}

.featured-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 30px;
}

.featured-content .read-more {
  align-self: flex-end;
  margin-top: auto;
}

@media (max-width: 600px) {
  .post-card.featured {
    flex-direction: column;
    padding: 25px;
  }
  .featured-content {
    padding: 0;
  }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.page-item {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--white);
  color: var(--text-gray);
  cursor: pointer;
  transition: all 0.2s;
}

.page-item.active {
  background: var(--primary-color);
  color: white;
}

.page-item:hover:not(.active) {
  background: #eee;
}

/* Sidebar Widgets */
.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-sm);
}

.sidebar-widget h4 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  border-left: 4px solid var(--primary-color);
  padding-left: 10px;
  color: var(--text-dark);
}

.search-box-mini {
    position: relative;
}

.search-box-mini input {
  width: 100%;
  padding: 10px 15px 10px 35px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.9rem;
  background: #f9f9f9;
}
.search-box-mini-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 14px;
}

.category-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.95rem;
}

.category-list li a:hover {
  color: var(--primary-color);
}

.count-badge {
  background: #f0f0f0;
  color: #888;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud a {
  background: #f5f7fa;
  color: var(--text-gray);
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.tag-cloud a:hover {
  background: var(--primary-color);
  color: white;
}

.hot-posts-list li {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.rank-num {
  background: var(--primary-color);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 3px;
}

.rank-num.top-3 {
    /* maybe distinct color for top 3 */
}

.hot-posts-list a {
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.4;
}
.hot-posts-list a:hover {
    color: var(--primary-color);
}

/* Footer */
.site-footer {
  background-color: #2d3436;
  color: #dfe6e9;
  padding: 60px 0 30px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 800px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 500px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-col h5 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.footer-col p {
  font-size: 0.9rem;
  color: #b2bec3;
  margin-bottom: 10px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a {
  color: #b2bec3;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: #fff;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.social-icon:hover {
  background: var(--primary-color);
}

.copyright {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 30px;
  font-size: 0.85rem;
  color: #636e72;
}

/* Responsive Header */
@media (max-width: 768px) {
  /* Hide desktop navigation */
  .site-nav.desktop-nav {
    display: none;
  }
  
  /* Show mobile menu toggle */
  .mobile-menu-toggle {
    display: flex;
  }
  
  /* Adjust header actions spacing */
  .header-actions {
    gap: 10px;
  }
  
  /* Show logo text on mobile */
  .site-title-text {
    display: block;
  }
  
  /* Adjust header height */
  .header-inner {
    height: 60px;
  }
  
  .logo-circle {
    width: 40px;
    height: 40px;
    margin-right: 8px;
  }
  
  .site-title-text {
    font-size: 1.3rem;
  }
}

@media (min-width: 769px) {
  /* Hide mobile navigation on desktop */
  .site-nav.mobile-nav {
    display: none !important;
  }
  
  /* Show desktop navigation */
  .site-nav.desktop-nav {
    display: flex;
  }
  
  /* Hide mobile menu toggle */
  .mobile-menu-toggle {
    display: none;
  }
  
  /* Hide logo text on desktop */
  .site-title-text {
    display: none;
  }
  
  /* Hide header actions on desktop */
  .header-actions {
    display: none;
  }
}

@media (max-width: 480px) {
  /* Hide logo text on very small screens */
  .site-title-text {
    display: none;
  }
  
  .logo-circle {
    margin-right: 0;
  }
  
  .header-actions {
    gap: 8px;
  }
  
  .search-btn {
    padding: 6px;
  }
}

