/*
Theme Name: Senkawa Theme
Author: Piclos Team
Description: Custom WordPress theme for senkawa.jp
Version: 1.0.0
*/

/**
 * Base Styles
 * Variables, resets, and global styles
 */

:root {
  /* Colors */
  --primary-color: #5D9C59;
  /* Greenery */
  --secondary-color: #DF7861;
  /* Warmth/Sunset */
  --accent-color: #ECB390;
  /* Soft light */
  --text-color: #333333;
  --bg-color: #FCFDF5;
  --white: #ffffff;
  --gray-light: #f4f4f4;

  /* Typography */
  --font-base: 'Zen Kaku Gothic New', sans-serif;
  --font-serif: 'Shippori Mincho', serif;

  /* Spacing */
  --spacing-xs: 5px;
  --spacing-sm: 10px;
  --spacing-md: 20px;
  --spacing-lg: 40px;
  --spacing-xl: 60px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: var(--font-base);
  color: var(--text-color);
  background-color: var(--bg-color);
  /* Subtle Japanese Pattern (Seigaiha-ish) */
  background-image:
    radial-gradient(circle at 100% 150%, var(--bg-color) 24%, rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, 0) 28%, var(--bg-color) 29%, var(--bg-color) 36%, rgba(255, 255, 255, 0) 37%, rgba(255, 255, 255, 0) 40%, var(--bg-color) 41%, var(--bg-color) 48%, rgba(255, 255, 255, 0) 49%, rgba(255, 255, 255, 0) 52%, var(--bg-color) 53%, var(--bg-color) 60%, rgba(255, 255, 255, 0) 61%, rgba(255, 255, 255, 0) 64%, var(--bg-color) 65%, var(--bg-color) 72%, rgba(255, 255, 255, 0) 73%, rgba(255, 255, 255, 0) 76%, var(--bg-color) 77%),
    radial-gradient(circle at 0% 150%, var(--bg-color) 24%, rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, 0) 28%, var(--bg-color) 29%, var(--bg-color) 36%, rgba(255, 255, 255, 0) 37%, rgba(255, 255, 255, 0) 40%, var(--bg-color) 41%, var(--bg-color) 48%, rgba(255, 255, 255, 0) 49%, rgba(255, 255, 255, 0) 52%, var(--bg-color) 53%, var(--bg-color) 60%, rgba(255, 255, 255, 0) 61%, rgba(255, 255, 255, 0) 64%, var(--bg-color) 65%, var(--bg-color) 72%, rgba(255, 255, 255, 0) 73%, rgba(255, 255, 255, 0) 76%, var(--bg-color) 77%),
    radial-gradient(circle at 50% 100%, rgba(236, 179, 144, 0.1) 10%, rgba(255, 255, 255, 0) 11%, rgba(255, 255, 255, 0) 23%, rgba(236, 179, 144, 0.05) 24%, rgba(236, 179, 144, 0.05) 30%, rgba(255, 255, 255, 0) 31%, rgba(255, 255, 255, 0) 43%, rgba(236, 179, 144, 0.05) 44%, rgba(236, 179, 144, 0.05) 50%, rgba(255, 255, 255, 0) 51%, rgba(255, 255, 255, 0) 63%, rgba(236, 179, 144, 0.05) 64%, rgba(236, 179, 144, 0.05) 71%, rgba(255, 255, 255, 0) 72%, rgba(255, 255, 255, 0) 84%, rgba(236, 179, 144, 0.05) 85%);
  background-size: 50px 25px;
  background-position: 0 0, 25px 0, 25px -25px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html {
  scroll-padding-top: 100px;
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s, color 0.3s;
}

a:hover {
  opacity: 0.7;
}

/* Responsive Images */
img {
  max-width: 100%;
  height: auto;
}

/* Fix for WP Caption inline width on mobile */
.wp-caption {
  max-width: 100%;
  width: auto !important;
}

/* Utility Classes */
.pc-only {
  display: block;
}

.sp-only {
  display: none;
}

@media (max-width: 768px) {
  .pc-only {
    display: none;
  }

  .sp-only {
    display: block;
  }
}

.ib {
  display: inline-block;
}

