@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

html {
  overflow-y: scroll;
}

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

header-container, footer-container {
  display: block;
  width: 100%;
}

:root {
  --primary-color: #0d91b3; /* Rich Royal Blue */
  --secondary-color: #0baad6; /* Slightly brighter blue */
  --accent-color: #e8f7fa; /* Very soft blue hint */
  --text-dark: #0b2931;
  --text-light: #ffffff;
  --bg-color: #ffffff;
  --shadow: 0 4px 20px rgba(13, 145, 179, 0.12);
  --header-height: 120px;
}

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

body {
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-color);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

/* Header */
header {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.logo-section {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: auto;
  padding: 1.5rem 15%;
  border-bottom: 1px solid #f0f0f0;
}

.logo-flex-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3rem;
  width: 100%;
}

.logo-tagline {
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
}


.logo-main {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
}

.logo-main a {
  font-size: 5rem;
  font-weight: 700;
  color: var(--primary-color);
  display: block;
  white-space: nowrap;
  line-height: 1;
}

.header-message {
  padding: 0;
  background-color: transparent;
  max-width: 60%;
  margin-bottom: 0.5rem;
}

.header-message p {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-dark);
  margin: 0;
}

.main-nav {
  padding: 0;
  flex: 1;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 15%;
  gap: 2rem;
  min-height: 60px;
}

.main-nav > ul {
  display: flex;
  gap: 0;
}

.main-nav > ul > li {
  position: relative;
}

.main-nav > ul > li > a {
  display: block;
  padding: 1rem 1.5rem;
  font-weight: 500;
  color: var(--primary-color);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.header-message {
  flex-shrink: 1;
  padding: 0;
  background-color: transparent;
  min-width: 250px;
}

.header-message p {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-dark);
  margin: 0;
}

.main-nav a:hover {
  color: var(--secondary-color);
}

/* Dropdown Menu */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 200px;
  background-color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1001;
  border-top: 3px solid var(--secondary-color);
}

.main-nav > ul > li:hover > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown {
  display: block;
}

.dropdown li {
  display: block;
  width: 100%;
}

.dropdown a {
  display: block;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
  color: var(--primary-color);
  transition: all 0.2s ease;
}

.dropdown a:hover {
  background-color: #f9f9f9;
  padding-left: 1.8rem;
  color: var(--secondary-color);
}

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

/* Nested Dropdown */
.dropdown .dropdown {
  position: absolute;
  top: 0;
  left: 100%;
  width: 200px;
  margin-left: 0;
  border-top: none;
  border-left: 3px solid var(--secondary-color);
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: all 0.3s ease;
}

.dropdown > li {
  position: relative;
}

/* Only show nested dropdown when parent li is directly hovered */
.dropdown > li:hover > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Add indicator for nested dropdown items */
.dropdown > li > span {
  position: relative;
  cursor: pointer;
  display: block;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
  color: var(--primary-color);
  transition: all 0.2s ease;
}

.dropdown > li > span:hover {
  background-color: #f9f9f9;
  padding-left: 1.8rem;
  color: var(--secondary-color);
}

.dropdown > li > span::after {
  content: '▶';
  position: absolute;
  right: 1rem;
  font-size: 0.7rem;
  color: var(--secondary-color);
}

/* Hero Carousel */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #eee;
}

.carousel-slide {
  position: relative;
  width: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: none;
}

.carousel-slide.active {
  opacity: 1;
  display: block;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, rgba(0, 74, 153, 0.8), transparent);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding-left: 10%;
  max-width: 800px;
}

.hero-content h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* Greeting Section */
.top-greeting {
  background-color: #fff;
  padding: 4rem 0;
}

.greeting-inner {
  max-width: 1100px;
}

.greeting-flex {
  display: flex;
  gap: 4rem;
  align-items: center;
}

.greeting-image {
  flex: 1;
  min-width: 300px;
}

.greeting-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.greeting-content {
  flex: 1.5;
  text-align: left;
}

