:root {
  --primary-color: #003366;
  /* Deep Ocean Blue */
  --secondary-color: #C68E17;
  /* Ochre/Gold */
  --accent-color: #008080;
  /* Teal/Eucalyptus */
  --background-color: #F5F7FA;
  --text-color: #333333;
  --text-light: #666666;
  --white: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
  --font-main: 'Noto Sans JP', sans-serif;
  --font-eng: 'Outfit', sans-serif;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
}
a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s;
}
ul {
  list-style: none;
}
/* Utilities */
.section {
  padding: 80px 20px;
}
.section-container {
  max-width: 1200px;
  margin: 0 auto;
}
.section-title {
  text-align: center;
  font-family: var(--font-eng);
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 3rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.section-title .jp-sub {
  font-size: 1rem;
  color: var(--accent-color);
  margin-top: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.1em;
}
/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}
.logo {
  font-family: var(--font-eng);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}
.nav-menu {
  display: flex;
  gap: 2rem;
}
.nav-link {
  font-weight: 500;
  color: var(--primary-color);
  font-size: 0.95rem;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s;
}
.nav-link:hover::after {
  width: 100%;
}
.mobile-menu-btn {
  display: none;
  /* Add logic for mobile later */
}
/* Hero Section */
.hero {
  position: relative;
  height: 90vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 0 20px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 51, 102, 0.8), rgba(0, 128, 128, 0.6)),
    url('https://images.unsplash.com/photo-1506973035872-a4ec16b8e8d9?w=1600&q=80') center/cover no-repeat;
  z-index: -1;
}
.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.hero-subtitle {
  display: block;
  font-family: var(--font-eng);
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.cta-button {
  display: inline-block;
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(198, 142, 23, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(198, 142, 23, 0.5);
}
/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1wfr));
  gap: 2rem;
}
.service-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.service-image {
  height: 200px;
  overflow: hidden;
}
.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.service-card:hover .service-image img {
  transform: scale(1.05);
}
.service-icon {
  width: 60px;
  height: 60px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -30px auto 0;
  position: relative;
  box-shadow: var(--shadow-sm);
  color: var(--primary-color);
  z-index: 2;
}
.service-content {
  padding: 1.5rem 2rem 2rem;
  text-align: center;
  flex-grow: 1;
}
.service-content h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}
.service-content p {
  color: var(--text-light);
  font-size: 0.95rem;
}
/* Features */
.features {
  background-color: var(--white);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.feature-item {
  text-align: center;
  padding: 2rem;
  border-radius: 12px;
  background: var(--background-color);
  transition: background 0.3s;
}
.feature-item:hover {
  background: #EFF3F8;
}
.feature-icon {
  color: var(--accent-color);
  margin-bottom: 1rem;
}
.feature-item h3 {
  margin-bottom: 0.8rem;
  color: var(--primary-color);
}
/* Media Section */
.media-section {
  background: linear-gradient(to bottom, var(--background-color), #E8EEF3);
}
.admin-controls-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}
.text-link {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}
.form-container {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin-bottom: 3rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.blur-glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}
.form-input,
.form-textarea {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #E0E0E0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s;
}
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}
.rich-text-toolbar {
  margin-bottom: 0.5rem;
  display: flex;
  gap: 0.5rem;
}
.rich-text-toolbar button {
  background: #f0f0f0;
  border: none;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  color: #555;
}
.rich-text-toolbar button:hover {
  background: #e0e0e0;
}
.submit-button {
  width: 100%;
  background: var(--primary-color);
  color: var(--white);
  padding: 1rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}
.submit-button:hover {
  background: #002244;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}
/* Post Card */
.post-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
  cursor: pointer;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.post-image {
  height: 180px;
  background-color: #eee;
  overflow: hidden;
}
.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-body {
  padding: 1.5rem;
}
.post-date {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  display: block;
}
.post-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.post-excerpt {
  font-size: 0.9rem;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Contact */
.glass-panel {
  background: var(--white);
  border-radius: 16px;
  padding: 3rem;
  box-shadow: var(--shadow-md);
  max-width: 700px;
  margin: 0 auto;
}
/* Footer */
.footer {
  background: var(--primary-color);
  color: var(--white);
  padding: 4rem 2rem 2rem;
  text-align: center;
}
.footer-logo {
  font-family: var(--font-eng);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.footer-desc {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2rem;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-link {
  color: var(--white);
  font-size: 0.9rem;
}
.copyright {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}
/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.modal.active {
  display: flex;
}
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}
.modal-content {
  background: var(--white);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  border-radius: 12px;
  position: relative;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalUp 0.3s ease-out;
}
@keyframes modalUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  color: #888;
  cursor: pointer;
  z-index: 10;
}
.close-modal:hover {
  color: #333;
}
#modalBody {
  padding: 3rem;
}
.modal-article-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 2rem;
}
.modal-article-title {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}
.modal-article-date {
  color: #888;
  margin-bottom: 2rem;
  display: block;
}
.modal-article-body {
  font-size: 1.1rem;
  line-height: 1.8;
}
.modal-article-body h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: var(--primary-color);
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 0.5rem;
  display: inline-block;
}
/* Mobile - Header Fix & Responsiveness */
@media (max-width: 768px) {
  .hero {
    margin-top: 60px;
    /* Offset for fixed header */
    height: auto;
    min-height: 500px;
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
  .section {
    padding: 60px 20px;
    /* Adjust padding for mobile */
  }
  .hero-content h1 {
    font-size: 2rem;
  }
  .header-container {
    padding: 1rem;
  }
  .nav-menu {
    display: none;
    /* Add mobile menu JS handling if needed */
  }
  .services-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }
  .glass-panel {
    padding: 1.5rem;
  }
  #modalBody {
    padding: 1.5rem;
  }
  .modal-article-image {
    height: 200px;
  }
}
/* Admin UI */
.admin-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}
.admin-btn {
  padding: 5px 10px;
  border-radius: 4px;
  border: none;
  font-size: 0.8rem;
  cursor: pointer;
  color: white;
}
.edit-btn {
  background-color: var(--secondary-color);
}
.delete-btn {
  background-color: #dc3545;
  /* Red */
}
/* Login Modal */
#loginModal .modal-content {
  max-width: 400px;
  padding: 2rem;
  text-align: center;
}
#loginModal h3 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}