/* Animations */
.scroll-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-fade-in {
  opacity: 0;
  transition: opacity 1.5s ease-out;
}

.scroll-fade-in.visible {
  opacity: 1;
}

/* Stagger delays */
.delay-100 {
  transition-delay: 0.1s;
}

.delay-200 {
  transition-delay: 0.2s;
}

.delay-300 {
  transition-delay: 0.3s;
}

/* Section Common */
section {
  padding: var(--spacing-sm) var(--spacing-md);
}

.section-title {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 2rem;
  margin: 0 auto 50px;
  color: var(--primary-color);
  position: relative;
  width: fit-content;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background-color: var(--accent-color);
  margin: 15px auto 0;
}

.subsection-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--text-color);
  margin: 30px auto 25px;
  max-width: 1200px;
  padding-left: 15px;
  border-left: 4px solid var(--primary-color);
}

/**
 * Header Component
 * Fixed navigation header with glassmorphism effect
 */

body>header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

/* Scrolled State (Glassmorphism) */
body>header.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 15px 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Admin Bar Compatibility */
body.admin-bar>header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar>header {
    top: 46px;
  }
}

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

.logo img {
  height: 40px;
  width: auto;
}

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

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s;
}

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

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  body>header {
    padding: 15px 24px;
  }

  .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  }

  .nav-links.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .menu-toggle {
    display: block;
  }
}

/**
 * Hero Component
 * Full-screen hero section with slideshow
 */

.hero {
  height: 100vh;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--white);
  text-align: center;
  overflow: hidden;
}

.hero-slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 2s ease-in-out, transform 10s ease-in-out;
  transform: scale(1.1);
  filter: brightness(0.7);
}

.hero-bg.active {
  opacity: 1;
  transform: scale(1.0);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 400;
  opacity: 0.9;
  letter-spacing: 0.1em;
}

/* Intro Section (below hero) */
.intro {
  text-align: center;
  padding: 50px 20px;
}

.intro-text-vertical {
  font-family: var(--font-serif);
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 1.6rem;
  text-align: right;
  margin: 0 auto;
  width: fit-content;
  height: 500px;
  line-height: 2;
  letter-spacing: 0.2em;
}

.intro p {
  max-width: 800px;
  margin: 0 auto;
  color: #666;
  line-height: 2;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--white);
  opacity: 0.8;
  animation: bounce 2s infinite;
  z-index: 10;
}

.scroll-indicator span {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.scroll-indicator .arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(45deg);
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  40% {
    transform: translateX(-50%) translateY(-10px);
  }

  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
    letter-spacing: 0.1em;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .intro-text-vertical {
    font-size: 1.2rem;
    height: 350px;
  }
}

/**
 * Topics/Cards Component
 * Topic cards grid and card styling
 */

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.topic-card-link {
  display: block;
  height: 100%;
}

.topic-card-link:hover {
  text-decoration: none;
  opacity: 1;
}

.topic-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 25px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  border-left: 5px solid transparent;
  display: flex;
  flex-direction: column;
}

.topic-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.topic-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.topic-date {
  color: #888;
  font-family: var(--font-base);
}

/* Tags */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-lg);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--white);
}

.tag.event {
  background-color: var(--secondary-color);
}

.tag.notice {
  background-color: var(--primary-color);
}

.tag.schedule {
  background-color: #4A90A4;
}

.tag.info {
  background-color: var(--primary-color);
}

.tag:not(.event):not(.notice):not(.schedule):not(.info) {
  background-color: #999;
}

.topic-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.6;
  margin: 0;
  color: var(--text-color);
  flex-grow: 1;
}

/* Schedule Section */
.schedule-section {
  margin-bottom: 50px;
}

.schedule-grid {
  margin-bottom: 0;
}

.no-topics {
  text-align: center;
  color: #888;
  grid-column: 1 / -1;
  padding: 40px;
}

/* Schedule Card Specific Styles */
.topic-card-schedule .topic-body {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  margin-top: 10px;
  word-wrap: break-word;
}

.topic-card-link-schedule {
  height: auto;
}

.topic-card-schedule {
  padding: 20px 20px 30px;
  height: auto;
  min-height: 0;
}