.greeting-lead {
  font-size: 1.5rem;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.greeting-body {
  font-size: 1rem;
  color: #444;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.greeting-link {
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .greeting-flex {
    flex-direction: column;
    gap: 2rem;
  }
  .greeting-image {
    min-width: 100%;
  }
  .greeting-content {
    text-align: center;
  }
  .greeting-lead {
    font-size: 1.2rem;
  }
}


/* Content Layout */
.container {
  display: flex;
  width: 100%;
  max-width: 100%;
  margin: 4rem 0;
  padding: 0 5vw;
  gap: 4vw;
  box-sizing: border-box;
}

/* Blog Content */
main {
  flex: 1;
  min-width: 0;
}

.blog-item {
  margin-bottom: 3rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 2rem;
}

.blog-thumb {
  height: 300px;
  background-color: #f0f0f0;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
}

.blog-thumb.has-image::after {
  content: none;
  display: none;
}

.blog-thumb::after {
  content: 'Blog Image Placeholder';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #999;
}

.blog-info {
  margin-bottom: 0.5rem;
}

.blog-category {
  color: var(--secondary-color);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.blog-date {
  color: #888;
  font-size: 0.8rem;
  margin-left: 1rem;
}

.blog-item h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.blog-item p {
  color: #555;
  margin-bottom: 1.5rem;
}

.read-more {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background-color: var(--primary-color);
  color: #fff;
  border-radius: 4px;
  font-weight: 500;
}

.read-more:hover {
  background-color: var(--secondary-color);
}

.blog-action-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.blog-item-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.blog-item-tag {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  background-color: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: all 0.2s ease;
}

.blog-item-tag:hover {
  background-color: var(--secondary-color);
  color: #fff;
  border-color: var(--secondary-color);
}

.blog-item-tag.active,
.blog-item-tags .blog-item-tag.active {
  background-color: var(--primary-color) !important;
  color: #fff !important;
  border-color: var(--primary-color) !important;
}

.blog-item-tag.active:hover,
.blog-item-tags .blog-item-tag.active:hover {
  background-color: var(--primary-color) !important;
  color: #fff !important;
  border-color: var(--primary-color) !important;
}

/* Sidebar */
aside {
  width: 20vw;
  flex-shrink: 0;
}

sidebar-container {
  display: block;
}

/* Section Title */
.section-title {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--primary-color);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--secondary-color);
}

.sidebar-widget {
  margin-bottom: 3rem;
}

.sidebar-widget h4 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--secondary-color);
  color: var(--primary-color);
}

.category-list li {
  margin-bottom: 0.8rem;
}

.category-list a {
  display: block;
  padding: 0.8rem 1rem;
  background-color: #f9f9f9;
  border-left: 3px solid transparent;
}

.category-list a:hover {
  background-color: #f0f0f0;
  border-left-color: var(--secondary-color);
  color: var(--primary-color);
}

