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

:root {
  --primary-color: #BF0A30;
  --secondary-color: #002868;
  --accent-color: #F2C750;
  --text-color: #333333;
  --background-color: #F9F9F9;
  --light-gray: #EEEEEE;
  --dark-gray: #555555;
  --white: #FFFFFF;
  --black: #111111;
  --success-color: #4CAF50;
  --error-color: #F44336;
  --font-main: 'Noto Sans', sans-serif;
  --font-headings: 'Noto Serif JP', serif;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
  --container-width: 1200px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-color);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1.5rem;
}

ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

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

/* Button Styles */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn:hover {
  background-color: #A00820;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
  background-color: #001E4F;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--light-gray);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 5px;
  border: 2px solid var(--light-gray);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Header & Navigation */
header {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-container img {
  height: 50px;
  width: auto;
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul li {
  margin: 0 1rem;
}

nav ul li a {
  display: block;
  padding: 0.5rem 0;
  font-weight: 600;
  position: relative;
}

nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: width var(--transition-medium);
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  margin: 2px 0;
  transition: var(--transition-fast);
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 40, 104, 0.8), rgba(0, 40, 104, 0.8)), url('images/1.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--white);
  padding: 5rem 0;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--white);
}

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

/* Features Section */
.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 5rem 1.5rem;
  background-color: var(--white);
}

.feature {
  flex: 1;
  min-width: 300px;
  margin: 1rem;
  padding: 2rem;
  text-align: center;
  background-color: var(--background-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.feature:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background-color: var(--secondary-color);
  color: var(--white);
  border-radius: 50%;
}

.feature h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* About Preview Section */
.about-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 5rem 1.5rem;
  background-color: var(--light-gray);
}

.about-image {
  flex: 1;
  min-width: 300px;
  padding: 1rem;
}

.about-image img {
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
}

.about-text {
  flex: 1;
  min-width: 300px;
  padding: 2rem;
}

.about-text h2 {
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
}

/* Latest Posts Section */
.latest-posts {
  padding: 5rem 1.5rem;
  background-color: var(--white);
  text-align: center;
}

.latest-posts h2 {
  margin-bottom: 3rem;
  color: var(--secondary-color);
}

.post-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

.post-card {
  flex: 1;
  min-width: 300px;
  max-width: 350px;
  background-color: var(--background-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

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

.post-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-card h3 {
  padding: 1.5rem 1.5rem 0.5rem;
  font-size: 1.2rem;
}

.post-card p {
  padding: 0 1.5rem 1rem;
  font-size: 0.9rem;
}

.read-more {
  display: inline-block;
  padding: 0 1.5rem 1.5rem;
  color: var(--primary-color);
  font-weight: 600;
}

.view-all {
  margin-top: 2rem;
}

/* Footer */
footer {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 4rem 1.5rem 1rem;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 3rem;
}

.footer-info, .footer-links, .footer-policies, .footer-social {
  flex: 1;
  min-width: 250px;
  margin-bottom: 2rem;
}

.footer-logo {
  width: 120px;
  margin-bottom: 1rem;
}

.footer-info p {
  margin-bottom: 1rem;
}

.contact-info p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.footer-links h3, .footer-policies h3, .footer-social h3 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.footer-links ul, .footer-policies ul {
  list-style: none;
  padding: 0;
}

.footer-links ul li, .footer-policies ul li {
  margin-bottom: 0.5rem;
}

.footer-links a, .footer-policies a {
  color: var(--white);
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.footer-links a:hover, .footer-policies a:hover {
  opacity: 1;
  text-decoration: underline;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--white);
  transition: background-color var(--transition-fast);
}

.social-icons a:hover {
  background-color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--white);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  padding: 1.5rem;
  display: none;
}

.cookie-content {
  max-width: var(--container-width);
  margin: 0 auto;
}

.cookie-content p {
  margin-bottom: 1rem;
}

.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cookie-more {
  font-size: 0.9rem;
  text-decoration: underline;
}

/* Page Header */
.page-header {
  background: linear-gradient(rgba(0, 40, 104, 0.8), rgba(0, 40, 104, 0.8)), url('images/5.jpg');
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.page-header h1 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

/* About Page Styles */
.about-story, .about-mission, .team-section, .facilities {
  padding: 5rem 0;
}

.about-story {
  background-color: var(--white);
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}

.about-mission {
  background-color: var(--light-gray);
  text-align: center;
}

.mission-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
}

.mission-item {
  flex: 1;
  min-width: 250px;
  max-width: 300px;
  padding: 2rem;
  background-color: var(--white);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-medium);
}

.mission-item:hover {
  transform: translateY(-10px);
}

.mission-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 1.5rem;
  color: var(--secondary-color);
}

.team-section {
  background-color: var(--white);
  text-align: center;
}

.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
}

.team-member {
  flex: 1;
  min-width: 250px;
  max-width: 300px;
  padding-bottom: 2rem;
  background-color: var(--background-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.team-member:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-md);
}

.team-member img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.team-member h3 {
  margin: 1.5rem 0 0.5rem;
}

.team-member p {
  padding: 0 1.5rem;
  margin-bottom: 0.5rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  background-color: var(--light-gray);
  border-radius: 50%;
  color: var(--text-color);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.social-links a:hover {
  background-color: var(--secondary-color);
  color: var(--white);
}

.facilities {
  background-color: var(--light-gray);
  text-align: center;
}

.facilities-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
}