/**
 * Footer Component
 */

footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 60px 20px 20px;
  text-align: center;
}

.footer-content {
  margin-bottom: 40px;
}

.footer-nav {
  margin-bottom: 30px;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

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

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

.copyright {
  font-size: 0.8rem;
  opacity: 0.7;
}

/**
 * Single/Post Page Component
 * Post hero, content, sidebar, share buttons
 */

/* Post Hero */
.post-hero {
  position: relative;
  min-height: 400px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  margin-bottom: 0;
}

.post-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
  z-index: 1;
}

.post-hero-content {
  position: relative;
  z-index: 2;
  padding: 20px;
  max-width: 800px;
}

.post-hero-content .entry-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.post-hero-content .tag {
  margin-bottom: 15px;
}

.post-hero-content .post-date {
  color: rgba(255, 255, 255, 0.9);
  margin-top: 10px;
  display: block;
}

/* Single Container */
.single-container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--white);
  margin-top: -50px;
  position: relative;
  z-index: 10;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: var(--shadow-md);
}

.entry-content {
  padding: 50px 40px;
  line-height: 2;
}

.entry-content p {
  margin-bottom: 1.5em;
}

.entry-content h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--primary-color);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
  margin: 40px 0 20px;
}

.entry-content h3 {
  font-size: 1.2rem;
  color: var(--text-color);
  margin: 30px 0 15px;
}

.entry-content ul,
.entry-content ol {
  margin: 1em 0;
  padding-left: 2em;
}

.entry-content li {
  margin-bottom: 0.5em;
}

.entry-content a {
  color: var(--primary-color);
  text-decoration: underline;
}

.entry-content a:hover {
  opacity: 0.8;
}

.entry-content img {
  border-radius: var(--radius-sm);
  margin: 20px 0;
}

/* Share Buttons */
.share-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 25px 40px;
  border-top: 1px solid #eee;
  background: #fafafa;
}

.share-label {
  font-weight: 600;
  color: #666;
  font-size: 0.9rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--white);
  transition: transform 0.3s, opacity 0.3s;
}

.share-btn:hover {
  transform: scale(1.1);
  opacity: 1;
}

.share-twitter {
  background-color: #1DA1F2;
}

.share-facebook {
  background-color: #1877F2;
}

.share-line {
  background-color: #00B900;
}

/* Responsive */
@media (max-width: 768px) {
  .post-hero {
    min-height: 300px;
  }

  .post-hero-content .entry-title {
    font-size: 1.8rem;
  }

  .single-container {
    margin-top: -30px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  }

  .entry-content {
    padding: 30px 20px;
  }

  .share-buttons {
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 15px;
  }

  .share-label {
    width: 100%;
    text-align: center;
    margin-bottom: 5px;
  }
}

/**
 * Shops Page Component
 * Shop grid and card styling
 */

.shop-category-group {
  margin-bottom: 60px;
}

