/* Home Page Styles */

/* Enable scrolling for home page */
body:has(.home-page) #main-container {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  overflow: auto;
}

.home-page {
  min-height: 100vh;
  background: var(--lm-page-bg-color);
}

.home-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero */
.home-hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Hero decorative waves */
.hero-decor {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  color: #00A3FF;
  opacity: 0.15;
  pointer-events: none;
}

.hero-decor-left {
  left: 24px;
}

.hero-decor-right {
  right: 24px;
}

.hero-decor svg {
  width: 100%;
  height: auto;
}

body[data-theme="dark"] .hero-decor {
  opacity: 0.12;
}

@media (min-width: 1400px) {
  .hero-decor {
    width: 280px;
  }
}

@media (min-width: 1700px) {
  .hero-decor {
    width: 360px;
  }
}

.home-hero-icon {
  width: 110px;
  height: 68px;
  margin-bottom: 24px;
}

.hero-sun {
  animation: sunPulse 4s ease-in-out infinite;
  transform-origin: 76px 8px;
}

@keyframes sunPulse {
  0%, 100% {
    opacity: 0.9;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.home-hero-icon path:not(.hero-wave) {
  animation: boatFloat 3s ease-in-out infinite;
  transform-origin: center;
}

@keyframes boatFloat {
  0%, 100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-2px) rotate(1deg);
  }
}

.hero-wave-1 {
  animation: heroWave1 2s ease-in-out infinite;
}

.hero-wave-2 {
  animation: heroWave2 2.5s ease-in-out infinite;
}

@keyframes heroWave1 {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(3px);
  }
}

@keyframes heroWave2 {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-3px);
  }
}

.home-hero-title {
  font-size: 3.6rem;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.home-hero-subtitle {
  font-size: 1.6rem;
  color: var(--lm-text-muted-color);
  margin: 0 0 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Tabs */
.home-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--lm-border-color);
  padding-bottom: 12px;
}

.home-tab {
  background: none;
  border: none;
  padding: 8px 16px;
  font-size: 1.4rem;
  color: var(--lm-text-muted-color);
  cursor: pointer;
  border-radius: 20px;
  transition: all 0.2s ease;
}

.home-tab:hover {
  color: var(--lm-text-color);
  background: rgba(0, 0, 0, 0.05);
}

.home-tab.active {
  color: var(--lm-text-color);
  background: rgba(0, 0, 0, 0.08);
  font-weight: 500;
}

/* Feed Section */
.home-feed-section {
  padding: 40px 0;
}

.home-feed-content {
  min-height: 300px;
}

/* Feed Items */
a.home-feed-item,
a.home-feed-item:link,
a.home-feed-item:visited,
a.home-feed-item:hover,
a.home-feed-item:active {
  display: block;
  padding: 20px 0;
  border-bottom: 1px solid var(--lm-border-color);
  text-decoration: none;
  transition: background 0.2s ease;
  color: var(--lm-text-color);
}

a.home-feed-item:hover {
  background: rgba(0, 0, 0, 0.02);
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
}

.home-feed-item:last-child {
  border-bottom: none;
}

.home-feed-item-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.home-feed-item-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.home-feed-item-author-name {
  font-size: 1.3rem;
  color: var(--lm-text-muted-color);
}

.home-feed-item-date {
  font-size: 1.2rem;
  color: var(--lm-text-muted-color);
}

.home-feed-item-date::before {
  content: "•";
  margin-left: 2px;
  margin-right: 10px;
}

.home-feed-item-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--lm-text-color);
  margin: 0 0 6px;
}

.home-feed-item-excerpt {
  font-size: 1.4rem;
  color: var(--lm-text-muted-color);
  margin: 0;
  line-height: 1.5;
}

.home-feed-item-thumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 1.2rem;
  color: var(--lm-text-muted-color);
}

.home-feed-item-thumbs i {
  font-size: 1.3rem;
}

/* Pagination */
.home-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 24px 0;
}

.home-page-num,
.home-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--lm-text-muted-color);
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.home-page-num:hover,
.home-page-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--lm-text-color);
}

.home-page-num.active {
  background: var(--primary-color);
  color: #fff;
  cursor: default;
}

.home-page-btn {
  font-size: 1.6rem;
}

.home-page-btn i {
  font-size: 1.8rem;
}

/* Blog Items */
a.home-blog-item,
a.home-blog-item:link,
a.home-blog-item:visited,
a.home-blog-item:hover,
a.home-blog-item:active {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--lm-border-color);
  text-decoration: none;
  transition: background 0.2s ease;
  color: var(--lm-text-color);
}

a.home-blog-item:hover {
  background: rgba(0, 0, 0, 0.02);
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
}

