/* Variables */
:root {
    --primary-color: #009944;
    --secondary-color: #6c757d;
    --accent-color: #00cc55;
    --dark-bg: #0c1117;
    --light-bg: #1a2230;
    --text-color: #aeb2b9;
    --heading-color: #e0e6ec;
    --border-color: #2e3a47;
    --container-width: 1200px;
    --header-height: 80px;
    --transition-speed: 0.3s ease-in-out;
}

/* Global Styles */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Open Sans', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    color: var(--text-color);
    background-color: var(--dark-bg);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}
body::before {
    content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><rect x="0" y="0" width="200" height="200" fill="none" /><circle cx="100" cy="100" r="80" fill-opacity="0.05" fill="%23009944" /><path d="M10 10 L190 10 L190 190 L10 190 Z" stroke="%23009944" stroke-width="0.5" fill="none" /></svg>');
    background-size: 200px 200px; opacity: 0.05; pointer-events: none; z-index: -1;
}
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }
h1, h2, h3, h4, h5, h6 { font-family: 'Montserrat', sans-serif; color: var(--heading-color); line-height: 1.2; margin-bottom: 1rem; }
a { color: var(--primary-color); text-decoration: none; transition: color var(--transition-speed); }
a:hover { color: var(--accent-color); }
ul { list-style: none; }
.btn {
    display: inline-block; padding: 12px 25px; border-radius: 5px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px; transition: all var(--transition-speed);
    border: 2px solid transparent; cursor: pointer;
}
.btn-primary { background-color: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.btn-primary:hover {
    background-color: transparent; color: var(--accent-color); border-color: var(--accent-color);
    transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0, 153, 68, 0.3);
}
.section { padding: 80px 0; position: relative; overflow: hidden; }
.section-title { font-size: 2.5rem; text-align: center; margin-bottom: 4rem; position: relative; display: inline-block; padding-bottom: 10px; }
.section-title::after { content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 80px; height: 3px; background-color: var(--primary-color); border-radius: 2px; }
.bg-light { background-color: var(--light-bg); }
.bg-dark { background-color: var(--dark-bg); }

/* Header & Logos */
.header { position: fixed; top: 0; left: 0; width: 100%; background-color: rgba(12, 17, 23, 0.9); padding: 15px 0; z-index: 1000; transition: background-color var(--transition-speed), box-shadow var(--transition-speed); }
.header.scrolled { background-color: var(--dark-bg); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); }
.header-container { display: flex; justify-content: space-between; align-items: center; }

.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: none !important;
    letter-spacing: 1px;
}

.main-nav .nav-list { display: flex; }
.main-nav .nav-list li { margin-left: 20px; }
.main-nav .nav-list a { color: var(--heading-color); font-weight: 600; font-size: 0.9rem; position: relative; }
.main-nav .nav-list a::after { content: ''; position: absolute; left: 0; bottom: -5px; width: 0; height: 2px; background-color: var(--primary-color); transition: width var(--transition-speed); }
.main-nav .nav-list a:hover::after, .main-nav .nav-list a.active::after { width: 100%; }

/* Language Switchers */
.lang-switch { font-size: 0.85rem; display: flex; align-items: center; margin-left: 20px; }
.lang-switch a { color: var(--text-color); transition: color 0.3s; }
.lang-switch a.active, .lang-switch a:hover { color: var(--accent-color); font-weight: bold; }
.lang-switch .divider { margin: 0 8px; color: var(--border-color); }
.lang-btn { cursor: pointer; font-weight: 400; }
.lang-btn.active { font-weight: 700; color: var(--primary-color) !important; }

/* スマホメニュー内の言語ボタンはPCでは非表示 */
.mobile-lang-switch { display: none; }

.hamburger-menu { display: none; flex-direction: column; cursor: pointer; width: 30px; height: 25px; justify-content: space-between; position: relative; z-index: 1001; }
.hamburger-menu .bar { width: 100%; height: 3px; background-color: var(--heading-color); transition: all var(--transition-speed); }
.hamburger-menu.active .bar:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.hamburger-menu.active .bar:nth-child(2) { opacity: 0; }
.hamburger-menu.active .bar:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

