/* ================================
   CSS Variables
================================ */
:root {
  --primary: #4a90d9;
  --primary-dark: #2c5282;
  --primary-light: #ebf4ff;
  --accent: #3182ce;
  --bg-main: #f8fafc;
  --bg-white: #ffffff;
  --text-main: #2d3748;
  --text-light: #718096;
  --text-white: #ffffff;
  --border: #e2e8f0;
  --shadow: rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --transition: 0.3s ease;
  --font-family: "Noto Sans JP", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family, "Noto Sans JP", sans-serif);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-main);
  background-color: var(--bg-main);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul {
  list-style: none;
}

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

/* ================================
   Container
================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ================================
   Header
================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-white);
  box-shadow: 0 2px 10px var(--shadow);
  z-index: 1000;
  transition: background var(--transition);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-list {
  display: flex;
  gap: 30px;
}

.nav-list a {
  font-weight: 500;
  position: relative;
}

.nav-list a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.nav-list a:hover::after {
  width: 100%;
}

.nav-list a:hover {
  color: var(--primary);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text-main);
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ================================
   Hero Section
================================ */
.hero {
  min-height: 350px;
  background: linear-gradient(135deg,
      var(--primary) 0%,
      var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px 40px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="3" fill="rgba(255,255,255,0.08)"/><circle cx="40" cy="70" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="80" r="2" fill="rgba(255,255,255,0.06)"/></svg>');
  background-size: 200px;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-white);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 10px;
  line-height: 1.3;
  animation: fadeInUp 0.8s ease;
}

.hero-text {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  margin-bottom: 15px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-btn {
  display: inline-block;
  background: var(--bg-white);
  color: var(--primary);
  padding: 10px 30px;
  border-radius: 50px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition:
    transform var(--transition),
    box-shadow var(--transition);
  animation: fadeInUp 0.8s ease 0.4s both;
  margin-top: 10px;
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================
   Section Title
================================ */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--primary);
  margin: 8px auto 0;
  border-radius: 3px;
}

