/*--------------------------------------------------------------
# Common Styles for All Pages
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Reset & Base
--------------------------------------------------------------*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #00A859;
  --secondary: #005A30;
  --accent: #00D06C;
  --dark: #0A0A0A;
  --gray: #666666;
  --light-gray: #F5F5F5;
  --white: #FFFFFF;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  color: var(--dark);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}

::selection {
  background: var(--primary);
  color: var(--white);
}

/*--------------------------------------------------------------
# Breadcrumb Section
--------------------------------------------------------------*/
.breadcrumb-section {
  background: #f8f9fa;
  padding: 12px 0;
  border-bottom: 1px solid #e9ecef;
  margin: 0;
}

.breadcrumb-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.breadcrumb {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: #666;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.breadcrumb i {
  margin: 0 0.8rem;
  color: #999;
  font-size: 0.8rem;
}

.breadcrumb span {
  color: var(--primary);
  font-weight: 500;
}

@media (max-width: 768px) {
  .breadcrumb-section {
    padding: 10px 0;
  }
  
  .breadcrumb-container {
    padding: 0 15px;
  }
  
  .breadcrumb {
    font-size: 0.8rem;
  }
  
  .breadcrumb i {
    margin: 0 0.6rem;
  }
}

/*--------------------------------------------------------------
# Loading Screen
--------------------------------------------------------------*/
#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--white);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loading.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-logo {
  width: 300px;
  height: auto;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1); }
}

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition);
  padding: 30px 0;
}

header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  padding: 15px 0;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 40px;
  transition: var(--transition);
  filter: brightness(0) invert(1);
}

header.scrolled .logo img {
  height: 35px;
  filter: none;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 0;
}

nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.5px;
  position: relative;
  transition: var(--transition);
}

/* Remove default link underline on hover */
nav a:hover {
  text-decoration: none;
}

/* Non-scrolled state hover color */
header:not(.scrolled) nav a:hover {
  color: #E5E5E5;
}

/* Scrolled state hover color */
header.scrolled nav a:hover {
  color: var(--primary);
}

header.scrolled nav a {
  color: var(--dark);
}

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

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

/* Remove underline animation from CTA button */
.cta-button::after {
  display: none;
}

.cta-button {
  background: var(--primary);
  color: var(--white) !important;
  padding: 12px 35px;
  border-radius: 30px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: var(--transition);
  border: 2px solid var(--primary);
  position: relative;
  overflow: hidden;
  z-index: 10;
}

/* CTA button hover with shine animation */
.cta-button:hover {
  background: transparent;
  transform: translateY(-2px);
  text-decoration: none;
  animation: buttonShine 0.6s ease-in-out;
}

@keyframes buttonShine {
  0% {
    box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    box-shadow: inset 0 0 20px 10px rgba(255, 255, 255, 0.2);
  }
  100% {
    box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

header:not(.scrolled) .cta-button:hover {
  border-color: var(--white);
  color: var(--white) !important;
}

header.scrolled .cta-button:hover {
  color: var(--primary) !important;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}

.menu-toggle span {
  width: 25px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}

header.scrolled .menu-toggle span {
  background: var(--dark);
}

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

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

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

.menu-toggle.active span {
  background: var(--primary);
}

/*--------------------------------------------------------------
# Common Utility Classes
--------------------------------------------------------------*/
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.section-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-subtitle {
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 15px;
}

.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 20px;
}

.section-desc {
  font-size: 18px;
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* Common Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
footer {
  background: var(--dark);
  color: var(--white);
  padding: 80px 0 40px;
}

.footer-grid {
  margin-bottom: 60px;
}

.footer-brand,
.footer-column {
  margin-bottom: 30px;
}

.footer-brand img {
  height: 40px;
  margin-bottom: 20px;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  margin-bottom: 30px;
  font-size: 14px;
}

.social-links {
  display: flex;
  gap: 15px;
}

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

.social-links a:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-3px);
  text-decoration: none;
}

.footer-column h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
}

.footer-column h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background: var(--primary);
}

.footer-column ul {
  list-style: none;
  padding-left: 0;
}

.footer-column ul li {
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.footer-column ul li i {
  margin-right: 10px;
  color: var(--primary);
}

.footer-column ul a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

.footer-column ul a:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 40px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

/*--------------------------------------------------------------
# Back to Top
--------------------------------------------------------------*/
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: 0 5px 20px rgba(0, 168, 89, 0.4);
  text-decoration: none;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--secondary);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 168, 89, 0.5);
  color: var(--white);
  text-decoration: none;
}

/*--------------------------------------------------------------
# Common Button Styles
--------------------------------------------------------------*/
.btn-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: var(--white) !important;
  font-weight: 600;
  padding: 12px 30px;
  transition: var(--transition);
}

.btn-primary:hover {
  background-color: var(--secondary) !important;
  border-color: var(--secondary) !important;
  color: var(--white) !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-outline-primary {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
  background-color: transparent !important;
  font-weight: 600;
  padding: 12px 30px;
}

.btn-outline-primary:hover {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: var(--white) !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 168, 89, 0.3);
}

/*--------------------------------------------------------------
# Responsive Design - Common
--------------------------------------------------------------*/
@media (max-width: 1260px) {
  .menu-toggle {
    display: flex;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--white);
    transition: right 0.4s ease;
    z-index: 999;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
  }

  nav.active {
    right: 0;
  }

  nav ul {
    flex-direction: column;
    padding: 80px 40px;
    gap: 30px;
  }

  nav a {
    color: var(--dark);
    font-size: 18px;
  }
}

@media (max-width: 768px) {

  .footer-column h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .social-links {
    justify-content: center;
  }
  
  .footer-brand,
  .footer-column {
    text-align: center;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0 20px;
  }

  .section-header {
    margin-bottom: 50px;
  }

  .section-title {
    font-size: 32px;
  }
}