/* Modern Japanese Female Idol News Portal - Main Stylesheet */

:root {
  --primary-color: #ff2a6d;       /* Idol Vivid Sakura Pink */
  --secondary-color: #05d5e7;     /* Idol Cyan / Neon Accent */
  --dark-bg: #11151c;             /* Header & Dark Elements */
  --body-bg: #f5f7fa;             /* Crisp Light Background */
  --card-bg: #ffffff;             /* Clean White Card Background */
  --text-main: #22252a;           /* Dark Primary Text */
  --text-muted: #6c757d;          /* Subdued Secondary Text */
  --border-color: #e9ecef;        /* Soft Border */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 1240px;
  --header-height: 70px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 18px rgba(0,0,0,0.08);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--body-bg);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--dark-bg);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-logo span {
  color: var(--primary-color);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-desktop ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

.nav-desktop a {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e0e0e0;
  transition: var(--transition);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.nav-desktop a:hover,
.nav-desktop .nav-current a {
  color: #ffffff;
  background-color: rgba(255, 42, 109, 0.2);
}

/* Search & Mobile Toggle */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
}

.hamburger-btn {
  display: none;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background-color: var(--dark-bg);
  z-index: 999;
  padding: 30px 20px;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  transform: translateY(-100%);
  opacity: 0;
  transition: var(--transition);
}

.mobile-nav-drawer.active {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav-drawer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav-drawer a {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  display: block;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background-color: rgba(255,255,255,0.05);
}

/* Primary Tag Badges */
.tag-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--primary-color), #ff6584);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(255, 42, 109, 0.3);
}

.tag-badge-secondary {
  background: var(--dark-bg);
  color: var(--secondary-color);
  border: 1px solid rgba(5, 213, 231, 0.3);
}

/* Hero Featured Section */
.hero-section {
  padding: 30px 0 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.hero-main-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 420px;
  box-shadow: var(--shadow-md);
}

.hero-main-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.hero-main-card:hover img {
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 24px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.3;
  color: #ffffff;
}

.hero-sub-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-sub-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 200px;
  box-shadow: var(--shadow-sm);
}

.hero-sub-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.hero-sub-card:hover img {
  transform: scale(1.04);
}

.hero-sub-card .hero-title {
  font-size: 1.1rem;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 35px 0 20px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 12px;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 22px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* Post Cards Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.post-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.post-card-media {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.post-card:hover .post-card-media img {
  transform: scale(1.05);
}

.post-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.post-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.post-card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* Post Detail Page (post.hbs) */
.article-header {
  padding: 40px 0 20px;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.article-category {
  margin-bottom: 16px;
}

.article-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.article-featured-image {
  margin: 30px auto 40px;
  max-width: 960px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.article-content {
  max-width: 780px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #2b2d30;
}

.article-content p {
  margin-bottom: 24px;
}

.article-content h2, 
.article-content h3 {
  font-weight: 800;
  margin: 36px 0 16px;
  color: var(--text-main);
}

.article-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding: 16px 20px;
  background-color: rgba(255, 42, 109, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
  font-style: italic;
}

/* Embed Containers (Twitter / YouTube) */
.iframe-container,
.kg-embed-card {
  position: relative;
  width: 100%;
  margin: 24px 0;
  display: flex;
  justify-content: center;
}

.kg-embed-card iframe {
  max-width: 100%;
  border-radius: var(--radius-sm);
}

/* Required Koenig Editor Image Classes */
.kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin: 32px calc(50% - 42.5vw);
}

.kg-width-full {
  position: relative;
  width: 100vw;
  margin: 32px calc(50% - 50vw);
}

.kg-width-full img,
.kg-width-wide img {
  width: 100%;
}

/* Author Bio Section */
.author-bio-card {
  max-width: 780px;
  margin: 50px auto 0;
  background: var(--card-bg);
  padding: 24px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}

.author-bio-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
}

.author-bio-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.author-bio-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Tag Archive Header (tag.hbs) */
.tag-header {
  position: relative;
  background-color: var(--dark-bg);
  color: #ffffff;
  padding: 60px 0;
  text-align: center;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin-bottom: 40px;
  overflow: hidden;
}

.tag-header-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  filter: blur(4px);
}

.tag-header-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

.tag-header-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.tag-header-description {
  font-size: 1rem;
  opacity: 0.85;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 40px 0 60px;
}

.page-number {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-pagination {
  padding: 10px 20px;
  border-radius: 20px;
  background-color: var(--card-bg);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.btn-pagination:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

/* Footer */
.site-footer {
  background-color: var(--dark-bg);
  color: #a0a5ad;
  padding: 50px 0 30px;
  margin-top: 60px;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-brand h3 {
  color: #ffffff;
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.footer-copyright {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-main-card {
    height: 340px;
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .hamburger-btn {
    display: block;
  }
  .posts-grid {
    grid-template-columns: 1fr;
  }
  .article-title {
    font-size: 1.6rem;
  }
  .hero-main-card {
    height: 280px;
  }
  .hero-title {
    font-size: 1.3rem;
  }
}