.category-list a.active {
  background-color: #eef2ff;
  border-left-color: var(--primary-color, #0d91b3);
  color: var(--primary-color, #0d91b3);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 992px) {
  .container {
    flex-direction: column;
  }
  aside {
    width: 100%;
  }
  .hero-content h2 {
    font-size: 2rem;
  }
}

/* Page Banner */
.page-banner {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  position: relative;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-banner img {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Principal Profile */
.principal-profile {
  display: flex;
  gap: 3rem;
  padding: 2rem 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 3rem;
}

.principal-photo {
  flex: 1;
  min-width: 250px;
}

.principal-photo img {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.principal-info {
  flex: 2;
}

.principal-info h3 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.principal-info .degree {
  font-size: 1rem;
  color: #666;
  font-weight: 400;
}

.bio-list {
  padding: 0;
}

.bio-list li {
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  position: relative;
  padding-left: 1.5rem;
}

.bio-list li::before {
  content: '・';
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-weight: bold;
}

@media (max-width: 768px) {
  .page-banner {
    max-height: 300px;
  }
  .page-banner img {
    max-height: 300px;
    height: auto;
    width: auto;
  }
  .principal-profile {
    flex-direction: column;
    gap: 2rem;
  }
  .principal-photo {
    min-width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .logo-section {
    padding: 0.8rem 1rem !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
    border-bottom: 1px solid #f0f0f0 !important;
  }

  .logo-tagline {
    font-size: 0.8rem !important;
    padding: 0 !important;
    margin: 0 0 0.3rem 0 !important;
    white-space: normal !important;
    word-break: break-all !important;
    text-align: center !important;
    line-height: 1.4 !important;
    color: var(--primary-color) !important;
  }
  .logo-flex-container {
    display: flex;
    align-items: center;
    width: auto;
    justify-content: center;
    gap: 0.5rem;
  }

  .logo-main {
    margin: 0 !important;
    padding: 0 !important;
  }

  .logo-main a {
    font-size: 1.5rem !important;
    white-space: nowrap !important;
    margin: 0 !important;
  }

  .header-message {
    display: none !important;
  }

  .nav-container {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    display: block !important;
  }

  .main-nav {
    width: 100% !important;
    margin: 0 !important;
  }

  .main-nav > ul {
    display: grid !important;
    grid-template-columns: 33.33% 33.33% 33.33% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .main-nav > ul > li {
    width: 100% !important;
    border: 0.5px solid #eee !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
  }

  .main-nav > ul > li > a {
    padding: 0.8rem 2px !important;
    font-size: 0.75rem !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.2 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    color: var(--primary-color) !important;
  }


  .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 240px;
    background-color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-top: 3px solid var(--secondary-color);
    border-bottom: 1px solid #eee;
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    border-radius: 0 0 8px 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    display: block !important;
  }

  .main-nav > ul > li:hover > .dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
  }

  .dropdown .dropdown {
    position: static;
    width: 100%;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
    margin-left: 1rem;
  }

  .dropdown > li:hover > .dropdown {
    display: block;
  }

  .dropdown > li > span::after {
    content: '▼';
  }

  .hero-content h2 {
    font-size: 1.5rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .container {
    padding: 0 5%;
    margin: 2rem auto;
  }

  .section-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {

  .hero-content h2 {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 1.2rem;
  }
}

/* 関連コンテンツグリッド表示用スタイル */
.greeting-related-posts {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid #eee;
}

.subsection-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
  position: relative;
  padding-left: 1rem;
}

.subsection-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 4px;
  background-color: var(--secondary-color);
  border-radius: 2px;
}

.greeting-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* 関連コンテンツがない場合のプレースホルダー */
.no-related-posts-placeholder {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  color: #64748b;
  text-align: center;
  padding: 2rem;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.no-related-posts-placeholder:hover {
  border-color: var(--secondary-color, #0baad6);
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.no-related-posts-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.no-related-posts-icon {
  color: #94a3b8;
  opacity: 0.8;
  transition: transform 0.3s ease, color 0.3s ease;
}

.no-related-posts-placeholder:hover .no-related-posts-icon {
  transform: scale(1.1);
  color: var(--secondary-color, #0baad6);
}

.no-related-posts-text {
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
}


.greeting-posts-grid .blog-item {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.greeting-posts-grid .blog-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(13, 145, 179, 0.08);
}

.greeting-posts-grid .blog-thumb {
  height: 160px;
  margin-bottom: 1rem;
  border-radius: 0;
  background-color: #f5f5f5;
  background-size: cover;
  background-position: center;
}

.greeting-posts-grid .blog-thumb::after {
  content: '';
  display: none;
}

.greeting-posts-grid .blog-info {
  padding: 0 1.25rem;
  margin-bottom: 0.5rem;
}

.greeting-posts-grid .blog-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  padding: 0 1.25rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em;
}

.greeting-posts-grid .blog-item p {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 1.25rem;
  padding: 0 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 4.2em;
  line-height: 1.4;
}

.greeting-posts-grid .read-more {
  margin: auto 1.25rem 1.25rem 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

@media (max-width: 992px) {
  .greeting-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .greeting-posts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .greeting-related-posts {
    margin-top: 2.5rem;
    padding-top: 2rem;
  }
}

/* Greetings / Representative Message Detail Styling */
.greetings-detail {
  margin-top: 3rem;
}

.greetings-content-body {
  margin-bottom: 4rem;
}

.greetings-content-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: #334466;
}

.content-subtitle {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 4px solid var(--secondary-color);
}

.content-image-box {
  margin: 2.5rem 0;
  text-align: center;
  background-color: #fcfdfe;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #eef2ff;
  box-shadow: 0 4px 15px rgba(13, 145, 179, 0.04);
}

.content-image-box img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 0.8rem;
}

.content-image-box .image-caption {
  font-size: 0.9rem;
  color: #556688;
  font-weight: 500;
  margin-top: 0.5rem;
  line-height: 1.4;
}

.content-image-gallery {
  display: grid;
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.content-image-gallery.col-2 {
  grid-template-columns: repeat(2, 1fr);
}

.content-image-gallery.col-3 {
  grid-template-columns: repeat(3, 1fr);
}

.gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #fcfdfe;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid #eef2ff;
  box-shadow: 0 4px 15px rgba(13, 145, 179, 0.04);
}

.gallery-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 0.8rem;
}

.gallery-item .image-caption {
  font-size: 0.85rem;
  color: #556688;
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .content-image-gallery.col-2,
  .content-image-gallery.col-3 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.gpa-quote {
  margin: 2.5rem 0;
  padding: 1.5rem 2rem;
  background-color: var(--accent-color);
  border-left: 5px solid var(--primary-color);
  border-radius: 0 12px 12px 0;
  box-shadow: 0 4px 15px rgba(13, 145, 179, 0.02);
}

.gpa-quote .quote-title {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.gpa-quote .quote-text {
  font-size: 0.95rem;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.gpa-quote .quote-source {
  font-size: 0.8rem;
  color: #556688;
  text-align: right;
  margin: 0;
}

.publications-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem 0;
}

.pub-group {
  background: #fff;
  border: 1px solid #eef2ff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.pub-group h4 {
  font-size: 1.15rem;
  color: var(--primary-color);
  margin-bottom: 1.2rem;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.5rem;
}

.pub-group ul {
  padding-left: 0;
}

.pub-group li {
  position: relative;
  margin-bottom: 1.2rem;
  line-height: 1.6;
  padding-left: 1.2rem;
  font-size: 0.95rem;
  list-style: none;
}

.pub-group li::before {
  content: '■';
  position: absolute;
  left: 0;
  top: 0.1rem;
  color: var(--secondary-color);
  font-size: 0.8rem;
}

.pub-group li:last-child {
  margin-bottom: 0;
}

.pub-group .pub-title {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 1.05rem;
}

.pub-group .pub-journal {
  color: #334466;
  font-size: 0.9rem;
  display: inline-block;
  margin-top: 0.3rem;
}

.pub-group .pub-authors {
  color: #667799;
  font-size: 0.85rem;
  display: block;
  margin-top: 0.2rem;
}

.activity-timeline {
  position: relative;
  padding-left: 2rem;
  margin: 2.5rem 0;
  list-style: none;
}

.activity-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background-color: var(--accent-color);
}

.activity-timeline li {
  position: relative;
  margin-bottom: 1.8rem;
}

.activity-timeline li::before {
  content: '';
  position: absolute;
  left: -29px;
  top: 0.4rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px var(--accent-color);
  z-index: 1;
  transition: all 0.3s ease;
}

.activity-timeline li:hover::before {
  background-color: var(--primary-color);
  transform: scale(1.2);
}

.activity-timeline li:last-child {
  margin-bottom: 0;
}

.activity-year {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary-color);
  display: block;
  margin-bottom: 0.3rem;
}

.activity-text {
  font-size: 0.95rem;
  color: var(--text-dark);
  line-height: 1.5;
}

.activity-text strong {
  color: var(--primary-color);
}

.text-red {
  color: #d32f2f;
}

.font-bold {
  font-weight: 700;
}

/* YouTube Sidebar Widget */
.youtube-widget-content {
  background: #fff;
  border: 1px solid #fee2e2;
  border-radius: 8px;
  padding: 1.2rem;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.05);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.youtube-widget-content:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.1);
}

.youtube-widget-desc {
  font-size: 0.85rem;
  color: #556688;
  line-height: 1.5;
  margin-bottom: 1rem;
  text-align: left;
}

.youtube-subscribe-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #ef4444; /* YouTube Red */
  color: #ffffff !important;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.25);
  transition: all 0.2s ease;
  width: 100%;
}

.youtube-subscribe-button:hover {
  background-color: #dc2626; /* Darker Red */
  box-shadow: 0 6px 14px rgba(239, 68, 68, 0.35);
  transform: translateY(-1px);
}

.youtube-logo-svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* LINE Subscribe Button */
.line-subscribe-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #06c755; /* LINE Green */
  color: #ffffff !important;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(6, 199, 85, 0.25);
  transition: all 0.2s ease;
  width: 100%;
  margin-top: 0.75rem; /* Space below YouTube button */
  box-sizing: border-box;
}

.line-subscribe-button:hover {
  background-color: #05b04b; /* Darker Green */
  box-shadow: 0 6px 14px rgba(6, 199, 85, 0.35);
  transform: translateY(-1px);
}

.line-logo-svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Instagram Subscribe Button */
.instagram-subscribe-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #ffffff !important;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(220, 39, 67, 0.25);
  transition: all 0.2s ease;
  width: 100%;
  margin-top: 0.75rem; /* Space below LINE button */
  box-sizing: border-box;
}

.instagram-subscribe-button:hover {
  opacity: 0.9;
  box-shadow: 0 6px 14px rgba(220, 39, 67, 0.35);
  transform: translateY(-1px);
}

.instagram-logo-svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Popular Posts Widget */
.popular-posts-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.popular-post-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 0.6rem;
  border-radius: 8px;
  background-color: #ffffff;
  border: 1px solid #eef2ff;
  transition: all 0.2s ease-in-out;
  box-sizing: border-box;
}