/* ================================
   Articles Section
================================ */
.articles {
  padding: 30px 0;
  background: var(--bg-white);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.article-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-image {
  height: 90px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #dbeafe 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 10px;
}

.card-category {
  display: inline-block;
  background: var(--primary);
  color: var(--text-white);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.card-content {
  padding: 10px 12px;
}

.card-date {
  font-size: 0.75rem;
  color: var(--text-light);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 4px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-excerpt {
  font-size: 0.85rem;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 50px;
}

.pagination-btn {
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.pagination-btn:disabled {
  background: var(--border);
  cursor: not-allowed;
  opacity: 0.6;
}

.pagination-info {
  font-size: 0.95rem;
  color: var(--text-light);
  min-width: 60px;
  text-align: center;
}

/* ================================
   Categories Section
================================ */
.categories {
  padding: 30px 0;
}

.category-grid {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.category-card {
  text-align: center;
  padding: 15px 20px;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px var(--shadow);
  transition: transform var(--transition);
  min-width: 140px;
}

.category-card:hover {
  transform: translateY(-3px);
}

.category-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.category-card h3 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.category-card p {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ================================
   Profile Section
================================ */
.profile {
  background: var(--bg-white);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 800px;
  margin: 0 auto;
  padding: 5px;
  background: var(--primary-light);
  border-radius: var(--radius);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg,
      var(--primary) 0%,
      var(--primary-dark) 100%);
  flex-shrink: 0;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--primary-dark);
}

.profile-admin-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.profile-info p {
  color: var(--text-main);
  margin-bottom: 8px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.profile-assistant {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.profile-assistant-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg,
      var(--primary) 0%,
      var(--primary-dark) 100%);
  flex-shrink: 0;
  overflow: hidden;
}

.profile-assistant-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-assistant-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-sub);
}

.profile-sns {
  display: flex;
  gap: 15px;
}

.sns-link {
  display: inline-block;
  background: var(--primary);
  color: var(--text-white);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background var(--transition);
}

.sns-link:hover {
  background: var(--primary-dark);
}

/* ================================
   Pagination
================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--primary);
  color: var(--text-white);
  border: none;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition:
    background var(--transition),
    transform var(--transition);
}

.pagination-btn:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.pagination-btn:disabled {
  background: var(--border);
  color: var(--text-light);
  cursor: not-allowed;
}

.pagination-info {
  font-size: 0.95rem;
  color: var(--text-light);
  min-width: 60px;
  text-align: center;
}

@media (max-width: 480px) {
  .pagination {
    gap: 10px;
  }

  .pagination-btn {
    padding: 10px 16px;
    font-size: 0.85rem;
  }
}

/* ================================
   Footer
================================ */
.footer {
  background: var(--primary-dark);
  color: var(--text-white);
  padding: 20px 0 15px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.footer-logo {
  font-size: 1.3rem;
  font-weight: 700;
}

.footer-nav {
  display: flex;
  gap: 30px;
}

.footer-nav a {
  font-size: 0.9rem;
  opacity: 0.8;
  transition: opacity var(--transition);
}

.footer-nav a:hover {
  opacity: 1;
}

.copyright {
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.7;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ================================
   Mobile Navigation
================================ */
.nav.active .nav-list {
  display: flex;
}

/* ================================
   Responsive
================================ */
@media (max-width: 1024px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    padding: 20px;
    box-shadow: 0 4px 10px var(--shadow);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }

  .nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    gap: 15px;
  }

  .nav-list a {
    display: block;
    padding: 10px 0;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .profile-card {
    flex-direction: column;
    text-align: center;
  }

  .profile-sns {
    justify-content: center;
  }

  .footer-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.4rem;
  }

  .hero-text {
    font-size: 0.9rem;
  }

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

/* ================================
   Search Area & Box
================================ */
.search-area {
  position: relative;
  z-index: 100;
  max-width: 500px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.search-box {
  display: flex;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-radius: 50px;
  background: var(--bg-white);
  padding: 5px;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 20px;
  font-size: 1rem;
  color: var(--text-main);
  font-family: inherit;
  outline: none;
}

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

.search-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-btn:hover {
  background: var(--primary-dark);
}

.search-results {
  position: relative;
  margin-top: 10px;
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 200;
  max-height: 400px;
  overflow-y: auto;
  text-align: left;
  display: none;
}

.search-results:not(:empty) {
  display: block;
  animation: fadeInUp 0.3s ease;
}

.search-result-item {
  display: block;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--bg-main);
}

.search-result-title {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 5px;
  font-size: 1rem;
}

.search-result-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-no-results {
  padding: 20px;
  color: var(--text-light);
  text-align: center;
}

/* Search Suggestions */
.search-suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 500px;
  margin: 12px auto 0;
  animation: fadeInUp 0.8s ease 0.5s both;
}

.search-suggestions:empty {
  display: none;
}

.suggestion-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

.suggestion-chip:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-dark);
  border-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.suggestion-chip:active {
  transform: translateY(0);
}

mark {
  background: rgba(255, 255, 0, 0.4);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

/* ================================
   Pagination
================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 60px;
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: var(--bg-white);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.pagination-btn:hover:not(:disabled) {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: var(--border);
  color: var(--text-light);
  background: var(--bg-main);
}

.pagination-info {
  font-weight: 700;
  color: var(--text-light);
  font-family: "Poppins", sans-serif;
  /* 数字を見やすく */
}

/* ================================
   Pagination
================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: none;
  border-radius: 8px;
  background: var(--bg-white);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 8px var(--shadow);
}

.pagination-btn:hover:not(:disabled) {
  background: var(--primary);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background: var(--primary);
  color: var(--text-white);
}

.pagination-info {
  color: var(--text-light);
  font-size: 0.85rem;
  margin: 0 10px;
}

@media (max-width: 480px) {
  .pagination {
    gap: 5px;
  }

  .pagination-btn {
    min-width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }
}