.category-heading {
  font-size: 1.8rem;
  color: var(--primary-color);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.shop-item {
  background: var(--white);
  padding: 25px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease;
  border-top: 4px solid var(--accent-color);
}

.shop-item:hover {
  transform: translateY(-5px);
}

.shop-item h3 {
  margin-top: 0;
  font-size: 1.25rem;
  color: var(--primary-color);
  border: none;
  padding: 0;
  margin-bottom: 10px;
}

.shop-item .category {
  display: inline-block;
  background: var(--gray-light);
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: 15px;
  color: #666;
  margin-bottom: 15px;
}

.shop-item .access {
  font-size: 0.9rem;
  color: #888;
  margin-top: 15px;
  border-top: 1px dashed #eee;
  padding-top: 10px;
}

.shop-item.recruiting {
  border-top-color: #ddd;
  background: #f9f9f9;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.shop-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.shop-item.has-link {
  cursor: pointer;
}

.shop-item.has-link:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.link-indicator {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--accent-color);
  font-weight: bold;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.shop-item.has-link:hover .link-indicator {
  opacity: 1;
  text-decoration: underline;
}

.no-shops {
  text-align: center;
  color: #888;
  padding: 40px;
}

/**
 * Facility Page Component
 * Styles for institution hall and square pages
 */

/* Facility Layout */
.facility-intro {
  margin-bottom: 15px;
  line-height: 1.8;
}

.facility-details,
.facility-rooms,
.facility-notes,
.facility-map,
.facility-features,
.facility-equipment {
  margin-bottom: 15px;
}

.facility-details h2,
.facility-rooms h2,
.facility-notes h2,
.facility-map h2,
.facility-features h2,
.facility-equipment h2 {
  font-size: 1.3rem;
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

/* Info Table */
.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr {
  border-bottom: 1px solid #ddd;
}

.info-table th {
  background: var(--primary-color);
  color: #ffffff;
  padding: 10px 15px;
  text-align: left;
  width: 130px;
  font-weight: 600;
  font-size: 0.9rem;
}

.info-table td {
  padding: 10px 15px;
  background: #fafafa;
}

.info-table a {
  color: var(--primary-color);
  text-decoration: none;
}

.info-table a:hover {
  text-decoration: underline;
}

/* Rooms/Equipment List */
.rooms-list {
  list-style: none;
  padding: 0;
}

.rooms-list li {
  padding: 10px 15px;
  background: #f5f5f5;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary-color);
}

/* Notes Content */
.notes-content {
  background: #fff9e6;
  padding: 15px;
  border-radius: var(--radius-sm);
  border-left: 4px solid #f0ad4e;
}

.notes-content p {
  margin-bottom: 10px;
}

.notes-content p:last-child {
  margin-bottom: 0;
}

/* External Links */
.external-link-box {
  margin-top: 10px;
}

.external-link {
  color: var(--primary-color) !important;
  text-decoration: underline;
  font-weight: 600;
}

.external-link:hover {
  opacity: 0.8;
}

.link-icon {
  font-size: 0.85em;
  margin-left: 2px;
}

/* Facility Navigation */
.facility-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.facility-nav a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.facility-nav a:hover {
  text-decoration: underline;
}

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.feature-card {
  background: #f8f8f8;
  border-radius: var(--radius-md);
  padding: 25px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.feature-card h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.feature-card p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Facility Slideshow */
.facility-slideshow {
  margin: 30px 0;
  max-width: 100%;
}

.slideshow-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.slides-wrapper {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.slideshow-container .slide {
  width: 100%;
  min-width: 100%;
  flex: 0 0 100%;
  box-sizing: border-box;
}

.slideshow-container .slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  cursor: pointer;
  margin: 0;
}

.slideshow-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  cursor: pointer;
  transition: background 0.3s;
  user-select: none;
  z-index: 10;
}

.slideshow-nav.prev {
  left: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.4), transparent);
}

.slideshow-nav.next {
  right: 0;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.4), transparent);
}

.slideshow-nav:hover {
  background: rgba(0, 0, 0, 0.5);
}

.slideshow-dots {
  text-align: center;
  padding: 15px 0;
}

.slideshow-dots .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 5px;
  background-color: #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
}

.slideshow-dots .dot.active,
.slideshow-dots .dot:hover {
  background-color: var(--primary-color);
}

/* Image Modal */
.image-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90vh;
  border-radius: 4px;
  object-fit: contain;
  animation: zoom 0.3s;
}

@keyframes zoom {
  from {
    transform: scale(0.1);
  }

  to {
    transform: scale(1);
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
}

.close-modal:hover,
.close-modal:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  .info-table th {
    display: block;
    width: 100%;
  }

  .info-table td {
    display: block;
  }

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

  .slideshow-nav {
    width: 40px;
    font-size: 20px;
  }
}


/* Social Icons */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.3s, transform 0.3s;
}

.social-icons a:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
  opacity: 1;
}

.social-icons img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* Spacing Fixes (Micro-spaces) */
.intro-text-vertical {
  margin-bottom: 60px;
}

.topics-grid {
  margin-bottom: 80px;
}

/* Topics Page Container Padding */
.page-template-page-topics .single-container,
.page-template-page-institution-info .single-container {
  padding: 50px 40px;
}

@media (max-width: 768px) {

  .page-template-page-topics .single-container,
  .page-template-page-institution-info .single-container {
    padding: 30px 20px;
  }
}