.popular-post-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 145, 179, 0.05);
  border-color: #dbe4ff;
}

.popular-post-thumb {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-color: #f8fafc;
  flex-shrink: 0;
  border: 1px solid #f1f5f9;
}

.popular-post-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.popular-post-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-dark);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popular-post-date {
  font-size: 0.75rem;
  color: #718096;
}

.popular-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  color: #718096;
  gap: 0.75rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px dashed #e2e8f0;
}

.popular-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(13, 145, 179, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color, #0d91b3);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Homepage Blog Container Custom Sizing */
.blog-section-title {
  width: 56%;
  margin-left: auto;
  margin-right: auto;
}

#blog-posts-container {
  width: 56%;
  margin-left: auto;
  margin-right: auto;
}

#blog-posts-container .blog-thumb {
  width: 100%;
  height: 360px;
}

#blog-posts-container .blog-item h3 {
  font-size: 1.4rem;
}

#blog-posts-container .blog-item p {
  font-size: 0.95rem;
}

/* Blog Pagination Styling */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 3rem;
  margin-bottom: 2rem;
  width: 56%;
  margin-left: auto;
  margin-right: auto;
}

.pagination-btn {
  padding: 0.6rem 1.4rem;
  background-color: var(--primary-color, #0d91b3);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #002299;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(13, 145, 179, 0.15);
}

.pagination-btn:active:not(:disabled) {
  transform: translateY(0);
}

.pagination-btn:disabled {
  background-color: #e2e8f0;
  color: #a0aec0;
  cursor: not-allowed;
}

@media (max-width: 992px) {
  .blog-section-title {
    width: 100%;
  }
  #blog-posts-container {
    width: 100%;
  }
  #blog-posts-container .blog-thumb {
    height: 240px;
  }
  #blog-posts-container .blog-item h3 {
    font-size: 1.6rem;
  }
  #blog-posts-container .blog-item p {
    font-size: 1rem;
  }
  .blog-pagination {
    width: 100%;
  }
}

