/* LUYUAN Blank Theme frontend reset */
:root {
  --ly-theme-text: #161616;
  --ly-theme-muted: #666;
  --ly-theme-border: #e8e8e8;
  --ly-theme-bg: #ffffff;
  --ly-theme-container: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  margin: 0 !important;
  padding: 0;
  scroll-behavior: smooth;
}

body.luyuan-blank-theme {
  margin: 0 !important;
  padding: 0 !important;
  background: var(--ly-theme-bg);
  color: var(--ly-theme-text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

body.luyuan-blank-theme.admin-bar { margin-top: 0 !important; }

a { color: inherit; }
img, video, iframe { max-width: 100%; }
img { height: auto; }

.ly-theme-page,
.ly-theme-main,
.ly-theme-article,
.ly-theme-entry-content {
  margin: 0;
  padding: 0;
  width: 100%;
}

.ly-theme-entry-content > *:first-child,
.ly-theme-front-main > *:first-child,
.ly-theme-page-main > *:first-child {
  margin-top: 0 !important;
}

.ly-theme-entry-content > *:last-child { margin-bottom: 0; }

/* Keep common builders and plugin output flush with the top of the content area. */
.elementor,
.elementor-section,
.elementor-top-section,
.wp-site-blocks,
.entry-content,
.site-content,
.content-area {
  margin-top: 0;
}

.elementor-section:first-of-type,
.elementor-top-section:first-of-type,
.ly-theme-entry-content > .elementor:first-child,
.ly-theme-entry-content > .wp-block-group:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.ly-theme-contained {
  width: min(var(--ly-theme-container), calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.ly-theme-entry-header,
.ly-theme-archive-header,
.ly-theme-empty {
  padding: 70px 0 30px;
}

.ly-theme-entry-title,
.ly-theme-archive-title,
.ly-theme-empty h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.ly-theme-archive-description,
.ly-theme-empty p {
  color: var(--ly-theme-muted);
  font-size: 16px;
}

.ly-theme-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding: 30px 0 80px;
}

.ly-theme-card {
  border: 1px solid var(--ly-theme-border);
  border-radius: 18px;
  padding: 20px;
  background: #fff;
}

.ly-theme-card h2 {
  margin: 14px 0 10px;
  font-size: 22px;
  line-height: 1.25;
}

.ly-theme-card h2 a { text-decoration: none; }
.ly-theme-card-excerpt { color: var(--ly-theme-muted); font-size: 15px; }
.ly-theme-card-image img { width: 100%; border-radius: 14px; display: block; }

.navigation.pagination { padding: 20px 0 70px; }
.nav-links { display: flex; gap: 10px; flex-wrap: wrap; }
.nav-links a,
.nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--ly-theme-border);
  border-radius: 999px;
  text-decoration: none;
}
.nav-links .current { background: #161616; color: #fff; border-color: #161616; }

@media (max-width: 900px) {
  .ly-theme-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .ly-theme-contained { width: min(100% - 28px, var(--ly-theme-container)); }
  .ly-theme-post-grid { grid-template-columns: 1fr; }
  .ly-theme-entry-header,
  .ly-theme-archive-header,
  .ly-theme-empty { padding: 46px 0 24px; }
}
