/* ============================================
   5igd.com 我爱广东 - 本地导航门户样式
   红色主题 #e11d48 | 响应式布局
   ============================================ */

:root {
  --primary: #e11d48;
  --primary-dark: #be123c;
  --primary-light: #f43f5e;
  --primary-50: #fff1f2;
  --primary-100: #ffe4e6;
  --accent: #fbbf24;
  --text: #1f2937;
  --text-light: #6b7280;
  --text-muted: #9ca3af;
  --bg: #ffffff;
  --bg-soft: #f9fafb;
  --bg-pink: #fff5f6;
  --border: #f1f5f9;
  --border-strong: #e5e7eb;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 14px rgba(225, 29, 72, 0.08);
  --shadow-lg: 0 10px 30px rgba(225, 29, 72, 0.12);
  --radius: 14px;
  --radius-sm: 8px;
  --max-width: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  color: var(--text);
  background: var(--bg-soft);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============ 顶部导航栏 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: var(--primary);
  white-space: nowrap;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

.logo-text small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s ease;
}

.main-nav a:hover {
  color: var(--primary);
  background: var(--primary-50);
}

.main-nav a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

/* ============ 首页 Hero ============ */
.hero {
  position: relative;
  background: linear-gradient(135deg, #e11d48 0%, #be123c 55%, #881337 100%);
  color: #fff;
  padding: 70px 0 90px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -120px;
  left: -60px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.18), transparent 70%);
  border-radius: 50%;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero h1 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 14px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.hero h1 .heart {
  color: var(--accent);
  margin: 0 6px;
}

.hero p {
  font-size: 17px;
  opacity: 0.92;
  margin-bottom: 32px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

/* 搜索框 */
.search-box {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

.search-box input {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 28px;
  padding: 0 60px 0 24px;
  font-size: 16px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  outline: none;
  color: var(--text);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-btn {
  position: absolute;
  right: 7px;
  top: 7px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: transform 0.2s;
}

.search-btn:hover {
  transform: scale(1.08);
}

.hot-tags {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.hot-tags span {
  font-size: 13px;
  opacity: 0.85;
}

.hot-tags a {
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
  transition: background 0.2s;
}

.hot-tags a:hover {
  background: rgba(255, 255, 255, 0.32);
}

/* ============ 分类入口卡片 ============ */
.section {
  padding: 56px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}

.section-head h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 48px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.section-head p {
  margin-top: 12px;
  color: var(--text-light);
  font-size: 15px;
}

/* ============ AI工具推荐横幅 ============ */
.ai-recommend-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: var(--radius);
  padding: 28px 32px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}
.ai-recommend-banner:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(99, 102, 241, 0.35);
}
.ai-recommend-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.ai-recommend-content {
  flex: 1;
}
.ai-recommend-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
}
.ai-recommend-content p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  line-height: 1.6;
}
.ai-recommend-cta {
  background: #fff;
  color: #6366f1;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.cat-card {
  display: block;
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 18px;
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.cat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-100);
}

.cat-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
}

.cat-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.cat-card p {
  font-size: 13px;
  color: var(--text-light);
}

/* 分类配色 */
.cat-gov .cat-icon { background: linear-gradient(135deg, #e11d48, #be123c); }
.cat-life .cat-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.cat-food .cat-icon { background: linear-gradient(135deg, #ef4444, #dc2626); }
.cat-travel .cat-icon { background: linear-gradient(135deg, #10b981, #059669); }
.cat-culture .cat-icon { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }

/* ============ 页面横幅 ============ */
.page-banner {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 60%, #881337 100%);
  color: #fff;
  padding: 48px 0 56px;
  position: relative;
  overflow: hidden;
}

.page-banner::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -40px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 70%);
  border-radius: 50%;
}

.page-banner .container {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 14px;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.page-banner h1 {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 10px;
}

.page-banner p {
  font-size: 15px;
  opacity: 0.9;
  max-width: 680px;
}

/* ============ 子分类标签 ============ */
.sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.sub-tab {
  padding: 7px 18px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--border-strong);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.sub-tab:hover {
  color: var(--primary);
  border-color: var(--primary-light);
}

.sub-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
}

/* ============ 网址卡片网格 ============ */
.site-section {
  padding: 40px 0 56px;
}

.subsection-title {
  font-size: 20px;
  font-weight: 700;
  margin: 30px 0 18px;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
  color: var(--text);
}

.subsection-title:first-child {
  margin-top: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.site-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.site-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-100);
}

.site-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.site-favicon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.site-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.site-card .site-desc {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 14px;
  flex: 1;
}

.site-url {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  word-break: break-all;
}

.site-url:hover {
  text-decoration: underline;
}

/* 搜索无结果提示 */
.no-result {
  display: none;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 15px;
}

.no-result.show {
  display: block;
}

/* ============ 友情链接 / 简介 ============ */
.intro-block {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.intro-block h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.intro-block p {
  color: var(--text-light);
  font-size: 15px;
  margin-bottom: 10px;
}

.friend-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.friend-links a {
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--primary-50);
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.friend-links a:hover {
  background: var(--primary);
  color: #fff;
}

/* ============ 底部 ============ */
.site-footer {
  background: #18181b;
  color: #a1a1aa;
  padding: 44px 0 24px;
  margin-top: 20px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid #27272a;
}

.footer-brand .logo {
  color: #fff;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.7;
  color: #71717a;
}

.footer-col h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
}

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

.footer-col a {
  font-size: 13px;
  color: #a1a1aa;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: #71717a;
}

.footer-bottom a {
  color: #a1a1aa;
}

.footer-bottom a:hover {
  color: var(--primary-light);
}

.footer-bottom .sep {
  margin: 0 8px;
  color: #3f3f46;
}

/* ============ 返回顶部 ============ */
.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 20px;
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 90;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
}

.back-top:hover {
  transform: translateY(-3px);
}

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    padding: 12px;
    gap: 4px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    z-index: 99;
  }
  .main-nav.open {
    transform: translateY(0);
  }
  .main-nav a {
    padding: 12px 16px;
  }
  .nav-toggle {
    display: flex;
  }
  .hero {
    padding: 50px 0 70px;
  }
  .hero h1 {
    font-size: 32px;
    letter-spacing: 1px;
  }
  .hero p {
    font-size: 15px;
  }
  .search-box input {
    height: 50px;
    font-size: 15px;
  }
  .page-banner h1 {
    font-size: 26px;
  }
  .section {
    padding: 40px 0;
  }
  .section-head h2 {
    font-size: 23px;
  }
}

@media (max-width: 520px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .logo-text small {
    display: none;
  }
  .hero h1 {
    font-size: 27px;
  }
  .ai-recommend-banner {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }
  .ai-recommend-cta {
    width: 100%;
    text-align: center;
  }
}
