/*
Theme Name: Kaishin Dousoukai Theme
Theme URI: https://kaishindousoukai.com
Author: Kaishin Alumni Association
Author URI: https://kaishindousoukai.com
Description: 開新高等学校同窓会 公式WordPressテーマ（Wix移行版）
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: kaishin-theme
*/

:root {
  --primary-color: #0b3954;
  --secondary-color: #c99738;
  --accent-color: #c0392b;
  --text-main: #333333;
  --text-light: #666666;
  --bg-light: #f7f9fa;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --nav-hover: #1e5a84;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.7;
  color: var(--text-main);
  background-color: #fbfbfb;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.2s ease;
}

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

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

/* Header */
.site-header {
  background-color: var(--bg-white);
  border-bottom: 2px solid #e5e9ee;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo h1, .site-logo .site-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #1a2530;
  margin: 0;
}

.site-logo .school-subtitle {
  font-size: 0.78rem;
  color: #718096;
  display: block;
  letter-spacing: 0.02em;
}

/* Navigation */
.header-nav {
  background-color: #132b3d;
}

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

.main-navigation ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.main-navigation li a {
  display: block;
  padding: 13px 18px;
  color: #f0f4f8;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  border-bottom: 3px solid transparent;
}

.main-navigation li a:hover,
.main-navigation li.current-menu-item a,
.main-navigation li.active a {
  background-color: #1b3d57;
  color: #ffffff;
  border-bottom-color: var(--secondary-color);
}

.header-right-action a.btn-cta-small {
  display: inline-block;
  background-color: var(--secondary-color);
  color: #ffffff;
  padding: 7px 16px;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-left: 10px;
}

.header-right-action a.btn-cta-small:hover {
  background-color: #ab7e28;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #132b3d;
  cursor: pointer;
  padding: 8px;
}

/* Hero & Slider */
.hero-slider-section {
  position: relative;
  background-color: #0f1e29;
  overflow: hidden;
  color: #ffffff;
}

.hero-slider {
  position: relative;
  width: 100%;
  height: 480px;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.75);
}

.hero-caption {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 28, 41, 0.85);
  padding: 16px 32px;
  border-radius: 6px;
  border-left: 5px solid var(--secondary-color);
  text-align: center;
  color: #ffffff;
  max-width: 90%;
}

.hero-caption h2 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.hero-caption p {
  font-size: 0.95rem;
  color: #cbd5e0;
}

/* Slider Controls */
.slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  border: none;
  transition: background 0.3s;
}

.slider-dot.active {
  background: var(--secondary-color);
  width: 28px;
  border-radius: 6px;
}

/* Page Container */
.site-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