/* Hero */
.hero-section { position: relative; height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; background-color: var(--dark-bg); }
.hero-bg-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; background-repeat: no-repeat; background-size: cover; background-position: center center; opacity: 0.1; }
.hero-bg-layer.layer-1 { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M0 0 L100 0 L50 50 Z" fill="%23009944" fill-opacity="0.1"/></svg>'); background-size: 200px 200px; opacity: 0.05; z-index: 10; }
.hero-bg-layer.layer-2 { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" stroke="%23009944" stroke-width="1" fill="none" stroke-opacity="0.1"/></svg>'); background-size: 300px 300px; opacity: 0.08; z-index: 11; }
.hero-content { text-align: center; z-index: 15; color: #fff; position: relative; }
.hero-title { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 700; margin-bottom: 20px; }
.hero-subtitle { font-size: clamp(1rem, 2vw, 1.2rem); margin-bottom: 40px; max-width: 800px; margin-left: auto; margin-right: auto; }

/* Sections */
.about-section .content-wrapper { display: flex; align-items: center; gap: 50px; }
.about-image { flex: 1; min-width: 300px; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.about-image img { width: 100%; display: block; }
.about-content { flex: 1; }
.info-table { width: 100%; border-collapse: collapse; margin-top: 20px; background-color: var(--light-bg); border-radius: 8px; overflow: hidden; }
.info-table th, .info-table td { padding: 15px; border-bottom: 1px solid var(--border-color); text-align: left; }
.info-table th { background-color: var(--dark-bg); color: var(--primary-color); width: 30%; font-weight: 600; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.service-card { background-color: var(--dark-bg); padding: 30px; border-radius: 10px; text-align: center; box-shadow: 0 5px 15px rgba(0,0,0,0.2); transition: all var(--transition-speed); border: 1px solid var(--border-color); border-top: 4px solid var(--primary-color); }
.service-card:hover { transform: translateY(-10px) scale(1.02); border-color: var(--accent-color); }

/* 🌟 クルクル回る動きの復活 🌟 */
.service-card .icon { 
    font-size: 3rem; 
    color: var(--primary-color); 
    margin-bottom: 20px; 
    transition: transform var(--transition-speed); /* スムーズなアニメーション */
}
.service-card:hover .icon { 
    transform: rotateY(180deg); /* 180度クルッと回転 */
}

/* Carousel */
.product-carousel { position: relative; max-width: 1000px; margin: 0 auto; overflow: hidden; padding-bottom: 20px; }
.carousel-inner { display: flex; transition: transform 0.5s ease-in-out; }
.carousel-page { min-width: 100%; flex-shrink: 0; display: flex; gap: 20px; padding: 15px 5px 50px 5px; }
.carousel-item { flex: 1; text-align: center; background-color: var(--light-bg); border-radius: 10px; padding: 30px 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); border-top: 4px solid var(--primary-color); }
.maker-logo { width: 100%; max-width: 200px; height: 80px; object-fit: contain; display: block; margin: 0 auto 20px; background-color: #fff; border-radius: 5px; padding: 10px; }
.carousel-control { position: absolute; top: 50%; transform: translateY(-50%); background-color: rgba(0, 0, 0, 0.5); color: #fff; border: none; padding: 15px 10px; font-size: 1.5rem; cursor: pointer; z-index: 50; border-radius: 5px; }
.carousel-control.prev { left: 0; }
.carousel-control.next { right: 0; }
.carousel-indicators { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 50; }
.indicator { width: 12px; height: 12px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.4); cursor: pointer; }
.indicator.active { background-color: var(--primary-color); transform: scale(1.2); }

/* Contact Section (Half & Half layout) */
.contact-section .content-wrapper { display: flex; flex-wrap: wrap; gap: 50px; }
.contact-info, .contact-form { flex: 1; min-width: 300px; }
.contact-info ul { margin-top: 30px; }
.contact-info ul li { margin-bottom: 15px; font-size: 1.1rem; display: flex; align-items: center; }
.contact-info ul li i { color: var(--primary-color); margin-right: 15px; font-size: 1.3rem; }

/* Form Styles */
.custom-form { text-align: left; margin-top: 30px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--heading-color); font-weight: 600; font-size: 0.95rem; }
.form-group .required { color: #ff4d4f; margin-left: 4px; }
.custom-form input, .custom-form textarea { width: 100%; padding: 12px 15px; border: 1px solid var(--border-color); background-color: var(--dark-bg); color: var(--text-color); border-radius: 5px; font-family: inherit; font-size: 1rem; transition: border-color 0.3s, box-shadow 0.3s; }
.custom-form input:focus, .custom-form textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(0, 153, 68, 0.2); }

/* Footer */
.footer { background-color: #05080b; color: var(--text-color); padding-top: 60px; }
.footer-container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; padding-bottom: 40px; border-bottom: 1px solid var(--border-color); }
.footer-col h4 { color: var(--heading-color); margin-bottom: 20px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a:hover { color: var(--accent-color); }
.footer-bottom { text-align: center; padding: 20px 0; font-size: 0.85rem; }

/* Components & Animations */
.scroll-to-top-btn { position: fixed; bottom: 30px; right: 30px; background-color: var(--primary-color); color: #fff; border: none; border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; visibility: hidden; transition: 0.3s; z-index: 999; }
.scroll-to-top-btn.show { opacity: 1; visibility: visible; }
.animated { opacity: 0; transform: translateY(20px); transition: 0.6s ease-out; }
.animated.is-visible { opacity: 1; transform: translate(0, 0) scale(1); }

/* Responsive Styles */
@media (max-width: 992px) {
    .main-nav { position: fixed; top: 0; right: -300px; width: 280px; height: 100vh; background-color: var(--dark-bg); padding-top: var(--header-height); box-shadow: -5px 0 15px rgba(0, 0, 0, 0.4); transition: right 0.3s; z-index: 990; }
    .main-nav.active { right: 0; }
    .main-nav .nav-list { flex-direction: column; padding: 20px; }
    .main-nav .nav-list li { margin: 0; width: 100%; border-bottom: 1px solid var(--border-color); }
    .main-nav .nav-list a { display: block; padding: 15px 10px; }
    .hamburger-menu { display: flex; }
    .about-section .content-wrapper, .contact-section .content-wrapper { flex-direction: column; }
    .lang-switch { display: none !important; }
    .mobile-lang-switch { display: flex; justify-content: center; gap: 20px; padding: 30px 0; margin-top: auto; border-top: 1px solid var(--border-color); }
    .mobile-lang-switch .lang-btn { color: var(--heading-color); font-size: 1.1rem; background: var(--light-bg); padding: 8px 15px; border-radius: 5px; border: 1px solid var(--border-color); }
}
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .footer-container { flex-direction: column; text-align: center; }
    .carousel-page { flex-direction: column; }
}