.home-blog-item:last-child {
  border-bottom: none;
}

.home-blog-item-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.home-blog-item-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--lm-border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-blog-item-avatar-placeholder i {
  font-size: 24px;
  color: var(--lm-text-muted-color);
}

.home-blog-item-info {
  flex: 1;
  min-width: 0;
}

.home-blog-item-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--lm-text-color);
  margin: 0 0 4px;
}

.home-blog-item-tagline {
  font-size: 1.3rem;
  color: var(--lm-text-muted-color);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-blog-item-followers {
  font-size: 1.2rem;
  color: var(--lm-text-muted-color);
  flex-shrink: 0;
}

/* Featured Section */
.home-featured-section {
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}

.home-featured-label {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: #FFB136;
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.home-container:has(.home-featured-label) {
  text-align: center;
}

/* Featured section decorations */
.featured-decor {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  pointer-events: none;
  color: #000;
  opacity: 0.12;
}

.featured-decor-left {
  left: 20px;
}

.featured-decor-right {
  right: 20px;
}

.featured-decor svg {
  position: absolute;
  width: 40px;
  height: auto;
}

/* Featured left side positioning */
.featured-decor-compass {
  top: 15%;
  left: 10px;
}

.featured-decor-shell {
  top: 45%;
  left: 40px;
}

.featured-decor-telescope {
  bottom: 15%;
  left: 5px;
  width: 50px;
}

/* Featured right side positioning */
.featured-decor-wheel {
  top: 12%;
  right: 15px;
}

.featured-decor-starfish {
  top: 48%;
  right: 35px;
}

.featured-decor-preserver {
  bottom: 12%;
  right: 10px;
}

.home-section-title {
  font-size: 2.4rem;
  font-weight: 600;
  margin: 0 0 12px;
  text-align: center;
}

.home-section-subtitle {
  font-size: 1.4rem;
  text-align: center;
  margin: 0 0 24px;
}

.home-featured-post {
  text-align: center;
}

.home-featured-post-title {
  font-size: 2.6rem;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.home-featured-post-title a {
  color: var(--lm-text-color);
  text-decoration: none;
}

.home-featured-post-title a:hover {
  text-decoration: underline;
}

.home-featured-post-meta {
  font-size: 1.3rem;
  color: var(--lm-text-muted-color);
  margin-bottom: 20px;
}

.home-featured-post-meta a {
  color: inherit;
  text-decoration: none;
}

.home-featured-post-meta a:hover {
  color: inherit;
  text-decoration: underline;
}

body[data-theme="dark"] .home-featured-post-meta {
  color: var(--dm-text-muted-color);
}

.home-featured-author {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.home-featured-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.home-featured-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--lm-border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-featured-avatar-placeholder i {
  font-size: 24px;
  color: var(--lm-text-muted-color);
}

.home-featured-author-info {
  text-align: left;
}

.home-featured-author-name {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--lm-text-color);
}

.home-featured-author-meta {
  display: block;
  font-size: 1.3rem;
  color: var(--lm-text-muted-color);
}

.home-featured-divider {
  width: 50px;
  height: 2px;
  background: var(--lm-border-color);
  margin: 0 auto 24px;
}

body[data-theme="dark"] .home-featured-divider {
  background: var(--dm-border-color);
}

.home-featured-post-excerpt {
  font-size: 1.5rem;
  color: var(--lm-text-muted-color);
  margin: 0 0 24px;
  line-height: 1.7;
}

.home-featured-post .home-read-more {
  margin-top: 0;
}

/* Seb Section */
.home-seb-section {
  position: relative;
  padding: 60px 0;
  overflow: hidden;
}

/* Seb section wave decorations */
.seb-decor {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  color: #00A3FF;
  opacity: 0.15;
  pointer-events: none;
}

.seb-decor-left {
  left: 34px;
}

.seb-decor-right {
  right: 34px;
}

.seb-decor svg {
  width: 100%;
  height: auto;
}

.home-seb-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
}

.home-seb-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.home-seb-header-text {
  text-align: left;
}

.home-seb-header-text .home-section-title {
  text-align: left;
  margin-bottom: 2px;
}

.home-seb-header-text .home-section-subtitle {
  text-align: left;
  margin-bottom: 0;
}

.home-seb-post {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-seb-post-card {
  background: var(--lm-page-bg-color);
  border: 1px solid var(--lm-border-color);
  border-radius: 12px;
  padding: 24px;
}

.home-seb-post-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0 0 12px;
}

.home-seb-post-title a {
  color: var(--lm-text-color);
  text-decoration: none;
}

.home-seb-post-title a:hover {
  text-decoration: underline;
}

.home-seb-post-excerpt {
  font-size: 1.5rem;
  color: var(--lm-text-muted-color);
  margin: 0 0 12px;
  line-height: 1.6;
}

.home-seb-post-meta {
  font-size: 1.3rem;
  color: var(--lm-text-muted-color);
  margin-bottom: 16px;
}

/* Dark Mode */
body[data-theme="dark"] .home-page {
  background: var(--dm-page-bg-color);
}

body[data-theme="dark"] .home-hero-subtitle {
  color: var(--dm-text-muted-color);
}

body[data-theme="dark"] .home-tabs {
  border-bottom-color: var(--dm-border-color);
}

body[data-theme="dark"] .home-tab {
  color: var(--dm-text-muted-color);
}

body[data-theme="dark"] .home-tab:hover {
  color: var(--dm-text-color);
  background: rgba(255, 255, 255, 0.05);
}

body[data-theme="dark"] .home-tab.active {
  color: var(--dm-text-color);
  background: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] a.home-feed-item,
body[data-theme="dark"] a.home-feed-item:link,
body[data-theme="dark"] a.home-feed-item:visited,
body[data-theme="dark"] a.home-feed-item:hover,
body[data-theme="dark"] a.home-feed-item:active {
  border-bottom-color: var(--dm-border-color);
  color: var(--dm-text-color);
}

body[data-theme="dark"] a.home-feed-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

body[data-theme="dark"] .home-feed-item-author-name,
body[data-theme="dark"] .home-feed-item-date,
body[data-theme="dark"] .home-feed-item-excerpt,
body[data-theme="dark"] .home-feed-item-thumbs {
  color: var(--dm-text-muted-color);
}

body[data-theme="dark"] .home-feed-item-title {
  color: var(--dm-text-color);
}

body[data-theme="dark"] a.home-blog-item,
body[data-theme="dark"] a.home-blog-item:link,
body[data-theme="dark"] a.home-blog-item:visited,
body[data-theme="dark"] a.home-blog-item:hover,
body[data-theme="dark"] a.home-blog-item:active {
  border-bottom-color: var(--dm-border-color);
  color: var(--dm-text-color);
}

body[data-theme="dark"] a.home-blog-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

body[data-theme="dark"] .home-blog-item-avatar-placeholder {
  background: var(--dm-border-color);
}

body[data-theme="dark"] .home-blog-item-avatar-placeholder i {
  color: var(--dm-text-muted-color);
}

body[data-theme="dark"] .home-blog-item-title {
  color: var(--dm-text-color);
}

body[data-theme="dark"] .home-blog-item-tagline,
body[data-theme="dark"] .home-blog-item-followers {
  color: var(--dm-text-muted-color);
}

body[data-theme="dark"] .home-page-num,
body[data-theme="dark"] .home-page-btn {
  color: var(--dm-text-muted-color);
}

body[data-theme="dark"] .home-page-num:hover,
body[data-theme="dark"] .home-page-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--dm-text-color);
}