/* Sidebar Search Widget Styles */
.search-form {
  width: 100%;
  margin-top: 0.5rem;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background-color: #fff;
  overflow: hidden;
  transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
  border-color: var(--primary-color, #0d91b3);
  box-shadow: 0 0 0 3px rgba(13, 145, 179, 0.15);
}

#blog-search-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: none;
  font-size: 0.95rem;
  outline: none;
  color: var(--text-dark, #333);
  box-sizing: border-box;
}

.search-input-wrapper button {
  background: none;
  border: none;
  padding: 0.8rem 1rem;
  color: #718096;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.search-input-wrapper button:hover {
  color: var(--primary-color, #0d91b3);
}

.search-icon-svg {
  display: block;
}

/* Blog Detail Styling */
.blog-post-detail {
  background: #fff;
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.blog-post-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1.5rem;
}

.blog-post-header .blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #666;
}

.blog-post-header .blog-category {
  background: var(--primary-color);
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.8rem;
}

.blog-post-header .blog-date {
  font-weight: 500;
}

.blog-post-header .blog-author {
  font-weight: 500;
}

.blog-post-header .reading-time {
  font-size: 0.85rem;
  color: #888;
  margin-top: 0.5rem;
}

.blog-title {
  font-size: 2.2rem;
  color: var(--primary-color);
  line-height: 1.3;
  margin: 0.5rem 0;
  font-weight: 700;
}

.blog-cover-image {
  width: 100%;
  height: 400px;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.blog-content {
  line-height: 1.8;
  color: var(--text-dark);
  font-size: 1.05rem;
}

.blog-content p {
  margin-bottom: 1.5rem;
}

.blog-content h2 {
  font-size: 1.6rem;
  color: var(--primary-color);
  margin: 2.5rem 0 1rem 0;
  border-left: 4px solid var(--secondary-color);
  padding-left: 0.8rem;
  font-weight: 700;
}

.blog-content h3 {
  font-size: 1.3rem;
  color: var(--text-dark);
  margin: 2rem 0 1rem 0;
  font-weight: 700;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1.5rem 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.blog-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.back-to-blog {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.back-to-blog:hover {
  transform: translateX(-4px);
}

@media (max-width: 768px) {
  .blog-post-detail {
    padding: 1.5rem;
  }
  
  .blog-title {
    font-size: 1.6rem;
  }
  
  .blog-cover-image {
    height: 250px;
    margin-bottom: 1.5rem;
  }
}