/* Page Header */
.page-title-banner {
  background: linear-gradient(135deg, #132b3d 0%, #204b6b 100%);
  color: #ffffff;
  padding: 40px 20px;
  text-align: center;
  margin-bottom: 40px;
  border-bottom: 4px solid var(--secondary-color);
}

.page-title-banner h1 {
  font-size: 2rem;
  margin-bottom: 8px;
  font-weight: 700;
}

.page-title-banner p {
  font-size: 1rem;
  color: #cbd5e0;
}

/* Cards & Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.card {
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.card-img-wrap {
  height: 190px;
  overflow: hidden;
  background: #edf2f7;
}

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

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

.card-body {
  padding: 20px;
}

.card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: #1a2530;
  line-height: 1.4;
}

.card-body p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 14px;
}

/* Section styling */
.section-block {
  margin-bottom: 50px;
}

.section-heading {
  font-size: 1.65rem;
  color: #132b3d;
  border-left: 6px solid var(--secondary-color);
  padding-left: 14px;
  margin-bottom: 25px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-heading .more-link {
  font-size: 0.88rem;
  font-weight: normal;
  color: #4a5568;
}

/* News List */
.news-article-card {
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 24px;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  display: flex;
  gap: 25px;
}

.news-thumb {
  width: 240px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  height: 160px;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-info {
  flex: 1;
}

.news-date {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 6px;
}

.news-info h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #1b3d57;
}

.news-info p {
  font-size: 0.93rem;
  color: #444;
  line-height: 1.7;
}

/* Banner / CTA */
.cta-banner {
  background: linear-gradient(135deg, #0b3954 0%, #174a6e 100%);
  color: #ffffff;
  padding: 40px 30px;
  border-radius: 10px;
  text-align: center;
  margin: 50px 0;
  box-shadow: 0 6px 20px rgba(11, 57, 84, 0.2);
}

.cta-banner h2 {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.cta-banner p {
  font-size: 1rem;
  color: #e2e8f0;
  max-width: 700px;
  margin: 0 auto 24px;
}

.btn-primary {
  display: inline-block;
  background-color: var(--secondary-color);
  color: #ffffff;
  padding: 12px 30px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn-primary:hover {
  background-color: #b5832a;
  color: #ffffff;
  transform: translateY(-2px);
}

/* Tables (役員一覧・年表) */
.custom-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 35px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  border-radius: 6px;
  overflow: hidden;
}

.custom-table th, .custom-table td {
  padding: 14px 18px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.custom-table th {
  background-color: #edf2f7;
  color: #2d3748;
  font-weight: 600;
  width: 25%;
}

/* Timeline */
.timeline-list {
  border-left: 3px solid #cbd5e0;
  padding-left: 20px;
  margin-left: 10px;
  position: relative;
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -27px;
  top: 5px;
  width: 12px;
  height: 12px;
  background: var(--secondary-color);
  border-radius: 50%;
  border: 2px solid #ffffff;
}

.timeline-year {
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 4px;
}

.timeline-desc {
  color: #4a5568;
}

/* Photo Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.gallery-item {
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item-caption {
  padding: 10px 14px;
  font-size: 0.88rem;
  color: #4a5568;
  background: #fafafa;
  text-align: center;
  border-top: 1px solid #edf2f7;
}

/* PDF List (会報) */
.kaiho-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 25px;
  margin: 30px 0;
}

.kaiho-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  padding-bottom: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
  transition: transform 0.2s;
}

.kaiho-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.kaiho-card .kaiho-thumb {
  height: 240px;
  overflow: hidden;
  background: #e2e8f0;
}

.kaiho-card .kaiho-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kaiho-card h3 {
  font-size: 1rem;
  padding: 12px 10px 8px;
  color: #1a2530;
}

.btn-pdf {
  display: inline-block;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-pdf:hover {
  background-color: var(--secondary-color);
  color: #ffffff;
}

/* Contact Form */
.contact-form-box {
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 35px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 7px;
  color: #2d3748;
}

.form-group label .required {
  color: var(--accent-color);
  font-size: 0.85rem;
  margin-left: 4px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cbd5e0;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(11, 57, 84, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 130px;
}

.btn-submit {
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  padding: 12px 35px;
  border-radius: 5px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-submit:hover {
  background-color: #1e5a84;
}

/* Footer */
.site-footer {
  background-color: #132b3d;
  color: #cbd5e0;
  padding: 50px 20px 20px;
  border-top: 5px solid var(--secondary-color);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.15rem;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 8px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 2px;
  background-color: var(--secondary-color);
}

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #cbd5e0;
  font-size: 0.92rem;
}

.footer-col ul li a:hover {
  color: var(--secondary-color);
  padding-left: 4px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 20px auto 0;
  text-align: center;
  font-size: 0.85rem;
  color: #8898aa;
}

/* Responsive */
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .news-article-card {
    flex-direction: column;
  }
  .news-thumb {
    width: 100%;
    height: 200px;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .main-navigation {
    display: none;
    width: 100%;
  }
  .main-navigation.is-open {
    display: block;
  }
  .main-navigation ul {
    flex-direction: column;
  }
  .main-navigation li a {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .hero-slider {
    height: 320px;
  }
  .hero-caption {
    bottom: 20px;
    padding: 10px 18px;
  }
  .hero-caption h2 {
    font-size: 1.2rem;
  }
}
