/* ==========================================================================
   CSS Reset & Base Styles
   ========================================================================== */

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

html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #333333;
  background: #f8f8f8;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  color: #333333;
  text-align: center;
  margin-bottom: 2rem;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
}

h2 {
  font-size: 1.8rem;
  color: #333333;
  margin-bottom: 1.5rem;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
}

h3 {
  font-size: 1.5rem;
  color: #333333;
  margin-bottom: 1rem;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  color: #333333;
  font-weight: 400;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  width: 100%;
  background: #ffffff;
  border: none;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  margin: 8rem auto;
  box-sizing: border-box;
  box-shadow: none;
}

.container::before {
  content: none;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: #333333;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
  background: #ffffff;
  color: #333333;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #4caf50;
  background: #ffffff;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #999999;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  font-family: "Noto Sans JP", sans-serif;
}

.btn-primary {
  background: #ffd700;
  color: #333333;
  border: none;
  font-weight: 600;
  box-shadow: none;
}

.btn-primary:hover {
  background: #ffd700;
  opacity: 0.95;
  transform: none;
}

.btn-primary:active {
  transform: none;
  background: #ffd700;
  opacity: 0.9;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  background: #ffd700;
}

/* ==========================================================================
   Success/Error Messages
   ========================================================================== */

.message {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-weight: 400;
  border: none;
}

.message-success {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
}

.message-error {
  background: rgba(255, 87, 34, 0.1);
  color: #ff5722;
}

/* ==========================================================================
   Loading Animation
   ========================================================================== */

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #000000;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Large screens (769px and up) */
@media (min-width: 769px) {
  .container {
    max-width: 1000px;
    padding: 4rem;
  }

  h1 {
    font-size: 3.5rem;
  }
}

/* Small screens (481px to 768px) */
@media (max-width: 768px) {
  body {
    padding: 0;
  }

  .container {
    max-width: 100%;
    padding: 2rem 1.5rem;
    border-radius: 0;
  }

  h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .site-logo-img {
    max-height: 50px;
  }
}