body[data-theme="dark"] .home-page-num.active {
  background: var(--dm-primary-color);
  color: #fff;
}

body[data-theme="dark"] .featured-decor {
  color: #fff;
}

body[data-theme="dark"] .seb-decor {
  opacity: 0.12;
}

body[data-theme="dark"] .home-seb-post-card {
  background: var(--dm-page-bg-color);
  border-color: var(--dm-border-color);
}

body[data-theme="dark"] .home-featured-post-title a,
body[data-theme="dark"] .home-featured-author-name {
  color: var(--dm-text-color);
}

body[data-theme="dark"] .home-featured-post-excerpt,
body[data-theme="dark"] .home-featured-author-meta {
  color: var(--dm-text-muted-color);
}

body[data-theme="dark"] .home-featured-avatar-placeholder {
  background: var(--dm-border-color);
}

body[data-theme="dark"] .home-featured-avatar-placeholder i {
  color: var(--dm-text-muted-color);
}

body[data-theme="dark"] .home-featured-post-excerpt,
body[data-theme="dark"] .home-seb-post-excerpt,
body[data-theme="dark"] .home-seb-post-meta {
  color: var(--dm-text-muted-color);
}

body[data-theme="dark"] .home-seb-post-title a {
  color: var(--dm-text-color);
}

/* Mobile responsive */
@media (max-width: 600px) {
  .home-hero-title {
    font-size: 2.8rem;
  }

  .home-hero-subtitle {
    font-size: 1.4rem;
  }

  .home-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .featured-decor {
    display: none;
  }
}

@media (max-width: 1200px) {
  .hero-decor {
    width: 180px;
  }
}

@media (max-width: 960px) {
  .hero-decor,
  .featured-decor {
    display: none;
  }
}

@media (max-width: 1400px) {
  .seb-decor {
    display: none;
  }
}