/* Mobile Menu Fix */
@media (max-width: 768px) {
  .nav-links.active {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Menu Click Area Fix */
@media (max-width: 768px) {
  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 10px 0;
  }
}

/* Page Specific Styles - Institution Info */
.facilities-intro {
  text-align: center;
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 40px;
}

.facilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.facility-card {
  display: block;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
}

.facility-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.facility-image {
  height: 200px;
  overflow: hidden;
}

.facility-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.facility-card:hover .facility-image img {
  transform: scale(1.05);
}

.facility-info {
  padding: 25px;
}

.facility-info h2 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.facility-subtitle {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.facility-desc {
  color: #555;
  line-height: 1.7;
  margin-bottom: 15px;
}

.facility-highlights {
  list-style: none;
  padding: 0;
  margin-bottom: 15px;
}

.facility-highlights li {
  padding: 5px 0;
  color: #666;
  font-size: 0.9rem;
}

.view-more {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 600;
  margin-top: 10px;
}

.facility-card:hover .view-more {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .facilities-grid {
    grid-template-columns: 1fr;
  }

  .facility-image {
    height: 180px;
  }
}

/* Page Specific Styles - Local Shops */
.shop-category-group {
  margin-bottom: 60px;
}

.category-heading {
  font-size: 1.8rem;
  color: var(--primary-color);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.shop-item {
  background: var(--white);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  border-top: 4px solid var(--accent-color);
}

.shop-item:hover {
  transform: translateY(-5px);
}

.shop-item h3 {
  margin-top: 0;
  font-size: 1.25rem;
  color: var(--primary-color);
  border: none;
  padding: 0;
  margin-bottom: 10px;
}

.shop-item .category {
  display: inline-block;
  background: var(--gray-light);
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: 15px;
  color: #666;
  margin-bottom: 15px;
}

.shop-item .access {
  font-size: 0.9rem;
  color: #888;
  margin-top: 15px;
  border-top: 1px dashed #eee;
  padding-top: 10px;
}

.shop-item.recruiting {
  border-top-color: #ddd;
  background: #f9f9f9;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.shop-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.shop-item.has-link {
  cursor: pointer;
}

.shop-item.has-link:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.link-indicator {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--accent-color);
  font-weight: bold;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.shop-item.has-link:hover .link-indicator {
  opacity: 1;
  text-decoration: underline;
}

/* Page Specific Styles - Group Info */
.group-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.group-card {
  padding: 30px;
  background: var(--gray-light);
  border-radius: 8px;
  border-left: 5px solid var(--secondary-color);
}

.group-card h2 {
  margin-top: 0;
  border-bottom: none;
  font-size: 1.5rem;
  color: var(--text-color);
  margin-bottom: 15px;
}

.group-card dl {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.5);
  padding: 15px;
  border-radius: 4px;
}

.group-card dt {
  font-weight: bold;
  color: var(--primary-color);
  float: left;
  clear: left;
  width: 80px;
}

.group-card dd {
  margin-left: 80px;
}

/* Ajax Pagination Styles */
.ajax-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  font-family: var(--font-base);
}

.ajax-pagination button {
  padding: 8px 16px;
  background-color: var(--white);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}

.ajax-pagination button:hover:not(:disabled) {
  background-color: var(--primary-color);
  color: var(--white);
}

.ajax-pagination button.disabled,
.ajax-pagination button:disabled {
  border-color: #ddd;
  color: #999;
  cursor: not-allowed;
  background-color: #f9f9f9;
}

.current-page-display {
  font-weight: 700;
  color: #666;
}

/* Share Button Styles */
.share-x {
  background-color: #000000;
  border-radius: 50%;
}

.share-x svg {
  fill: #ffffff;
}

/* Group Card Official Site Link Button */
.group-site-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1.2rem;
  background-color: var(--accent-color);
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: bold;
  border-radius: 4px;
  transition: background-color 0.3s, transform 0.2s;
}

.group-site-link:hover {
  background-color: var(--accent-dark);
  transform: translateY(-2px);
}

.group-site-link:active {
  transform: translateY(0);
}