.facility {
  flex: 1;
  min-width: 250px;
  max-width: 300px;
  background-color: var(--white);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-medium);
}

.facility:hover {
  transform: translateY(-10px);
}

.facility img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.facility h3 {
  margin: 1.5rem 0 0.5rem;
}

.facility p {
  padding: 0 1.5rem 1.5rem;
}

/* Blog Page Styles */
.blog-content {
  padding: 5rem 0;
  background-color: var(--white);
}

.blog-posts {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.blog-post {
  display: flex;
  flex-wrap: wrap;
  background-color: var(--background-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.post-thumbnail {
  flex: 1;
  min-width: 300px;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-content {
  flex: 2;
  min-width: 300px;
  padding: 2rem;
}

.post-content h2 {
  margin-bottom: 1rem;
}

.post-content h2 a {
  color: var(--text-color);
  transition: color var(--transition-fast);
}

.post-content h2 a:hover {
  color: var(--primary-color);
}

.post-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--dark-gray);
}

/* Blog Post Page Styles */
.blog-post-content {
  padding: 5rem 0;
  background-color: var(--white);
}

.post-header {
  text-align: center;
  margin-bottom: 3rem;
}

.post-featured-image {
  margin-bottom: 3rem;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.post-body {
  margin-bottom: 3rem;
}

.post-body h2 {
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
}

.post-body h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid var(--light-gray);
  border-bottom: 1px solid var(--light-gray);
  margin-bottom: 3rem;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.3rem 0.8rem;
  background-color: var(--light-gray);
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
}

.post-share {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.post-share a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  background-color: var(--light-gray);
  border-radius: 50%;
  color: var(--text-color);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.post-share a:hover {
  background-color: var(--secondary-color);
  color: var(--white);
}

.related-posts {
  margin-top: 4rem;
}

.related-posts h3 {
  margin-bottom: 2rem;
  text-align: center;
}

.related-posts-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.related-post {
  flex: 1;
  min-width: 250px;
  max-width: 350px;
  background-color: var(--background-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-medium);
}

.related-post:hover {
  transform: translateY(-10px);
}

.related-post img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.related-post h4 {
  padding: 1.5rem;
  font-size: 1.1rem;
}

/* Terminology Page Styles */
.terminology-content {
  padding: 5rem 0;
  background-color: var(--white);
}

.terminology-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3rem;
  margin-bottom: 4rem;
}

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

.terminology-image img {
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
}

.terminology-text {
  flex: 1;
  min-width: 300px;
}

.terminology-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  margin-top: 4rem;
}

.terminology-category {
  flex: 1;
  min-width: 300px;
}

.terminology-category h2 {
  color: var(--secondary-color);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--secondary-color);
  margin-bottom: 2rem;
}

.term {
  margin-bottom: 2rem;
}

.term h3 {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

/* Contact Page Styles */
.contact-content {
  padding: 5rem 0;
  background-color: var(--white);
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
}

.contact-info-block, .contact-form-block {
  flex: 1;
  min-width: 300px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.info-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  margin-right: 1rem;
  background-color: var(--secondary-color);
  color: var(--white);
  border-radius: 50%;
  flex-shrink: 0;
}

.info-content h3 {
  margin-bottom: 0.5rem;
}

.contact-form {
  background-color: var(--background-color);
  padding: 2rem;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--light-gray);
  border-radius: var(--border-radius-sm);
  font-family: var(--font-main);
}

.form-group textarea {
  resize: vertical;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
}

.form-checkbox input {
  width: auto;
  margin-right: 0.5rem;
  margin-top: 0.25rem;
}

.btn-submit {
  width: 100%;
  margin-top: 1rem;
}

.map-section {
  padding: 5rem 0;
  background-color: var(--light-gray);
  text-align: center;
}

.map-container {
  height: 400px;
  margin-top: 2rem;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.map-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Success Modal */
.success-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1001;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: var(--white);
  width: 90%;
  max-width: 500px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background-color: var(--secondary-color);
  color: var(--white);
}

.close-modal {
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body {
  padding: 2rem;
  text-align: center;
}

.success-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background-color: var(--success-color);
  color: var(--white);
  border-radius: 50%;
}

.close-btn {
  margin-top: 1.5rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.7rem;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  nav {
    position: fixed;
    top: 75px;
    left: 0;
    width: 100%;
    background-color: var(--white);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transform: translateY(-150%);
    transition: transform var(--transition-medium);
  }
  
  nav.active {
    transform: translateY(0);
  }
  
  nav ul {
    flex-direction: column;
  }
  
  nav ul li {
    margin: 0;
  }
  
  nav ul li a {
    padding: 1rem 0;
    border-bottom: 1px solid var(--light-gray);
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .feature, .post-card, .mission-item, .team-member, .facility, .related-post {
    min-width: 100%;
  }
  
  .about-content, .blog-post {
    flex-direction: column;
  }
  
  .post-thumbnail {
    max-height: 250px;
  }
  
  .contact-grid {
    flex-direction: column;
  }
  
  .info-item {
    flex-direction: column;
  }
  
  .info-icon {
    margin: 0 0 1rem 0;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.9rem;
  }
  
  .hero {
    padding: 3rem 0;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .feature, .mission-item, .team-member {
    padding: 1.5rem;
  }
  
  .post-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .cookie-buttons {
    flex-direction: column;
  }
  
  .cookie-buttons button {
    width: 100%;
  }
}