/* Extra small screens (480px and below) */
@media (max-width: 480px) {
  body {
    padding: 0;
  }

  .container {
    padding: 1.5rem 1rem;
    border-radius: 0;
  }

  h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
  }

  h2 {
    font-size: 1.25rem;
    margin-bottom: 0.875rem;
  }

  h3 {
    font-size: 1.125rem;
  }

  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
    width: 100%;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 0.875rem;
    font-size: 0.9rem;
  }

  .site-logo-img {
    max-height: 40px;
  }

  .wpcf7-form input[type="submit"] {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for keyboard navigation */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.btn:focus {
  outline: 2px solid #4caf50;
  outline-offset: 2px;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  z-index: 1000;
  padding: 1rem 0;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: none;
}

.site-branding {
  text-align: center;
  margin-bottom: 1rem;
}

.site-title {
  margin: 0;
  line-height: 1;
  font-size: 0;
}

.site-title a {
  display: block;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 0;
  text-align: center;
}

.site-title a:hover {
  opacity: 0.8;
}

.site-logo-img {
  height: auto;
  max-height: 60px;
  max-width: 100%;
  width: auto;
  display: block;
  margin: 0 auto;
}

.site-title a img {
  display: block;
  width: auto;
  height: auto;
  max-height: 60px;
  margin: 0 auto;
}

.site-logo-fallback {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: "Noto Sans JP", sans-serif;
  color: #4caf50;
  line-height: 1;
}

.site-description {
  color: #666666;
  font-size: 0.9rem;
  margin: 0.5rem 0 0 0;
}

/* Navigation */
.main-navigation {
  text-align: center;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.nav-menu li {
  margin: 0;
}

.nav-menu a {
  color: #333333;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-menu a:hover {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 4px;
}

.menu-toggle-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-toggle-icon span {
  width: 25px;
  height: 3px;
  background: #333333;
  border-radius: 2px;
  transition: all 0.3s ease;
}

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

.menu-toggle.active .menu-toggle-icon span:nth-child(2) {
  opacity: 0;
}

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

/* ==========================================================================
   Form Enhancements
   ========================================================================== */

.form-description {
  text-align: center;
  color: #666666;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.required {
  color: #ff5722;
}

.error-message {
  color: #ff5722;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.char-counter {
  font-size: 0.875rem;
  color: #999999;
  margin-top: 0.25rem;
  text-align: right;
}

.char-counter.error {
  color: #ff5722;
}

.form-group.error input,
.form-group.error textarea,
.form-group.error select {
  border-color: #ff5722;
  background: #fff5f2;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */

.site-footer {
  background: #000000;
  color: #ffffff;
  padding: 2rem;
  text-align: center;
  border-top: 1px solid #333333;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

.footer-info p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

/* ==========================================================================
   WordPress Specific Styles
   ========================================================================== */

.wp-block-group {
  margin: 0;
}

.alignwide,
.alignfull {
  max-width: none;
}

/* Contact Form 7 specific styles */
.contact-form-wrapper {
  margin-top: 2rem;
}

.wpcf7-form {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

.wpcf7-form p {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wpcf7-form label {
  font-weight: 600;
  color: #333333;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="number"],
.wpcf7-form textarea,
.wpcf7-form select {
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  background: #ffffff;
  color: #333333;
  width: 100%;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form input[type="url"]:focus,
.wpcf7-form input[type="number"]:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
  outline: none;
  border-color: #4caf50;
  background: #ffffff;
}

.wpcf7-form input[type="text"]::placeholder,
.wpcf7-form input[type="email"]::placeholder,
.wpcf7-form input[type="tel"]::placeholder,
.wpcf7-form input[type="url"]::placeholder,
.wpcf7-form input[type="number"]::placeholder,
.wpcf7-form textarea::placeholder {
  color: #999999;
}

.wpcf7-form textarea {
  resize: vertical;
  min-height: 120px;
}

.wpcf7-form input[type="submit"] {
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #ffd700;
  color: #333333;
  align-self: flex-start;
  font-family: "Noto Sans JP", sans-serif;
  box-shadow: none;
}

.wpcf7-form input[type="submit"]:hover {
  background: #ffd700;
  opacity: 0.95;
  transform: none;
}

.wpcf7-form input[type="submit"]:active {
  transform: translateY(0);
}

.wpcf7-form input[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  background: #ffd700;
}

.wpcf7-form input[type="submit"]:focus {
  outline: 2px solid #4caf50;
  outline-offset: 2px;
}

/* Contact Form 7 validation styles */
.wpcf7-not-valid-tip {
  color: #ff5722;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.wpcf7-validation-errors {
  background: rgba(255, 87, 34, 0.1);
  color: #ff5722;
  border: none;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.wpcf7-mail-sent-ok {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
  border: none;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.wpcf7-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #000000;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s ease-in-out infinite;
  margin-left: 0.5rem;
}

/* Contact Form 7 responsive styles */
@media (max-width: 768px) {
  .wpcf7-form input[type="submit"] {
    width: 100%;
    align-self: stretch;
  }
}

@media (max-width: 480px) {
  .wpcf7-form input[type="text"],
  .wpcf7-form input[type="email"],
  .wpcf7-form input[type="tel"],
  .wpcf7-form input[type="url"],
  .wpcf7-form input[type="number"],
  .wpcf7-form textarea,
  .wpcf7-form select {
    padding: 0.875rem;
    font-size: 0.9rem;
  }

  .wpcf7-form input[type="submit"] {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* ==========================================================================
   Additional Responsive Styles
   ========================================================================== */

@media (max-width: 768px) {
  .site-header {
    padding: 0.75rem 0;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
  }

  .site-footer {
    padding: 1.5rem;
  }

  .footer-content {
    padding: 0;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 0.5rem 0;
  }

  .form-description {
    font-size: 0.9rem;
  }

  .site-footer {
    padding: 1.5rem 1rem;
  }

  .footer-content {
    padding: 0;
  }
}

/* ==========================================================================
   Basic Transitions
   ========================================================================== */

.container {
  transition: all 0.2s ease;
}

.form-group input,
.form-group textarea,
.form-group select {
  transition: all 0.2s ease;
}

.btn {
  transition: all 0.2s ease;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .site-header,
  .site-footer,
  .menu-toggle {
    display: none;
  }

  .container {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  body {
    background: #ffffff;
  }
}